Re: is laziness a programer's virtue?

2007-04-17 Thread Ken Tilton
Xah Lee wrote: > Dear Ken, > > I want to thank you for your spirit in supporting and leading the lisp > community, in spreading lisp the language both in what you have done > technically as well as evangelization, as well as the love and > knowledge attitude towards newsgroup communities in gene

Re: Binary file output using python

2007-04-17 Thread Peter Otten
Chi Yin Cheung wrote: > 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.

Re: What makes an iterator an iterator?

2007-04-17 Thread I V
On Wed, 18 Apr 2007 15:39:22 +1000, Steven D'Aprano wrote: > I thought that an iterator was any object that follows the iterator > protocol, that is, it has a next() method and an __iter__() method. ... > class Parrot(object): ... > def __init__(self): > self.next = self._next() self.n

Re: Future Python Gui?

2007-04-17 Thread Richard Jones
kirkjobsluder wrote: > I'd say that the best bet is to learn swig and similar > bridging, expanding, and embedding mechanisms. For GUI programming this would seem overkill. Pick a GUI toolkit and it's almost guaranteed to be wrapped for use in Python already. Richard -- http://mail.python.

How to communicate via USB "port"

2007-04-17 Thread [EMAIL PROTECTED]
Can someone explain how I would read the data from the USB "port"? I don't know if it matters, but I am trying to read the data from a GPS plugged in to the USB port. Thank you, Robin -- http://mail.python.org/mailman/listinfo/python-list

Re: is laziness a programer's virtue?

2007-04-17 Thread Ken Tilton
George Neuner wrote: > On 17 Apr 2007 08:20:24 -0700, Ingo Menger > <[EMAIL PROTECTED]> wrote: > > >>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 dri

Re: Queue enhancement suggestion

2007-04-17 Thread Hendrik van Rooyen
"Antoon Pardon" <[EMAIL PROTECTED]> wrote: > 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

What makes an iterator an iterator?

2007-04-17 Thread Steven D'Aprano
I thought that an iterator was any object that follows the iterator protocol, that is, it has a next() method and an __iter__() method. But I'm having problems writing a class that acts as an iterator. I have: class Parrot(object): def __iter__(self): return self def __init__(self

?? WHO IS MORE EVIL, THE KOREAN KILLER OF YANK BASTARDS WHO KILLED MILLION IRAQIS MANY WITH WHITE PHOSPHORUS ???

2007-04-17 Thread lemnitzer
WHO IS MORE EVIL, THE KOREAN KILLER OF YANK BASTARDS WHO KILLED MILLION IRAQIS MANY WITH WHITE PHOSPHORUS ? On Apr 17, 4:05 pm, [EMAIL PROTECTED] wrote: > Does GW Bush have Balls to BOMB South Korea like Afghanistan and Iraq > in return for Korean Suicide Murderer Terrorism ? > > No, he does not h

Re: python - dll access (ctypes or swig)

2007-04-17 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Larry Bates <[EMAIL PROTECTED]> wrote: >Daniel Watrous wrote: >> 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

Re: Getting started with python

2007-04-17 Thread Basilisk96
On Apr 14, 8:46 pm, "Eric" <[EMAIL PROTECTED]> wrote: > Hello, after reading some of the book Programming Python it seems that > python is something I would like to delve deeper into. The only thing > is, I have no idea what I should try and write. So I was hoping that > someone here could help poi

Re: Any way to refactor this?

2007-04-17 Thread John Salerno
John Salerno wrote: > Setting aside, for the moment, the utility of this method or even if > there's a better way, I'm wondering if this is an efficient way to do > it. I admit, there was some copying and pasting, which is what prompts > me to ask the question. Here's the method. (I hope it look

Re: is laziness a programer's virtue?

2007-04-17 Thread Lew
"Lew" ranted maniacally: >> Y'know, even in jest, calling for an oppressive regime to suppress even >> wrong-headed and self-serving garbage self-expression is immoral and >> horrible. How dare you? >> >> Free speech, free press and free expression of ideas is not something to >> take so lightly

Re: wx and SOAPpy interaction

2007-04-17 Thread alf
Amaury Forgeot d'Arc wrote: > alf a écrit : > >> Hi, >> >> there is problem when I import (python 2.4) wx and SOAPpy at the same >> time. I narrowed the problem to following (on Linux): >> >> >>import wx >> >>import pyexpat >> >> Traceback (most recent call last): >> File "", line 1, in ? >>

Re: Future Python Gui?

2007-04-17 Thread kirkjobsluder
On Apr 17, 9:28 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I've been trying to find out what the future of Python is with regard > to Tk. It seems there are several interfaces that make use of new > functionality, including "Tile" and "Ttk". > > If I want to write a program that will run

Re: is laziness a programer's virtue?

2007-04-17 Thread Bruce C. Baker
"Lew" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Markus E Leypold >>> Trying to correct Xah's behaviour is probably impossible. > > Ingo Menger wrote: >> Perhaps somebody could ask the chinese government to put him in jail >> for "hurting international society" :) > > Y'know, e

Re: retarded twits posting horseshit in technical groups

2007-04-17 Thread Brandon D Cartwright
On Tue, 17 Apr 2007 15:43:02 -0700, MassiveProng <[EMAIL PROTECTED]> wrote: >On 17 Apr 2007 06:56:05 -0700, [EMAIL PROTECTED] Gave us: > >>We know that... > > You're a fucking retard. But you are a text book example of a retard shoveling horseshit to technical groups.This is why you are universa

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

2007-04-17 Thread Yingpu Zhao
Thanks to Larry. I want to pass the IDispatch pointer of other COM object to AddShapeInfo or pass null to tell x do nothing. for example. Rect= Dispatch("Rect.Document") ShapeSet = Dispatch("xxx.Document") ShapeSet.AddShapeInfo("Rect", 0, Shape) or ShapeSet.AddShapeInfo("EmptyShape", 0, None) -

Re: python - dll access (ctypes or swig)

2007-04-17 Thread Alex Martelli
Larry Bates <[EMAIL PROTECTED]> wrote: > recently learned that you can ship COM as either an .EXE or a .DLL (nobody > has yet let me know why). The "why" is pretty obvious -- you may want to be able to instantiate a COM object either in-process, or in its own separate process, depending on that

Re: rewrite for achieving speedup

2007-04-17 Thread Alex Martelli
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > why would binding to a function-local name speeds up performance? Like any other constant-hoisting, pulling the lookup out of the loop speeds things up because otherwise Python must repeat the lookup each time through the loop (Python doesn't _know_

Future Python Gui?

2007-04-17 Thread [EMAIL PROTECTED]
I've been trying to find out what the future of Python is with regard to Tk. It seems there are several interfaces that make use of new functionality, including "Tile" and "Ttk". If I want to write a program that will run under the standard Python distribution of the future, what extension module

Re: rewrite for achieving speedup

2007-04-17 Thread [EMAIL PROTECTED]
On Apr 17, 11:25 pm, Steven Bethard <[EMAIL PROTECTED]> wrote: > 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.s

Re: is laziness a programer's virtue?

2007-04-17 Thread George Neuner
On 17 Apr 2007 08:20:24 -0700, Ingo Menger <[EMAIL PROTECTED]> wrote: >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

Re: Python COM iterator

2007-04-17 Thread Carsten Haese
On Tue, 2007-04-17 at 16:54 -0500, Larry Bates wrote: > Does anyone know if there is a way to make a Python COM object > act like a proper iterator in VB/Delphi? I don't use COM, VB, or Delphi, but Google turned up these two references: http://msdn.microsoft.com/library/default.asp?url=/library/en

Re: is laziness a programer's virtue?

2007-04-17 Thread Lew
Markus E Leypold >> Trying to correct Xah's behaviour is probably impossible. Ingo Menger wrote: > Perhaps somebody could ask the chinese government to put him in jail > for "hurting international society" :) Y'know, even in jest, calling for an oppressive regime to suppress even wrong-headed an

Re: Screen Control in WinXP and Linux

2007-04-17 Thread Gabriel Genellina
En Tue, 17 Apr 2007 19:06:38 -0300, peter <[EMAIL PROTECTED]> escribió: > I've been wrestling on and off with this problem for over a year now, > without success. Basically, I am looking for a simple set of screen > and keyboard manipulation commands that will run identically under > Linux and

??? Does GW Bush have Balls to BOMB South Korea like Afghanistan and Iraq in return for Korean Suicide Murderer Terrorism ???

2007-04-17 Thread thermate2
Does GW Bush have Balls to BOMB South Korea like Afghanistan and Iraq in return for Korean Suicide Murderer Terrorism ? No, he does not have the balls because Bush is a FAKE new born Christian and the Neocons FAKE Jews. If Bush dares to attack any asian country, they will put the ADULTEROUS sex vi

python-list@python.org

2007-04-17 Thread bearophileHUGS
Paddy: > def multiremberandco1(el, seq, fun): > l1, l2 = [], [] > c = seq.count(e1) > l1 = [el] * c > l2 = [el] * (len(seq) - c) > return fun(l1, l2) Thank you Paddy, but unfortunately there is a bug in my first function, this is more correct: def multiremberandco1b(el, seq,

Re: retarded twits posting horseshit in technical groups

2007-04-17 Thread MassiveProng
On 17 Apr 2007 06:56:05 -0700, [EMAIL PROTECTED] Gave us: >We know that... You're a fucking retard. -- http://mail.python.org/mailman/listinfo/python-list

Screen Control in WinXP and Linux

2007-04-17 Thread peter
I've been wrestling on and off with this problem for over a year now, without success. Basically, I am looking for a simple set of screen and keyboard manipulation commands that will run identically under Linux and Windows. Nothing fancy - just clear the screen, print a string at an arbitrary xy

Re: scipy 0.52 det crashes python

2007-04-17 Thread Robert Kern
Peter Maas wrote: > I tried some scipy examples using scipy 0.52, numpy 1.02 and python 2.5 on > a WinXP SP2 machine. numpy.linalg.det() works but scipy.linalg.det() > crashes python. Has anybody experienced this and can point me to a solution? Most likely your build of scipy was built with an ATL

Python COM iterator

2007-04-17 Thread Larry Bates
Does anyone know if there is a way to make a Python COM object act like a proper iterator in VB/Delphi? Example: Python COM object class foo: _public_methods_=['next'] def __init__(self): self.numbers=[1,2,3,4,5,6,7,8] def next(self): try: return self.number

Re: python - dll access (ctypes or swig)

2007-04-17 Thread Larry Bates
Daniel Watrous wrote: > 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

scipy 0.52 det crashes python

2007-04-17 Thread Peter Maas
I tried some scipy examples using scipy 0.52, numpy 1.02 and python 2.5 on a WinXP SP2 machine. numpy.linalg.det() works but scipy.linalg.det() crashes python. Has anybody experienced this and can point me to a solution? Thanks for your help. Peter Maas, Aachen -- http://mail.python.org/mailman/

Re: Binary file output using python

2007-04-17 Thread bvukov
On Apr 17, 10:30 pm, Thomas Dybdahl Ahle <[EMAIL PROTECTED]> wrote: > Den Tue, 17 Apr 2007 11:07:38 -0700 skrev 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 o

Re: Binary file output using python

2007-04-17 Thread Thomas Dybdahl Ahle
Den Tue, 17 Apr 2007 11:07:38 -0700 skrev 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 seem

Re: Binary file output using python

2007-04-17 Thread Michael Hoffman
Michael Hoffman wrote: > 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,

Re: C++ extension problem

2007-04-17 Thread Martin v. Löwis
> I assumed that the compiler would warn me about that kind of problem, > but I know better know. :) It's a variable argument list (...). The compiler is not supposed to give any warnings for that (although I do have a gcc patch that enables warnings for PyArg_ParseTuple). > Still, the error mess

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 acc

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 inef

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) >> >

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 faci

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 cal

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', '/usr/lib/python

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: arra

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? > >

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:

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 t

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 lim

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

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 ap

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: >> - > 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 not s

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 DllGetClassObjec

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

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 g

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 pi

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 im

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 recently

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 winxpgui.Upda

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: 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 b

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 "error

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 m

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: 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),

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 l

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 a

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 ? > > Th

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 ... 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

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

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

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

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 mo

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 when

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: 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: >

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" beh

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

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: 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 f

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

??? 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 thread

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 st

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: 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 m

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 pr

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 recreat

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),

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 PROTEC

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 pu

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: 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

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: >> 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

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: 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(

Re: question of easyExcel (<>)

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

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

  1   2   >