Re: Read data from Serial Command

2008-10-10 Thread brianrpsgt1
Again, what is weird is that all works fine in Hyperterminal, but not with the Python script. brianrpsgt1 wrote: > Gave that a shot what is happening is that the script is > hanging. Does that mean that the write function is not making it > through, thus there is nothing to return? > > > >

Re: python debugger tips?

2008-10-10 Thread aizenman
On Oct 10, 5:58 pm, Stef Mientki <[EMAIL PROTECTED]> wrote: > take a look at winpdb (which has no relation with Windows-OS !! > > cheers, > Stef Looks pretty cool; sadly, our sysadmin refuses to install wxwindows, and the commandline version is fairly cryptic... Thanks! Y -- http://mail.python.or

Re: How to uninstall/update modules

2008-10-10 Thread Robert Kern
[EMAIL PROTECTED] wrote: Dear All, It seems I don't understand how Python packages are handled. Here's my specific problem * I'm on Win32 * I've installed Enthought Python 2.5 because it got all the numerical stuff included * Later I tried to install Twisted 8.1 Twisted ended up in C:\Python\

Re: Read data from Serial Command

2008-10-10 Thread brianrpsgt1
That did it! The fix was the '\r' Thanks for the assistance Dennis and Grant! Dennis Lee Bieber wrote: > On Fri, 10 Oct 2008 15:40:08 -0700 (PDT), brianrpsgt1 > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > > > Again, what is weird is that all works fine in Hyperterminal, bu

Simple Python Project Structure

2008-10-10 Thread amit
Hi, I recently wrote a fairly complex project in python. It works great and it was completed fairly quickly thanks to python! Anyways, I am in the process of cleaning the code/directory and I had a simple question How do create my own modules and import them? Right now it works but they all

Win32 system administrator gpedit.msc

2008-10-10 Thread Abah Joseph
Hi everybody... i`m not a prof in english so please read and understand me.. Thank u. Using the win32 python module can we perform every tasks like *gpedit.msc?* i will like to automate tasks like enabling or disaple some of the windows functions. with my basic experince, you can perform important

Re: extracting null pointer address from PyCObject with ctypes

2008-10-10 Thread Aaron "Castironpi" Brady
On Oct 10, 4:16 pm, Gordon Allott <[EMAIL PROTECTED]> wrote: > Aaron "Castironpi" Brady wrote: > > I see.  If I understand, you have a PyCObject in a dictionary. > > > Look at the 'ctypes' module and try calling PyCObject_AsVoidPtr.  Its > > return type should be 'c_void_p', and you can use 'result

Python 2.6 json & encoding of datetime.

2008-10-10 Thread David Wilson
Hi there, I've been playing with Python's new json library, and found myself facing a seemingly simple problem: encoding of datetime objects. Some 'jsonlib' that I was using previously was unable to do this, and the new built-in json module shares the same limitation. A bit of googling around bro

Re: Porn Addiction Solutions?

2008-10-10 Thread Aaron "Castironpi" Brady
On Oct 10, 10:33 am, Aspersieman <[EMAIL PROTECTED]> wrote: > On Fri, 10 Oct 2008 16:11:07 +0200, <[EMAIL PROTECTED]> wrote: > > On Oct 10, 7:03 am, Um Jammer NATTY <[EMAIL PROTECTED]> wrote: > >> On Oct 10, 5:37 am, [EMAIL PROTECTED] wrote: > > >> > It's very simple. You need to know the world is

Re: Where/how to propose an addition to a standard module?

2008-10-10 Thread Aaron "Castironpi" Brady
On Oct 10, 2:10 pm, Joe Strout <[EMAIL PROTECTED]> wrote: > I would like to propose a new method for the string.Template class.   > What's the proper procedure for doing this?  I've joined the python- > ideas list, but that seems to be only for proposed language changes,   > and my idea doesn't req

Re: extracting null pointer address from PyCObject with ctypes

2008-10-10 Thread Gordon Allott
Aaron "Castironpi" Brady wrote: > Yes, well said. But no, not true, not necessarily. You can choose/ > change return types with your code. If the call is defined already > and you can't change the return, just define a new one that returns > long. > -- > http://mail.python.org/mailman/listinfo/

Re: Simple Python Project Structure

2008-10-10 Thread jay graves
On Oct 10, 7:17 pm, amit <[EMAIL PROTECTED]> wrote: > How do create my own modules and import them? Right now it works but > they all have to be in the same directory. For example, > > project/ > util/ > config/ > tests/ > start.py > You need an __init__.py file (it doesn't matter

Re: Using multiprocessing

2008-10-10 Thread Jesse Noller
On Fri, Oct 10, 2008 at 4:32 PM, nhwarriors <[EMAIL PROTECTED]> wrote: > I am attempting to use the (new in 2.6) multiprocessing package to > process 2 items in a large queue of items simultaneously. I'd like to > be able to print to the screen the results of each item before > starting the next on

Re: self signing a py2exe windows executable

2008-10-10 Thread William Heath
Hi All, I just purchased a code signing certificate from godaddy. It is a .spc. I installed it, I see it in the trusted root authority in the certificates area of ie. By the way I got the self signed approach to work, thanks! Anyway, I am not clear how to proceed as the .spc does not show up in

Re: extracting null pointer address from PyCObject with ctypes

2008-10-10 Thread Aaron "Castironpi" Brady
On Oct 10, 7:59 pm, Gordon Allott <[EMAIL PROTECTED]> wrote: > Aaron "Castironpi" Brady wrote: > > Yes, well said.  But no, not true, not necessarily.  You can choose/ > > change return types with your code.  If the call is defined already > > and you can't change the return, just define a new one

Re: Using multiprocessing

2008-10-10 Thread Aaron "Castironpi" Brady
On Oct 10, 3:32 pm, nhwarriors <[EMAIL PROTECTED]> wrote: > I am attempting to use the (new in 2.6) multiprocessing package to > process 2 items in a large queue of items simultaneously. I'd like to > be able to print to the screen the results of each item before > starting the next one. I'm having

Re: Read data from Serial Command

2008-10-10 Thread Grant Edwards
On 2008-10-10, brianrpsgt1 <[EMAIL PROTECTED]> wrote: > Gave that a shot what is happening is that the script is > hanging. Hanging where? Which line? You'd get a lot more helpful answers if you provided details about what your program is doing rather than vague statements like "it doesn't

Win32 system admin

2008-10-10 Thread Abah Joseph
Hi everybody... i`m not a prof in english so please read and understand me.. Thank u. Using the win32 python module can we perform every tasks like *gpedit.msc?* i will like to automate tasks like enabling or disaple some of the windows functions. with my basic experince, you can perform importan

Re: Efficient Bit addressing in Python.

2008-10-10 Thread Aaron "Castironpi" Brady
On Oct 9, 5:30 pm, "Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote: > Is there a canonical way to address the bits in a structure > like an array or string or struct? > > Or alternatively, is there a good way to combine eight > ints that represent bits into one of the bytes in some > array or string

Re: Efficient Bit addressing in Python.

2008-10-10 Thread Aaron "Castironpi" Brady
On Oct 10, 10:37 pm, "Aaron \"Castironpi\" Brady" <[EMAIL PROTECTED]> wrote: > On Oct 9, 5:30 pm, "Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote: > > > > > Is there a canonical way to address the bits in a structure > > like an array or string or struct? > > > Or alternatively, is there a good way

Re: Using multiprocessing

2008-10-10 Thread nhwarriors
On Oct 10, 10:52 pm, "Aaron \"Castironpi\" Brady" <[EMAIL PROTECTED]> wrote: > On Oct 10, 3:32 pm, nhwarriors <[EMAIL PROTECTED]> wrote: > > > > > I am attempting to use the (new in 2.6) multiprocessing package to > > process 2 items in a large queue of items simultaneously. I'd like to > > be able

Re: extracting null pointer address from PyCObject with ctypes

2008-10-10 Thread Gordon Allott
Aaron "Castironpi" Brady wrote: > > You are hard to follow. There is the 'cast' function, which I've had > some success with, even in adding pointers and offsets. It took a > look at the code for it though, and calling an undocumented version of > it. I can post that later if you don't have luc

Re: Modification of a urllib2 object ?

2008-10-10 Thread George Sakkis
On Oct 10, 6:12 pm, [EMAIL PROTECTED] wrote: > On Oct 10, 1:02 pm, George Sakkis <[EMAIL PROTECTED]> wrote: > > > > > On Oct 10, 2:32 pm, [EMAIL PROTECTED] wrote: > > > > I have several ways to the following problem. > > > > This is what I have: > > > > ... > > > import ClientForm > > > import Bea

Re: Simple Python Project Structure

2008-10-10 Thread George Sakkis
On Oct 10, 9:26 pm, jay graves <[EMAIL PROTECTED]> wrote: > On Oct 10, 7:17 pm, amit <[EMAIL PROTECTED]> wrote: > > > How do create my own modules and import them? Right now it works but > > they all have to be in the same directory. For example, > > > project/ > > util/ > > config/ > > ...

Re: Using multiprocessing

2008-10-10 Thread Aaron "Castironpi" Brady
On Oct 10, 10:48 pm, nhwarriors <[EMAIL PROTECTED]> wrote: > On Oct 10, 10:52 pm, "Aaron \"Castironpi\" Brady" > > > > <[EMAIL PROTECTED]> wrote: > > On Oct 10, 3:32 pm, nhwarriors <[EMAIL PROTECTED]> wrote: > > > > I am attempting to use the (new in 2.6) multiprocessing package to > > > process 2

Re: extracting null pointer address from PyCObject with ctypes

2008-10-10 Thread Aaron "Castironpi" Brady
On Oct 10, 10:54 pm, Gordon Allott <[EMAIL PROTECTED]> wrote: > Aaron "Castironpi" Brady wrote: > snip > > Last, you > > haven't mentioned an attempt with PyCObject_AsVoidPtr yet: > > > void* PyCObject_AsVoidPtr(PyObject* self) > >     Return the object void * that the PyCObject self was created wi

how to set the time of a directory?

2008-10-10 Thread oyster
os.utime works only against files. so what to do for a directory? thanx -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple Python Project Structure

2008-10-10 Thread Ben Finney
George Sakkis <[EMAIL PROTECTED]> writes: > ''' > The __init__.py files are required to make Python treat the > directories as containing packages; this is done to prevent > directories with a common name, such as "string", from > unintentionally hiding valid modules that occur later on the module

Re: how to set the time of a directory?

2008-10-10 Thread Timothy Grant
On Fri, Oct 10, 2008 at 10:16 PM, oyster <[EMAIL PROTECTED]> wrote: > os.utime works only against files. so what to do for a directory? > thanx Not sure why you'd say that. drwxr-xr-x 2 tjg tjg 68 Oct 10 22:23 test ([EMAIL PROTECTED]) python Python 2.5.1 (r251:54863, Jan 17 2008, 19:35:16

Trouble importing module using swig and python

2008-10-10 Thread Basha J P M
I am beginner in python. I am working through the tutorial examples from http://www.swig.org/ and have run into some problems. I took the following command instructions from the tutorial on swig.org: http://www.swig.org/tutorial.html I have written example.c and example.i as described in the abo

Re: HARD REAL TIME PYTHON

2008-10-10 Thread James Mills
On 10/7/08, James Mills <[EMAIL PROTECTED]> wrote: > I shall do some latency benchmarks ok :) Out of curiosity I modifed my bench marking tool for my event/component library (pymills) and here are the results: ~/pymills/examples/event $ ./bench.py -m latency -t 10 Setting up latency Test... Late

Re: type-checking support in Python?

2008-10-10 Thread Steven D'Aprano
On Tue, 07 Oct 2008 19:36:12 +1300, Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, > Gabriel Genellina wrote: > >> As an example, in the oil industry here in my country there is a mix of >> measurement units in common usage. Depth is measured in meters, but >> pump stroke in inches;

<    1   2