473,324 Members | 2,400 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

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

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.

Marcus.

Aug 5 '05 #1
3 1555

<ma***********@cyantechnology.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.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.

TJR

Aug 5 '05 #2
Terry Reedy wrote:
<ma***********@cyantechnology.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.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
Aug 5 '05 #3
Reinhold Birkenfeld <re************************@wolke7.net> writes:
Terry Reedy wrote:
<ma***********@cyantechnology.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.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'.


I would say that "import site failed" means that something is wrong.
The '-v' flag helps to find out what and why. The PYTHONVERBOSE
environment variable does the same.

Thomas
Aug 6 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Sofia | last post by:
My name is Sofia and I have for many years been running a personals site, together with my partner, on a non-profit basis. The site is currently not running due to us emigrating, but during its...
6
by: Robert Maas, see http://tinyurl.com/uh3t | last post by:
System login message says PHP is available, so I tried this: http://www.rawbw.com/~rem/HelloPlus/h.php It doesn't work at all. Browser just shows the source. What am I doing wrong?
3
by: sancha | last post by:
Hi, I need to promt the user when he moves away from the page by clicking an of the links available on the page. I was trying to use the onbeforeunload function but it seems it is a jScript...
4
by: Marquisha | last post by:
If this is off-topic, please forgive me. But I thought this might be the perfect spot to get some advice about how to proceed with a project. Working on a Web site design for a nonprofit...
1
by: Celia Oblinger | last post by:
Please understand that I am not asking HOW to do something - but, rather, I just need some advise on what "technology" or method I should employ... The problem is this: I have a client for...
15
by: Cheryl Langdon | last post by:
Hello everyone, This is my first attempt at getting help in this manner. Please forgive me if this is an inappropriate request. I suddenly find myself in urgent need of instruction on how to...
13
by: Alan Silver | last post by:
Hello, I finally got around to buying a 2nd hand Mac, so I can test pages in the Mac-only browsers. It has IE5.2, although that hangs up every time I try to start it up, so I guess I won't be...
3
by: hazly | last post by:
I'm very new in the web technology and need advice on search engine. I want to develop a portal using PHP and MySQL on Linux. Need to know on the following features : 1. search engine that could...
8
by: john | last post by:
To test a new piece of software designed to help with (among other things) eCommerce WWW site development. The software is fairly easy to use but you must fit a profile. Retail price is 120 GBP and...
20
by: mike | last post by:
I help manage a large web site, one that has over 600 html pages... It's a reference site for ham radio folks and as an example, one page indexes over 1.8 gb of on-line PDF documents. The site...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.