Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #62382

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

From Mark Lawrence <breamoreboy@yahoo.co.uk>
Subject Re: how to develop code using a mix of an existing python-program and console-commands
Date 2013-12-19 07:33 +0000
References <7fb59330-6de2-4ea9-923e-7845de22df1e@googlegroups.com> <l8u6vv$iuj$1@dont-email.me>
Newsgroups comp.lang.python
Message-ID <mailman.4402.1387438431.18130.python-list@python.org> (permalink)

Show all headers | View raw


On 19/12/2013 07:24, Christian Gollwitzer wrote:
> Am 18.12.13 21:17, schrieb Jean Dubois:
>> 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.
>
> Excellent way to use/debug a scripting langugage. Use ipython, and then
> either
>
> %run myfile.py
>
> or
>
> execfile('myfile.py')
>
> You can do this multiple times, where the new definitions overwrite the
> old ones. In any case, ipython is much more friendly to use at the
> command prompt than plain python.
>
>      Christian
>

execfile is Python 2 only.

-- 
My fellow Pythonistas, ask not what our language can do for you, ask 
what you can do for our language.

Mark Lawrence

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

how to develop code using a mix of an existing python-program and console-commands Jean Dubois <jeandubois314@gmail.com> - 2013-12-18 12:17 -0800
  Re: how to develop code using a mix of an existing python-program and console-commands Joel Goldstick <joel.goldstick@gmail.com> - 2013-12-18 15:25 -0500
  Re: how to develop code using a mix of an existing python-program and console-commands Jerry Hill <malaclypse2@gmail.com> - 2013-12-18 15:28 -0500
    Re: how to develop code using a mix of an existing python-program and console-commands Jean Dubois <jeandubois314@gmail.com> - 2013-12-18 19:16 -0800
  Re: how to develop code using a mix of an existing python-program and console-commands Joel Goldstick <joel.goldstick@gmail.com> - 2013-12-18 15:29 -0500
  Re: how to develop code using a mix of an existing python-program and console-commands Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-12-18 20:52 +0000
  Re: how to develop code using a mix of an existing python-program and console-commands Terry Reedy <tjreedy@udel.edu> - 2013-12-18 17:02 -0500
  Re: how to develop code using a mix of an existing python-program and console-commands Christian Gollwitzer <auriocus@gmx.de> - 2013-12-19 08:24 +0100
    Re: how to develop code using a mix of an existing python-program and console-commands Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-12-19 07:33 +0000

csiph-web