Hello,
Is there a way to create a C-style pointer in (pure) Python so the
following code will reflect the changes to the variable "a" in the
dictionary "x"?
For example:
>>> a = 1.0
>>> b = 2.0
>>> x = {"a":a, "b":b}
>>> x
{'a': 1.0, 'b': 2.0}
>>> a = 100.0
>>> x
{'a': 1.0, 'b': 2.0} ## at
I've taken two Python classes from David Beazley and can second
Eric's recommendation. The "advanced" class is really advanced
and goes into some pretty mind-blowing stuff. The class comes with
lots of problems and solutions, and a book of all the slides which are
a great reference. Well worth
I've taken two Python classes from David Beazley and can second
Eric's recommendation. The "advanced" class is really advanced
and goes into some pretty mind-blowing stuff. The class comes with
lots of problems and solutions, and a book of all the slides which are
a great reference. Well worth
Hello,
I'm working on an application that as part of its processing, needs to
copy 50 Meg binary files from one NFS mounted disk to another.
The simple-minded approach of shutil.copyfile is very slow, and I'm
guessing that this is due to the default 16K buffer size. Using
shtil.copyfileobj
Hello,
I am trying to work with a structured array and a mask, and am
encountering some problems.
For example:
>>> xtype = numpy.dtype([("n", numpy.int32), ("x", numpy.float32)])
>>> a = numpy.zeros((4), dtype=xtype)
>>> b = numpy.arange(0,4)
>>> a2 = numpy.zeros((4), dtype=xtype)
>>> mask =
Hello,
I have an object of class X that I am writing to a pickled file. The
pickling part goes fine, but I am having some problems reading the
object back out, as I get complaints about "unable to import module X".
The only way I have found around it is to run the read-file code out of
the
pyhdfeos-1.0_r57_58-py2.5-linux-x86_64.egg
variable showing up as one of the first entries in sys.path.
Thanks for the education,
Catherine
Dan Stromberg wrote:
On Tue, Jan 11, 2011 at 4:30 PM, Catherine Moroney
wrote:
In what order does python import modules on a Linux system? I have a
packa
pyhdfeos-1.0_r57_58-py2.5-linux-x86_64.egg
variable showing up as one of the first entries in sys.path.
Thanks for the education,
Catherine
Dan Stromberg wrote:
On Tue, Jan 11, 2011 at 4:30 PM, Catherine Moroney
wrote:
In what order does python import modules on a Linux system? I have a
packa
In what order does python import modules on a Linux system? I have a
package that is both installed in /usr/lib64/python2.5/site-packages,
and a newer version of the same module in a working directory.
I want to import the version from the working directory, but when I
print module.__file__ in
Robert Kern wrote:
On 2010-04-16 14:06 PM, Catherine Moroney wrote:
Hello,
I want to call a system command (such as uname) that returns a string,
and then store that output in a string variable in my python program.
What is the recommended/most-concise way of doing this?
I could always
Hello,
I want to call a system command (such as uname) that returns a string,
and then store that output in a string variable in my python program.
What is the recommended/most-concise way of doing this?
I could always create a temporary file, call the "subprocess.Popen"
module with the tempora
Are the temporary filenames generated by the tempfile module
guaranteed to be unique?
I have a need to generate temporary files within an application,
and I will have many instances of this application running as a
sub-process (so I can submit them to a batch queue). Is there
any danger of my di
On Jan 14, 2009, at 5:20 PM, Jean-Paul Calderone wrote:
On Wed, 14 Jan 2009 17:11:44 -0800, Catherine Moroney
wrote:
[snip]
The easy thing is to use a Queue object. The background thread uses
.put() to place a computed result on the QUeue and the caller uses
.get() to read from the queue
Cameron Simpson wrote:
On 14Jan2009 15:50, Catherine Moroney wrote:
James Mills wrote:
On Wed, Jan 14, 2009 at 11:02 AM, Catherine Moroney
wrote:
I would like to spawn off multiple instances of a function
and run them simultaneously and then wait until they all complete.
[...]
Try using
James Mills wrote:
On Wed, Jan 14, 2009 at 11:02 AM, Catherine Moroney
wrote:
I would like to spawn off multiple instances of a function
and run them simultaneously and then wait until they all complete.
Currently I'm doing this by calling them as sub-processes
executable from the command
Hello everybody,
I know how to spawn a sub-process and then wait until it
completes. I'm wondering if I can do the same thing with
a Python function.
I would like to spawn off multiple instances of a function
and run them simultaneously and then wait until they all complete.
Currently I'm doing
Dan Upton wrote:
On Wed, Nov 19, 2008 at 2:38 PM, Catherine Moroney
<[EMAIL PROTECTED]> wrote:
Dan Upton wrote:
On Wed, Nov 19, 2008 at 2:13 PM, Philip Semanchuk <[EMAIL PROTECTED]>
wrote:
On Nov 19, 2008, at 2:03 PM, Catherine Moroney wrote:
The command (stored as an array of s
Dan Upton wrote:
On Wed, Nov 19, 2008 at 2:13 PM, Philip Semanchuk <[EMAIL PROTECTED]> wrote:
On Nov 19, 2008, at 2:03 PM, Catherine Moroney wrote:
The command (stored as an array of strings) that I'm executing is:
['python ../src_python/Match1.p
x27;]
sub1 = subprocess.Popen(command)
Can anybody see a reason for why the abbreviated version works, and
the full-up one doesn't?
Catherine
Philip Semanchuk wrote:
On Nov 19, 2008, at 2:03 PM, Catherine Moroney wrote:
The command (stored as an arr
I have one script (Match1) that calls a Fortran executable as a
sub-process, and I want to write another script (Match4) that
spawns off several instances of Match1 in parallel and then waits
until they all finish running. The only way I can think of doing this
is to call it as a sub-process, ra
I'm writing a python program that reads in a very large
"pickled" file (consisting of one large dictionary and one
small one), and parses the results out to several binary and hdf
files.
The program works fine, but the memory load is huge. The size of
the pickle file on disk is about 900 Meg so
21 matches
Mail list logo