'REPL' style IDE

Discussion in 'Python' started by beginner, Aug 20, 2007.

  1. beginner

    beginner Guest

    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
    beginner, Aug 20, 2007
    #1
    1. Advertising

  2. beginner

    beginner Guest

    On Aug 20, 12:50 pm, 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.
    >
    > 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.
    beginner, Aug 20, 2007
    #2
    1. Advertising

  3. beginner

    Jeff Guest

    python-mode in Emacs.
    Jeff, Aug 20, 2007
    #3
  4. beginner

    JoeSox Guest

    On 8/20/07, 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.


    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
    JoeSox, Aug 20, 2007
    #4
  5. beginner

    JoeSox Guest

    On 8/20/07, JoeSox <> wrote:
    > On 8/20/07, 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.

    >
    > 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
    JoeSox, Aug 20, 2007
    #5
  6. beginner

    beginner Guest

    On Aug 20, 2:51 pm, JoeSox <> wrote:
    > On 8/20/07, 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.

    >
    > 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
    beginner, Aug 20, 2007
    #6
  7. beginner

    beginner Guest

    On Aug 20, 2:39 pm, Jeff <> wrote:
    > python-mode in Emacs.


    Yeah, but I don't know anything about Emacs and as far as I know it is
    pretty complicated.
    beginner, Aug 20, 2007
    #7
  8. beginner

    Guest

    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?
    , Aug 21, 2007
    #8
  9. beginner

    Dick Moores Guest

    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,
    <>?

    Dick Moores



    ======================================
    Bagdad Weather
    <http://weather.yahoo.com/forecast/IZXX0008_f.html>
    Dick Moores, Aug 22, 2007
    #9
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matthew Fitzgibbons

    Programmatically exit the REPL

    Matthew Fitzgibbons, Aug 26, 2008, in forum: Python
    Replies:
    3
    Views:
    377
    Matthew Fitzgibbons
    Aug 26, 2008
  2. Brendan Miller

    starting repl programmatically

    Brendan Miller, May 21, 2010, in forum: Python
    Replies:
    2
    Views:
    248
    Patrick Maupin
    May 21, 2010
  3. Marc Feeley
    Replies:
    0
    Views:
    381
    Marc Feeley
    May 19, 2011
  4. Shalev NessAiver

    Building a REPL for Ruby

    Shalev NessAiver, Aug 15, 2005, in forum: Ruby
    Replies:
    18
    Views:
    466
    Ben Giddings
    Aug 17, 2005
  5. S. Robert James

    Using irb as a REPL

    S. Robert James, Nov 19, 2007, in forum: Ruby
    Replies:
    7
    Views:
    80
    Joel VanderWerf
    Nov 29, 2007
Loading...

Share This Page