Do I need to have site.py available or not ?

Reinhold Birkenfeld reinhold-birkenfeld-nospam at wolke7.net
Fri Aug 5 16:56:52 EDT 2005


Terry Reedy wrote:
> <marcus.obrien at cyantechnology.com> wrote in message 
> news:1123257409.099201.114960 at g49g2000cwa.googlegroups.com...
>> Hi,
>> on startup my embedded python comes up with "import site failed use
>> -v". Later python crashes on Pyrun_file(). This is the first time I
>> have used python and I would like to know does it require site.py to be
>> read in, and has anyone got an idea how to pass in the -v without using
>> the python -v command, ie the embedded way. Thanks very much.
> 
> If by embedded you mean embedded in a C/C++ program, I would look to the 
> doc for the C API function that you use to start it up to see whether there 
> is a way to pass in argv flags or to have the same effect.

Also note that '-v' doesn't do what you want here, it merely activates verbose
mode so that you can find the cause for above error. You want '-S'.

Reinhold



More information about the Python-list mailing list