[Tutor] command to determine of python 32 or 64 bit?

2016-08-10 Thread Garry Willgoose
I have a number of binary libraries that are dependent on whether the precompiled python distribution (eg. Enthought, ActiveState, etc) in which they are installed are compiled with 32 or 64 bit. Is there any reliable way to determine at run time whether a python distribution is 32 or 64 bit?

[Tutor] command line list arguments

2015-11-07 Thread Garry Willgoose
I want to input a python list as a command line argument as for example python weathering-sens.py -daughter ['p0-50-50','p0-0-0-100’] but what I get from sys.argv is [p0-50-50,p0-0-0-100] without the string delimiters on the list elements. I’m probably missing something really simple because

Re: [Tutor] making a shortcut in windows

2012-09-04 Thread Garry Willgoose
September 2012 02:57, Garry Willgoose garry.willgo...@newcastle.edu.au wrote: I want to put a shortcut onto the desktop in windows (XP and later) in Python 2.6 or later. In Unix its easy using os.symlink but I can't find anything equivalent for windows. My searches on the web led me to the code below

[Tutor] making a shortcut in windows

2012-09-03 Thread Garry Willgoose
I want to put a shortcut onto the desktop in windows (XP and later) in Python 2.6 or later. In Unix its easy using os.symlink but I can't find anything equivalent for windows. My searches on the web led me to the code below but the code returns the error AttributeError: function

[Tutor] shutil.rmtree clarification

2012-05-17 Thread Garry Willgoose
os.system('rm -R test_directory'). - Prof Garry Willgoose Australian Professorial Fellow, School of Engineering, The University of Newcastle, Callaghan, NSW, 2308. Australia Phone: +61 2 4921 6050 (Tues-Thurs) +61 2 6545 9574 (Fri-Mon) FAX

[Tutor] shutil.rmtree clarification

2012-05-17 Thread Garry Willgoose
os.system('rm -R test_directory'). - Prof Garry Willgoose Australian Professorial Fellow, School of Engineering, The University of Newcastle, Callaghan, NSW, 2308. Australia Phone: +61 2 4921 6050 (Tues-Thurs) +61 2 6545 9574 (Fri-Mon) FAX

[Tutor] shutil.rmtree clarification

2012-05-17 Thread Garry Willgoose
os.system('rm -R test_directory'). - Prof Garry Willgoose Australian Professorial Fellow, School of Engineering, The University of Newcastle, Callaghan, NSW, 2308. Australia Phone: +61 2 4921 6050 (Tues-Thurs) +61 2 6545 9574 (Fri-Mon) FAX

Re: [Tutor] bogus characters in a windows file

2012-02-09 Thread Garry Willgoose
on the web most of the solutions look rather difficult. Prof Garry Willgoose, Director, Centre for Climate Impact Management (C2IM), Head of Discipline, Discipline of Civil Surveying and Environmental Engineering, School of Engineering

[Tutor] bogus characters in a windows file

2012-02-08 Thread Garry Willgoose
I'm reading a file output by the system utility WMIC in windows (so I can track CPU usage by process ID) and the text file WMIC outputs seems to have extra characters in I've not seen before. I use os.system('WMIC /OUTPUT:c:\cpu.txt PROCESS GET ProcessId') to output the file and parse file

[Tutor] OS dependence of line separators

2011-01-31 Thread Garry Willgoose
. Prof Garry Willgoose, email: garry.willgo...@newcastle.edu.au; g.willgo...@telluricresearch.com email-for-life: garry.willgo...@alum.mit.edu personal webpage: www.telluricresearch.com/garry Do not go where the path may lead

[Tutor] querying the name of a calling python file

2010-11-05 Thread Garry Willgoose
. Prof Garry Willgoose, Australian Professorial Fellow in Environmental Engineering, Director, Centre for Climate Impact Management (C2IM), School of Engineering, The University of Newcastle, Callaghan, 2308 Australia. Centre webpage: www.c2im.org.au Phone: (International) +61 2 4921 6050

[Tutor] portability of pickle and shelve across platforms and different python versions?

2010-05-05 Thread Garry Willgoose
independence. My core question if I give a pickled file to somebody else can i guarantee they can read/load it OK. The other person will be using exactly the same python code to open it as used to create it. Prof Garry Willgoose

[Tutor] aliasing an imported module

2010-02-12 Thread Garry Willgoose
variables in entirely different modules. IS there any way to do this? Prof Garry Willgoose, Australian Professorial Fellow in Environmental Engineering, Director, Centre for Climate Impact Management (C2IM), School

[Tutor] why is os.path.walk so slow?

2009-11-04 Thread Garry Willgoose
? Prof Garry Willgoose, Australian Professorial Fellow in Environmental Engineering, Director, Centre for Climate Impact Management (C2IM), School of Engineering, The University of Newcastle, Callaghan, 2308 Australia. Centre webpage: www.c2im.org.au Phone: (International) +61

[Tutor] wxPython dialog problem

2009-02-19 Thread Garry Willgoose
I'm just porting an old code from a GUI in Tkinter to one in wxPython and am having a problem with one of the dialog widgets. This is on OSX. The code below gives the result result= 5104 5103 5104 as expected but if I substitute the single line form that is commented out (as per the

[Tutor] capturing exceptions from an exec statement

2008-04-08 Thread Garry Willgoose
read popen I can't do that. Prof Garry Willgoose, Australian Professorial Fellow in Environmental Engineering, Director, Centre for Climate Impact Management (C2IM), School of Engineering, The University of Newcastle, Callaghan

Re: [Tutor] capturing exceptions from an exec statement

2008-04-08 Thread Garry Willgoose
this? Andreas Am Dienstag, den 08.04.2008, 17:12 +1000 schrieb Garry Willgoose: I'm writing a (very simple) command line window for use within my Tkinter GUI menu driven program (Aside: I want to provide a Matlab like command line capability within an otherwise menu driven program ... but where

[Tutor] creating a nested dictionary

2008-01-24 Thread Garry Willgoose
doing so I'm just wondering if there is a clear and simple shortcut ;-) Prof Garry Willgoose, Australian Professorial Fellow in Environmental Engineering, Director, Centre for Climate Impact Management (C2IM), School

[Tutor] providing a Python command line within a Tkinter appl

2008-01-01 Thread Garry Willgoose
. Prof Garry Willgoose, Australian Professorial Fellow in Environmental Engineering, Director, Centre for Climate Impact Management (C2IM), School of Engineering, The University of Newcastle, Callaghan, 2308 Australia. Centre webpage

[Tutor] import and reload in modules

2007-11-04 Thread Garry Willgoose
siberia900 '1.00' - Prof Garry Willgoose, Australian Professorial Fellow in Environmental Engineering, Director, Centre for Climate Impact Management (C2IM), School of Engineering, The University

Re: [Tutor] import and reload in modules

2007-11-04 Thread Garry Willgoose
' is not defined - Prof Garry Willgoose, Australian Professorial Fellow in Environmental Engineering, Director, Centre for Climate Impact Management (C2IM), School of Engineering, The University