0

The title maybe a little bit confusing, I will explain it.

I am using opensuse. Usually I work in a shell like this:
$vim test.py
$python test.py
>>>running...
>>>running...
>>>running...
>>>running...
$

Here the program end, but I cannot make further change nor access to the variable. I know I can do this:
$python
>>>
then paste the python code on it and it will run

But it is quite troublesome to open 2 shell and copy and paste...
Can anyone suggest a better method?

Thanks

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by gunbuster363
0

You should run

$ python -i test.py

It runs your program, then starts the interactive python shell. You should also have a look at python -h.

Edited by Gribouillis: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.