'REPL' style IDE

B

beginner

Hi Everyone,

I am using the Wing IDE. It works great when developing applications,
but the workflow is like Visual Studio -- after you execute it or
debug it, the python script ends.

What I want is an interactive interpreting environment. I want the IDE
to execute a boot script to initialize my environment and create some
basic data objects. And then I want to be able to type in command on
the command line using these objects. The IDLE that comes with Python
does this, but compared with Wing, it does not have a lot of the
convenient features.

I am wondering if there is anything more powerful than IDLE that can
do this.

Thanks,
Geoffrey
 
B

beginner

Hi Everyone,

I am using the Wing IDE. It works great when developing applications,
but the workflow is like Visual Studio -- after you execute it or
debug it, the python script ends.

What I want is an interactive interpreting environment. I want the IDE
to execute a boot script to initialize my environment and create some
basic data objects. And then I want to be able to type in command on
the command line using these objects. The IDLE that comes with Python
does this, but compared with Wing, it does not have a lot of the
convenient features.

I am wondering if there is anything more powerful than IDLE that can
do this.

Thanks,
Geoffrey

If Wing could load my init script into a python session ONCE and then
run my code in another files MANY times, with or without the debugger,
without starting a new python session, that would be great.
 
J

JoeSox

Hi Everyone,

I am using the Wing IDE. It works great when developing applications,
but the workflow is like Visual Studio -- after you execute it or
debug it, the python script ends.

What I want is an interactive interpreting environment. I want the IDE
to execute a boot script to initialize my environment and create some
basic data objects. And then I want to be able to type in command on
the command line using these objects. The IDLE that comes with Python
does this, but compared with Wing, it does not have a lot of the
convenient features.

I am wondering if there is anything more powerful than IDLE that can
do this.

I use Wing IDE.
Place something like this on the bottom of your module you are debuging.
Place a stop point on the line you want then start your debug! Hope that helps.

def test():
c=MyClass
c.do_foobar()

if __name__ == '__main__':
test()
 
J

JoeSox

I use Wing IDE.
Place something like this on the bottom of your module you are debuging.
Place a stop point on the line you want then start your debug! Hope that helps.

def test():
c=MyClass
c.do_foobar()

if __name__ == '__main__':
test()

Just seeing if you all were paying attention :p

s/b...
c=MyClass()
 
B

beginner

I use Wing IDE.
Place something like this on the bottom of your module you are debuging.
Place a stop point on the line you want then start your debug! Hope that helps.

def test():
c=MyClass
c.do_foobar()

if __name__ == '__main__':
test()

Thanks for your help.

Yes, this is what I always do. However, I want more than debugging
interactively. I am trying to use the python interperter as a
programmable application. Once I run my boot script, the python
interpreter should have all the right objects and libraries, and the
end user (who obviously knows python) can simply type in a few
commands, calling my functions, to achieve his purposes
interactively.

What I am doing right now is almost exactly what you prescribed. I put
a 'pass' statement at the end of my boot script and set a breakpoint
on it, so that once the debugger stops on the breakpoint, the user can
start typing in commands in the Debug Probe window. But this is by no
means a nice set up.

Thanks,
Geoffrey
 
P

pyscottishguy

How about embedding ipython in your script with:

from IPython.Shell import IPShellEmbed

ipshell = IPShellEmbed()

** your set up code **

ipshell() # this call anywhere in your program will start IPython

see: http://ipython.scipy.org/doc/manual/node9.html#sec:embed

Here are some ipython tips: http://ipython.scipy.org/doc/manual/node4.html

Another option is to set up Wing so that it attaches to a process that
is started externally (http://wingware.com/doc/debug/importing-the-
debugger)

So... in one window you can run your code that sets up everything and
then displays the ipython CLI - and in the other window you have
WingIDE where you can set your breakpoints and use the GUI.

Is this what you're looking for?
 
D

Dick Moores

Hi Everyone,

I am using the Wing IDE. It works great when developing applications,
but the workflow is like Visual Studio -- after you execute it or
debug it, the python script ends.

What I want is an interactive interpreting environment. I want the IDE
to execute a boot script to initialize my environment and create some
basic data objects. And then I want to be able to type in command on
the command line using these objects. The IDLE that comes with Python
does this, but compared with Wing, it does not have a lot of the
convenient features.

I am wondering if there is anything more powerful than IDLE that can
do this.

Are you sure you can't do this with Wing? Have you asked support,
<[email protected]>?

Dick Moores



======================================
Bagdad Weather
<http://weather.yahoo.com/forecast/IZXX0008_f.html>
 

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

Similar Threads


Members online

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,007
Latest member
obedient dusk

Latest Threads

Top