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


Groups > comp.lang.python > #12669 > unrolled thread

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

Started by"Gabriel Genellina" <gagsl-py2@yahoo.com.ar>
First post2011-09-02 17:06 -0300
Last post2011-09-02 17:06 -0300
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

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

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

From"Gabriel Genellina" <gagsl-py2@yahoo.com.ar>
Date2011-09-02 17:06 -0300
SubjectRe: Invoking profile from command line prevent my sys.path modification
Message-ID<mailman.717.1314993990.27778.python-list@python.org>
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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web