Air conditioners for free!??!?!!!
http://airconlinks.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list
Air conditioners for cars!
Have a problem with car air conditioner, go here http://car-air-conditioning.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list
Car Air Conditioners!
http://car-air-conditioning.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list
is there a threadsafe cookie library?
I'm working with a script written in python2.4 that has to handle multiple http connections but I'm having concurrency issues with cookielib. Does anyone know of a threadsafe library that handles cookies? -- http://mail.python.org/mailman/listinfo/python-list
Reconstituting f2py Multi-dimensional character array
Hello all, I've normally only had to build a list of words from a f2py fortran character array. For this I found the transpose method to work fine. However I have had difficulty finding a way of getting a 3d array of words from Fortran to python. (I.e. 4d in python) I've attached 2 files that are my test-run. On windows I create the windummy.prd file by using the following command: python C:\Python26\Scripts\f2py.py -c -m windummy --fcompiler=gnu95 --compiler=mingw32 -lmsvcr90 --verbose dummy.f95 or in linux f2py -c -m lindummy --fcompiler=gnu95 --verbose dummy.f95 My problem is a bit "Morecambe & Wise" in that I can get all the 3-letter words, but not necessarily in the right order. I have tried various transpose methods to try and get things in order but with no luck. There's very little on the boards. Any help would be *MASSIVELY* appreciated. Many thanks in advance, HF dummy.f95 Description: Binary data dummy.py Description: Binary data -- http://mail.python.org/mailman/listinfo/python-list
Re: are there some special about '\x1a' symbol
Raps cane on floor. It's probably an "end-of-file" sentinel because 'Z' is the last letter of the alphabet. I suspect it comes from MIT. Unix, developed at a telephone company, uses \x4, which was, in fact, the ASCII in-band end-of-transmission code and would disconnect a teletype. Does this qualify me for the dinosaur award? R Fritz On 2009-01-14 07:15:33 -0800, Mel said: Steve Holden wrote: Unknown wrote: On 2009-01-12, John Machin wrote: I didn't think your question was stupid. Stupid was (a) CP/M recording file size as number of 128-byte sectors, forcing the use of an in-band EOF marker for text files (b) MS continuing to regard Ctrl-Z as an EOF decades after people stopped writing Ctrl-Z at the end of text files. I believe that "feature" was inherited by CP/M from DEC OSes (RSX-11 or RSTS-11). AFAICT, all of CP/M's file I/O API (including the FCB) was lifted almost directly from DEC's PDP-11 stuff, which probably copied it from PDP-8 stuff. Perhaps in the early 60's somebody at DEC had a reason. The really interesting thing is that we're still suffering because of it 40+ years later. I suspect this is probably a leftover from some paper tape data formats, when it was easier to detect the end of a file with a sentinel byte than it was to detect run-off as end of file. It could easily date back to the PDP-8. Perhaps, although in ASCII it's the SUB symbol: "A control character that is used in the place of a character that is recognized to be invalid or in error or that cannot be represented on a given device." [Wikipedia]. There were other codes defined for End-of-Text and File-Separator. Unless the protocol were one of DEC's own. The fact that it's Ctrl-last-letter-of-the-alphabet makes me suspect that it was picked in a pretty informal way. Mel. -- http://mail.python.org/mailman/listinfo/python-list
Re: 3D plotting in a GUI
I've been doing 3D modeling for lighting simulation and I found two reasonably well-supported solutions: VTK and OpenSceneGraph. VTK generally has a research slant and has what I believe are reasonably strong Python bindings. OSG is closer to VR/AR/Flight Simulation applications and the Python bindings are pre-alpha--you'll probably have to roll your own for some purposes. Both are OpenGL based; if you need an easy Windows install you'll have to go with something that supports DirectX. If your app is simple, you might just be able to write OpenGL code. Anyone who knows of other reasonably current libraries, please follow up--there are a lot of libraries that don't seem to see much activity, and I'm not sure if this is because they are complete or because they are not much used. -- http://mail.python.org/mailman/listinfo/python-list
Re: Your beloved python features
My favorite feature is its readability. It's as near to pseudo-code as any language we have, and that's valuable in open source projects or when I return to code to modify it. -- http://mail.python.org/mailman/listinfo/python-list
Re: cpan for python?
On 2010-02-28 06:31:56 -0800, [email protected] said: On Feb 28, 2010, at 9:28 AM, Someone Something wrote: Is there something like cpan for python? I like python's syntax, but Iuse perl because of cpan and the tremendous modules that it has. -- Please search the mailing list archives. This subject has been discussed to absolute death. But somehow the question is not in the FAQ, though the answer is. See: <http://www.python.org/doc/faq/library/#how-do-i-find-a-module-or-application-to-perform-task-x> -- Randolph Fritz design machine group, architecture department, university of washington [email protected] -or- [email protected] -- http://mail.python.org/mailman/listinfo/python-list
shoehorn c-structured data into Numpy
Hello there everyone, I used to be on this a long time ago but then I got so
much spam I gave up.
But this strategy has come a little unstuck. I have binary output from a
Fortran program that is in a big-endian C-structured binary file. The
output can be very variable and many options create different orderings in
the binary file. So I'd like to keep the header-reading in python.
Anyhoo, I've so far been able to read the output with the struct module.
But my question is how do I create numpy arrays from the bits of the file I
want?
So far I've been able to scan through to the relevant sections and I've
tried all maner of idiotic combinations...
The floats are 4 bytes for sinngle percision, and it's a unstructured grid
from a finite difference scheme so I know the number of cells (ncells) for
the property I am looking to extract.
So I've tried:
TC1 = np.frombuffer(struct.unpack(">%df" % ncells, data.read(4*ncells))[0],
dtype=float)
Only to get a very logical:
>>> Traceback (most recent call last):
>>> File "a2o.py", line 466, in
>>> runme(me)
>>> File "a2o.py", line 438, in runme
>>> me.spmapdat(data)
>>> File "a2o.py", line 239, in spmapdat
>>> TC1 = np.frombuffer(struct.unpack(">%df" % ncells,
data.read(4*ncells))[0], dtype=float)
>>> AttributeError: 'float' object has no attribute '__buffer__'
ok... so I'll feed frombuffer my data file...
And then tried:
TC1 = np.frombuffer(data.read(4*ncells), dtype=float, count=ncells)
>>> Traceback (most recent call last):
>>> File "a2o.py", line 466, in
>>> runme(me)
>>> File "a2o.py", line 438, in runme
>>> me.spmapdat(data)
>>> File "a2o.py", line 240, in spmapdat
>>> TC1 = np.frombuffer(data.read(4*ncells), dtype=float, count=ncells)
>>> ValueError: buffer is smaller than requested size
And THEN I tried:
TC1 = np.frombuffer(data.read(4*ncells), dtype=float, count=4*ncells)
>>> Traceback (most recent call last):
>>> File "a2o.py", line 466, in
>>> runme(me)
>>> File "a2o.py", line 438, in runme
>>> me.spmapdat(data)
>>> File "a2o.py", line 240, in spmapdat
>>> TC1 = np.frombuffer(data.read(4*ncells), dtype=float,
count=4*ncells)
>>> ValueError: buffer is smaller than requested size
But it's the right size - honest.
(In general) I should be able to put these arrays into memory with no
problems. Certainly given the rate at which I'm turning around this code...
Memory may be in the terabytes once I'm done.
Anyone got a Sesame Street answer for this?
Many thanks! Helmut.
--
http://mail.python.org/mailman/listinfo/python-list
how to extract an implicit dict expression (with statement return)
Hi, I do not know how to subject my problem in a better way. I have the following statement: return [ dict(x1 = elem.x1, x2 = elem.x2, x3 = elem.x3,) for elem in method(in_values) ] How can I transform it to an explicit description: result = ... return result Could not found a description for the here used form of for and what [...] means. Need this for debugging. Thanks for any help. Regards, Fritz -- http://mail.python.org/mailman/listinfo/python-list
Init a dictionary with a empty lists
Hi there,
How can I do this in a one liner:
maxCountPerPhraseWordLength = {}
for i in range(1,MAX_PHRASES_LENGTH+1):
maxCountPerPhraseWordLength[i] = 0
Thanks!
--
http://mail.python.org/mailman/listinfo/python-list
