'REPL' style IDE - Python
This is a discussion on 'REPL' style IDE - Python ; 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 ...
-
'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
-
Re: 'REPL' style IDE
On Aug 20, 12:50 pm, beginner <zyzhu2...> 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.
>
> 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.
-
Re: 'REPL' style IDE
-
Re: 'REPL' style IDE
On 8/20/07, beginner <zyzhu2000> 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.
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
-
Re: 'REPL' style IDE
On 8/20/07, JoeSox <joesox> wrote:
> On 8/20/07, beginner <zyzhu2000> 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.
>
> 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
-
Re: 'REPL' style IDE
On Aug 20, 2:51 pm, JoeSox <joe...> wrote:
> On 8/20/07, beginner <zyzhu2...> 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.
>
> 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
-
Re: 'REPL' style IDE
On Aug 20, 2:39 pm, Jeff <jeffo...> wrote:
> python-mode in Emacs.
Yeah, but I don't know anything about Emacs and as far as I know it is
pretty complicated.
-
Re: 'REPL' style IDE
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?
-
Re: 'REPL' style IDE
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,
<support@wingware.com>?
Dick Moores
======================================
Bagdad Weather
<http://weather.yahoo.com/forecast/IZXX0008_f.html>
Similar Threads
-
By Application Development in forum RUBY
Replies: 7
Last Post: 11-29-2007, 04:36 PM
-
By Application Development in forum lisp
Replies: 7
Last Post: 10-16-2007, 07:35 PM
-
By Application Development in forum lisp
Replies: 14
Last Post: 10-07-2007, 04:19 PM
-
By Application Development in forum DOTNET
Replies: 1
Last Post: 08-20-2007, 10:40 AM
-
By Application Development in forum lisp
Replies: 32
Last Post: 08-09-2007, 04:43 AM