Re: [gDesklets] Http Proxy
- From: "Mario Gonzalez" <gonzalemario gmail com>
- To: "Bjoern Koch" <H Humpel gmx de>
- Cc: gDesklets <gdesklets-list gnome org>
- Subject: Re: [gDesklets] Http Proxy
- Date: Mon, 3 Dec 2007 10:18:14 -0300
On 02/12/2007, Bjoern Koch <H Humpel gmx de> wrote:
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> NameError: name 'export' is not defined
> >>> export HTTP_PROXY=127.0.0.1:1080
> File "<stdin>", line 1
> export HTTP_PROXY=127.0.0.1:1080
> ^
> SyntaxError: invalid syntax
> -------
>
If you want to use an environment variable you've got to do something like:
# (this file will named test.py)
import os
print os.environ["HELLO"]
And in the terminal for testing purposes you can do
mario localhost:~$ HELLO="Hello world" python test.py
Hello world
Regards.
> But I am neither a python nor a bash guru ;).
>
> Hope I am not too wrong and that I could help...
>
--
http://www.advogato.org/person/mgonzalez/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]