473,395 Members | 1,441 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

How does IPython modify the sys.path?

Hello all:

I installed IPython on my XP machine today and find that my sys.path
has been changed
as follows:
>import sys
print sys.path
['',
'C:\\Program Files\\Python24\\scripts',
'C:\\WINDOWS\\system32\\python24.zip',
'C:\\Documents and Settings\\Daniel\\Desktop',
'C:\\Program Files\\Python24\\DLLs',
'C:\\Program Files\\Python24\\lib',
'C:\\Program Files\\Python24\\lib\\plat-win',
'C:\\Program Files\\Python24\\lib\\lib-tk',
'C:\\Program Files\\Python24',
'C:\\Program Files\\Python24\\lib\\site-packages',
'C:\\Program Files\\Python24\\lib\\site-packages\\PIL',
'C:\\Program Files\\Python24\\lib\\site-packages\\win32',
'C:\\Program Files\\Python24\\lib\\site-packages\\win32\\lib',
'C:\\Program Files\\Python24\\lib\\site-packages\\Pythonwin',
'C:\\Program Files\\Python24\\lib\\site-packages\\wx-2.6-msw-ansi',
'C:\\Program Files\\Python24\\lib\\site-packages\\reportlab_2_0',
'C:\\Program Files\\Python24\\lib\\site-packages\\IPython/Extensions',
'C:\\Documents and Settings\\Daniel\\_ipython']
Obviously, IPython changed my sys.path and added an entry in the end as
"C:\\Documents and Settings\\Daniel\\_ipython'"
However, I cannot figure out how IPython can change my sys.path.

I refer to all the following sources
1http://www.python.org/doc/current/inst/search-path.html Installing
Python Modules
2KEY_LOCAL_MACHINE\Software\Python\PythonCore\2.4\ PythonPath
3My machine has no environment variable "PYTHONPATH"
4There is no *.pth file under
C:\Program Files\Python24\Lib\site-packages
that contains that information (i.e. C:\\Documents and
Settings\\Daniel\\_ipython)
So how dos IPython modify my sys.path without trace???

Thank you very much!
-Daniel

Sep 22 '06 #1
2 4764
Daniel Mark wrote:
So how dos IPython modify my sys.path without trace???
sys.path.append()

Specifically, line 321 of ipmaker.py

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco

Sep 22 '06 #2
Daniel Mark wrote:
However, I cannot figure out how IPython can change my sys.path.

I refer to all the following sources
1http://www.python.org/doc/current/inst/search-path.html Installing
Python Modules
2KEY_LOCAL_MACHINE\Software\Python\PythonCore\2.4\ PythonPath
3My machine has no environment variable "PYTHONPATH"
4There is no *.pth file under
C:\Program Files\Python24\Lib\site-packages
that contains that information (i.e. C:\\Documents and
Settings\\Daniel\\_ipython)
did you look up sys.path in the documentation ?

A list of strings that specifies the search path for modules.
Initialized from the environment variable PYTHONPATH, plus an
installation-dependent default. /.../

A program is free to modify this list for its own purposes.

http://pyref.infogami.com/sys.path

</F>

Sep 22 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Yaroslav Bulatov | last post by:
> Hi, > > Equis Uno wrote: > > > I use meta-x shell to start a shell and then once I see a shell > > prompt I enter the python command and I get a well-behaved python > > shell inside of emacs....
1
by: Ismael Herrera | last post by:
Hi,i wonder if there is an editor or ide that has similar dinamic instrospection features as ipython? ,since i have failed to find one, i spend more time coding in ipython than in my editor. ...
0
by: Fernando Perez | last post by:
Hi all, The IPython team is happy to release version 0.7.2, with a lot of new enhancements, as well as many bug fixes. We hope you all enjoy it, and please report any problems as usual. ...
4
by: Daniel Mark | last post by:
Hello all: I have found a useful module in IPython, named 'from IPython.ipstruct import Struct". So I can use it as follows: #################################### from IPython.ipstruct...
5
by: Lou Pecora | last post by:
I installed the SciPy superpackage and have pylab, matplotlib, scipy, and numpy apparently running well. But I want to use matplotlib/pylab interactively. The instructions suggest doing this in...
0
by: Ville Vainio | last post by:
Hi all, The IPython team is happy to release version 0.7.3, with a lot of new enhancements, as well as many bug fixes (including full Python 2.5 support). We hope you all enjoy it, and please...
1
by: Karlo Lozovina | last post by:
Based on the idea from 'Open Command Window Here' utility from MS - add a context menu item, which allows you to open IPython in selected directory. ---cut-here--- Windows Registry Editor...
0
by: Marko Bozikovic | last post by:
Hi all, I have a small problem with IPython shell on Windows. If I run 'python C:\python\scripts\ipython -p pysh' from cmd.exe or directly from Run dialog, I don't get any output from 'shell'...
2
by: David Sanders | last post by:
Hi, I have a script with function definitions which I load into ipython for interactive use. These functions modify a global numpy array, whose size I need to be able to change interactively. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.