Re: PyOpenGL pour python 2.5 ???

2006-09-25 Thread andychambers2002
Sébastien Ramage wrote: oh! sorry, I made some search on comp.lang.python and fr.comp.lang.python and finally I forgot where I was... My question is : how use pyopengl with python 2.5 ?? it seems that pyopengl was stop on 2005 Have a look at this thread. I think with pyopengl you'll have

Re: Daemonizing python

2006-09-25 Thread andychambers2002
Andi Clemens wrote: Hi, what is the main difference of running a python program as a daemon or as a cronjob? I have written a program at work that checks all internet connections of our failover sites and saves the results in a MySQL-database. The whole program is made with django (a

Force sleep to ignore interrupts

2006-09-14 Thread andychambers2002
I've written a simple Timer class that allows you to extend it and then implement onMinuteChange, onHourChange etc methods which will be executed on each new minute/hour respectively. It works as I want when used in the main application thread. That is, when you hit Ctr + C, it stops running.

Re: Force sleep to ignore interrupts

2006-09-14 Thread andychambers2002
Jeremy Sanders wrote: [EMAIL PROTECTED] wrote: It works as I want when used in the main application thread. That is, when you hit Ctr + C, it stops running. However, if the class that subclasses it, also subclasses Thread, it breaks in that hitting Ctrl + C interrupts the call to sleep

Re: couple more questions about sqlite

2006-08-18 Thread andychambers2002
2. What's the difference between sqlite and pysqlite? Do you need both, just one, or is one an older version of the same thing? To access your database from python you need both (or some alternative to pysqlite) 3. What's the difference between the command line program called sqlite3 and

Re: sqlite3 or mysqldb?

2006-08-17 Thread andychambers2002
I was using mysqldb just because MySQL seems to be a pretty big standard, but now that sqlite3 is coming with Python 2.5, I might switch, since it seems to be easier to use. Yes and No. Sqlite takes less to configure and manage but you have to consider your needs for concurrent processing.

Re: dynamic type changing

2006-05-28 Thread andychambers2002
I'm working on a TempFile class that stores the data in memory until it gets larger than a specified threshold (as per PEP 42). Whilst trying to implement it, I've come across some strange behaviour. Can anyone explain this? The test case at the bottom starts a TempFile at size 50 and

Re: generating random passwords ... for a csv file with user details

2006-05-28 Thread andychambers2002
import random def rand_str(len): chars = ''.join(['abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', '1234567890', '_+']) # plus whatever additional characters you want return ''.join([random.choice(chars) for i in

Re: Running External Commands + Seeing when they are Finished

2006-05-27 Thread andychambers2002
from os import * for cmd in ['adaware', 'spybot']: system(cmd) -- http://mail.python.org/mailman/listinfo/python-list

dynamic type changing

2006-05-27 Thread andychambers2002
I'm working on a TempFile class that stores the data in memory until it gets larger than a specified threshold (as per PEP 42). Whilst trying to implement it, I've come across some strange behaviour. Can anyone explain this? The test case at the bottom starts a TempFile at size 50 and prints

Re: Natural Language Date Processing.

2006-02-07 Thread andychambers2002
From the docs for PHP's 'strtotime' Parameters time The string to parse, according to the GNU Date Input Formats syntax. Before PHP 5.0, microseconds weren't allowed in the time, since PHP 5.0 they are allowed but ignored. ... It seems that the string to be parsed has to be provided in the GNU

classmethod and instance method

2006-02-02 Thread andychambers2002
Hi, I'm trying to write a method that needs to know both the class name and the instance details class A: @classmethod def meth(cls, self): print cls print self a = A() a.meth(a) The above code seems to work as intended. Could the same effect be achieved using a

Re: classmethod and instance method

2006-02-02 Thread andychambers2002
Yes that's better. Didn't know about the __class__ attribute. I thought there must be a way to access this but couldn't find it in the docs. Thanks, Andy -- http://mail.python.org/mailman/listinfo/python-list

DB API specification of .rowcount and/or execute

2005-11-14 Thread andychambers2002
Hi, Should execute() be allowed to execute multiple operations? e.g. from dbi import * conn = connect(database=test) curs = conn.cursor() curs.execute( INSERT INTO test_table VALUES (1, 'one'); INSERT INTO test_table VALUES(2, 'two');

Retain reference to a struct

2005-11-02 Thread andychambers2002
Hi All, A C library I'm using has a number of functions that all require a struct as an argument. The example module shows how to make a new Python Object from C code and I've seen other posts that recommend this way of doing it. In this case though, it would seem easier if I could create the