Re: python -Ms-Word

2008-10-06 Thread Gabriel Genellina
En Mon, 06 Oct 2008 15:27:55 -0300, gita saleh <[EMAIL PROTECTED]> escribió: I'd like to add header and footer to ms-word using python. Any hint would be appreciated. google for "python Word automation" -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list

Re: When Python should not be used?

2008-10-06 Thread Gabriel Genellina
En Mon, 06 Oct 2008 15:07:23 -0300, Stef Mientki <[EMAIL PROTECTED]> escribió: Andrea Francia wrote: While some python users prefer to talk about when Python is the right tool I think that it is more instructive to know when it is not. Please, could you let me know what do you think about t

Re: What AugStore and AugLoad AST nodes are?

2008-10-06 Thread franck
> They aren't used by the current implementation. OK, thanks! Franck -- http://mail.python.org/mailman/listinfo/python-list

Re: type-checking support in Python?

2008-10-06 Thread Lawrence D'Oliveiro
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; loads in lbs but pressures in kg/cm². Isn't the right way to handle tha

Re: subprocess.Popen(..., cwd=...) and Makefile $(PWD) don't play nice

2008-10-06 Thread Gabriel Genellina
En Mon, 06 Oct 2008 13:09:26 -0300, Miki <[EMAIL PROTECTED]> escribió: Can anybody explain why Makefile $(PWD) does show the right directory when running under subprocess.Popen(..., cwd=...) For example: [18:07] tmp $cat /tmp/p/Makefile all: @echo $(PWD) [18:07] tmp $cat t

Re: If an OS was to be written in Python, how'w it look?

2008-10-06 Thread Gabriel Genellina
En Mon, 06 Oct 2008 01:16:55 -0300, process <[EMAIL PROTECTED]> escribió: If an OS was to be written in Python and the hardware optimized for it, what changes would be made to the hardware to accomodate Python strenghs and weaknesses? There was an experiment ("Unununium"), now abandoned:

Re: type-checking support in Python?

2008-10-06 Thread Gabriel Genellina
En Mon, 06 Oct 2008 11:19:58 -0300, Joe Strout <[EMAIL PROTECTED]> escribió: Finally, one thing I've considered is adopting some identifier prefixes indicating type. Maybe "iFoo" for integer, "fFoo" for floating-point numbers, "d" for dictionary, "l" for list, "t" for tuple, "o" for object

Re: how to start thread by group?

2008-10-06 Thread Gabriel Genellina
En Mon, 06 Oct 2008 11:24:51 -0300, <[EMAIL PROTECTED]> escribió: On 6 Ott, 15:24, oyster <[EMAIL PROTECTED]> wrote: my code is not right, can sb give me a hand? thanx for example, I have 1000 urls to be downloaded, but only 5 thread at one time I would restructure my code with someting l

Re: Pure Python interface to MySQL?

2008-10-06 Thread James Mills
On Tue, Oct 7, 2008 at 2:12 PM, Tino Wildenhain <[EMAIL PROTECTED]> wrote: > Will you be asking for a pure python implementation of mysql > in the next question? ;) Why not use the proxy approach (for > example via xmlrpc) as suggested by James or just spill to > a file? :-) You could for example

Re: Pure Python interface to MySQL?

2008-10-06 Thread Tino Wildenhain
Hi, Roy Smith wrote: In article <[EMAIL PROTECTED]>, Carsten Haese <[EMAIL PROTECTED]> wrote: Roy Smith wrote: Does there exist a pure Python version of a MySQL module? A quick google search turns up this: http://github.com/mopemope/pure-python-mysql/tree/master/pymysql Awesome, thanks!

Re: How to setup pythonpath in Ubuntu8.04

2008-10-06 Thread Benjamin Kaplan
On Mon, Oct 6, 2008 at 10:37 PM, Steve <[EMAIL PROTECTED]> wrote: > Ubuntu8.04 wrapped python25 and set python25 as default python path in > the shell.Now I want upgrade to python26,how I set up python26 as > default python path?Thanks a lot! > -- What do you mean by that? "Python path" usually

How to setup pythonpath in Ubuntu8.04

2008-10-06 Thread Steve
Ubuntu8.04 wrapped python25 and set python25 as default python path in the shell.Now I want upgrade to python26,how I set up python26 as default python path?Thanks a lot! -- http://mail.python.org/mailman/listinfo/python-list

Re: python 2.6 is out people!!

2008-10-06 Thread Steve Holden
AON LAZIO wrote: > When we change from 2.5.2 to 2.6? should we update any module in 2.5.2? > Thanks You will need updated versions of your extension modules (those that have been written in C or C++ and compiled). The pure Python modules will need to be installed into the new Python - you shouldn'

Re: Python 2.6, GUI not working on vista?

2008-10-06 Thread Tim Roberts
Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote: >In message <[EMAIL PROTECTED]>, Thorsten Kampe >wrote: > >> * Lawrence D'Oliveiro (Sun, 05 Oct 2008 22:13:46 +1300) >> >>> In message <[EMAIL PROTECTED]>, Michel Claveau - >>> NoSpam SVP ; merci wrote: >>> >>> > Another way is to de-activate UAC. >>

Re: What AugStore and AugLoad AST nodes are?

2008-10-06 Thread Benjamin
On Oct 6, 7:00 am, franck <[EMAIL PROTECTED]> wrote: > Dear all, > > I'm experimenting with new ast module. > I'd like to have pieces of code that can generate AugLoad and AugStore > AST nodes. > Indeed, I actually do not know what they correspond to. They aren't used by the current implementation

How to best return a string from C to CPython 2.5?

2008-10-06 Thread dylan . fun
I'm trying to return a Python string from a C++ function (actually inside gnuradio) using CPython 2.5. My C++ function is declared like: typedef struct { int size; unsigned char *data; } STRING STRINGBUF myfunc(std::string s) { STRINGBUF buf; . . . buf.size = s.length(); buf.data

Re: HARD REAL TIME PYTHON

2008-10-06 Thread Jean-Paul Calderone
On Tue, 7 Oct 2008 12:10:44 +1000, James Mills <[EMAIL PROTECTED]> wrote: On Tue, Oct 7, 2008 at 11:48 AM, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: Indeed, this looks wrong - or at least inconclusive. The benchmark above demonstrates throughput, not minimum (or maximum, or average, or any

Re: HARD REAL TIME PYTHON

2008-10-06 Thread James Mills
On Tue, Oct 7, 2008 at 11:48 AM, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > Indeed, this looks wrong - or at least inconclusive. The benchmark > above demonstrates throughput, not minimum (or maximum, or average, > or any other statistic) response latency, which is what the OP was > really a

Re: tcl/tk version confusion with tkinter in Python 2.6, on OS X

2008-10-06 Thread Kent Johnson
On Oct 6, 5:58 pm, [EMAIL PROTECTED] wrote: > On Oct 6, 4:48 pm, [EMAIL PROTECTED] wrote: > > > I'm having trouble with tkinter on a new installation of Python (2.6), > > built with the framework option from source that was downloaded from > > python.org. I'm running OS 10.4 on a PowerPC G4. > > >

EARN 1000$ IN EVERY MONTH

2008-10-06 Thread chinu
hai, i am srinu from india. i am sending a blog url for yours use. click on the blog and get more information to choose yours job. the blog url is: http://earnmonthlyincome.blogspot.com/ goodluck -- http://mail.python.org/mailman/listinfo/python-list

Re: Array of dict or lists or ....?

2008-10-06 Thread Tim Chase
__repr__ = __str__ I don't know if that's a good practice. I've seen it in a couple places, and it's pretty explicit what it's doing. try: data.setdefault( state, {}).setdefault( county, {}).setdefault( cls, Attendence(max_students)).accrue(enrolle

Re: HARD REAL TIME PYTHON

2008-10-06 Thread Jean-Paul Calderone
On Tue, 7 Oct 2008 09:32:37 +1000, James Mills <[EMAIL PROTECTED]> wrote: On Tue, Oct 7, 2008 at 9:25 AM, Blubaugh, David A. <[EMAIL PROTECTED]> wrote: close to real time constraints? For example is it possible to develop a python program that can address an interrupt or execute an operation wit

Re: self signing a py2exe windows executable

2008-10-06 Thread Roger Upole
William Heath wrote: >I don't know, how can I tell, sorry I am new to this. > -Tim > You can use the certificates snap in for MMC to view them. Start->Run and enter mmc.exe File->Add/Remove snapin Click the Add button, and then select Certificates. On some systems, you might find it already con

Re: Python 2.6: Determining if a method is inherited

2008-10-06 Thread Terry Reedy
Fuzzyman wrote: On Oct 6, 7:02 pm, Terry Reedy <[EMAIL PROTECTED]> wrote: fuzzyman wrote: Doesn't sound like a particularly *good* solution to me. :-) From what you posted, 'type object at' should work. It's still a hack... I am sorry if I offended you by pointing out to you a quick and d

Re: Array of dict or lists or ....?

2008-10-06 Thread bearophileHUGS
Tim Chase: >__repr__ = __str__ I don't know if that's a good practice. > try: >data.setdefault( > state, {}).setdefault( > county, {}).setdefault( > cls, Attendence(max_students)).accrue(enrolled) > except TooManyAttendants: I suggest to decompr

Re: Pure Python interface to MySQL?

2008-10-06 Thread Roy Smith
In article <[EMAIL PROTECTED]>, Carsten Haese <[EMAIL PROTECTED]> wrote: > Roy Smith wrote: > > Does there exist a pure Python version of a MySQL module? > > A quick google search turns up this: > > http://github.com/mopemope/pure-python-mysql/tree/master/pymysql Awesome, thanks! You have bet

Re: self signing a py2exe windows executable

2008-10-06 Thread William Heath
I don't know, how can I tell, sorry I am new to this. -Tim On Mon, Oct 6, 2008 at 5:57 PM, Roger Upole <[EMAIL PROTECTED]> wrote: > > William Heath wrote: > > Hi Roger, > > I managed to get the dll and register it. I am now getting this error: > > > > Traceback (most recent call last): > > File

Re: self signing a py2exe windows executable

2008-10-06 Thread Roger Upole
William Heath wrote: > Hi Roger, > I managed to get the dll and register it. I am now getting this error: > > Traceback (most recent call last): > File > "C:\Python25\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", > line 312, in RunScript >exec codeObject in __main__.__dict__ >

Re: The recent SPAM messages, and a suggested solution

2008-10-06 Thread Ben Finney
"Barak, Ron" <[EMAIL PROTECTED]> writes: > I think most of us are annoyed by the recent SPAM messages that > crept onto our list. Note that “spam”, referring to unsolicited bulk messages, is not an acronym for anything and so is not capitalised. The term “SPAM” in uppercase rather refers to the H

Re: Is PyFIT dead and abandoned?

2008-10-06 Thread Ben Finney
"James Mills" <[EMAIL PROTECTED]> writes: > On Tue, Oct 7, 2008 at 5:18 AM, <[EMAIL PROTECTED]> wrote: > > Has PyFIT been completely abandoned? Is there a better alternative or > > other resources to help me integrate fitnesse and python? > > I for one am not interested in this kind of framework

Re: Array of dict or lists or ....?

2008-10-06 Thread Tim Chase
I can't figure out how to set up a Python data structure to read in data that looks something like this (albeit somewhat simplified and contrived): States Counties Schools Classes Max Allowed Students Current enrolled Students Nebraska, Wabash, Newville,

Re: self signing a py2exe windows executable

2008-10-06 Thread William Heath
Hi Roger, I managed to get the dll and register it. I am now getting this error: Traceback (most recent call last): File "C:\Python25\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", line 312, in RunScript exec codeObject in __main__.__dict__ File "C:\Documents and Settings\bl

Re: Dict Comprehension ?

2008-10-06 Thread Ben Finney
"Ernst-Ludwig Brust" <[EMAIL PROTECTED]> writes: > Given 2 Number-Lists say l0 and l1, > count the various positiv differences between the 2 lists > > the following part works: > > dif=[abs(x-y) for x in l0 for y in l1] > da={} > for d in dif: da[d]=da.get(d,0)+1 > > i wonder, if there is a way

Re: Is PyFIT dead and abandoned?

2008-10-06 Thread Pekka Laukkanen
2008/10/6 <[EMAIL PROTECTED]>: > I was wanting to experiment with PyFIT but it seems DOA. Googling > doesn't yield any information less than two years old. When I try to > install 0.8a2 I get errors because setup.py references a non-existant > file (FitFilter.py). I find it hard to believe that in

Re: Python 2.6 / 3.0: Determining if a method is inherited

2008-10-06 Thread Pekka Laukkanen
2008/10/7 Pekka Laukkanen <[EMAIL PROTECTED]>: > 2008/10/5 Fuzzyman <[EMAIL PROTECTED]>: >> I may well be being dumb (it has happened before), but I'm struggling >> to fix some code breakage with Python 2.6. >> >> I have some code that looks for the '__lt__' method on a class: >> >> if hasattr(clr,

Array of dict or lists or ....?

2008-10-06 Thread Pat
I can't figure out how to set up a Python data structure to read in data that looks something like this (albeit somewhat simplified and contrived): States Counties Schools Classes Max Allowed Students Current enrolled Students Nebraska, Wabash, Newville, Ma

Re: Pure Python interface to MySQL?

2008-10-06 Thread Carsten Haese
Roy Smith wrote: > Does there exist a pure Python version of a MySQL module? A quick google search turns up this: http://github.com/mopemope/pure-python-mysql/tree/master/pymysql I've never used it, though, so I have no idea whether it works or how well it works. HTH, -- Carsten Haese http://i

Re: Python 2.6 / 3.0: Determining if a method is inherited

2008-10-06 Thread Pekka Laukkanen
2008/10/5 Fuzzyman <[EMAIL PROTECTED]>: > I may well be being dumb (it has happened before), but I'm struggling > to fix some code breakage with Python 2.6. > > I have some code that looks for the '__lt__' method on a class: > > if hasattr(clr, '__lt__'): > > However - in Python 2.6 object has grow

Re: HARD REAL TIME PYTHON

2008-10-06 Thread James Mills
On Tue, Oct 7, 2008 at 9:25 AM, Blubaugh, David A. <[EMAIL PROTECTED]> wrote: > close to real time constraints? For example is it possible to develop a > python program that can address an interrupt or execute an operation > within 70 Hz or less?? Are there any additional considerations that I > sh

Re: Pure Python interface to MySQL?

2008-10-06 Thread James Mills
On Tue, Oct 7, 2008 at 9:15 AM, Roy Smith <[EMAIL PROTECTED]> wrote: > Does there exist a pure Python version of a MySQL module? I've got a data > logging application that needs to run on a whole bunch of OSs, ranging from > Windows to a dozen different unix flavors on all sorts of hardware. > > P

HARD REAL TIME PYTHON

2008-10-06 Thread Blubaugh, David A.
To All, I have done some additional research into the possibility of utilizing Python for hard real time development. I have seen on various websites where this has been discussed before on the internet. However, I was wondering as to how successful anyone has truly been in developing a program

Pure Python interface to MySQL?

2008-10-06 Thread Roy Smith
Does there exist a pure Python version of a MySQL module? I've got a data logging application that needs to run on a whole bunch of OSs, ranging from Windows to a dozen different unix flavors on all sorts of hardware. Portability is much more important than performance for this application. W

Re: tcl/tk version confusion with tkinter in Python 2.6, on OS X

2008-10-06 Thread Marans
On Oct 6, 5:58 pm, [EMAIL PROTECTED] wrote: > On Oct 6, 4:48 pm, [EMAIL PROTECTED] wrote: > > > > > I'm having trouble with tkinter on a new installation of Python (2.6), > > built with the framework option from source that was downloaded from > > python.org. I'm running OS 10.4 on a PowerPC G4. >

Re: PyOpenGL double-buffered hardware surface

2008-10-06 Thread [EMAIL PROTECTED]
On Oct 6, 11:45 am, Clay Hobbs <[EMAIL PROTECTED]> wrote: > I'm using wxPython.  My real problem is that everything flashes when it > moves.  I thought the way to fix this was to make a double-buffered Have you tried looking here? If it doesn't solve your problem, then more information would be h

python 2.6 is out people!!

2008-10-06 Thread AON LAZIO
When we change from 2.5.2 to 2.6? should we update any module in 2.5.2? Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: tcl/tk version confusion with tkinter in Python 2.6, on OS X

2008-10-06 Thread kevin . walzer
On Oct 6, 4:48 pm, [EMAIL PROTECTED] wrote: > I'm having trouble with tkinter on a new installation of Python (2.6), > built with the framework option from source that was downloaded from > python.org. I'm running OS 10.4 on a PowerPC G4. > > The problem first arose when I tried to run matplotlib -

Re: gif creator

2008-10-06 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > has anyone written a gif creator program purely in python that doesn't > require PIL or tons of other claptrap? It's so much easier to just go into Synaptic (or whatever your package manager is) and check a few boxes to install all the ne

Re: Is PyFIT dead and abandoned?

2008-10-06 Thread James Mills
On Tue, Oct 7, 2008 at 5:18 AM, <[EMAIL PROTECTED]> wrote: > Has PyFIT been completely abandoned? Is there a better alternative or > other resources to help me integrate fitnesse and python? I for one am not interested in this kind of framework for testing - and yet I come from a strict Software

Re: When Python should not be used?

2008-10-06 Thread Tim Rowe
2008/10/6 Andrea Francia <[EMAIL PROTECTED]>: > The right tool depends on the current problem. > > While some python users prefer to talk about when Python is the right tool I > think that it is more instructive to know when it is not. > > Please, could you let me know what do you think about that?

Re: Favorite Python System Administration Examples

2008-10-06 Thread Casey
On Oct 6, 3:05 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > I'm giving a talk at LISA this year, and while the slides are ready I > would like to go armed with as many examples of good system > administration code as possible. > > If you have a favorite administration tool that you wouldn't mind m

Re: When Python should not be used?

2008-10-06 Thread Bruno Desthuilliers
Andrea Francia a écrit : The right tool depends on the current problem. While some python users prefer to talk about when Python is the right tool I think that it is more instructive to know when it is not. Please, could you let me know what do you think about that? Last time I had to chang

Re: function(s) to decode a URL produced by encodeURIComponent in javascript

2008-10-06 Thread Bruno Desthuilliers
Merrick a écrit : (answering to itself) sorry for answering my own question. Don't be sorry. You're doing a great service to everyone here by letting us know the problem is solved (so we don't bother answering), and to everyone that might have the same problem (and is able to use a search e

Re: function(s) to decode a URL produced by encodeURIComponent in javascript

2008-10-06 Thread Merrick
On Oct 6, 12:51 pm, Merrick <[EMAIL PROTECTED]> wrote: > I encoded a URL in javascript and would like to decode it in python. > The urllib.unquote does not have an optional safe argument and I > cannot find how to do urldecode. It looks like urllib.unquote_plus does this, sorry for answering my ow

Re: lint for Python?

2008-10-06 Thread Bruno Desthuilliers
Pat a écrit : Bruno Desthuilliers wrote: Pat a écrit : (snip) How you catch these types of errors? Just like any other type of errors : testing, testing, and then add some more tests. I haven't gotten into unittesting. I've just started learning Python. It also dawned on me why my

Re: I built a nice html templater!

2008-10-06 Thread Carl Banks
On Oct 2, 3:18 am, Tim Roberts <[EMAIL PROTECTED]> wrote: > Derick van Niekerk <[EMAIL PROTECTED]> wrote: > >Ok - so it's not really an awesome achievement and only handles basic > >templating needs (no loops and other programming constructs) but maybe > >someone will find it useful. > > > Sure, t

tcl/tk version confusion with tkinter in Python 2.6, on OS X

2008-10-06 Thread njwilson23
I'm having trouble with tkinter on a new installation of Python (2.6), built with the framework option from source that was downloaded from python.org. I'm running OS 10.4 on a PowerPC G4. The problem first arose when I tried to run matplotlib - it couldn't find tcl/tk because it was searching for

Re: Python 2.6: Determining if a method is inherited

2008-10-06 Thread Fuzzyman
On Oct 6, 7:02 pm, Terry Reedy <[EMAIL PROTECTED]> wrote: > Fuzzyman wrote: > > On Oct 5, 11:54 pm, Terry Reedy <[EMAIL PROTECTED]> wrote: > >> Fuzzyman wrote: > >>> Hello all, > >>> I may well be being dumb (it has happened before), but I'm struggling > >>> to fix some code breakage with Python 2.

Re: lint for Python?

2008-10-06 Thread George Sakkis
On Oct 6, 3:49 pm, Pat <[EMAIL PROTECTED]> wrote: > I'll come back with more intelligent questions after I've actually > learned some Python. That's a wise self-advice ;-) -- http://mail.python.org/mailman/listinfo/python-list

function(s) to decode a URL produced by encodeURIComponent in javascript

2008-10-06 Thread Merrick
I encoded a URL in javascript and would like to decode it in python. The urllib.unquote does not have an optional safe argument and I cannot find how to do urldecode. -- http://mail.python.org/mailman/listinfo/python-list

Re: lint for Python?

2008-10-06 Thread Pat
Bruno Desthuilliers wrote: Pat a écrit : I've been searching for a good multi-module lint checker for Python and I haven't found one yet. Pylint does a decent job at checking for errors only within a single module. Here's one of my problems. I have two modules. In module one, I have a fun

Re: I built a nice html templater!

2008-10-06 Thread Eric S. Johansson
Steve Holden wrote: > Tim Roberts wrote: >> Derick van Niekerk <[EMAIL PROTECTED]> wrote: >>> Ok - so it's not really an awesome achievement and only handles basic >>> templating needs (no loops and other programming constructs) but maybe >>> someone will find it useful. >> >> Sure, that's what th

Re: When Python should not be used?

2008-10-06 Thread Stef Mientki
David, Craig, Thanks for your interest. Here are a few examples, containing links to some animations http://oase.uci.kun.nl/~mientki/data_www/pylab_works/pw_animations_screenshots.html and here is a collection of my notes until july this year: http://pylab-works.googlecode.com/files/pw_manual

Re: do something in time interval

2008-10-06 Thread Mathieu Prevot
2008/10/6 Petr Jakeš <[EMAIL PROTECTED]>: >> I am not an expert, but why not to use time.sleep(5)? >> If you are using wxPython, you may also try wx.Timer, in which you could >> set its interval. >> > > Thanks for your reply. > During the 5s period my script has to do some stuff instead of sleeping

Re: do something in time interval

2008-10-06 Thread D'Arcy J.M. Cain
On Mon, 6 Oct 2008 21:13:21 +0200 "Petr Jake?" <[EMAIL PROTECTED]> wrote: > > I am not an expert, but why not to use time.sleep(5)? > > > During the 5s period my script has to do some stuff instead of sleeping. > Thats why it runs in the loop and once in 5s period it has to trigger some > other stu

Re: Builing Python 2.6 on AIX 5.2

2008-10-06 Thread pruebauno
On Oct 6, 11:03 am, "Jesse Noller" <[EMAIL PROTECTED]> wrote: > Looks like AIX is missing sem_timedwait - see:http://bugs.python.org/issue3876 > > Please add your error to the bug report just so I can track it. > > -jesse > > On Mon, Oct 6, 2008 at 4:16 AM, brasse <[EMAIL PROTECTED]> wrote: > > Hel

Is PyFIT dead and abandoned?

2008-10-06 Thread oakley
I was wanting to experiment with PyFIT but it seems DOA. Googling doesn't yield any information less than two years old. When I try to install 0.8a2 I get errors because setup.py references a non-existant file (FitFilter.py). I find it hard to believe that in two years nobody has stumbled over this

Re: do something in time interval

2008-10-06 Thread Petr Jakeš
> > I am not an expert, but why not to use time.sleep(5)? > If you are using wxPython, you may also try wx.Timer, in which you could > set its interval. > > Thanks for your reply. During the 5s period my script has to do some stuff instead of sleeping. Thats why it runs in the loop and once in 5s p

Favorite Python System Administration Examples

2008-10-06 Thread Steve Holden
I'm giving a talk at LISA this year, and while the slides are ready I would like to go armed with as many examples of good system administration code as possible. If you have a favorite administration tool that you wouldn't mind me using I'd love to know about it. Feel free to email me personally

Re: do something in time interval

2008-10-06 Thread Jerry Hill
On Mon, Oct 6, 2008 at 2:07 PM, Petr Jakes <[EMAIL PROTECTED]> wrote: > I have infinitive loop running script and I would like to check > something periodically after 5 seconds (minutes, hours...) time period > (I do not mean time.sleep(5) ). Till now, I have following script, but > I think there m

Re: Python 2.6 / 3.0: Determining if a method is inherited

2008-10-06 Thread Fuzzyman
On Oct 6, 7:23 pm, "Aaron \"Castironpi\" Brady" <[EMAIL PROTECTED]> wrote: > On Oct 6, 1:17 pm, Fuzzyman <[EMAIL PROTECTED]> wrote: > > > > > On Oct 6, 7:01 pm, "Aaron \"Castironpi\" Brady" <[EMAIL PROTECTED]> > > wrote: > > > It's a very object oriented solution.  Essentially you're inheriting > >

Re: PyOpenGL double-buffered hardware surface

2008-10-06 Thread Clay Hobbs
On Sun, 2008-10-05 at 14:16 -0400, Mike C. Fletcher wrote: > Clay Hobbs wrote: > > How do I create a double-buffered hardware surface with PyOpenGL? I > > knew how to once, but forgot. > > > > > Depends on your GUI library, most of them have a flag-set that you pass > to the initializer of th

Re: lint for Python?

2008-10-06 Thread Bruno Desthuilliers
Pat a écrit : I've been searching for a good multi-module lint checker for Python and I haven't found one yet. Pylint does a decent job at checking for errors only within a single module. Here's one of my problems. I have two modules. In module one, I have a function: def foo( host, useri

Re: do something in time interval

2008-10-06 Thread Terry Reedy
Petr Jakes wrote: I have infinitive loop running script and I would like to check something periodically after 5 seconds (minutes, hours...) time period (I do not mean time.sleep(5) ). Till now, I have following script, but I think there must be something more elegant. eventFlag = False while 1:

RE: When Python should not be used?

2008-10-06 Thread Blubaugh, David A.
Stef, May I see your open-source version of a combined Matlab + Labview program? Is there a website, I may visit?? Thanks, David Blubaugh -Original Message- From: Stef Mientki [mailto:[EMAIL PROTECTED] Sent: Monday, October 06, 2008 2:07 PM To: python-list@python.org Subject:

Re: do something in time interval

2008-10-06 Thread Leon Zhang
Petr, I am not an expert, but why not to use time.sleep(5)? If you are using wxPython, you may also try wx.Timer, in which you could set its interval. Good luck! Leon On Tue, Oct 7, 2008 at 2:07 AM, Petr Jakes <[EMAIL PROTECTED]> wrote: > I have infinitive loop running script and I would like t

python -Ms-Word

2008-10-06 Thread gita saleh
Hello Everyone, I'd like to add header and footer to ms-word using python. Any hint would be appreciated. Thanks, /G* -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.6 / 3.0: Determining if a method is inherited

2008-10-06 Thread Aaron "Castironpi" Brady
On Oct 6, 1:17 pm, Fuzzyman <[EMAIL PROTECTED]> wrote: > On Oct 6, 7:01 pm, "Aaron \"Castironpi\" Brady" <[EMAIL PROTECTED]> > wrote: > > It's a very object oriented solution.  Essentially you're inheriting > > all the classes that you want to fail, from a class that does. > > But not a very good s

Re: When Python should not be used?

2008-10-06 Thread cstorey
On Oct 6, 2:07 pm, Stef Mientki <[EMAIL PROTECTED]> wrote: > and I'm working on a large application, > which should be open source replacement for MatLab + LabView. > > cheers, > Stef An Open Source Labview replacement would be really useful! Any preview of the project? Craig -- http://mail.pyt

Re: how to get the thighest bit position in big integers?

2008-10-06 Thread Aaron "Castironpi" Brady
On Oct 6, 3:37 am, Mark Dickinson <[EMAIL PROTECTED]> wrote: > On Oct 5, 11:40 pm, Terry Reedy <[EMAIL PROTECTED]> wrote: > > > Your point, that taking floor(log2(x)) is redundant, is a good catch. > > However, you should have added 'untested' ;-).  When value has more > > significant bits than the

Re: Python 2.6 / 3.0: Determining if a method is inherited

2008-10-06 Thread Fuzzyman
On Oct 6, 7:01 pm, "Aaron \"Castironpi\" Brady" <[EMAIL PROTECTED]> wrote: > On Oct 6, 4:30 am, Fuzzyman <[EMAIL PROTECTED]> wrote: > > > > > On Oct 6, 1:13 am, MRAB <[EMAIL PROTECTED]> wrote: > > > > Fuzzyman wrote: > > > > Hello all, > > > > > I may well be being dumb (it has happened before), bu

Re: how to get the thighest bit position in big integers?

2008-10-06 Thread Fredrik Johansson
On Oct 5, 5:26 pm, [EMAIL PROTECTED] wrote: > Hi, > > My question to the group: Does anyone know of a non-hackish way to > determine the required bit position in python? I know that my two > ideas > can be combined to get something working. But is there a *better* way, > that isn't that hackish? N

do something in time interval

2008-10-06 Thread Petr Jakes
I have infinitive loop running script and I would like to check something periodically after 5 seconds (minutes, hours...) time period (I do not mean time.sleep(5) ). Till now, I have following script, but I think there must be something more elegant. eventFlag = False while 1: time.sleep(0.01

Re: When Python should not be used?

2008-10-06 Thread Stef Mientki
Andrea Francia wrote: The right tool depends on the current problem. While some python users prefer to talk about when Python is the right tool I think that it is more instructive to know when it is not. Please, could you let me know what do you think about that? Thanks I'm programming in P

Re: Python 2.6 / 3.0: Determining if a method is inherited

2008-10-06 Thread Aaron "Castironpi" Brady
On Oct 6, 4:30 am, Fuzzyman <[EMAIL PROTECTED]> wrote: > On Oct 6, 1:13 am, MRAB <[EMAIL PROTECTED]> wrote: > > > > > Fuzzyman wrote: > > > Hello all, > > > > I may well be being dumb (it has happened before), but I'm struggling > > > to fix some code breakage with Python 2.6. > > > > I have some c

Re: Python 2.6: Determining if a method is inherited

2008-10-06 Thread Terry Reedy
Fuzzyman wrote: On Oct 5, 11:54 pm, Terry Reedy <[EMAIL PROTECTED]> wrote: Fuzzyman wrote: Hello all, I may well be being dumb (it has happened before), but I'm struggling to fix some code breakage with Python 2.6. I have some code that looks for the '__lt__' method on a class: if hasattr(clr,

Re: 2to3 refactoring [was Re: Tuple parameter unpacking in 3.x]

2008-10-06 Thread Harald Luessen
On Sun, 05 Oct 2008 "Aaron \"Castironpi\" Brady" wrote: >There's the possibility that the most important words should go first in >this case: > >result_flag__t > >But, I'll admit that other people could have learned different orders of >scanning words than I, especially depending on their spoken

Re: lint for Python?

2008-10-06 Thread Wolfgang Grafen
No need to develop another lint tool. Just give the creator of pylint an improvement proposal. This can be at least reported as a warning. Even in a highly dynamic language like Python it is good to follow some style guides. I try to avoid the same names if possible for different functionality. T

AIR Jordan Fusions 13 NIKE Jordan Fusion 14 AIR Jordans 15Nike Jordan

2008-10-06 Thread 46768
shoes on AIR Jordan 1 (paypal payment)(www.youtetrade.com ) AIR Jordan 2 AIR Jordan 3 AIR Jordan 4 AIR Jordan 5 (paypal payment)(www.youtetrade.com ) AIR Jordan 6 Rings AIR Jordan 6 AIR Jordan 7 AIR Jordan 8 AIR Jordan 9 (paypal payment)(www.youtetrade.com ) AIR Jordan 10 AIR Jordan 11 AIR Jordan

AIR Jordan Fusions 13 NIKE Jordan Fusion 14 AIR Jordans 15Nike Jordan

2008-10-06 Thread [EMAIL PROTECTED]
shoes on AIR Jordan 1 (paypal payment)(www.youtetrade.com ) AIR Jordan 2 AIR Jordan 3 AIR Jordan 4 AIR Jordan 5 (paypal payment)(www.youtetrade.com ) AIR Jordan 6 Rings AIR Jordan 6 AIR Jordan 7 AIR Jordan 8 AIR Jordan 9 (paypal payment)(www.youtetrade.com ) AIR Jordan 10 AIR Jordan 11 AIR Jordan

Re: gif creator

2008-10-06 Thread Miki
> i didn't want to have to upgrade to a newer release of python, install > a huge bunch of stuff or compile > anything.  and i don't care about other formats or animation or > whatever.  black and white is ok. One option is to install ImageMagick and use subprocess.Popen to communicate with it. Thi

Re: ABCs -> infix syntax for isinstance() ?

2008-10-06 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : Bruno Desthuilliers dixit : Boris Borcic a écrit : Given the ABC innovation, maybe an infix syntax for isinstance() would be good. Possibilities : - stealing "is" away from object identity. As a motivation, true use cases for testing object identity are rare; "x i

Re: If an OS was to be written in Python, how'w it look?

2008-10-06 Thread Paul Rubin
"Dan Upton" <[EMAIL PROTECTED]> writes: > The closest I can think of to that is Singularity, Microsoft's > research OS written in .NET (well, C# specifically I guess). Singularity is almost the exact opposite of this and I don't think it uses (unmodified) C#. It does away with use of hardware m

Re: If an OS was to be written in Python, how'w it look?

2008-10-06 Thread Paul Rubin
"Eric Wertman" <[EMAIL PROTECTED]> writes: > I'm no expert, but this would seem like a good example of something > that python wasn't good for. I have always wondered, though, what a > Linux kernel module would look like that had a python (or java, or > whatever) interpreter running low-level, so

Re: gif creator

2008-10-06 Thread Steve Holden
[EMAIL PROTECTED] wrote: > has anyone written a gif creator program purely in python that doesn't > require PIL or tons of other claptrap? > > the GIF89a format is pretty straightforward and C is not required to > create these files. > > i didn't want to have to upgrade to a newer release of pyth

Re: type-checking support in Python?

2008-10-06 Thread Bruno Desthuilliers
Joe Strout a écrit : I'm just re-learning Python after nearly a decade away. I've learned a good healthy paranoia about my code in that time, and so one thing I'd like to add to my Python habits is a way to both (a) make intended types clear to the human reader of the code, Good naming and d

subprocess.Popen(..., cwd=...) and Makefile $(PWD) don't play nice

2008-10-06 Thread Miki
Hello All, Can anybody explain why Makefile $(PWD) does show the right directory when running under subprocess.Popen(..., cwd=...) For example: [18:07] tmp $cat /tmp/p/Makefile all: @echo $(PWD) [18:07] tmp $cat t #!/usr/bin/env python from subprocess import Popen

Re: The recent SPAM messages, and a suggested solution

2008-10-06 Thread skip
Ron> I think most of us are annoyed by the recent SPAM messages that Ron> crept onto our list. I'd like to suggest a possible solution, and Ron> maybe start a thread that eventually will rid us of this Ron> unpleasantness. Ron> My idea: Ron> Once every few messages from

gif creator

2008-10-06 Thread [EMAIL PROTECTED]
has anyone written a gif creator program purely in python that doesn't require PIL or tons of other claptrap? the GIF89a format is pretty straightforward and C is not required to create these files. i didn't want to have to upgrade to a newer release of python, install a huge bunch of stuff or co

Re: Cookielib in Jython

2008-10-06 Thread Felipe De Bene
On Oct 6, 10:36 am, [EMAIL PROTECTED] wrote: > On 6 Ott, 13:19, Felipe De Bene <[EMAIL PROTECTED]> wrote: > > > > > Hi There, > > I'm trying to run an App I wrote in Python 2.5.2 in Jython 2.2.1 and > > everything works fine except when I try to import the Standard > > CPython's cookielib. I know t

OptionParser: options and args passed to PyQT app

2008-10-06 Thread [EMAIL PROTECTED]
Hi, New with python, I've developped a small cmd line script parsing opts and args with an OptionParser: in myApp.py: ...blablabla... parser.add_option(...) parser.add_option(...) (options, args) = parser.parse_args() doCheckParams(parser, options, args) ...blablabla... I'm trying now to integr

  1   2   >