Re: USB HID documentation?

2008-05-05 Thread ETP
I don't doubt I misunderstand since most programming jargon goes over my head. That said, I'm sure you can guess my OS is Windows and I don't know what an API is. After a quick search it looks like windows uses something called DirectInput for gaming devices. Is anyone familiar with DirectInput?

Re: Are rank noobs tolerated, here?

2008-05-05 Thread Mensanator
On May 5, 1:43 pm, notbob <[EMAIL PROTECTED]> wrote: > On 2008-05-04, notbob <[EMAIL PROTECTED]> wrote: > > > I'm trying to learn how to program.  I'm using: > > > How to Think Like a Computer Scientist > > > Learning with Python > > 2nd Edition > > http://openbookproject.net//thinkCSpy/index.xhtml

Re: pygame music, cant read mp3?

2008-05-05 Thread globalrev
On 5 Maj, 17:25, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > > directory = ['C:','Python25','myPrograms','pygameProgs','dront.mp3'] > > os.path.join(directory) > > > Then python can worry about the gritty details, and you don't have to. > > Or somewhat neater IMHO: > > os.path.join('C:','Python

Re: SSL through python. possible ?

2008-05-05 Thread Jean-Paul Calderone
On Mon, 5 May 2008 11:11:19 -0700 (PDT), TkNeo <[EMAIL PROTECTED]> wrote: On May 2, 1:52 pm, Mike Driscoll <[EMAIL PROTECTED]> wrote: On May 2, 1:20 pm, Heikki Toivonen <[EMAIL PROTECTED]> wrote: > Mike Driscoll wrote: > > On Apr 29, 8:56 am,TkNeo<[EMAIL PROTECTED]> wrote: > >> I need to do SSL

Re: Visual Studio 6 compile of 2.5.2 fails with missing db.h

2008-05-05 Thread Christian Heimes
brucoder schrieb: > Any pointers? A prerequisite that I might be missing? The source is > the Python-2.5.2.tar.gz from the Python.org site. The tar.gz doesn't contain the dependencies like the bsddb files or sqlite3, bzip2 and more. You have to download and unpack the correct versions into the c

Python Minidom Help

2008-05-05 Thread Alok Kumar
Hi, I am reading a XML data from HTTP server and giving it to parse method. dom = parse(dataread) It throws following error File "/usr/lib/python2.3/site-packages/_xmlplus/dom/minidom.py", line 1908, in parse return expatbuilder.parse(file) File "/usr/lib/python2.3/site-packages/_xmlpl

Re: [Twisted-Python] Counting errors in a DeferredList and avoiding Unhandled error in Deferred messages

2008-05-05 Thread Terry Jones
Hi Jean-Paul > You can do this (if you replace `pass´ with `None´, anyway) or you can pass > `consumeErrors=True´ to the `DeferredList´ initializer which will make it > do something equivalent. Thanks. Sorry - I should have just read the docs again :-) Terry -- http://mail.python.org/mailman/lis

Re: psycopg2 ReferenceManual

2008-05-05 Thread Daniel Fetchinson
> Hi all, where can I find the reference manual from the psycopg2 or the > dbapi2.0 because in their official pages I could'nt find > thx > > Once you have the source of any package you can create a reference manual using e.g. epydoc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Browser + local Python-based web server vs. wxPython

2008-05-05 Thread [EMAIL PROTECTED]
On 5 mai, 16:22, [EMAIL PROTECTED] wrote: > I'm looking at rewriting some legacy VB applications and am pondering > which of the following techniques to use: > > 1. Browser based GUI with local web server (Browser + > wsgiref.simple_server) (I'm assuming that simple_server is class I want > to buil

Re: Colors for Rows

2008-05-05 Thread [EMAIL PROTECTED]
> On Tue, 29 Apr 2008 09:33:32 -0500 > "Victor Subervi" <[EMAIL PROTECTED]> wrote: > print '' % bg You'd better learn to use css instead. -- http://mail.python.org/mailman/listinfo/python-list

Re: Visual Studio 6 compile of 2.5.2 fails with missing db.h

2008-05-05 Thread brucoder
On May 5, 1:46 pm, Christian Heimes <[EMAIL PROTECTED]> wrote: > brucoder schrieb: > > > Any pointers?  A prerequisite that I might be missing?  The source is > > the Python-2.5.2.tar.gz from the Python.org site. > > The tar.gz doesn't contain the dependencies like the bsddb files or > sqlite3, bzi

Re: SSL through python. possible ?

2008-05-05 Thread Todd Whiteman
TkNeo wrote: ok i have tried around a lot but no luck. I think M2Crypto is my best option except it requires a minimum of python 2.4 which i don't have. What i am trying to do is to do an FTP transfer that uses SSL (username, password authentication) and not a certificate file. The few example i

Re: Browser + local Python-based web server vs. wxPython

2008-05-05 Thread Mike Driscoll
On May 5, 9:22 am, [EMAIL PROTECTED] wrote: > I'm looking at rewriting some legacy VB applications and am pondering > which of the following techniques to use: > > 1. Browser based GUI with local web server (Browser + > wsgiref.simple_server) (I'm assuming that simple_server is class I want > to bu

Re: Random/anonymous class methods

2008-05-05 Thread philly_bob
On Apr 27, 8:05 am, philly_bob <[EMAIL PROTECTED]> wrote: > In the sample program below, I want to send a random method to a class > instance. > In other words, I don't know which method to send until run-time. How > can I send ch, which is my random choice, to the myclass instance? > > Thanks, >

Re: ]ANN[ Vellum 0.16: Lots Of Documentation and Watching

2008-05-05 Thread Paul Boddie
On 5 Mai, 20:26, [EMAIL PROTECTED] (Ville M. Vainio) wrote: > > Basically, avoiding GPL maximizes the brainshare that a small-ish tool > is going to attract, and many (including myself, FWIW) view GPL as a > big turn-off when I consider spending some time to familiarize myself > with a tool, or rec

Re: ]ANN[ Vellum 0.16: Lots Of Documentation and Watching

2008-05-05 Thread Ville M. Vainio
Paul Boddie <[EMAIL PROTECTED]> writes: > Anyway, I'm just confirming that I'm clearly not one of the "many" > described above. A lot of my own work is licensed under the GPL or I guess it's safe to assume that you are not opposed to using code based on more liberal license, right? :-) My point

License selection for free software (was: ]ANN[ Vellum 0.16: Lots Of Documentation and Watching)

2008-05-05 Thread Ben Finney
[EMAIL PROTECTED] (Ville M. Vainio) writes: > Paul Boddie <[EMAIL PROTECTED]> writes: > > > Anyway, I'm just confirming that I'm clearly not one of the "many" > > described above. A lot of my own work is licensed under the GPL or > > I guess it's safe to assume that you are not opposed to using

Re: get the pid of a process with pexpect

2008-05-05 Thread Noah
On May 5, 7:18 am, Karim Bernardet <[EMAIL PROTECTED]> wrote: > ssh_tunnel = pexpect.spawn (tunnel_command % globals()) > ... > print ssh_tunnel.pid > > but ssh_tunnel is not the pid of the ssh tunnel > > Is there a way to get it using pexpect ? You will notice that you can't get this information

Re: Browser + local Python-based web server vs. wxPython

2008-05-05 Thread Stef Mientki
Mike Driscoll wrote: On May 5, 9:22 am, [EMAIL PROTECTED] wrote: I'm looking at rewriting some legacy VB applications and am pondering which of the following techniques to use: 1. Browser based GUI with local web server (Browser + wsgiref.simple_server) (I'm assuming that simple_server is cl

Re: SSL through python. possible ?

2008-05-05 Thread TkNeo
On May 5, 2:32 pm, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > On Mon, 5 May 2008 11:11:19 -0700 (PDT),TkNeo<[EMAIL PROTECTED]> wrote: > >On May 2, 1:52 pm, Mike Driscoll <[EMAIL PROTECTED]> wrote: > >> On May 2, 1:20 pm, Heikki Toivonen <[EMAIL PROTECTED]> wrote: > > >> > Mike Driscoll wrote:

How to generate binary python?

2008-05-05 Thread David Anderson
Hi, i'm comingo from Java and I'm wanting to know what in Python is the equivalent to the file.class in java, I am producing some apps that ar not open source, so I would like to share only the binaries, Both for Windows and for Linux, Can you suggest me anything? Bye -- http://mail.python.org/mail

Re: logger output

2008-05-05 Thread Gabriel Genellina
En Mon, 05 May 2008 13:02:12 -0300, skunkwerk <[EMAIL PROTECTED]> escribió: > On May 4, 10:40 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> > wrote: >> En Mon, 05 May 2008 00:33:12 -0300,skunkwerk<[EMAIL PROTECTED]> escribió: >> >> > i'm redirecting the stdout & stderr of my python program to a log.

Re: ]ANN[ Vellum 0.16: Lots Of Documentation and Watching

2008-05-05 Thread Paul Boddie
On 5 Mai, 23:57, [EMAIL PROTECTED] (Ville M. Vainio) wrote: > Paul Boddie <[EMAIL PROTECTED]> writes: > > Anyway, I'm just confirming that I'm clearly not one of the "many" > > described above. A lot of my own work is licensed under the GPL or > > I guess it's safe to assume that you are not oppose

Re: config files in python

2008-05-05 Thread Matimus
On May 5, 10:22 am, Francesco Bochicchio <[EMAIL PROTECTED]> wrote: > On Mon, 05 May 2008 00:35:51 -0700, sandipm wrote: > > Hi, > > In my application, I have some configurable information which is used > > by different processes. currently I have stored configration in a > > conf.py file as name=

Re: config files in python

2008-05-05 Thread Matimus
On May 4, 11:35 pm, sandipm <[EMAIL PROTECTED]> wrote: > Hi, > In my application, I have some configurable information which is used > by different processes. currently I have stored configration in a > conf.py file as name=value pairs, and I am importing conf.py file to > use this variable. it wo

How can we write a class factory that dynamically redefines the __init__ function etc.

2008-05-05 Thread John Schroeder
Basically I have some classes like this: ### # 0x01: ModeCommand ### class ModeCommand: """This is the Mode Command Packet class.""" def

Re: STL multimap

2008-05-05 Thread castironpi
On May 5, 1:26 pm, Aaron Watters <[EMAIL PROTECTED]> wrote: > Hi there.  Maybe a little more context would > help us figure out what you want here... > > On May 5, 1:28 pm, [EMAIL PROTECTED] wrote: > > > Is multimap just a syntax-checked dictionary of mutable sequences? > > I think the equivalent o

Python Programmer position available in New York

2008-05-05 Thread Rakhi
Title: Python Programmer Location: Orangeburg, NY 10962 6 months position Roles and responsibilities:- · Designs and codes from specifications, analyzes, evaluates, tests, debugs, documents, and implements moderately complex software applications. Prepares detailed specifications. ·

Re: Nested os.path.join()'s

2008-05-05 Thread Scott David Daniels
Paul Scott wrote: ... example: if os.path.exists(os.path.join(basedir,picdir)) == True : blah blah Question is, is there a better way of doing this? The above *works* but it looks kinda hackish... You've had the joining addressed elsewhere, but note that: if os.path.exists(os.path.join

Re: listing computer hard drives with python

2008-05-05 Thread python newbie
Sorry, I forgot to copy the list. Looks like you are doing this on Windows. Windows has a built in command call fsutil that would work in this situation. The syntax would be: C:\Documents and Settings\username>fsutil fsinfo drives Drives: C:\ D:\ E:\ To find out the type of drive you can use

Python-URL! - weekly Python news and links (May 6)

2008-05-05 Thread Gabriel Genellina
QOTW: "[buildout] is not just some stupid thing." - Alan Runyan http://wiki.python.org/moin/buildout has more background sum() doesn't use the best possible algorithm when dealing with floating point numbers: http://mail.python.org/pipermail/python-list/2008-May/4

notification of file truncate

2008-05-05 Thread nishant . deshpande
hi, I am running ubuntu 7.1 (linux 2.6.22-12-generic) i was trying to implement 'tail -f' (well tail -F actually but for this example i think its not relevent) and one of the features which i couldn't get in python was notification of truncation of a file. i looked at the inotify (the pyinotify

Re: word shifts

2008-05-05 Thread dave
On 2008-05-04 01:10:40 -0600, Arnaud Delobelle <[EMAIL PROTECTED]> said: dave <[EMAIL PROTECTED]> writes: Hello, I made a function that takes a word list (one word per line, text file) and searches for all the words in the list that are 'shifts' of eachother. 'abc' shifted 1 is 'bcd' Please

Re: config files in python

2008-05-05 Thread George Sakkis
On May 5, 6:57 pm, Matimus <[EMAIL PROTECTED]> wrote: > On May 5, 10:22 am, Francesco Bochicchio <[EMAIL PROTECTED]> wrote: > > > > > On Mon, 05 May 2008 00:35:51 -0700, sandipm wrote: > > > Hi, > > > In my application, I have some configurable information which is used > > > by different processe

Re: STL multimap

2008-05-05 Thread castironpi
On May 5, 6:40 pm, [EMAIL PROTECTED] wrote: > On May 5, 1:26 pm, Aaron Watters <[EMAIL PROTECTED]> wrote: > > > > > > > Hi there.  Maybe a little more context would > > help us figure out what you want here... > > > On May 5, 1:28 pm, [EMAIL PROTECTED] wrote: > > > > Is multimap just a syntax-check

Re: word shifts

2008-05-05 Thread George Sakkis
On May 5, 11:02 pm, dave <[EMAIL PROTECTED]> wrote: > On 2008-05-04 01:10:40 -0600, Arnaud Delobelle <[EMAIL PROTECTED]> said: > > > > > dave <[EMAIL PROTECTED]> writes: > > >> Hello, > > >> I made a function that takes a word list (one word per line, text > >> file) and searches for all the words

Re: generator functions in another language

2008-05-05 Thread castironpi
On May 5, 1:55 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On May 4, 1:11 pm, [EMAIL PROTECTED] wrote: > > > There is no such thing as a 'frame' per se in C; byte code is > > integral.  As there is no such thing as suspended state without > > frames, and no such thing as generators without

Re: Feature suggestion: sum() ought to use a compensated summation algorithm

2008-05-05 Thread Gabriel Genellina
En Mon, 05 May 2008 11:08:02 -0300, Szabolcs <[EMAIL PROTECTED]> escribió: On May 5, 12:24 pm, Duncan Booth <[EMAIL PROTECTED]> wrote: Szabolcs <[EMAIL PROTECTED]> wrote: > On May 5, 9:37 am, Szabolcs Horvát <[EMAIL PROTECTED]> wrote: >> Gabriel Genellina wrote: >> > Python doesn't require __a

Decimal vs Float comparasion

2008-05-05 Thread Yuan HOng
Hi, It seems decimal object will always be larger than float in comparasion, which goes against common sense: >>> from decimal import Decimal >>> a = Decimal('0.5') >>> a > 9 False >>> a > 9.0 True It seems to me that rather than allowing this to happen, comparasion between the two shoul

Re: Decimal vs Float comparasion

2008-05-05 Thread Gasto
I still don't see why such a module exists. On 5 mayo, 21:52, "Yuan HOng" <[EMAIL PROTECTED]> wrote: > Hi, > > It seems decimal object will always be larger than float in > comparasion, which goes against common sense: > > >>> from decimal import Decimal > >>> a = Decimal('0.5') > >>> a > 9 >

Re: SSL through python. possible ?

2008-05-05 Thread Heikki Toivonen
TkNeo wrote: > ok i have tried around a lot but no luck. I think M2Crypto is my best > option except it requires a minimum of python 2.4 which i don't have. M2Crypto requires Python 2.3. There are optional features that require newer Python. If you run into anything else (=bugs) that does not work

Re: threading: getting latest elements from list/dict

2008-05-05 Thread Gabriel Genellina
En Mon, 05 May 2008 08:26:45 -0300, Vaibhav.bhawsar <[EMAIL PROTECTED]> escribió: Hello I have a thread updating a dictionary with new elements. How can I check for new elements as they are inserted into the dictionary by the thread? In general is it safe to read a dictionary or a list whil

Re: How to generate binary python?

2008-05-05 Thread Gabriel Genellina
En Mon, 05 May 2008 19:43:24 -0300, David Anderson <[EMAIL PROTECTED]> escribió: Hi, i'm comingo from Java and I'm wanting to know what in Python is the equivalent to the file.class in java, I am producing some apps that ar not open source, so I would like to share only the binaries, Both f

Bad form to access a *private variable* like _foo?

2008-05-05 Thread [EMAIL PROTECTED]
Bad form to access a *private variable* like _foo? The reason I'm asking is that TurboGears/SQLObject mobel objects have an attribute called "_connection" that must be used to manually commit database stuff e.g. MyObject._connection.commit() It bugs me. I don't know if it is a stylistic fa

Re: How can we write a class factory that dynamically redefines the __init__ function etc.

2008-05-05 Thread Gabriel Genellina
En Mon, 05 May 2008 20:34:32 -0300, John Schroeder <[EMAIL PROTECTED]> escribió: Basically I have some classes like this: ### # 0x01: ModeCommand ##

Re: Feature suggestion: sum() ought to use a compensated summation algorithm

2008-05-05 Thread Gabriel Genellina
En Mon, 05 May 2008 05:08:15 -0300, Raymond Hettinger <[EMAIL PROTECTED]> escribió: On May 3, 9:50 am, Szabolcs Horvát <[EMAIL PROTECTED]> wrote: I did the following calculation:  Generated a list of a million random numbers between 0 and 1, constructed a new list by subtracting the mean valu

Re: #!/usr/bin/env python vs. #!/usr/bin/python

2008-05-05 Thread andrej . panjkov
At our site we run IRIX, UNICOS, Solaris, Tru64, Linux, cygwin and other unixy OSes. We have python installed in a number of different places: /bin/python /usr/local/bin/python /usr/bin/python /opt/freeware/Python/Python-2.5.1/bin/python ~mataap/platform/python/python-2.5.1 So I cannot assume a

Re: How to pass a multiline arg to exec('some.exe arg')?

2008-05-05 Thread n00m
> Yes, call flush() each time you're done writing. No, it would be too easy & simple. While stdin is NOT CLOSED stdout has not EOF, but readlines() waits for its appearence ... and so freezes for good. IMO. Should be like this: import popen2 o=popen2.popen2('osql -E -S(local) -dpubs -c"GO" -n -w

Re: config files in python

2008-05-05 Thread sandipm
Thanks for various useful suggestions. actually right now I am using conf files only in psp handler of mod_python/apache but I have other processes which might use same config files. One way is I can put conf related data directly in database and database handling module can directly pickup values

Re: word shifts

2008-05-05 Thread Arnaud Delobelle
George Sakkis <[EMAIL PROTECTED]> writes: > On May 5, 11:02 pm, dave <[EMAIL PROTECTED]> wrote: >> On 2008-05-04 01:10:40 -0600, Arnaud Delobelle <[EMAIL PROTECTED]> said: >> >> >> >> > dave <[EMAIL PROTECTED]> writes: >> >> >> Hello, >> >> >> I made a function that takes a word list (one word per

Re: USB HID documentation?

2008-05-05 Thread Tim Roberts
"Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > >You seem to misunderstand HID. HID is a protocol over USB (and Bluetooth I >believe) that will create user input device events which are mapped to your >OS input layer. That means that whenever you e.g. attach a keyboard device, >it's keyboard events

Re: Decimal vs Float comparasion

2008-05-05 Thread Wojciech Walczak
2008/5/6, Yuan HOng <[EMAIL PROTECTED]>: > It seems decimal object will always be larger than float in > comparasion, which goes against common sense: > > >>> from decimal import Decimal > >>> a = Decimal('0.5') > >>> a > 9 > False > >>> a > 9.0 > True > > It seems to me that rathe

Re: How can we write a class factory that dynamically redefines the __init__ function etc.

2008-05-05 Thread s0suk3
On May 6, 12:14 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > (the convention is to use lowercase names for attributes: rawdata instead > of RawData) > But at least put an underscore between the words (raw_data), or, if you like the OO world, make the subsequent words capitalized (rawData).

Re: config files in python

2008-05-05 Thread Jorge Vargas
On Tue, May 6, 2008 at 2:00 AM, sandipm <[EMAIL PROTECTED]> wrote: > > here I would like to have python file which read conf from text file > and load those params in current process space. > so only importing that python file should read up the conf file and > load the current process with co

Re: Decimal vs Float comparasion

2008-05-05 Thread Wojciech Walczak
2008/5/6, Wojciech Walczak <[EMAIL PROTECTED]>: > a > 9.0 returns True because NotImplemented > 9.0 returns True. > a < 9.0 returns False because NotImplemented < 9.0 returns False. Sorry, it should rather be: Decimal('0.5') > 9.0 returns True because: Decimal('0.5') > NotImplem

<    1   2