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? I
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 sy
gt; On 4 September 2012 02:57, Garry Willgoose
> 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 belo
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 'CreateSymbolic
and. What do
people suggest short of calling 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 60
and. What do
people suggest short of calling 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 60
and. What do
people suggest short of calling 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 60
for each simulation with os.system() and occasionally a simulation goes
into an infinite loop, which stalls the monte-carlo so we just want to be able
to kill that simulation and go to the next one. WE do this sort of stuff on
*NIX all the time using the unix command 'ps' but because
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 c:\c
n when opening the
new file ... which, ughh, requires me to explicitly convert all
numbers to strings before I write them.
Prof Garry Willgoose,
email: garry.willgo...@newcastle.edu.au; g.willgo...@telluricresearch.com
email-for-life: garry.willgo...@alum.mit.edu
personal webpage: www.tellu
e I've been able to run a
broader cross-section of my codes.
====
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
7;) all should be well for platform 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.
======
My question is so simple I'm surprised I can't find an answer
somewhere. I'm interested if I can rely on the order of the
directories in the sys.path list. When I'm running a file from the
comand line like
python tellusim.py
The string in entry sys.path[0] appears to be the full path to th
erent 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),
Scho
n do that better utilizes my
broadband bandwidth?
====
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 we
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 wxPyth
gt;> raised an exception that I could capture. I seem unable to get this
>> to throw an exception no matter what is in commandtext. I assume I'm
>> missing something simple here.
>>
>> Alternatively should I open a process with popen ... I want to be
>> able to
sting scope and the way I 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 Univ
is is a pretty
common construct in what I'm doing so I'm just wondering if there is
a clear and simple shortcut ;-)
========
Prof Garry Willgoose,
Australian Professorial Fellow in Environmental Engineering,
Director,
... just like in the Python interpreter
or IDLE".
========
Prof Garry Willgoose,
Australian Professorial Fellow in Environmental Engineering,
Director, Centre for Climate Impact Management (C2IM),
School of Engineering, The University o
ria900)
Traceback (most recent call last):
File "", line 1, in
File "mytest1.py", line 10, in load
exec(text2)
File "", line 1, in
NameError: name 'siberia900' is not defined
-
==
>>> mytest.load()
here 10 import siberia900
'1.00'
>>> mytest.load()
here 3 import siberia900
'1.00'
>>> reload(mytest)
>>> mytest.load()
here 10 import siberia900
'1.00'
-
=
22 matches
Mail list logo