how to develop code using a mix of an existing python-program and console-commands

Joel Goldstick joel.goldstick at gmail.com
Wed Dec 18 15:29:45 EST 2013


On Wed, Dec 18, 2013 at 3:28 PM, Jerry Hill <malaclypse2 at gmail.com> wrote:

> On Wed, Dec 18, 2013 at 3:17 PM, Jean Dubois <jeandubois314 at gmail.com>
> wrote:
> > I have a python-program which I want to perform its task first, then
> > switch to
> > the python console to experiment with further commands, using what was
> > already
> > defined in the python-program.
> > I want this as an alternative for what I do now (but which is not very
> > efficient):
> > I start the python-console and then manually copy-paste line per line
> from
> > the program in the console, then try out possible continuation commands,
> > if however something goes wrong I have to redo the whole process.
>
> On the command line, python itself can take command line options,
> including one that does exactly what you're looking for.
>
> python -i script.py
>
> That command will run script.py to its end, then drop you into the
> interactive interpreter with the environment intact from running the
> script.
>
> --
> Jerry
> --
> https://mail.python.org/mailman/listinfo/python-list
>

Wow, Jerry, I didn't know that one.  Cool

-- 
Joel Goldstick
http://joelgoldstick.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20131218/103e2803/attachment.html>


More information about the Python-list mailing list