Asking for Help
See the Community page for a selection of related resources.
For those of you willing to wait, and to add to the archive of problems (and solutions), enter your question in the list below. For longer questions, consider adding a new page using the button just below: write a short version of the question in the box - this will be the page name - and then write the actual question or problem description in the page editor that appears after pressing the button.
The page will be automatically added to the longer questions section below.
- ssl-1.14.tar.gz exists and supposedly works with Python 2.5x. Assuming I have Visual Studio .NET 2003 available on my box, how do I build the package for Windows. It currently complains about a series of openssl *.h files that aren't available. I can drag in openssl for www.openssl.org, but which version, if that is applicable, and how do I connect the two either in a directory structure or appropriate configuration files?
- 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.
- I'm 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
- 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?
- 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.
- Is there any way to determine if the C implementation under my Python uses IEEE 754 for floating point numbers? If yes, what is it?
- I am trying to run Python script in ABAQUS, but there is a error "Import Error: No Module named " Tkinter"". So how can I handle the problem? Thanks
- I am new at python, I have python 2.5 and every time i open the shell python resets my moniter to 800x600. How do I keep python from messing with my monitor settings? -Travis
Pages containing longer questions should appear in this list:
Answered (fully or partially)
Related question to the for-a-blink question in the answered section. When running os.system(some command) the CMD.exe window pops up and then terminates when the process terminates. How do I get the contents of what was in that CMD.exe window saved someplace - variable, file, etc. Variable assignment doesn't work - only the exit code is in the variable.
- Seems to me you need to redirect the stdout. As per Python Library Reference 6.1.5., this is impossible for os.system() calls.
- Does anyone know why msOffice products (using win32com return) u'dana\u2019s best' rather than u'dana's best'?
Microsoft Office replaces apostrophes (U+0027) with "Right Single Quotation Marks" (U+2019) automatically. While this looks correct typograpphically, it might cause some problems. -- IanBollinger
I would recommend learning Python on a normal desktop system, with a recent version, a full suite of libraries, and IPython (Interactive Python) installed. After you've learned the basics then you can probably adapt more readily to the limitations of the Palm Pilot interface, implementation, version (older), and libraries (reduced subset). JimD
- How do you save python code and use it for anything? --elpenmaster
Save it as "scriptName.py" and then execute it with the Python interpreter. As for choosing a purpose for the code, that's entirely up to you. -- PeytonMcCullough
- How do I save it as scriptname.py? --elpenmaster
- - it is possible to enter python commands into a text file, rather than entering them directly into the python shell. Simply create a text file containing your python instructions and save it as scriptname.py, you can then import it into a python shell session or execute it directly.
- How do I save it as scriptname.py? --elpenmaster
- How do I publish Python modules?
lwickjr: My question, "my" page. I created that page, empty, in hopes that someone would populate it. They have, and I've read it. They hadn`t yet when I created *this* page for posting how-to questions, at about the same time, so I included the question here in the seed page. See the attachments to my page for my final solution to the problem. By the way, "How to publish Python modules" has been renamed "PublishingPythonModules", to be more Wiki-style. [Me, again.] 2005-11-24.
i got winxp. i make a simple program like print "hello". i save it as whatever.py. then i double-click it. nothing happens just the windows cmd appears for a blink. Additionally you can go to Start -> Run, type 'cmd', and hit enter. Now cd to your foo.py file, and execute it.
- The Windows command window appears "for a blink" to show the output ("hello") before going away again - your program ends and the window closes. You can, of course, run the program from the command window (type "python whatever.py") to see the output, or you could make the program pause (using time.sleep) or wait for input (raw_input) before finishing - that would at least leave the command window open. Some operating systems leave command windows open after the program has finished, by the way.
This is an actual question. I have have a prototype for a python related website. Right now I am just running it off old PC (http://18.104.22.168). Where could I host this site & and do you think this site would be helpful to the advancement of Python programming knowledge? Thanks. Father Jack
- How can I programming the io ports (eg.: LPT) with Python?
- I was browsing the Python source code, trying to find out how str.strip() is implemented as a string method. I found string.py in the Lib directory, but that didn't seem to hold the answer. Could you please help me learn where to look?
Take a look in the Objects directory for built-in types. The stringobject.c file contains the implementations of string methods, and the string_strip function should provide some details of the underlying functions used to provide the strip method's functionality.
- How (aside from reading gobs and gobs of source code) can I find out the asymptotic time behaviour of various primitive Python operations? For example, for list xs, does xs.append(x) take amortized O(1) time or O(n) time?
- I'm trying to build matplotlib-1.0.1 from the source, and I keep getting error: command gcc-4.2 failed with error status one. Any ideas?
You might have to give a few more details including the circumstances and exact error message. Feel free to create a page showing the details using the "Add a page for a question" form at the top of this Wiki page. Alternatively, you may get better support by contacting the matplotlib developers directly, probably using one of the mailing lists. See the matplotlib site for details of the different help options (currently listed under the "Need help?" sidebar). -- PaulBoddie 2012-07-12 14:09:20
Answered Longer Questions
Pages containing answered longer questions should appear in this list:
Questions appear here when they are added to the CategoryAskingForHelpAnswered category (having been answered).