Re: The code version of python -i

2021-09-19 Thread Abdur-Rahmaan Janhangeer
Oh thanks a lot, i was way from list this week Just a note: it's pretty amazing to have at Chris Angelico at your local PUG Else, Well, let's say you have a lib that you need to provide users with a shell for them to try out functions, no need to translate functions to cli args. Like Django pro

Re: The code version of python -i

2021-09-16 Thread dn via Python-list
Abdur-Rahmaan, Apologies for delay: several last-minute tasks were landed on me, so I haven't been able to 'read the list' since last week. > 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 value

Re: The code version of python -i

2021-09-15 Thread Abdur-Rahmaan Janhangeer
Thanks folks will update with progress soon > -- https://mail.python.org/mailman/listinfo/python-list

Re: The code version of python -i

2021-09-15 Thread Dennis Lee Bieber
On Wed, 15 Sep 2021 16:08:32 +0200, Peter Otten <__pete...@web.de> declaimed the following: > >I tried > >import code > >x = 42 >code.interact(local=globals()) > >but didn't bother to read the documentation at > >https://docs.python.org/3/library/code.html > >and thus do not know what the limitati

Re: The code version of python -i

2021-09-15 Thread Peter Otten
On 15/09/2021 15:39, Abdur-Rahmaan Janhangeer wrote: 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 Kin

The code version of python -i

2021-09-15 Thread Abdur-Rahmaan Janhangeer
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