Differences between revisions 101 and 102
Revision 101 as of 2008-11-15 14:01:24
Size: 8842
Editor: localhost
Comment: converted to 1.6 markup
Revision 102 as of 2008-12-19 09:08:11
Size: 8913
Editor: 193
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:

  * [[How to solve problem when running python from command line?]]

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

  • 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.