[FAQTS] Python Knowledge Base Update -- July 2nd, 2000
Fiona Czuczman
fiona at sitegnome.com
Sun Jul 2 21:10:20 EDT 2000
Hi Guys.
The FAQTs knowledge base continues to grow. Currently 265 questions and
answers.
http://python.faqts.com
Cheers,
Fiona Czuczman
## New Entries #################################################
-------------------------------------------------------------
When executing a command with os.system how can I capture the output into a python variable?
http://www.faqts.com/knowledge-base/view.phtml/aid/4152
-------------------------------------------------------------
Fiona Czuczman
Mark Hammond, Grant Edwards
You want "popen". For non-windows platforms, "os.popen" is where you
can find it. For Win32 systems, you need the win32 extensions, and
"win32pipe.popen".
.........
The commands module has a nice function that runs a program and returns
the exit status and output as a tuple.
-------------------------------------------------------------
Is there a way of making a MS-DOS box recognise the Python script as an executable file so I can just use the name "script.py"?
http://www.faqts.com/knowledge-base/view.phtml/aid/4153
-------------------------------------------------------------
Fiona Czuczman
Mark Hammond
Under Windows NT or Win2k, you can use the PATHEXT environment variable.
Simply add ".py" to the semi-colon sep'd list of extensions, and off you
go!
-------------------------------------------------------------
What is the best way of setting default options of widgets?
http://www.faqts.com/knowledge-base/view.phtml/aid/4151
-------------------------------------------------------------
Fiona Czuczman
richard_chamberlain
You can use an option database. If you create a file called optionDB
with for example the following kind of entries:
*font: Times New Roman
*Button*foreground blue
*foreground black
You can then apply these via
root.option_readfile('optionDB')
More information about the Python-list
mailing list