datetheuk - Free Online Dating

2008-11-21 Thread megiacomonadeau
datetheuk . . . ***CLICK HERE http://dating365.co.cc/datetheuk * . . . . . . . . . . . . datetheuk -- http://mail.python.org/mailman/listinfo/python-list

freedatingusa - Free Online Dating

2008-11-21 Thread megiacomonadeau
freedatingusa . . . ***CLICK HERE http://dating365.co.cc/freedatingusa * . . . . . . . . . . . . freedatingusa -- http://mail.python.org/mailman/listinfo/python-list

plentyoffish dating service - Free Online Dating

2008-11-21 Thread megiacomonadeau
plentyoffish dating service . . . ***CLICK HERE http://dating365.co.cc/plentyoffish-dating-service * . . . . . . . . . . . . plentyoffish dating service -- http://mail.python.org/mailman/listinfo/python-list

plentyoffish uk - Free Online Dating

2008-11-21 Thread megiacomonadeau
plentyoffish uk . . . ***CLICK HERE http://dating365.co.cc/plentyoffish-uk * . . . . . . . . . . . . plentyoffish uk -- http://mail.python.org/mailman/listinfo/python-list

myukdate - Free Online Dating

2008-11-21 Thread megiacomonadeau
myukdate . . . ***CLICK HERE http://dating365.co.cc/myukdate * . . . . . . . . . . . . myukdate -- http://mail.python.org/mailman/listinfo/python-list

www myukdate com - Free Online Dating

2008-11-21 Thread megiacomonadeau
www myukdate com . . . ***CLICK HERE http://dating365.co.cc/www-myukdate-com * . . . . . . . . . . . . www myukdate com -- http://mail.python.org/mailman/listinfo/python-list

african american singles - Free Online Dating

2008-11-21 Thread megiacomonadeau
african american singles . . . ***CLICK HERE http://dating365.co.cc/african-american-singles * . . . . . . . . . . . . african american singles -- http://mail.python.org/mailman/listinfo/python-list

www okcupid com - Free Online Dating

2008-11-21 Thread megiacomonadeau
www okcupid com . . . ***CLICK HERE http://dating365.co.cc/www-okcupid-com * . . . . . . . . . . . . www okcupid com -- http://mail.python.org/mailman/listinfo/python-list

A little comments of ctypes and construct.

2008-11-21 Thread 一首诗
Hi all, Recently I asked a question on this group: >> What's your choice when handle complicated C structures. I got these suggestion: 1) try construct 2) try ctypes I spend half a day on construct and here's my conclusion: 1. It really good for parse(unpack) data structur

How to read space separated file in python?

2008-11-21 Thread ganesh gajre
Hi all, I want to read file which is mapping file. Used in to map character from ttf to unicode. eg Map file contain data in the following way: 0 ० 1 १ 2 २ 3 ३ 4 ४ 5 ५ 6 ६ 7 ७ 8 ८ 9 ९ Like this. Please use any unicode editor to view the text if it not properly shown. Now i want to read both th

Re: sorting list of complex numbers

2008-11-21 Thread Tim Golden
Steven D'Aprano wrote: On Wed, 19 Nov 2008 18:39:27 -0800, Paul Rubin wrote: Terry Reedy <[EMAIL PROTECTED]> writes: Do your tuple destructuring in the first statement in your body and nothing will break. Why get rid of a useful feature that unclutters code? Unfortunately, the people who fi

Re: How to read space separated file in python?

2008-11-21 Thread Steven D'Aprano
On Fri, 21 Nov 2008 14:16:13 +0530, ganesh gajre wrote: > Hi all, > > I want to read file which is mapping file. Used in to map character from > ttf to unicode. > eg > > Map file contain data in the following way: > > 0 ० > 1 १ > 2 २ > 3 ३ > 4 ४ > 5 ५ > 6 ६ > 7 ७ > 8 ८ > 9 ९ > > Like this. Ple

Re: Python 3 __cmp__ semantic change?

2008-11-21 Thread Duncan Booth
Johannes Bauer <[EMAIL PROTECTED]> wrote: > Seems it was removed on purpose - I'm sure there was a good reason for > that, but may I ask why? Instead of the sleek __cmp__ function I had > earlier, I now have code like: > > > def __lt__(self, other): > return self.__cmp__(other) < 0 >

Re: Official definition of call-by-value (Re: Finding the instance reference...)

2008-11-21 Thread Duncan Booth
Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Fri, 21 Nov 2008 03:32:25 +, Steven D'Aprano wrote: > >>> Rather it seems to me that the essence of the idea they had in mind >>> is that call-by-value is equivalent to assignment. >> >> You've just *assumed* that assignment in Algol 60 doesn't

Dynamic features used

2008-11-21 Thread bearophileHUGS
I often use Python to write small programs, in the range of 50-500 lines of code. For example to process some bioinformatics data, perform some data munging, to apply a randomized optimization algorithm to solve a certain messy problem, and many different things. For that I often use several genera

Re: zope vs openACS

2008-11-21 Thread Stefan Scholl
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > On Nov 19, 1:50 am, gavino <[EMAIL PROTECTED]> wrote: >> what is nicer about each? > > Yes. And No. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to read space separated file in python?

2008-11-21 Thread Peter Otten
ganesh gajre wrote: > Hi all, > > I want to read file which is mapping file. Used in to map character from > ttf to unicode. > eg > > Map file contain data in the following way: > > 0 ० > 1 १ > 2 २ > 3 ३ > 4 ४ > 5 ५ > 6 ६ > 7 ७ > 8 ८ > 9 ९ > > Like this. Please use any unicode editor to view t

Re: Python / Debian package dependencies

2008-11-21 Thread Stephane Bulot
I'm not familiar with stdeb, but dpkg-buildpackage needs a file called "control". This is this file that will be used to generate deb archive with the good dependancies. Into this file, there are two fields, Build-Depends and Depends, that give to dpkg-buildpackage what are the package dependancies

Re: Optional parameter object re-used when instantiating multiple objects

2008-11-21 Thread Aaron Brady
On Nov 20, 11:26 pm, alex23 <[EMAIL PROTECTED]> wrote: > On Nov 21, 10:07 am, Aaron Brady <[EMAIL PROTECTED]> wrote: > > > Why, I would expect the interpreter to define the functions when it > > first hits the def, that is, at the point of definition. > > Then why are you arguing that the parameter

strange pythoncom.com_error - it only happens once

2008-11-21 Thread Rafe
Hi, I'm getting this error: # File "C:\Python25\Lib\site-packages\win32com\client\dynamic.py", line 491, in __getattr__ # raise pythoncom.com_error, details # COM Error: Unspecified failure - [line 52] ...when my program hits a line of code which I know should work. The strange thing is, wh

Re: Official definition of call-by-value (Re: Finding the instance reference...)

2008-11-21 Thread Aaron Brady
On Nov 21, 3:11 am, Duncan Booth <[EMAIL PROTECTED]> wrote: > Steven D'Aprano <[EMAIL PROTECTED]> wrote: > > On Fri, 21 Nov 2008 03:32:25 +, Steven D'Aprano wrote: > > >>> Rather it seems to me that the essence of the idea they had in mind > >>> is that call-by-value is equivalent to assignment

Re: Dynamic features used

2008-11-21 Thread Rafe
On Nov 21, 4:17 pm, [EMAIL PROTECTED] wrote: > I often use Python to write small programs, in the range of 50-500 > lines of code. For example to process some bioinformatics data, > perform some data munging, to apply a randomized optimization > algorithm to solve a certain messy problem, and many

Re: A little comments of ctypes and construct.

2008-11-21 Thread Aaron Brady
On Nov 21, 2:28 am, 一首诗 <[EMAIL PROTECTED]> wrote: > Hi all, > > Recently I asked a question on this group: > > >> What's your choice when handle complicated C structures. snip > > typedef struct _Point > { >int x; >int y; > > } Point; > > typedef struct _Shape > { > int z; > Point ap[2

Re: Official definition of call-by-value (Re: Finding the instance reference...)

2008-11-21 Thread Duncan Booth
Aaron Brady <[EMAIL PROTECTED]> wrote: >> a[:] = [1, 2, 3] > > No, that's not assignment, it's syntactic sugar for a __setslice__ > call. No copies here. > Oh dear, perhaps you had better get the Python developers to update the grammar that Python uses as that seems to think it's an assignment

Re: Official definition of call-by-value (Re: Finding the instance reference...)

2008-11-21 Thread Aaron Brady
On Nov 21, 4:33 am, Duncan Booth <[EMAIL PROTECTED]> wrote: > Aaron Brady <[EMAIL PROTECTED]> wrote: > >> a[:] = [1, 2, 3] > > > No, that's not assignment, it's syntactic sugar for a __setslice__ > > call.  No copies here. > > Oh dear, perhaps you had better get the Python developers to update the

Re: Dynamic features used

2008-11-21 Thread Almar Klein
You're right (I think), but I fail to see the point you're trying to make or the question you're asking... :) I use python for scientific research too, and for me speed can be an issue too sometimes. By using numpy and scipy I have an environment similar to Matlab in terms of speed and functiona

Re: Optional parameter object re-used when instantiating multiple objects

2008-11-21 Thread alex23
On Nov 21, 7:49 pm, Aaron Brady <[EMAIL PROTECTED]> wrote: > On Nov 20, 11:26 pm, alex23 <[EMAIL PROTECTED]> wrote: > > > On Nov 21, 10:07 am, Aaron Brady <[EMAIL PROTECTED]> wrote: > > > > Why, I would expect the interpreter to define the functions when it > > > first hits the def, that is, at the

Re: strange pythoncom.com_error - it only happens once

2008-11-21 Thread Rafe
On Nov 21, 4:50 pm, Rafe <[EMAIL PROTECTED]> wrote: > Hi, > > I'm getting this error: > #   File "C:\Python25\Lib\site-packages\win32com\client\dynamic.py", > line 491, in __getattr__ > #     raise pythoncom.com_error, details > # COM Error: Unspecified failure - [line 52] > > ...when my program hi

Re: Optional parameter object re-used when instantiating multiple objects

2008-11-21 Thread Aaron Brady
On Nov 21, 4:24 am, alex23 <[EMAIL PROTECTED]> wrote: > On Nov 21, 7:49 pm, Aaron Brady <[EMAIL PROTECTED]> wrote: > > > On Nov 20, 11:26 pm, alex23 <[EMAIL PROTECTED]> wrote: > > > > On Nov 21, 10:07 am, Aaron Brady <[EMAIL PROTECTED]> wrote: > > > > > Why, I would expect the interpreter to define

Re: Can't find Python Library packages in Ubuntu (Debian)

2008-11-21 Thread Jerzy Jalocha N
>> So, the first question is: How do I install the complete Python test >> framework under Ubuntu (Debian)? >> >> So, my second question: What (meta?-)package(s) do I have to install >> under Ubuntu (Debian) in order to get a full (as in the official >> release) Python installation? > I don't have

Re: A little comments of ctypes and construct.

2008-11-21 Thread 一首诗
I didn't try your code. That might be working since it a completely different method. What mean is pack works: = class POINT(Structure): _fields_ = [('x', c_int), ('y', c_int)] p = POINT(1,2) p.x, p.y (1, 2) str(buffer(p)) s = str(buffer(p)) ===

Re: Can't find Python Library packages in Ubuntu (Debian)

2008-11-21 Thread David Cournapeau
On Fri, Nov 21, 2008 at 9:24 PM, Jerzy Jalocha N <[EMAIL PROTECTED]> wrote: > > And my third question could be: Do all Python developers that work with Debian > (or derivations) have to compile Python? I think most people using python as a development tool use the version available in their distr

call an exturnal program in python

2008-11-21 Thread Adam
I am trying to run an external program in my code using os.system('exename -exearg') but the exe has an "&" in it so windows thinks it's two commands any way around this? Adam -- http://mail.python.org/mailman/listinfo/python-list

Re: call an exturnal program in python

2008-11-21 Thread Steve Holden
Adam wrote: > I am trying to run an external program in my code using > os.system('exename -exearg') but the exe has an "&" in it so windows > thinks it's two commands any way around this? > Have you tries quoting the exename: os.system('"exename" -exearg') That might help. How do you run it f

Re: Dynamic features used

2008-11-21 Thread bearophileHUGS
Almar Klein: > but I fail to see the point you're trying > to make or the question you're asking... :) It's not easy to define what my point was :-) I try again, but the following questions don't cover all the points: - What are the dynamic features of Python that you use in your code? (excluding

Re: A little comments of ctypes and construct.

2008-11-21 Thread 一首诗
OK, I was wrong with construct! I wrote to the author and he replied. It works! I am really glad there IS a easy way to handle binary data in python. >>> from construct import * >>> >>> >>> point = Struct("point", ... SNInt32("x"), # Signed, Native byte-order, Int 32 bits ('int' is platfo

Re: Dynamic features used

2008-11-21 Thread Almar Klein
> > - Is it good for Python to become two languages in one, a fast > statically typed one and a dynamically one, like pypy shows to like > with RPython, or is it better to go the way of the Boo language, that > (while being mostly static) is mixing dynamic and static typing in the > same code, but

Re: Dynamic features used

2008-11-21 Thread Tim Chase
- What are the dynamic features of Python that you use in your code? (excluding ones that can can be done with a good static template system). introspection & dynamic properties are a big one. Having functions and classes as higher-order objects that can be passed around like any other variab

how to get all repeated group with regular expression

2008-11-21 Thread scsoce
say, when I try to search and match every char from variable length string, such as string '123456', i tried re.findall( r'(\d)*, '12346' ) , but only get '6' and Python doc indeed say: "If a group is contained in a part of the pattern that matched multiple times, the last match is returned."

Re: function parameter scope python 2.5.2

2008-11-21 Thread J Kenneth King
alex23 <[EMAIL PROTECTED]> writes: > On Nov 21, 9:40 am, J Kenneth King <[EMAIL PROTECTED]> wrote: >> Of course, providing a shallow (or deep as necessary) copy makes it >> work, I'm curious as to why the value passed as a parameter to a >> function outside the class is passed a reference rather t

Re: how to get all repeated group with regular expression

2008-11-21 Thread Steve Holden
scsoce wrote: > say, when I try to search and match every char from variable length > string, such as string '123456', i tried re.findall( r'(\d)*, '12346' ) I think you will find you missed a quote out there. Always better to copy and paste ... > , but only get '6' and Python doc indeed say: "

Re: how to get all repeated group with regular expression

2008-11-21 Thread Hrvoje Niksic
scsoce <[EMAIL PROTECTED]> writes: > say, when I try to search and match every char from variable length > string, such as string '123456', i tried re.findall( r'(\d)*, '12346' > ) , but only get '6' and Python doc indeed say: "If a group is > contained in a part of the pattern that matched mult

RELEASED Python 3.0rc3

2008-11-21 Thread Barry Warsaw
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On behalf of the Python development team and the Python community, I am happy to announce the third and last planned release candidate for Python 3.0. This is a release candidate, so while it is not quite suitable for production environments,

Air Force1 and Air Jordan shoes PAYPAL wholesale

2008-11-21 Thread yahoo808
Air Force1 and Air Jordan shoes PAYPAL wholesale www.z-a-z-a.com we are professional produce air force1 and jordan shoes supplier ,carry PAYPAL.products main; air force1-25th AF1-high AF1- low .air jordan 1-14,air jordan 23,air force 1&jordan 5,air force1&jordan12,air jordan1&jordan23 and so on

Build of extension module depending on external lib fails on Solaris 10

2008-11-21 Thread Eric Brunel
Hello all, I've got a brand new Solaris 10 computer and I'm trying to build Python and extension modules for it. The Python build didn't have any problem and I have a working Python interpreter. But I can't succeed to build extension modules depending on external libraries: The compilation

Re: function parameter scope python 2.5.2

2008-11-21 Thread J Kenneth King
Steven D'Aprano <[EMAIL PROTECTED]> writes: > On Thu, 20 Nov 2008 18:31:12 -0500, J Kenneth King wrote: > >> Of course I expected that recursive_func() would receive a copy of >> weird_obj.words but it appears to happily modify the object. > > I am curious why you thought that. What made you think

Re: How to read space separated file in python?

2008-11-21 Thread Joe Strout
On Nov 21, 2008, at 2:08 AM, Steven D'Aprano wrote: a, b = line.split() Note that in a case like this, you may want to consider using partition instead of split: a, sep, b = line.partition(' ') This way, if there happens to be more than one space (for example, because the Unicode c

Best strategy for finding a pattern in a sequence of integers

2008-11-21 Thread Slaunger
Hi all, I am a Python novice, and I have run into a problem in a project I am working on, which boils down to identifying the patterns in a sequence of integers, for example 1 6 6 1 6 6 1 6 6 1 6 6 1 6 6 1 9 3 3 0 3 3 0 3 3 0 3 3 0 10 6 6 1 6 6 1 6 6 1 6 6 1 6 6 1 6 6 1 6 6 1 9 3 3 0 3 3 0 3

Need help converting text to csv format

2008-11-21 Thread Chuck Connors
Hey guys. I'm working on a little program to help my wife catalog her/ our coupons. I found a good resource but need help formatting the text data so that I can import it into a mysql database. Here's the data format: 40922003 Life Fitness Products $1 (12-13-08) (CVS) 546500181141 Oust Air S

Re: Dynamic features used

2008-11-21 Thread pruebauno
On Nov 21, 4:17 am, [EMAIL PROTECTED] wrote: > What are the dynamic features of Python that you use in your code? The main ones is using configuration files that are plain Python instead of XML and not having to wait 5 minutes to compile larger programs. I also prefer structural typing over nomina

Custom Formatting The Output Of subprocess.Popen

2008-11-21 Thread thedsadude
Hello, I'm launching a script as follows: p = subprocess.Popen(['./p.py', 'aa']) p.wait() If p.py writes to sys.stdout, then it is shown on the console. Looking at the console, then, it is hard to distinguish the output of p.py from that of the script launching it. I'd like to do it so t

Re: Python 3 __cmp__ semantic change?

2008-11-21 Thread Hyuga
On Nov 21, 4:09 am, Duncan Booth <[EMAIL PROTECTED]> wrote: > Johannes Bauer <[EMAIL PROTECTED]> wrote: > > Seems it was removed on purpose - I'm sure there was a good reason for > > that, but may I ask why? Instead of the sleek __cmp__ function I had > > earlier, I now have code like: > > > def __

Re: Need help converting text to csv format

2008-11-21 Thread George Sakkis
On Nov 21, 10:18 am, Chuck Connors <[EMAIL PROTECTED]> wrote: > Any help, pseudo code, or whatever push in the right direction would > be most appreciated.  I am a novice Python programmer but I do have a > good bit of PHP programming experience. I'm wondering if PHP experience precludes the abil

Re: 404 not found on for Python 2.6 Itanium

2008-11-21 Thread Christopher
> Yes. It's too much effort to build, and too few users that actually > use it. Users are still free to build it themselves, and to share > the build with others. I guess that I don't understand why you feel there is so much effort involved. I developed a set of makefiles that build Python and a

Re: Need help converting text to csv format

2008-11-21 Thread Chuck Connors
> I'm wondering if PHP experience precludes the ability to use a search > engine before asking for help... Thanks for the push in the right direction, friend. -- http://mail.python.org/mailman/listinfo/python-list

Re: 404 not found on for Python 2.6 Itanium

2008-11-21 Thread Steve Holden
Christopher wrote: > [Martin von Loewis wrote]: >> Yes. It's too much effort to build, and too few users that actually >> use it. Users are still free to build it themselves, and to share >> the build with others. > > I guess that I don't understand why you feel there is so much effort > involved.

Re: Custom Formatting The Output Of subprocess.Popen

2008-11-21 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > Hello, > > I'm launching a script as follows: > > p = subprocess.Popen(['./p.py', 'aa']) > > p.wait() > > > If p.py writes to sys.stdout, then it is shown on the console. > Looking at the console, then, it is hard to distinguish the output of > p.py from that

Re: Using eval, or something like it...

2008-11-21 Thread r0g
Scott David Daniels wrote: > r0g wrote: >> ... >> A class is like a template which combines a complex data type (made from >> a combination of other data types) and the methods that operate on that >> data type. >> >> You generally don't work with classes directly but you make instances of >> them,

Re: Python 3 __cmp__ semantic change?

2008-11-21 Thread Benjamin Kaplan
On Fri, Nov 21, 2008 at 10:44 AM, Hyuga <[EMAIL PROTECTED]> wrote: > On Nov 21, 4:09 am, Duncan Booth <[EMAIL PROTECTED]> wrote: > > Johannes Bauer <[EMAIL PROTECTED]> wrote: > > > Seems it was removed on purpose - I'm sure there was a good reason for > > > that, but may I ask why? Instead of the

Re: Need help converting text to csv format

2008-11-21 Thread Tim Chase
40922003 Life Fitness Products $1 (12-13-08) (CVS) 546500181141 Oust Air Sanitizer, any B1G1F up to $3.49 (1-17-09) .35 each 518000159258 Pillsbury Crescent Dinner Rolls, any .25 (2-14-09) 518000550406 Pillsbury Frozen Grands Biscuits, Cinnamon Rolls, Mini Cinnamon Rolls, etc. .40 (2-14-09) i

Re: Need help converting text to csv format

2008-11-21 Thread Joe Strout
On Nov 21, 2008, at 8:18 AM, Chuck Connors wrote: The first value (large number) is the UPC, the next element is the coupon description, followed by a date in parenthesis. Those are the only three elements I am concerned with. Can someone help me in reformatting this: 40922003 Life Fitnes

Re: How to read space separated file in python?

2008-11-21 Thread Steve Holden
Joe Strout wrote: > On Nov 21, 2008, at 2:08 AM, Steven D'Aprano wrote: > >>a, b = line.split() > > Note that in a case like this, you may want to consider using partition > instead of split: > > a, sep, b = line.partition(' ') > > This way, if there happens to be more than one space (for

Re: Using eval, or something like it...

2008-11-21 Thread Joe Strout
On Nov 21, 2008, at 8:58 AM, r0g wrote: I hadn't really appreciated the consequences of this till now though e.g. that an instance might do a = a + 1 without affecting it's siblings but that b.append("fish") would affect b for everyone. I don't know if I will find any uses for that kind of

Re: Problem with writing fast UDP server

2008-11-21 Thread Krzysztof Retel
On Nov 21, 3:52 am, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > > >Start the server before the client. > > If you want to try this program out on POSIX, make sure you change the > time.clock() calls to time.time() calls instead, otherwise the results > aren't very meaningful. > > I gave this a

Re: Need help converting text to csv format

2008-11-21 Thread Steve Holden
George Sakkis wrote: > On Nov 21, 10:18 am, Chuck Connors <[EMAIL PROTECTED]> wrote: > >> Any help, pseudo code, or whatever push in the right direction would >> be most appreciated. I am a novice Python programmer but I do have a >> good bit of PHP programming experience. > > I'm wondering if P

Re: Need help converting text to csv format

2008-11-21 Thread Tim Chase
>>> qfields = ['"' + fld.strip() + '"' for fld in (num,desc,date)] >>> out = qfields.join(',') Just a quick note here to prevent the confusion of the OP...this should be ','.join(qfields) -tkc -- http://mail.python.org/mailman/listinfo/python-list

Re: How to read space separated file in python?

2008-11-21 Thread Joe Strout
On Nov 21, 2008, at 9:00 AM, Steve Holden wrote: Joe Strout wrote: On Nov 21, 2008, at 2:08 AM, Steven D'Aprano wrote: a, b = line.split() Note that in a case like this, you may want to consider using partition instead of split: a, sep, b = line.partition(' ') This way, if there hap

Re: Need help converting text to csv format

2008-11-21 Thread Chuck Connors
Wow! What a change in direction from the previous post. Thank you both for the help and the explanations. This will work great! -- http://mail.python.org/mailman/listinfo/python-list

Re: A little comments of ctypes and construct.

2008-11-21 Thread Mark Tolonen
"一首诗" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] I didn't try your code. That might be working since it a completely different method. What mean is pack works: = class POINT(Structure): _fields_ = [('x', c_int), ('y', c_int)] p = POINT(1,2) p.x

Re: Problem with writing fast UDP server

2008-11-21 Thread Krzysztof Retel
On Nov 21, 5:49 am, Greg Copeland <[EMAIL PROTECTED]> wrote: > On Nov 20, 9:03 am, Krzysztof Retel <[EMAIL PROTECTED]> > wrote: > > > > > Hi guys, > > > I am struggling writing fast UDP server. It has to handle around 1 > > UDP packets per second. I started building that with non blocking > > s

Re: Need help converting text to csv format

2008-11-21 Thread Tim Golden
Tim Chase wrote: >>> qfields = ['"' + fld.strip() + '"' for fld in (num,desc,date)] >>> out = qfields.join(',') Just a quick note here to prevent the confusion of the OP...this should be ','.join(qfields) To be honest, it's so easy to use the stdlib csv module that I'd always recommend t

Re: Need help converting text to csv format

2008-11-21 Thread Joe Strout
On Nov 21, 2008, at 9:22 AM, Tim Golden wrote: Tim Chase wrote: >>> qfields = ['"' + fld.strip() + '"' for fld in (num,desc,date)] >>> out = qfields.join(',') Just a quick note here to prevent the confusion of the OP...this should be ','.join(qfields) Thanks Tim #1, for pointing out my er

Re: how to get all repeated group with regular expression

2008-11-21 Thread Steve Holden
Please keep this on the list. scsoce wrote: > Steve Holden wrote: >> scsoce wrote: >> >>> say, when I try to search and match every char from variable length >>> string, such as string '123456', i tried re.findall( r'(\d)*, '12346' ) >>> >> >> I think you will find you missed a quote out

Re: Need help converting text to csv format

2008-11-21 Thread Tim Golden
Joe Strout wrote: A follow-up question here... is it really necessary to close things like files in Python? I've been slumming it in the REALbasic community for the last decade, where you generally don't worry about such things, as any object that represents something "open" will automatically

Re: Need help converting text to csv format

2008-11-21 Thread Tim Chase
Tim Golden wrote: Tim Chase wrote: >>> qfields = ['"' + fld.strip() + '"' for fld in (num,desc,date)] >>> out = qfields.join(',') Just a quick note here to prevent the confusion of the OP...this should be ','.join(qfields) To be honest, it's so easy to use the stdlib csv module that I'd

Re: 404 not found on for Python 2.6 Itanium

2008-11-21 Thread Christopher Nelson
I'm not sure what to say about that. The company I work for is committed to Python (our product is mostly Python source), and my current job is to make our software work on Itanium, which means providing an Itanium build of Python. As long as I have this job I suspect that I will be maintaining i

Re: function parameter scope python 2.5.2

2008-11-21 Thread Peter Pearson
On Fri, 21 Nov 2008 10:12:08 -0500, J Kenneth King wrote: > Steven D'Aprano <[EMAIL PROTECTED]> writes: >> >> I am curious why you thought that. What made you think Python should/did >> make a copy of weird_obj.words when you pass it to a function? [snip] > Of course if there is any further readin

Re: Problem with writing fast UDP server

2008-11-21 Thread Peter Pearson
On Fri, 21 Nov 2008 08:14:19 -0800 (PST), Krzysztof Retel wrote: > I am not sure what do you mean by CPU-bound? How can I find out if I > run it on CPU-bound? CPU-bound is the state in which performance is limited by the availability of processor cycles. On a Unix box, you might run the "top" uti

Re: Need help converting text to csv format

2008-11-21 Thread Tim Golden
Tim Chase wrote: yes, the CSV module has some wonderful stuff in it, and I regularly use it for *reading* CSV files. But for writing them, it's often just as fast (for my purposes) to simply code my 1st post's quickie as it is to scrounge in the docs/docstrings to remember how to let the CSV d

Re: Dynamic features used

2008-11-21 Thread George Sakkis
On Nov 21, 7:55 am, [EMAIL PROTECTED] wrote: > It's not easy to define what my point was :-) I try again, but the > following questions don't cover all the points: > - What are the dynamic features of Python that you use in your code? > (excluding ones that can can be done with a good static templ

Re: Problem with writing fast UDP server

2008-11-21 Thread Krzysztof Retel
On Nov 21, 4:48 pm, Peter Pearson <[EMAIL PROTECTED]> wrote: > On Fri, 21 Nov 2008 08:14:19 -0800 (PST), Krzysztof Retel wrote: > > I am not sure what do you mean by CPU-bound? How can I find out if I > > run it on CPU-bound? > > CPU-bound is the state in which performance is limited by the > avail

Re: function parameter scope python 2.5.2

2008-11-21 Thread J Kenneth King
Peter Pearson <[EMAIL PROTECTED]> writes: > On Fri, 21 Nov 2008 10:12:08 -0500, J Kenneth King wrote: >> Steven D'Aprano <[EMAIL PROTECTED]> writes: >>> >>> I am curious why you thought that. What made you think Python should/did >>> make a copy of weird_obj.words when you pass it to a function?

Re: Best strategy for finding a pattern in a sequence of integers

2008-11-21 Thread Gerard flanagan
Slaunger wrote: Hi all, I am a Python novice, and I have run into a problem in a project I am working on, which boils down to identifying the patterns in a sequence of integers, for example 1 6 6 1 6 6 1 6 6 1 6 6 1 6 6 1 9 3 3 0 3 3 0 3 3 0 3 3 0 10 6 6 1 6 6 1 6 6 1 6 6 1 6 6 1 6 6 1 6 6

Re: Best strategy for finding a pattern in a sequence of integers

2008-11-21 Thread Banibrata Dutta
Haven't followed the entire thread, so I could be making a silly, out-of-place remark, and apologies in advance for the same.However, to me it looks like Slaunger wants to find 2 of the longest repeating patterns, and not just 2 specific patterns (though from the introductory test, it appears to be

Building Python 2.5.2 for Itanium

2008-11-21 Thread Christopher
Hello, A tool that we use needs to be ported to Itanium. It wsa written for Python 2.5.2, and so I was happily using the Itanium version of that release. However, as I have gotten deeper into the port, I see that ctypes was not included with the Itanium Python 2.5.2 release. I need to compi

Re: Need help converting text to csv format

2008-11-21 Thread MRAB
Tim Golden wrote: Joe Strout wrote: A follow-up question here... is it really necessary to close things like files in Python? I've been slumming it in the REALbasic community for the last decade, where you generally don't worry about such things, as any object that represents something "open"

Re: Python 3 __cmp__ semantic change?

2008-11-21 Thread Arnaud Delobelle
Hyuga <[EMAIL PROTECTED]> writes: > On Nov 21, 4:09 am, Duncan Booth <[EMAIL PROTECTED]> wrote: >> Johannes Bauer <[EMAIL PROTECTED]> wrote: >> > Seems it was removed on purpose - I'm sure there was a good reason for >> > that, but may I ask why? Instead of the sleek __cmp__ function I had >> > ea

Re: how to get all repeated group with regular expression

2008-11-21 Thread M.-A. Lemburg
On 2008-11-21 15:31, scsoce wrote: > say, when I try to search and match every char from variable length > string, such as string '123456', ??? That's a strange requirement. If you want to match every character, then why are you using a regular expression for this ? > i tried re.findall( r'(\d)

Re: Need help converting text to csv format

2008-11-21 Thread M.-A. Lemburg
On 2008-11-21 16:18, Chuck Connors wrote: > Hey guys. I'm working on a little program to help my wife catalog her/ > our coupons. I found a good resource but need help formatting the > text data so that I can import it into a mysql database. Here's the > data format: > > 40922003 Life Fitnes

Re: Need help converting text to csv format

2008-11-21 Thread Joe Strout
On Nov 21, 2008, at 10:26 AM, MRAB wrote: The file will be closed automatically when the file object is garbage-collected. CPython uses reference-counting, so the file object is garbage- collected as soon as there are no references to it. Jython (and IronPython?) are garbage-collected in t

Re: how to get all repeated group with regular expression

2008-11-21 Thread MRAB
Steve Holden wrote: Please keep this on the list. scsoce wrote: Steve Holden wrote: scsoce wrote: say, when I try to search and match every char from variable length string, such as string '123456', i tried re.findall( r'(\d)*, '12346' ) I think you will find you missed a quote out

Re: Best strategy for finding a pattern in a sequence of integers

2008-11-21 Thread Arnaud Delobelle
Slaunger <[EMAIL PROTECTED]> writes: > I am a Python novice, and I have run into a problem in a project I am > working on, which boils down to identifying the patterns in a sequence > of integers, for example > > 1 6 6 1 6 6 1 6 6 1 6 6 1 6 6 1 9 3 3 0 3 3 0 3 3 0 3 3 0 10 6 6 > 1 6 6 1 6 6 1

Re: Need help converting text to csv format

2008-11-21 Thread George Sakkis
On Nov 21, 11:05 am, Steve Holden <[EMAIL PROTECTED]> wrote: > George Sakkis wrote: > > On Nov 21, 10:18 am, Chuck Connors <[EMAIL PROTECTED]> wrote: > > >> Any help, pseudo code, or whatever push in the right direction would > >> be most appreciated.  I am a novice Python programmer but I do have

Re: special editor support for indentation needed.

2008-11-21 Thread Andreas Roehler
Eric S. Johansson wrote: > Andreas Roehler wrote: > >> IMO Jeremiah Dodds is right. With all the time spent on this discussion, you >> could write the needed function in elisp probably. BTW your request seems >> reasonable. Other python programmers may use it too. > > I tried learning lisp about

can the sequence of entries in a dictionary be depended on?

2008-11-21 Thread Priya
Hi, I'm writing a program where i iterate through the entries in a dictionary using a for loop. This for-loop is enclosed by another loop which traverses through a list and checks the relation between each entry in the list and each entry in the dictionary. while I know that dictionaries are 'unord

Re: can the sequence of entries in a dictionary be depended on?

2008-11-21 Thread Diez B. Roggisch
Priya wrote: > Hi, > I'm writing a program where i iterate through the entries in a > dictionary using a for loop. This for-loop is enclosed by another loop > which traverses through a list and checks the relation between each > entry in the list and each entry in the dictionary. > while I know th

Re: Using eval, or something like it...

2008-11-21 Thread Scott David Daniels
I forgot to include a few cases: (1) Inspired by your calling the class attributes "templates": class Demo3(object): pass d = Demo3() print d.non_template # raises exception d.non_template = 45 print d.non_template print Demo3.non_template # raises exception

Re: Custom Formatting The Output Of subprocess.Popen

2008-11-21 Thread Scott David Daniels
[EMAIL PROTECTED] wrote: Hello, I'm launching a script as follows: p = subprocess.Popen(['./p.py', 'aa']) p.wait() If p.py writes to sys.stdout, then it is shown on the console You seem to be missing the fact that ./py is run in a different process. The "sys.stdout" that p.py uses

Re: Problem with writing fast UDP server

2008-11-21 Thread Greg Copeland
On Nov 21, 11:05 am, Krzysztof Retel <[EMAIL PROTECTED]> wrote: > On Nov 21, 4:48 pm, Peter Pearson <[EMAIL PROTECTED]> wrote: > > > On Fri, 21 Nov 2008 08:14:19 -0800 (PST), Krzysztof Retel wrote: > > > I am not sure what do you mean by CPU-bound? How can I find out if I > > > run it on CPU-bound?

Re: Need help converting text to csv format

2008-11-21 Thread Richard Riley
George Sakkis <[EMAIL PROTECTED]> writes: > On Nov 21, 11:05 am, Steve Holden <[EMAIL PROTECTED]> wrote: >> George Sakkis wrote: >> > On Nov 21, 10:18 am, Chuck Connors <[EMAIL PROTECTED]> wrote: >> >> >> Any help, pseudo code, or whatever push in the right direction would >> >> be most appreciate

  1   2   >