The code version of python -i <filename>

Abdur-Rahmaan Janhangeer arj.python at gmail.com
Wed Sep 15 09:39:06 EDT 2021


Greetings,

If i have a file name flower.py and i add x = 1 in it.
When i run python -i flower.py i get a shell
>>>

If type x i get 1
>>> x
1

The values are auto injected.

How do i start a shell by code with values already injected? Thanks

Kind Regards,

Abdur-Rahmaan Janhangeer
about <https://compileralchemy.github.io/> | blog
<https://www.pythonkitchen.com>
github <https://github.com/Abdur-RahmaanJ>
Mauritius


More information about the Python-list mailing list