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

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <prvs=062185773=jeanmichel@sequans.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.022
X-Spam-Evidence '*H*': 0.96; '*S*': 0.00; 'debugging': 0.07; 'subject:code': 0.07; 'debugger': 0.09; 'scripting': 0.09; 'subject:using': 0.09; 'unhandled': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'exceptions,': 0.16; 'subject: \n ': 0.16; 'subject:program': 0.16; 'suggestion.': 0.16; 'subject:python': 0.16; 'cc:addr:python.org': 0.22; 'commands,': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'first,': 0.26; 'switch': 0.26; 'task': 0.26; 'second': 0.26; 'post': 0.26; 'defined': 0.27; 'header:In-Reply-To:1': 0.27; 'jean': 0.31; '-----': 0.33; 'thank': 0.38; 'either': 0.39; 'further': 0.61; 'you.': 0.62; 'making': 0.63; 'information': 0.63; 'received:194': 0.64; 'notice:': 0.67; 'person,': 0.68; 'privileged.': 0.69; 'disclose': 0.74; 'walk': 0.74; 'experiment': 0.84; 'subject:commands': 0.84; 'medium.': 0.91
X-IronPort-AV E=Sophos;i="4.95,536,1384297200"; d="scan'208";a="2271740"
X-Virus-Scanned amavisd-new at zimbra.sequans.com
Date Mon, 23 Dec 2013 13:24:57 +0100 (CET)
From Jean-Michel Pichavant <jeanmichel@sequans.com>
To Christian Gollwitzer <auriocus@gmx.de>
In-Reply-To <l8u6vv$iuj$1@dont-email.me>
Subject Re: how to develop code using a mix of an existing python-program and console-commands
MIME-Version 1.0
X-Mailer Zimbra 7.2.4_GA_2900 (ZimbraWebClient - GC31 (Win)/7.2.4_GA_2900)
Content-Type text/plain; charset="utf-8"
Content-Transfer-Encoding base64
Cc python-list@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.4549.1387801505.18130.python-list@python.org> (permalink)
Lines 17
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1387801505 news.xs4all.nl 2970 [2001:888:2000:d::a6]:49755
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:62619

Show key headers only | 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