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


Groups > comp.lang.python > #62619

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

Date 2013-12-23 13:24 +0100
From Jean-Michel Pichavant <jeanmichel@sequans.com>
Subject Re: how to develop code using a mix of an existing python-program and console-commands
Newsgroups comp.lang.python
Message-ID <mailman.4549.1387801505.18130.python-list@python.org> (permalink)

Show all headers | View raw


----- Original Message -----
> 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

I second his suggestion. Additionally, 

%pdb
%run myfile.py

will automatically call the ipython debugger on unhandled exceptions, making post mortem debugging a walk in a park.

JM


-- IMPORTANT NOTICE: 

The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

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


Thread

Re: how to develop code using a mix of an existing python-program and console-commands Jean-Michel Pichavant <jeanmichel@sequans.com> - 2013-12-23 13:24 +0100

csiph-web