Re: Getting screen dims platform specific? Say it ain't so!

2009-02-24 Thread Lionel
On Feb 24, 4:41 pm, Luis Zarrabeitia wrote: > On Tuesday 24 February 2009 07:12:36 pm Lionel wrote: > > > In a nutshell, what I need is a way to acquire the screen dimensions > > (in pixels) and its dpi setting. > > This is a guess, and a guess only. > What do you wa

Re: Getting screen dims platform specific? Say it ain't so!

2009-02-24 Thread Lionel
On Feb 24, 3:53 pm, Luis Zarrabeitia wrote: > On Tuesday 24 February 2009 05:57:52 pm Lionel wrote: > > > from win32api import GetSystemMetrics > > I'd guess that win32api is patform specific, as in "api for win32". > > -- > Luis Zarrabeitia (aka Kyrie) &

Getting screen dims platform specific? Say it ain't so!

2009-02-24 Thread Lionel
Hello people, I'm looking for a way to get the screen dimensions (in pixels) using the standard Python library. The only thing I found so far was the following: from win32api import GetSystemMetrics Width = GetSystemMetrics(0) Height = GetSystemMetrics(1) I get an error claiming "no module named

Re: "import" not working?

2009-02-23 Thread Lionel
On Feb 23, 11:24 am, Lionel wrote: > On Feb 21, 12:37 am, "Gabriel Genellina" > wrote: > > > > > > > En Fri, 20 Feb 2009 22:40:03 -0200, Lionel   > > escribió: > > > > Okay, moving the wx example into the same directory containing

Re: "import" not working?

2009-02-23 Thread Lionel
On Feb 21, 12:37 am, "Gabriel Genellina" wrote: > En Fri, 20 Feb 2009 22:40:03 -0200, Lionel   > escribió: > > > Okay, moving the wx example into the same directory containing the > > first example that was working fixed it. This directory only contains > &g

Re: "import" not working?

2009-02-20 Thread Lionel
On Feb 20, 4:15 pm, Matimus wrote: > On Feb 20, 3:56 pm, Lionel wrote: > > > > > > > On Feb 20, 3:52 pm, Chris Rebert wrote: > > > > On Fri, Feb 20, 2009 at 3:33 PM, Lionel wrote: > > > > Hello all: > > > > > I've crafte

Re: "import" not working?

2009-02-20 Thread Lionel
On Feb 20, 3:52 pm, Chris Rebert wrote: > On Fri, Feb 20, 2009 at 3:33 PM, Lionel wrote: > > Hello all: > > > I've crafted several classes and exceptions which I've stored in a > > file called "DataFileType.py". I then invoke them from within ot

"import" not working?

2009-02-20 Thread Lionel
Hello all: I've crafted several classes and exceptions which I've stored in a file called "DataFileType.py". I then invoke them from within other files like this: # Top of file import sys sys.path.append("c:\DataFileTypes") from DataFileTypes import * data = None try: # Note: "INTData" is

Re: numpy.memmap advice?

2009-02-19 Thread Lionel
On Feb 19, 12:26 pm, Carl Banks wrote: > On Feb 19, 10:36 am, Lionel wrote: > > > > > > > On Feb 19, 9:51 am, Carl Banks wrote: > > > > On Feb 19, 9:34 am, Lionel wrote: > > > > > On Feb 18, 12:35 pm, Carl Banks wrote: > > > > &g

Re: numpy.memmap advice?

2009-02-19 Thread Lionel
On Feb 19, 9:51 am, Carl Banks wrote: > On Feb 19, 9:34 am, Lionel wrote: > > > > > > > On Feb 18, 12:35 pm, Carl Banks wrote: > > > > On Feb 18, 10:48 am, Lionel wrote: > > > > > Thanks Carl, I like your solution. Am I correct in my un

Re: numpy.memmap advice?

2009-02-19 Thread Lionel
On Feb 18, 12:35 pm, Carl Banks wrote: > On Feb 18, 10:48 am, Lionel wrote: > > > Thanks Carl, I like your solution. Am I correct in my understanding > > that memory is allocated at the slicing step in your example i.e. when > > "reshaped_data" is sliced using

Re: PyGTK install

2009-02-18 Thread Lionel
On Feb 18, 3:03 pm, Lionel wrote: > On Feb 18, 2:08 pm, Lionel wrote: > > > > > > > On Feb 18, 11:43 am, Lionel wrote: > > > > Hello folks, I couldn't find a specific PyGTK forum so I thought I'd > > > post here and hope someone new the ans

Re: PyGTK install

2009-02-18 Thread Lionel
On Feb 18, 2:08 pm, Lionel wrote: > On Feb 18, 11:43 am, Lionel wrote: > > > > > > > Hello folks, I couldn't find a specific PyGTK forum so I thought I'd > > post here and hope someone new the answer. I feel it's a silly > > problem, maybe some

Re: PyGTK install

2009-02-18 Thread Lionel
On Feb 18, 11:43 am, Lionel wrote: > Hello folks, I couldn't find a specific PyGTK forum so I thought I'd > post here and hope someone new the answer. I feel it's a silly > problem, maybe something to do with a path variable? The problem: I've > downloaded

PyGTK install

2009-02-18 Thread Lionel
Hello folks, I couldn't find a specific PyGTK forum so I thought I'd post here and hope someone new the answer. I feel it's a silly problem, maybe something to do with a path variable? The problem: I've downloaded the "all-in-one" windows binary installer for PyGTK from their website. After typing

Re: numpy.memmap advice?

2009-02-18 Thread Lionel
On Feb 18, 12:56 am, Carl Banks wrote: > On Feb 17, 3:08 pm, Lionel wrote: > > > > > > > Hello all, > > > On a previous thread (http://groups.google.com/group/comp.lang.python/ > > browse_thread/thread/64da35b811e8f69d/67fa3185798ddd12? > > hl=en&a

numpy.memmap advice?

2009-02-17 Thread Lionel
Hello all, On a previous thread (http://groups.google.com/group/comp.lang.python/ browse_thread/thread/64da35b811e8f69d/67fa3185798ddd12? hl=en&lnk=gst&q=keene#67fa3185798ddd12) I was asking about reading in binary data. Briefly, my data consists of complex numbers, 32-bit floats for real and imag

Re: "Super()" confusion

2009-02-09 Thread Lionel
On Feb 9, 4:04 pm, Jean-Paul Calderone wrote: > On Mon, 9 Feb 2009 15:20:05 -0800 (PST), Lionel > wrote: > >Hello. I've been scouring the web looking for something to clear up a > >little confusion about the use of "super()" but haven't found anything

"Super()" confusion

2009-02-09 Thread Lionel
Hello. I've been scouring the web looking for something to clear up a little confusion about the use of "super()" but haven't found anything that really helps. Here's my simple example: class Parent: def __init__(self, filePath): . . Do some processing with "filePath"

Re: Skipping bytes while reading a binary file?

2009-02-05 Thread Lionel
On Feb 5, 3:35 pm, Lionel wrote: > On Feb 5, 2:56 pm, Lionel wrote: > > > > > > > On Feb 5, 2:48 pm, MRAB wrote: > > > > Lionel wrote: > > > >  > Hello, > > >  > I have data stored in binary files. Some of these files are > >

Re: Skipping bytes while reading a binary file?

2009-02-05 Thread Lionel
On Feb 5, 2:56 pm, Lionel wrote: > On Feb 5, 2:48 pm, MRAB wrote: > > > > > > > Lionel wrote: > > >  > Hello, > >  > I have data stored in binary files. Some of these files are > >  > huge...upwards of 2 gigs or more. They consist of 32-bit f

Re: Skipping bytes while reading a binary file?

2009-02-05 Thread Lionel
On Feb 5, 2:48 pm, MRAB wrote: > Lionel wrote: > >  > Hello, >  > I have data stored in binary files. Some of these files are >  > huge...upwards of 2 gigs or more. They consist of 32-bit float complex >  > numbers where the first 32 bits of the file is the real com

Re: Skipping bytes while reading a binary file?

2009-02-05 Thread Lionel
On Feb 5, 2:22 pm, Lionel wrote: > Hello, > I have data stored in binary files. Some of these files are > huge...upwards of 2 gigs or more. They consist of 32-bit float complex > numbers where the first 32 bits of the file is the real component, the > second 32bits is the imagin

Skipping bytes while reading a binary file?

2009-02-05 Thread Lionel
Hello, I have data stored in binary files. Some of these files are huge...upwards of 2 gigs or more. They consist of 32-bit float complex numbers where the first 32 bits of the file is the real component, the second 32bits is the imaginary, the 3rd 32-bits is the real component of the second number

Re: Does array.read() move file pointer automatically?

2009-02-04 Thread Lionel
On Feb 4, 5:10 pm, MRAB wrote: > Lionel wrote: > >  > On Feb 4, 3:10 pm, MRAB wrote: >> Lionel > wrote: > >  >> >  >>  > Hello everyone. Quick question: When using the "read()" method in the >  >>  > array module, m

Re: Does array.read() move file pointer automatically?

2009-02-04 Thread Lionel
On Feb 4, 3:10 pm, MRAB wrote: > Lionel wrote: > >  > Hello everyone. Quick question: When using the "read()" method in the >  > array module, must I redirect the current file pointer or will that >  > occur automatically? >  > >  > For example, if I

Does array.read() move file pointer automatically?

2009-02-04 Thread Lionel
Hello everyone. Quick question: When using the "read()" method in the array module, must I redirect the current file pointer or will that occur automatically? For example, if I were to sequentially read data in chunks from a binary file as in: for currentChunk in range(numberOfChunksToRead):

Re: Reading text file with wierd file extension?

2009-02-03 Thread Lionel
On Feb 2, 2:07 pm, John Machin wrote: > On Feb 3, 8:43 am, Lionel wrote: > > >         ResourceFilepath = DataFilepath + ".src" > > Don't you mean ".rsc"? Good Grief!!! That's It!! I've been staring at it all day and I didn't see

Re: Reading text file with wierd file extension?

2009-02-02 Thread Lionel
On Feb 2, 5:40 pm, "Rhodri James" wrote: > [Quoting restored for reduced > > On Mon, 02 Feb 2009 22:33:50 -, Lionel wrote: > > On Feb 2, 2:01 pm, Mike Driscoll wrote: > >> On Feb 2, 3:43 pm, Lionel wrote: > >> > On Feb 2, 1:07 pm, "Diez

Re: Reading text file with wierd file extension?

2009-02-02 Thread Lionel
On Feb 2, 4:50 pm, Denis Kasak wrote: > On Mon, Feb 2, 2009 at 10:43 PM, Lionel wrote: > > > > > >>> ResourcefilePath > > 'C:\\C8Example1.slc.rsc' > > > > > C:\C8Example1.slc.src > > The extension you used in the interactive sh

Re: Reading text file with wierd file extension?

2009-02-02 Thread Lionel
On Feb 2, 2:01 pm, Mike Driscoll wrote: > On Feb 2, 3:43 pm, Lionel wrote: > > > > > > > On Feb 2, 1:07 pm, "Diez B. Roggisch" wrote: > > > This is written very slowly, so you can read it better: > > > Please post without sa

Re: Reading text file with wierd file extension?

2009-02-02 Thread Lionel
print(message) print("Error opening " + ResourceFilepath) DataFH.close() return None Console output when invoking as "someObject = C8DataType("C:\ \C8Example1.slc")" : C:\C8Example1.slc C:\C8Example1.slc.src [Errno 2] No s

Re: Reading text file with wierd file extension?

2009-02-02 Thread Lionel
On Feb 2, 12:10 pm, Mike Driscoll wrote: > On Feb 2, 1:20 pm, Lionel wrote: > > > > > > > On Feb 2, 10:41 am, Mike Driscoll wrote: > > > > On Feb 2, 12:36 pm, Lionel wrote: > > > > > Hi Folks, Python newbie here. > > > > &g

Re: Reading text file with wierd file extension?

2009-02-02 Thread Lionel
On Feb 2, 11:20 am, Lionel wrote: > On Feb 2, 10:41 am, Mike Driscoll wrote: > > > > > > > On Feb 2, 12:36 pm, Lionel wrote: > > > > Hi Folks, Python newbie here. > > > > I'm trying to open (for reading) a text file with the following >

Re: Reading text file with wierd file extension?

2009-02-02 Thread Lionel
On Feb 2, 10:41 am, Mike Driscoll wrote: > On Feb 2, 12:36 pm, Lionel wrote: > > > > > > > Hi Folks, Python newbie here. > > > I'm trying to open (for reading) a text file with the following > > filenaming convension: > > > "MyTextFile

Reading text file with wierd file extension?

2009-02-02 Thread Lionel
Hi Folks, Python newbie here. I'm trying to open (for reading) a text file with the following filenaming convension: "MyTextFile.slc.rsc" My code is as follows: Filepath = "C:\\MyTextFile.slc.rsc" FileH = open(Filepath) The above throws an IOError exception. On a hunch I changed the filename (