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


Groups > comp.lang.python > #12669

Re: Invoking profile from command line prevent my sys.path modification

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.005
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'beginner': 0.04; 'run,': 0.07; 'variable,': 0.07; 'python': 0.08; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:80.91.229.12': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:lo.gmane.org': 0.09; 'escribi\xc3\xb3:': 0.16; 'from:addr:yahoo.com.ar': 0.16; "isn't.": 0.16; 'subject: \n ': 0.16; 'subject:command': 0.16; 'question.': 0.16; 'session.': 0.18; 'file,': 0.21; 'work,': 0.23; 'module,': 0.23; 'path,': 0.23; 'sep': 0.23; 'code': 0.25; 'saying': 0.26; 'fine': 0.26; 'thu,': 0.28; 'environment': 0.29; "won't": 0.29; 'to:addr:python- list': 0.33; 'that,': 0.33; 'header:User-Agent:1': 0.34; 'header:X -Complaints-To:1': 0.35; 'supposed': 0.35; 'url:python': 0.36; 'doing': 0.36; 'but': 0.37; 'received:org': 0.38; 'url:org': 0.38; 'subject:: ': 0.39; 'url:docs': 0.39; 'header:Mime-Version:1': 0.39; 'absolute': 0.39; 'to:addr:python.org': 0.39; 'subject:from': 0.40; 'url:index': 0.61; 'order': 0.62; 'profile': 0.72; 'subject:line': 0.73; 'received:190': 0.76; '-0300,': 0.84; 'genellina': 0.84; 'profiling': 0.84; 'url:install': 0.84; 'gabriel': 0.91
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From "Gabriel Genellina" <gagsl-py2@yahoo.com.ar>
Subject Re: Invoking profile from command line prevent my sys.path modification
Date Fri, 02 Sep 2011 17:06:57 -0300
References <CAFEUn8YAG5P92XTHaubMuX_NFG0b28+yhFkR3yf2QxQ4u5gFpQ@mail.gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed; delsp=yes
Content-Transfer-Encoding 8bit
X-Gmane-NNTP-Posting-Host 190.2.4.25
User-Agent Opera Mail/11.51 (Win32)
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.717.1314993990.27778.python-list@python.org> (permalink)
Lines 21
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1314993990 news.xs4all.nl 2406 [2001:888:2000:d::a6]:38763
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:12669

Show key headers only | View raw


En Thu, 01 Sep 2011 07:51:43 -0300, Yaşar Arabacı <yasar11732@gmail.com>  
escribió:

> I am new to profile module, so I am sorry if this is an absolute beginner
> question. In order to my code to run, I need to add a directory to  
> sys.path.
> When I invole python -m profile myfile.py, my code won't work, saying  
> that
> the thing that is supposed to be in path, isn't. Code works fine without
> profiling. Profiling works if I write it into the file, but I don't  
> prefer
> doing that, if that is possible.

You may set the PYTHONPATH environment variable, just for the profiling  
session.

http://docs.python.org/install/index.html#modifying-python-s-search-path

-- 
Gabriel Genellina

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


Thread

Re: Invoking profile from command line prevent my sys.path modification "Gabriel Genellina" <gagsl-py2@yahoo.com.ar> - 2011-09-02 17:06 -0300

csiph-web