Differences between revisions 107 and 108
Revision 107 as of 2009-02-23 03:55:47
Size: 9383
Editor: c-24-16-76-53
Comment: I figured it out. Was being stupid and forgot to install the VS2008 redist ><;
Revision 108 as of 2009-02-28 05:12:52
Size: 9639
Editor: 66-192-186-101
Comment: Embedding Python: Distribution Error
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:

  *Hi, I'm working with embedding Python into my applications. However, the Py_Initialize() is producing an " 'import site' failed " message on non-dev computers. I was wondering if there is a way to fix this or is it just a bug with Python? Thank you.

See Also: Asking for Help/Why doesn`t this work?

  • Hi, I'm working with embedding Python into my applications. However, the Py_Initialize() is producing an " 'import site' failed " message on non-dev computers. I was wondering if there is a way to fix this or is it just a bug with Python? Thank you.
  • Hi, im trying to run the IDLE but it wont go on. i have an R52 leptop with ibm-tools installed (there is ver 2.2 there but i changed it so it wont ebe the default one). im trying to run ver 2.6. Thank
  • Hi, I'm new to python and I am just working with the idle-shell. How can I write a script without having python executing orders immediately after I type them into the shell? Follow-Up question: Having written the script, how do I run it in the interpreter?
  • How to solve problem when running python from command line?

  • Hi, I just installed MacPython. Unfortunately it doesn't seem to include the CoreGraphics-Python Module. Where ist my old system python? How can I uninstall MacPython?

  • Hi, I am new to Python from Java background, I have following structure
    • /root
              /folder1
                      Class1.py
                      Class2.py
              /folder2
                      Class3.py
      I am in the folder2 and want to run class3.py but it need to import a module from Class1.py Could someone please help me?
  • I believe you just need to add folder1 to your path variable. Should be something along the lines of: import sys; sys.path.append('/root/folder1'); import Class1 (with ; replaced by newlines). If that doesn't work, look through the documentation for info on how the sys.path variable works--I may just have the syntax slightly off
  • Is there any way to get the environment from a subprocess.Popen created by python? In other words, if the new process updates it's environment, is it possible to get access to the modifications. For example In my case I'm executing MS Visual Studio's vsvars32.bat file and would like to access the modified PATH environment variable.

No, it is doing what you told it to do. To realize this you must know that arguments are evaluated before they are passed to the functions. But what is the value of "\g<1>".replace(",", "|")? "\g<1>", of course, as there are no commas to replace in "\g<1>". re.sub therefore receives '"([^"]*)"' and "\g<1>" as arguments, which is the exact equivalent of the first call.

Answered (fully or partially)


CategoryFaq

Asking for Help (last edited 2019-11-04 14:47:35 by ChrisM)

Unable to edit the page? See the FrontPage for instructions.