i use the urllib question

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Mon Dec 8 08:49:07 CET 2008


En Fri, 05 Dec 2008 10:23:44 -0200, Huytason <zevboy at gmail.com> escribió:

> i use pthon 3.0 today
>
> python code:
> import urllib.request
>
> then use PyRun_StringFlag to run it.
>
> get this <class "ImportError">
>
> it's a bug?

You should tell us more details. You are embedding Python, I presume?
The default search path (sys.path) is initialized based on the executable
location; very probably you don't have a 'lib' directory.
Either set the PYTHONPATH environment var, or copy the required libraries,
or call Py_SetProgramName.

-- 
Gabriel Genellina




More information about the Python-list mailing list