views:

76

answers:

3

I have added a path to the system pythonpath on linux and now i've broken it. How may i remove it ?

[EDIT] Finally i solved it removing the script that added that path + installing something to rebuild the path.

A: 

not directly programming related but....

'print' your pythonpath to a file, edit the file and export that as your new pythonpath

[edit] I stand corrected, see Banang answer below [/edit]

KevinDTimm
+1  A: 

Read this.

Banang
A: 

I don't think there is a concept of Windows-like environment variables in Linux; they are defined in various scripts (e.g. .bashrc). You can edit those in any text editor.

What exactly did you to do "break" your PYTHONPATH?

katrielalex
I'm sorry, this is just not true: you may not set them in the control panel, but that doesn't mean they aren't environment variables.
Andrew Aylett
@Andrew Aylett: but am I right that there are no win32-ey magic variables floating around? I.e., that all variables in the shell are defined in a script somewhere?
katrielalex
A process (even in Windows) gets its environment from its parent process. Windows has a GUI to let you set what environment is defined by the session; I've not come across an equivalent for Linux (but it would be fairly easy to write). In general, yes, environment variables will be in shell scripts, but there's no reason why that has to be the case.
Andrew Aylett