Can't print Chinese to HTTP
Gnarlodious
gnarlodious at gmail.com
Mon Nov 30 22:24:54 EST 2009
> you probably need to change the encoding of sys.stdout
>>> sys.stdout.encoding
'UTF-8'
>> #!/usr/bin/python
> do you know what python version, exactly, that gets called by this
hashbang?
Verified in HTTP:
>>> print(sys.version)
3.1.1
Is is possible modules are getting loaded from my old Python?
I symlinked to the new Python, and no I do not want to roll it back
because it is work (meaning I would have to type "sudo").
ls /usr/bin/python
lrwxr-xr-x 1 root wheel 63 Nov 20 21:24 /usr/bin/python -> /Library/
Frameworks/Python.framework/Versions/3.1/bin/python3.1
Ugh, I have not been able to program in 11 days.
Now I remember doing it that way because I could not figure out how to
get Apache to find the new Python.
ls /usr/local/bin/python3.1
lrwxr-xr-x 1 root wheel 71 Nov 20 08:19 /usr/local/bin/python3.1 -
> ../../../Library/Frameworks/Python.framework/Versions/3.1/bin/
python3.1
So they are both pointing to the same Python.
And yes, I would prefer easier http scripting, but don't know one.
-- Gnarlie
More information about the Python-list
mailing list