switch to interactive mode

N

nntpman68

Hi

I know about two ways to enter python interactive mode

1.) just start python

2.) run python -i pythonscript.py

What I am looking for is slightly different:

I'd like, that a python script can be started by just calling it
(clicking on it),


but that the script can decide to enter interactive mode if certain
conditions occur.

Is this possible?
 
J

JBW

I'd like, that a python script can be started by just calling it
(clicking on it),

but that the script can decide to enter interactive mode if certain
conditions occur.

Is this possible?

Don't know about the clicky-clicky part, but I've used code.interact to
do something similar.

JBW
 
M

Mike Driscoll

Hi

I know about two ways to enter python interactive mode

1.) just start python

2.) run python -i pythonscript.py

What I am looking for is slightly different:

I'd like, that a python script can be started by just calling it
(clicking on it),

but that the script can decide to enter interactive mode if certain
conditions occur.

Is this possible?

That sounds kind of like needing to embed the interpreter. I would
recommend looking into that. Wingware's Wing IDE has this feature
where you can run the program up a breakpoint and then use their
debugger to interact with the variables and objects and such.

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,955
Messages
2,570,117
Members
46,705
Latest member
v_darius

Latest Threads

Top