471,353 Members | 1,629 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,353 software developers and data experts.

'REPL' style IDE

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

Aug 20 '07 #1
8 1126
On Aug 20, 12:50 pm, beginner <zyzhu2...@gmail.comwrote:
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.

Aug 20 '07 #2
python-mode in Emacs.

Aug 20 '07 #3
On 8/20/07, beginner <zy*******@gmail.comwrote:
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()
--
Later, Joe
Aug 20 '07 #4
On 8/20/07, JoeSox <jo****@gmail.comwrote:
On 8/20/07, beginner <zy*******@gmail.comwrote:
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()
Just seeing if you all were paying attention :P

s/b...
c=MyClass()

--
Later, Joe
Aug 20 '07 #5
On Aug 20, 2:51 pm, JoeSox <joe...@gmail.comwrote:
On 8/20/07, beginner <zyzhu2...@gmail.comwrote:
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()
--
Later, Joe
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

Aug 20 '07 #6
On Aug 20, 2:39 pm, Jeff <jeffo...@gmail.comwrote:
python-mode in Emacs.
Yeah, but I don't know anything about Emacs and as far as I know it is
pretty complicated.

Aug 20 '07 #7
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/...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?
Aug 21 '07 #8
At 10:50 AM 8/20/2007, beginner wrote:
>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,
<su*****@wingware.com>?

Dick Moores

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

Aug 22 '07 #9

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by macgyver | last post: by
3 posts views Thread by Fabian | last post: by
6 posts views Thread by rongchaua | last post: by
3 posts views Thread by Matthew Fitzgibbons | last post: by
reply views Thread by Matthew Fitzgibbons | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.