Release 0.63.1 of Task Coach

2007-04-17 Thread Frank Niessink
Hi all, I'm pleased to announce release 0.63.1 of Task Coach. This is a bug fix release that should fix the following bugs: * Dropping a file on a task in the tree viewer didn't work. * Showing the description column in the composite effort viewers (effort per day, per week, per month) caused

Re: script for seconds in given month?

2007-04-17 Thread Hendrik van Rooyen
Paul McGuire [EMAIL PROTECTED] wrote: On Apr 16, 11:22 am, edfialk [EMAIL PROTECTED] wrote: Hi, does anyone happen to know of a script that would return the number of seconds in a month if I give it a month and a year? My python is a little weak, but if anyone could offer some

Re: Python Feature Request: Allow changing base of member indices to 1

2007-04-17 Thread Tim Roberts
Beliavsky [EMAIL PROTECTED] wrote: Fortran has allowed a user-specified base since at least the 1977 standard -- see for example http://www.umiacs.umd.edu/~jhu/DOCS/SP/docs/essl/essl159.html . You can strike at least; this extension was introduced in FORTRAN 77. FORTRAN 66 didn't do this. --

Re: multiremberco

2007-04-17 Thread attn . steven . kuo
On Apr 16, 5:14 pm, [EMAIL PROTECTED] wrote: Once in while I too have something to ask. This is a little problem that comes from a Scheme Book (I have left this thread because this post contains too much Python code for a Scheme

how to copy the contents of pygtk into a file

2007-04-17 Thread PARIMALA KALAVALA
hi, I want to know how to copy the contents of a pygtk application into a file and include that in other applications. Pls reply to this . bye. -- http://mail.python.org/mailman/listinfo/python-list

Re: multiremberco

2007-04-17 Thread Peter Otten
[EMAIL PROTECTED] wrote: Once in while I too have something to ask. This is a little problem that comes from a Scheme Book (I have left this thread because this post contains too much Python code for a Scheme newsgroup): For fun I have tried to make it lazy, if may be useful if seq is a

Re: strange behaviour sys.argv

2007-04-17 Thread Charles Sanders
schnupfy wrote: ok, thanks for the answers. I try to hand over the 3rd part (the long trap) as one cmd argument. I will ask in a shell ng. Thanks again. Cheers Should be as simple as removing the backslashes /root/mk/services.py $HOST $SEVERITY $TRAP should pass TRAP as a single

Re: Queue enhancement suggestion

2007-04-17 Thread Antoon Pardon
On 2007-04-17, Paul Rubin http wrote: Antoon Pardon [EMAIL PROTECTED] writes: The problem is this doesn't work well if you have multiple producers. One producer can be finished while the other is still putting values on the queue. Right, you'd wait for all the producers to finish, then

Re: Queue enhancement suggestion

2007-04-17 Thread Antoon Pardon
On 2007-04-17, Hendrik van Rooyen [EMAIL PROTECTED] wrote: Antoon Pardon [EMAIL PROTECTED] wrote: The problem is this doesn't work well if you have multiple producers. One producer can be finished while the other is still putting values on the queue. The solution I have been thinking on is

Re: How to better pickle an extension type

2007-04-17 Thread Ziga Seilnacht
dgdev wrote: I would like to pickle an extension type (written in pyrex). I have it working thus far by defining three methods: class C: # for pickling __getstate__(self): ... # make 'state_obj' return state_obj __reduce__(self):

Re: strange behaviour with keyword arguments and inheritance

2007-04-17 Thread Bruno Desthuilliers
matthewperpick a écrit : Check out this toy example that demonstrates some strange behaviour with keyword arguments and inheritance. Nope. It demonstrates that default arguments are eval'd only once (when the def statement is eval'd), which is documented and a FAQ. I have a very rudimentary

Re: Getting started with python

2007-04-17 Thread James Stroud
7stud wrote: On Apr 15, 9:49 pm, James Stroud [EMAIL PROTECTED] wrote: py t = timeit.Timer(stmt=s) py print %.2f usec/pass % (100 * t.timeit(number=10)/10) 40.88 usec/pass What does this accomplish: 100 * t.timeit(number=10)/10 that the following doesn't

Re: Getting started with python

2007-04-17 Thread James Stroud
Steve Holden wrote: James Stroud wrote: Steve Holden wrote: You'd be worth more if you'd used elif and omitted the continue statements, but for a first solution it's acceptable. Depends on what you are after. py s = ... for i in xrange(1,101): ... if not i % 15: ... continue

Re: Rapyd-Tk Pmw Notebook tutorial

2007-04-17 Thread James Stroud
boriq wrote: Hello, could anybody be so kind and write me a small tutorial about how to create a Pmw notebook with 3 tabs each containing 5 checkboxes with the help of Rapyd-Tk? Thanks in advance rg, boris I'll do it for $200.00. I bill at $50.00/hr when I'm feeling generous. James

Re: C++ extension problem

2007-04-17 Thread pythoncurious
On Apr 16, 9:31 pm, Michael Hoffman [EMAIL PROTECTED] wrote: I can't answer your question since I have no experience writingextensiontypes. I know this is at least partially a learning exercise for you, but might I suggest that your time might be better spent learning Boost.Python instead? It

Re: script for seconds in given month?

2007-04-17 Thread pythoncurious
On Apr 17, 6:41 am, [EMAIL PROTECTED] (Alex Martelli) wrote: edfialk [EMAIL PROTECTED] wrote: Hi, does anyone happen to know of ascriptthat would return the number ofsecondsin amonthif I give it amonthand a year? My python is a little weak, but if anyone could offer some suggestions I

Re: script for seconds in given month?

2007-04-17 Thread pythoncurious
On Apr 16, 7:49 pm, edfialk [EMAIL PROTECTED] wrote: Jim: I need years too, basically from 1960-2000. Don't want to hardcode all those days :) Matt: Thanks, I will try this out. Paul: I don't believe we need leapseconds. Leap days definitely. I'll let you know how Matt's code works. Any

Handling sorted dictionaries

2007-04-17 Thread loial
The following code gives the error d=sortedmachines[machine] TypeError: list indices must be integers What works for the unsorted dictionary does not work for the sorted dictionary. Can anyone help? machinekey = 11 machines = {} machines[machinekey]=[1,0,0,0,0,0,0,0,0,0,0,0,0]

Re: is laziness a programer's virtue?

2007-04-17 Thread Ingo Menger
On 16 Apr., 23:01, Xah Lee [EMAIL PROTECTED] wrote: If your article is relevant to X, Y, and Z, please cross post it. Yeah right, and if it is not, don't post it at all. Your articles are nothing but a bunch of unfounded allegations, moralism and your personal notion of what alledgedly hurts

Re: Compare regular expressions

2007-04-17 Thread Diez B. Roggisch
Adam Atlas schrieb: On Apr 16, 1:50 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote: It's not. For the simplest of expressions one might come up with a relation between them, but even that would be hard. General case? No chance. I wouldn't say there's 'no chance'. It would require external

Re: Compare regular expressions

2007-04-17 Thread Diez B. Roggisch
Paddy schrieb: On Apr 16, 10:50 am, Thomas Dybdahl Ahle [EMAIL PROTECTED] wrote: Hi, I'm writing a program with a large data stream to which modules can connect using regular expressions. Now I'd like to not have to test all expressions every time I get a line, as most of the time, one of

Re: Python + ogr module?

2007-04-17 Thread martin . laloux
You must seek for python and Open Source GIS or mapserver and you find: http://mapserver.gis.umn.edu/community/conferences/MUM3/workshop/python http://www.archaeoworld.com/classes/osgit/lectures/ with http://www.archaeoworld.com/classes/osgit/lectures/osgit_02_libraries.pdf and you have some

Re: Handling sorted dictionaries

2007-04-17 Thread Steven D'Aprano
On Tue, 17 Apr 2007 01:01:55 -0700, loial wrote: The following code gives the error d=sortedmachines[machine] TypeError: list indices must be integers What works for the unsorted dictionary does not work for the sorted dictionary. Can anyone help? The error message you got tells you

Re: Handling sorted dictionaries

2007-04-17 Thread filyph
Hello, Dictionary items are inordered and can not be sorted. Function sorted() returns list of tuples in each is 0. item key from dictionary and 1. is value from key-value pair from dict machines. List indices must be integers and machine keys are strings. See

Re: strange behaviour with keyword arguments and inheritance

2007-04-17 Thread Arnaud Delobelle
matthewperpick wrote: Check out this toy example that demonstrates some strange behaviour with keyword arguments and inheritance. = class Parent: def __init__(self, ary = []): self.ary = ary [snip] As pointed out earlier, default values for

Deleting or Empty a File

2007-04-17 Thread Robert Rawlins - Think Blue
I'm looking to clear those log files we were discussing earlier chaps, What the best method to do this? Delete the file completely? Or just empty its content? Thanks, Rob -- http://mail.python.org/mailman/listinfo/python-list

Re: OverflowError: mktime argument out of range ???

2007-04-17 Thread Jorgen Bodde
Thanks again, I will explain what happened. I am a python newbie. The time and datetime modules are confusing at the beginning, but after diving into them I started to understand the structure. So what I did was using the time module for date storage, but I came to understand that time is

Re: Import From SubFolder

2007-04-17 Thread Jorgen Bodde
From what I know, if you place a __init__.py file in the folder that will become your subfolder, you can make it a module subfolder. Like; d:\src\app\submodule\__init__.py (can be empty file) Then in d:\src\app\main.py simply do; import submodule # use your new module like

sql to xml

2007-04-17 Thread Ros
Hi, I wish to write xml file after validating data from mssql database. I am using xml data mapping list and would use it for validating data. Here is the program : Map_list.xml : loop id=Book1' ele id='A01' min_length=10 max_length=25 column_name=Written by/ele ele id='A01' min_length=14

Beginner: Simple Output to a Dialog PyQt4

2007-04-17 Thread Glen
Hello, I've written a script in python and put together a simple QFrame with a QTextBrowser with Designer. I've translated the C++ into python using puic4. The .py file is called outputWin.py. My Script and its functions are in cnt.py. Finally, my main is in pball.py which follows

Re: Python Feature Request: Allow changing base of member indices to 1

2007-04-17 Thread Dustan
On Apr 14, 4:06 pm, Bjoern Schliessmann usenet- [EMAIL PROTECTED] wrote: jamadagni wrote: OK fine. It is clear that this feature must be implemented if at all only on a per-module basis. So can we have votes for per-module implementation of this feature? I don't think it's worth the

Re: is laziness a programer's virtue?

2007-04-17 Thread Markus E Leypold
Ingo Menger [EMAIL PROTECTED] writes: On 16 Apr., 23:01, Xah Lee [EMAIL PROTECTED] wrote: If your article is relevant to X, Y, and Z, please cross post it. Yeah right, and if it is not, don't post it at all. Your articles are nothing but a bunch of unfounded allegations, moralism and your

Re: Python Feature Request: Allow changing base of member indices to 1

2007-04-17 Thread Zara
On Mon, 16 Apr 2007 10:15:19 +0200, Javier Bezos [EMAIL PROTECTED] wrote: Paddy, Dijkstra's argument is obsolete, as it is based on how array length was computed many years ago -- if we have an array a = b..e, then the lenght of a is e-b (half open range). Good at low level programming.

Antigen Notification: Antigen found a message matching a filter

2007-04-17 Thread Antigen_VITORIA
Microsoft Antigen for Exchange found a message matching a filter. The message is currently Detected. Message: Python_list Digest_ Vol 43_ Issue 268 Filter name: KEYWORD= spam: porn Sent from: [EMAIL PROTECTED] Folder: SMTP Messages\Inbound And Outbound Location: ITURAN/First Administrative

Re: is laziness a programer's virtue?

2007-04-17 Thread Mirco Wahab
Markus E Leypold wrote: Trying to correct Xah's behaviour is probably impossible. People who publish pictures of themselves as he does on the WWW probably don't have any sense of embarrasment left ... you think of stuff like this www DOT m-e-leypold DOT de SLASH leypold-small.jpg ;-)

Re: [OT] Re: is laziness a programer's virtue?

2007-04-17 Thread Michele Dondi
On Mon, 16 Apr 2007 17:58:52 -0400, D Herring [EMAIL PROTECTED] wrote: - Please topquote snippets from the threads about which you are commenting. - Please set your newsreader to prepend Re: or somesuch when replying to a toplevel post. - Please don't preach about meta-talk and policing in a

Re: Python and SSL

2007-04-17 Thread Steve Holden
Paul Rubin wrote: Martin v. Löwis [EMAIL PROTECTED] writes: It means that these modules can do encrypted communication for their respective protocol. They cannot validate that they are really talking to the server they think they talk to (so they are prone to a man-in-the-middle attack),

Re: sql to xml

2007-04-17 Thread Tim Golden
Ros wrote: Hi, I wish to write xml file after validating data from mssql database. I am using xml data mapping list and would use it for validating data. All right, I'm not going answer the question you're asking (a) because I'm not really sure what the question is and (b) because I'm not

PYTHON and GUIS and LOGIC... What First? (NEWBIE)

2007-04-17 Thread Sampson, David
Hey folks, Well I read parts of the Oreily python book last night to knock me out. Unfortunately it actualy kept me awake with more questions. I am new to Python, OOP and for the fact programming. I have been a long time scriptor for basic processes using BAT shells and BASH shells... now I have

Re: question of easyExcel (Python Programming on Win32)

2007-04-17 Thread Tim Golden
Tommy Zong wrote: class easyExcel: [... snip ...] However, I found a problem today - it works fine in single thread version but can not work properly in multi-thread version - If I move excel file operations to sub-thread, it will complain 'CoInitialize has not been called'. I noticed the

Re: subprocess confusion

2007-04-17 Thread Tim Arnold
Nick Craig-Wood [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Tim Arnold [EMAIL PROTECTED] wrote: snip Should I just put the remsh in the actual command instead of preexec_fn? Yes. The preexec_fn is run after the fork() but before the exec(). Ie a new process has been made,

Re: Help on Shelve....

2007-04-17 Thread Michael Bentley
On Apr 17, 2007, at 6:52 AM, Clement wrote: Can i use Shelve for storing large amount of data around 6GB.. Is it stable...? if any problems come, can i retrive the document.. Do you know for sure your filesystem handles files that big? -- http://mail.python.org/mailman/listinfo/python-list

Pydev 1.3.2 Released

2007-04-17 Thread Fabio Zadrozny
Hi All, Pydev and Pydev Extensions 1.3.2 have been released Details on Pydev Extensions: http://www.fabioz.com/pydev Details on Pydev: http://pydev.sf.net Details on its development: http://pydev.blogspot.com Release Highlights in Pydev Extensions:

RE: VB6 To Python

2007-04-17 Thread Sampson, David
Thanks for the feedback to this thread. I tried the conversion but unfortunately it did not translate from VB to Python. It wrapped the VB using a lib of python calls. So the language is not pure python. From what I see. So a full rewrite it is. -Original Message- From: [EMAIL

Re: is laziness a programer's virtue?

2007-04-17 Thread BJörn Lindqvist
On 4/17/07, Mirco Wahab [EMAIL PROTECTED] wrote: The reason why I answered your posting at all (besides seeing your x-post going into 5 ng's) is your mentioning of 'God'. According to christian tradition (which is somehow on topic in a Perl group) it is exactly the case of Jesus (imho), who

Re: Deleting or Empty a File

2007-04-17 Thread Tim Golden
Robert Rawlins - Think Blue wrote: I'm looking to clear those log files we were discussing earlier chaps, What the best method to do this? Delete the file completely? Or just empty its content? Not sure there is a best method. For simplicity I'd just delete it and let the logger recreate,

Using X509 (and TLSlite) authentication

2007-04-17 Thread Chaz Ginger
I have been looking for a server application as an example of how to use TLSLite or PyOpenSSL X509 certificates for authentication. Does any one have a pointer or two? Peace, Chaz -- http://mail.python.org/mailman/listinfo/python-list

Re: OverflowError: mktime argument out of range ???

2007-04-17 Thread John Machin
On Apr 17, 7:39 pm, Jorgen Bodde [EMAIL PROTECTED] wrote: Thanks again, I will explain what happened. I am a python newbie. Even GvR was a Python newbie once :-) The time and datetime modules are confusing at the beginning, but after diving into them I started to understand the structure.

Re: rewrite for achieving speedup

2007-04-17 Thread Steve Holden
Johnny Blonde wrote: Hello Group! I really tried hard for two hours to rewrite the following expression (python 2.4): -- teilnehmer = [] for r in Reisen.select(AND(Reisen.q.RESVON = datum, Reisen.q.RESBIS = datum)): for g in r.BUCHUNGEN: for t

Syntax error

2007-04-17 Thread hg
Hi, I've had this problem in the past and still cannot fully understand. I latelly passed my source code in Wing IDE wihch asked be to resolve tab/space/CRLF conflicts and I said yes (initially the code was developped under Linux ... and now all source got tabs replaced by spaces and all EOL

The smallest and largest values of numeric types

2007-04-17 Thread tom
Hi! How can I determine the smallest and largest values of numeric types (for example int) possible in my system? I think there exists a function for this task but I don't know it. -- http://mail.python.org/mailman/listinfo/python-list

Re: ??? POLICE AND CITY/UNIVERSITY OFFICIALS INCOMPETENCE LEADS TO 33 KILLED BY KOREAN-ALQAEDA TERRORIST ???

2007-04-17 Thread lemnitzer
Lets not forget that the odious and atrocious bastard from UCLA faculty who wrote the terror policy and loopholes for the Bush and CIA was a KOREAN professor named Yoo. But then Bush has a knack for USING minorities for dirty jobs. He used Jamaican dog to lie in the UN about fake WMDs and their

Re: rewrite for achieving speedup

2007-04-17 Thread Steven Bethard
Steve Holden wrote: Johnny Blonde wrote: Hello Group! I really tried hard for two hours to rewrite the following expression (python 2.4): -- teilnehmer = [] for r in Reisen.select(AND(Reisen.q.RESVON = datum, Reisen.q.RESBIS = datum)): for g in r.BUCHUNGEN:

Re: Printing Using Python

2007-04-17 Thread Roger Upole
Raja [EMAIL PROTECTED] wrote: Hi, Attached is the code . I want my program to save the current printer job properties and , when I reconnect the printer at a latter date , i need to print the saved job . Can you please help with my code ? How to print a document at a later stage and any

Re: The smallest and largest values of numeric types

2007-04-17 Thread Lou Pecora
In article [EMAIL PROTECTED], [EMAIL PROTECTED] wrote: Hi! How can I determine the smallest and largest values of numeric types (for example int) possible in my system? I think there exists a function for this task but I don't know it. There is or was a module called kinds which was an

Re: Queue enhancement suggestion

2007-04-17 Thread Jean-Paul Calderone
On 17 Apr 2007 14:32:01 GMT, Antoon Pardon [EMAIL PROTECTED] wrote: On 2007-04-17, Jean-Paul Calderone [EMAIL PROTECTED] wrote: On 17 Apr 2007 13:32:52 GMT, Antoon Pardon [EMAIL PROTECTED] wrote: On 2007-04-17, Hendrik van Rooyen [EMAIL PROTECTED] wrote: [snip] Not sure I understand this - it

Re: Syntax error

2007-04-17 Thread hg
Diez B. Roggisch wrote: hg wrote: Hi, I've had this problem in the past and still cannot fully understand. I latelly passed my source code in Wing IDE wihch asked be to resolve tab/space/CRLF conflicts and I said yes (initially the code was developped under Linux ... and now all

Re: rewrite for achieving speedup

2007-04-17 Thread Johnny Blonde
thanks steve h., works like this just perfectly! steve b.: for the next time if i cannot figure it out i will just do it like this! thanks a lot guys, Frank -- http://mail.python.org/mailman/listinfo/python-list

Re: subprocess confusion

2007-04-17 Thread Nick Craig-Wood
Tim Arnold [EMAIL PROTECTED] wrote: Just discovered that my subprocess call with the preexec_fn wasn't doing what I thought. If 'machine' value is different than the current machine name, I want to remsh the command to that machine, but obviously I misunderstood the preexec_fn arg.

Re: is laziness a programer's virtue?

2007-04-17 Thread Ingo Menger
On 17 Apr., 12:33, Markus E Leypold [EMAIL PROTECTED] wrote: What makes Xah a troll is neither off-topic posts nor being incoherent -- its the attitude. He's broadcasting his drivel to a number of groups not with the intention to discuss (he hardly ever answers to answers to his posts), but

Re: The smallest and largest values of numeric types

2007-04-17 Thread fumanchu
On Apr 17, 7:12 am, [EMAIL PROTECTED] wrote: How can I determine the smallest and largest values of numeric types (for example int) possible in my system? I think there exists a function for this task but I don't know it. This should work for ints: import sys print sys.maxint For floats,

Re: C++ extension problem

2007-04-17 Thread pythoncurious
On Apr 16, 11:44 pm, Martin v. Löwis [EMAIL PROTECTED] wrote: Now this is what confuses me: Why does it say that I have the wrong type when it's the same type as it suggests? When referring to the type, you must *always* form the address of the type structure, including, but not limited to,

Re: The smallest and largest values of numeric types

2007-04-17 Thread Robert Kern
Lou Pecora wrote: In article [EMAIL PROTECTED], [EMAIL PROTECTED] wrote: Hi! How can I determine the smallest and largest values of numeric types (for example int) possible in my system? I think there exists a function for this task but I don't know it. There is or was a module called

Re: Syntax error

2007-04-17 Thread Marc 'BlackJack' Rintsch
In [EMAIL PROTECTED], hg wrote: I had the customer comment out the first two lines of the file: #!/bin/env python # -*- coding: iso-8859-15 -*- ... and the problem disappeared. I am at a loss. Any clue ? There was once a bug in Python that lead to such errors if an encoding

Re: Syntax error

2007-04-17 Thread Diez B. Roggisch
hg wrote: Hi, I've had this problem in the past and still cannot fully understand. I latelly passed my source code in Wing IDE wihch asked be to resolve tab/space/CRLF conflicts and I said yes (initially the code was developped under Linux ... and now all source got tabs replaced by

Re: Queue enhancement suggestion

2007-04-17 Thread Hendrik van Rooyen
Antoon Pardon [EMAIL PROTECTED] wrote: On 2007-04-17, Hendrik van Rooyen [EMAIL PROTECTED] wrote: Antoon Pardon [EMAIL PROTECTED] wrote: The problem is this doesn't work well if you have multiple producers. One producer can be finished while the other is still putting values on the

Re: Queue enhancement suggestion

2007-04-17 Thread Antoon Pardon
On 2007-04-17, Hendrik van Rooyen [EMAIL PROTECTED] wrote: Antoon Pardon [EMAIL PROTECTED] wrote: On 2007-04-17, Hendrik van Rooyen [EMAIL PROTECTED] wrote: Antoon Pardon [EMAIL PROTECTED] wrote: The problem is this doesn't work well if you have multiple producers. One producer can

Re: The smallest and largest values of numeric types

2007-04-17 Thread tom
Thank you for your answers. Seems like the limits of numeric values aren't considered as important in Python as in C ;) -- http://mail.python.org/mailman/listinfo/python-list

Re: UpdateLayeredWindow in pywin32

2007-04-17 Thread livibetter
I have found the cause Please note that after SetLayeredWindowAttributes has been called, subsequent UpdateLayeredWindow calls will fail until the layering style bit is cleared and set again. from http://msdn2.microsoft.com/en-us/library/ms632599.aspx#layered But I still can't use

Re: Syntax error

2007-04-17 Thread hg
Marc 'BlackJack' Rintsch wrote: In [EMAIL PROTECTED], hg wrote: I had the customer comment out the first two lines of the file: #!/bin/env python # -*- coding: iso-8859-15 -*- ... and the problem disappeared. I am at a loss. Any clue ? There was once a bug in Python that

Re: Using X509 (and TLSlite) authentication

2007-04-17 Thread Jean-Paul Calderone
On Tue, 17 Apr 2007 13:44:05 GMT, Chaz Ginger [EMAIL PROTECTED] wrote: I have been looking for a server application as an example of how to use TLSLite or PyOpenSSL X509 certificates for authentication. Does any one have a pointer or two? You might want to take a look at the code in Twisted for

Re: ??? POLICE AND CITY/UNIVERSITY OFFICIALS INCOMPETENCE LEADS TO 33 KILLED BY KOREAN-ALQAEDA TERRORIST ???

2007-04-17 Thread Muhammad
On Apr 17, 7:56 am, [EMAIL PROTECTED] wrote: We know that the city officials are corrupt. Instead of applying the city codes and pursuing violations, they let the cases fester and turn into civil disputes when there are clear code violations. And when they apply, that is at the instigation of

Re: Queue enhancement suggestion

2007-04-17 Thread Antoon Pardon
On 2007-04-17, Jean-Paul Calderone [EMAIL PROTECTED] wrote: On 17 Apr 2007 13:32:52 GMT, Antoon Pardon [EMAIL PROTECTED] wrote: On 2007-04-17, Hendrik van Rooyen [EMAIL PROTECTED] wrote: [snip] Not sure I understand this - it sounds vaguely incestous to me. I normally use a GUI with two

??? POLICE AND CITY/UNIVERSITY OFFICIALS INCOMPETENCE LEADS TO 33 KILLED BY KOREAN-ALQAEDA TERRORIST ???

2007-04-17 Thread thermate
We know that the city officials are corrupt. Instead of applying the city codes and pursuing violations, they let the cases fester and turn into civil disputes when there are clear code violations. And when they apply, that is at the instigation of evil neocons and their boss george w bus and neil

Re: Queue enhancement suggestion

2007-04-17 Thread Jean-Paul Calderone
On 17 Apr 2007 13:32:52 GMT, Antoon Pardon [EMAIL PROTECTED] wrote: On 2007-04-17, Hendrik van Rooyen [EMAIL PROTECTED] wrote: [snip] Not sure I understand this - it sounds vaguely incestous to me. I normally use a GUI with two queues, one for input, one for output, to two threads that

Re: Compare regular expressions

2007-04-17 Thread Thomas Dybdahl Ahle
Den Mon, 16 Apr 2007 11:50:40 +0200 skrev Thomas Dybdahl Ahle: Hi, I'm writing a program with a large data stream to which modules can connect using regular expressions. Now I'd like to not have to test all expressions every time I get a line, as most of the time, one of them having a match

Help on Shelve....

2007-04-17 Thread Clement
Can i use Shelve for storing large amount of data around 6GB.. Is it stable...? if any problems come, can i retrive the document.. Plz tell the suggestions. By clement -- http://mail.python.org/mailman/listinfo/python-list

Re: Deleting or Empty a File

2007-04-17 Thread Daniel Nogradi
I'm looking to clear those log files we were discussing earlier chaps, What the best method to do this? Delete the file completely? Or just empty its content? If you just want to delete the content of a file but keep it with 0 length you can do: f = open( 'myfile', 'w' )# or open(

rewrite for achieving speedup

2007-04-17 Thread Johnny Blonde
Hello Group! I really tried hard for two hours to rewrite the following expression (python 2.4): -- teilnehmer = [] for r in Reisen.select(AND(Reisen.q.RESVON = datum, Reisen.q.RESBIS = datum)): for g in r.BUCHUNGEN: for t in g.aktiveTeilnehmer:

Re: strange behaviour with keyword arguments and inheritance

2007-04-17 Thread matthewperpick
cool .. thanks everyone. here is the aforementioned faq. http://www.python.org/doc/faq/general/#why-are-default-values-shared-between-objects On Apr 17, 5:16 am, Arnaud Delobelle [EMAIL PROTECTED] wrote: matthewperpick wrote: Check out this toy example that demonstrates some strange behaviour

Re: PYTHON and GUIS and LOGIC... What First? (NEWBIE)

2007-04-17 Thread Jorgen Bodde
Hi, Basically your data model needs to be defined. It depends on your 'problem area'. It is usually good practice to keep your datamodel free of GUI elements, so that it can be easily reused. The GUI in the other hand can know everything about the public interface of the data model. I've

Re: Pyqt calling a custom dialog and returning the vars

2007-04-17 Thread Marcpp
On 17 abr, 00:03, Diez B. Roggisch [EMAIL PROTECTED] wrote: Marcpp schrieb: I call a dialog from a principal program but cannot return the value of the variables (text box's). Here is a example... from ui import Agenda from dialog1 import dialogo1 from PyQt4 import * import dbm

Binary file output using python

2007-04-17 Thread Chi Yin Cheung
Hi, Is there a way in python to output binary files? I need to python to write out a stream of 5 million floating point numbers, separated by some separator, but it seems that all python supports natively is string information output, which is extremely space inefficient. I'd tried using the

Re: Queue enhancement suggestion

2007-04-17 Thread Diez B. Roggisch
The problem is that sometimes the gui thread has something to show too. With the added problem that the code wanting to show something doesn't know when it is executing the gui thread or an other. So it is very difficult to avoid the gui thread putting things on the queue. But since the gui

Re: Binary file output using python

2007-04-17 Thread kyosohma
On Apr 17, 12:41 pm, Chi Yin Cheung [EMAIL PROTECTED] wrote: Hi, Is there a way in python to output binary files? I need to python to write out a stream of 5 million floating point numbers, separated by some separator, but it seems that all python supports natively is string information

python - dll access (ctypes or swig)

2007-04-17 Thread Daniel Watrous
Hello, I am interested in using python to script access to some hardware for which there are existing drivers in the form of DLLs. The DLLs each have four exported functions and a host of COM Properties and COM Methods. The four exported functions are as follows: DllCanUnloadNow

Re: ??? POLICE AND CITY/UNIVERSITY OFFICIALS INCOMPETENCE LEADS TO 33 KILLED BY KOREAN-ALQAEDA TERRORIST ???

2007-04-17 Thread utabintarbo
On Apr 17, 10:32 am, Muhammad [EMAIL PROTECTED] wrote: On Apr 17, 7:56 am, [EMAIL PROTECTED] wrote: - snipped rant You mentioned Korean Al-Qaeda Terrorist in the title! Honesty demands that you establish it as a fact that the person was connected to Al-Qaeda and that he was a terrorist and

setup.py bdist_rpm help

2007-04-17 Thread Greg Copeland
Okay, I have an application which is frozen via pyinstaller. That is all working great. I now want to create an RPM using distutils' bdist_rpm facilities. I seem to be running into trouble. No matter what, I only seem to get three files within my RPM (setup.py, README.txt, and PKG_INFO). My

Re: The smallest and largest values of numeric types

2007-04-17 Thread Michael Hoffman
fumanchu wrote: On Apr 17, 7:12 am, [EMAIL PROTECTED] wrote: How can I determine the smallest and largest values of numeric types (for example int) possible in my system? I think there exists a function for this task but I don't know it. This should work for ints: import sys print

Re: The smallest and largest values of numeric types

2007-04-17 Thread [EMAIL PROTECTED]
On Apr 17, 11:37 am, [EMAIL PROTECTED] wrote: Thank you for your answers. Seems like the limits of numeric values aren't considered as important in Python as in C ;) Sure, they're important, we just don't want to notice them. That's why conversion to longs is automatic, so that number size

Re: Compare regular expressions

2007-04-17 Thread Paddy
On Apr 17, 9:17 am, Diez B. Roggisch [EMAIL PROTECTED] wrote: Paddy schrieb: On Apr 16, 10:50 am, Thomas Dybdahl Ahle [EMAIL PROTECTED] wrote: Hi, I'm writing a program with a large data stream to which modules can connect using regular expressions. Now I'd like to not have to test

Numpy problem: Arrays in a list of dictionaries

2007-04-17 Thread ZMY
I am new to Numpy/Pylab, and I am trying to construct a list of dictionaries with arrays as the items, for example: dict = {1: array([2, 3, 4]), 2: ''} list1 = [] for i in range(3): list1.append(dict.copy()) ... list1 [{1: array([2, 3, 4]), 2: ''}, {1: array([2, 3, 4]), 2: ''}, {1: array([2,

Re: Traceback when trying to run script from cron?

2007-04-17 Thread erikcw
On Apr 14, 10:50 pm, Dennis Lee Bieber [EMAIL PROTECTED] wrote: On 14 Apr 2007 18:56:00 -0700, erikcw [EMAIL PROTECTED] declaimed the following in comp.lang.python: The cron command is python /home/lybp/public_html/wa/wa.py Any idea why MySQLdb wouldn't like this? Does the cron

Re: Numpy problem: Arrays in a list of dictionaries

2007-04-17 Thread Robert Kern
ZMY wrote: I am new to Numpy/Pylab, and I am trying to construct a list of dictionaries with arrays as the items, for example: dict = {1: array([2, 3, 4]), 2: ''} list1 = [] for i in range(3): list1.append(dict.copy()) ... list1 [{1: array([2, 3, 4]), 2: ''}, {1: array([2, 3, 4]), 2:

Re: Traceback when trying to run script from cron?

2007-04-17 Thread Carsten Haese
On Tue, 2007-04-17 at 12:33 -0700, erikcw wrote: You're right. Something is not right with my sys.path. cron: '/home/lybp/public_html/winneralert', '/usr/lib/python2.2', '/usr/lib/ python2.2/plat-linux2', '/usr/lib/python2.2/lib-tk', '/usr/lib/ python2.2/lib-dynload',

Re: How to Passs NULL as a IDispatch Pointer to method?

2007-04-17 Thread Larry Bates
[EMAIL PROTECTED] wrote: Hello,all I am using win32com to use com. and invoke a method as follows: void AddShapeInfo(LPCTSTR name, LONG type, IDispatch* pDisp); but i pass 0 or None to third parameter and get error info: x.AddShapeInfo(who, 10, 0) Traceback (most recent call last):

Re: setup.py bdist_rpm help

2007-04-17 Thread Greg Copeland
Ahh. I figured it out. I resolved the issue by using a MANIFEST.in file. Greg On Apr 17, 1:19 pm, Greg Copeland [EMAIL PROTECTED] wrote: Okay, I have an application which is frozen via pyinstaller. That is all working great. I now want to create an RPM using distutils' bdist_rpm

Re: Compare regular expressions

2007-04-17 Thread Thomas Dybdahl Ahle
Den Tue, 17 Apr 2007 11:59:15 -0700 skrev Paddy: On Apr 17, 9:17 am, Diez B. Roggisch [EMAIL PROTECTED] wrote: Paddy schrieb: you could OR all the individual RE's test them all at once then find out which matched. big_re = |.join( r(?P__match_%i__%s) % (i, r) for i,r

Re: Binary file output using python

2007-04-17 Thread Michael Hoffman
Chi Yin Cheung wrote: Hi, Is there a way in python to output binary files? I need to python to write out a stream of 5 million floating point numbers, separated by some separator, but it seems that all python supports natively is string information output, which is extremely space

Re: Getting started with python

2007-04-17 Thread Ross Ridge
James Stroud [EMAIL PROTECTED] wrote: py t = timeit.Timer(stmt=s) py print %.2f usec/pass % (100 * t.timeit(number=10)/10) 40.88 usec/pass 7stud [EMAIL PROTECTED] wrote: What does this accomplish: 100 * t.timeit(number=10)/10 that the following doesn't accomplish: 10 *

  1   2   >