Re: How do I count the number of spaces at the left end of a string?

2007-05-16 Thread Asun Friere
On May 17, 8:18 am, Steven Howe <[EMAIL PROTECTED]> wrote: > walterbyrd wrote: > > I don't know exactly what the first non-space character is. I know the > > first non-space character will be * or an alphanumeric character. > > using builtin function rindex But only if there is a guarantee that a

Re: How to do basic CRUD apps with Python

2007-05-16 Thread half . italian
On May 14, 7:46 pm, "James T. Dennis" <[EMAIL PROTECTED]> wrote: > Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > > walterbyrd a ?crit : > >> With PHP, libraries, apps, etc. to do basic CRUD are everywhere. Ajax > >> and non-Ajax solutions abound. > >> With Python, finding such library, or apps.

Re: How do I tell the difference between the end of a text file, and an empty line in a text file?

2007-05-16 Thread Asun Friere
On May 17, 7:47 am, walterbyrd <[EMAIL PROTECTED]> wrote: > Python's lack of an EOF character is giving me a hard time. The difference is simply that an empty line contains a '\n' while EOF does not. If you strip() your line before testing you will have trouble. But the minimal cases you post (p

Re: Trying to choose between python and java

2007-05-16 Thread [EMAIL PROTECTED]
Cameron Laird wrote: > In article <[EMAIL PROTECTED]>, > Terry Reedy <[EMAIL PROTECTED]> wrote: > > > >"Anthony Irwin" <[EMAIL PROTECTED]> wrote in message > >news:[EMAIL PROTECTED] > . > . > . > >| #5 someone said that they used to

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread rurpy
On May 16, 1:37 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On May 16, 12:54 pm, Gregor Horvath <[EMAIL PROTECTED]> wrote: > > > Istvan Albert schrieb: > > > > Here is something that just happened and relates to this subject: I > > > had to help a student run some python code on her laptop

Re: Asyncore Help?

2007-05-16 Thread Josiah Carlson
Paul Kozik wrote: > I am working on the networking code for a small Multiplayer RPG I'm > working on. I currently have some basic code using threads, but it > seems like asyncore would be far better suited for my needs. However, > I have trouble finding a solid example for what I need. Python.org a

Re: cPickle.dumps differs from Pickle.dumps; looks like a bug.

2007-05-16 Thread Gabriel Genellina
En Thu, 17 May 2007 02:09:02 -0300, Josiah Carlson <[EMAIL PROTECTED]> escribió: > All strings of length 0 (there is 1) and 1 (there are 256) are interned. I thought it was the case too, but not always: py> a = "a" py> b = "A".lower() py> a==b True py> a is b False py> a is intern(a) True py>

Re: Python Newbie Suggestions

2007-05-16 Thread Jeff Pang
I'm interested in konwing that for python and perl,which is easier for start? Please note: message attached As a newbie, Python has my vote for beginners. It is easy to get started with some quick and satisfying scripts but tricky to learn good OOP form. That's why I highly recommend the Progr

Re: Distributing programs depending on third party modules.

2007-05-16 Thread Tina I
Kevin Walzer wrote: > Tina I wrote: >> Kevin Walzer wrote: > > >> And maybe the smartest thing to do would be to dump PyQt and just go >> for tkinter, however ugly it is :/ > > Tkinter doesn't have to be ugly. > > I sell a proprietary Tkinter app commercially on OS X: > > http://www.codebykev

Python Newbie Suggestions

2007-05-16 Thread Teresa Hardy
As a newbie, Python has my vote for beginners. It is easy to get started with some quick and satisfying scripts but tricky to learn good OOP form. That's why I highly recommend the Programming Python Part 1 article that just came out in the June 2007 Linux Journal. You can use some of the sections

Re: cPickle.dumps differs from Pickle.dumps; looks like a bug.

2007-05-16 Thread Josiah Carlson
Daniel Nogradi wrote: > Caching? > from cPickle import dumps dumps('0') == dumps(str(0)) > True dumps('1') == dumps(str(1)) > True dumps('2') == dumps(str(2)) > True > > dumps('9') == dumps(str(9)) > True dumps('10') == dumps(str(10)) > False du

Re: How do I tell the difference between the end of a text file, and an empty line in a text file?

2007-05-16 Thread casevh
On May 16, 2:47 pm, walterbyrd <[EMAIL PROTECTED]> wrote: > Python's lack of an EOF character is giving me a hard time. > > I've tried: > > - > s = f.readline() > while s: > . > . > s = f.readline() > > > and > > --- > s = f.readline() > while s != '' > . > . > s = f.readline() > -

Re: How do I tell the difference between the end of a text file, and an empty line in a text file?

2007-05-16 Thread Dan Bishop
On May 16, 4:47 pm, walterbyrd <[EMAIL PROTECTED]> wrote: > Python's lack of an EOF character is giving me a hard time. > > I've tried: > > - > s = f.readline() > while s: > . > . > s = f.readline() > > > and > > --- > s = f.readline() > while s != '' > . > . > s = f.readline() > -

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Gabriel Genellina
En Mon, 14 May 2007 13:30:42 -0300, <[EMAIL PROTECTED]> escribió: > Although probably not-sufficient to overcome this built-in > bias, it would be interesting if some bi-lingual readers would > raise this issue in some non-english Python discussion > groups to see if the opposition to this idea is

Re: In a text file: how do I tell the EOF, from a blank line?

2007-05-16 Thread Grant Edwards
On 2007-05-17, walterbyrd <[EMAIL PROTECTED]> wrote: > How do I test for the end of a file, in such a why that python can > tell the EOF from a blank line? This has already been explained to you by at least 5 different people -- complete with examples. -- Grant Edwards grante

Re: Python Web Programming - looking for examples of solid high-traffic sites

2007-05-16 Thread Luis M . González
On May 16, 6:04 pm, Victor Kryukov <[EMAIL PROTECTED]> wrote: > Hello list, > > our team is going to rewrite our existing web-site, which has a lot of > dynamic content and was quickly prototyped some time ago. > > Today, as we get better idea of what we need, we're going to re-write > everything f

Re: problem with import in python 2.2.3

2007-05-16 Thread Gabriel Genellina
En Thu, 17 May 2007 00:37:26 -0300, Anthony Irwin <[EMAIL PROTECTED]> escribió: > ./backup_all_mysql_databases.py > Traceback (most recent call last): >File "./backup_all_mysql_databases.py", line 5, in ? > from datetime import date > ImportError: No module named datetime > > Does anyon

Re: Python Web Programming - looking for examples of solid high-traffic sites

2007-05-16 Thread Luis M . González
On May 16, 6:04 pm, Victor Kryukov <[EMAIL PROTECTED]> wrote: > Hello list, > > our team is going to rewrite our existing web-site, which has a lot of > dynamic content and was quickly prototyped some time ago. > > Today, as we get better idea of what we need, we're going to re-write > everything f

Re: Python Web Programming - looking for examples of solid high-traffic sites

2007-05-16 Thread Luis M . González
On May 16, 6:04 pm, Victor Kryukov <[EMAIL PROTECTED]> wrote: > Hello list, > > our team is going to rewrite our existing web-site, which has a lot of > dynamic content and was quickly prototyped some time ago. > > Today, as we get better idea of what we need, we're going to re-write > everything f

problem with import in python 2.2.3

2007-05-16 Thread Anthony Irwin
Hi, I have written a python script that works perfectly in python 2.4.4 and python 2.4.3 but when I try to use the same script on an older system with python 2.2.3 I get the following error. ./backup_all_mysql_databases.py Traceback (most recent call last): File "./backup_all_mysql_databases

Re: how do I count spaces at the beginning of a string?

2007-05-16 Thread Anthony Irwin
Anthony Irwin wrote: > walterbyrd wrote: >> The strings start with whitespace, and have a '*' or an alphanumeric >> character. I need to know how many whitespace characters exist at the >> beginning of the string. >> > > Hi, > > I am new to python and just really learning but this is what I came

Re: how do I count spaces at the beginning of a string?

2007-05-16 Thread Norman Lorrain
On 2007-05-16 20:02:18 -0600, walterbyrd <[EMAIL PROTECTED]> said: > The strings start with whitespace, and have a '*' or an alphanumeric > character. I need to know how many whitespace characters exist at the > beginning of the string. a = ' three spaces' print len(a) -len(a.lstrip()) -- http

Re: how do I count spaces at the beginning of a string?

2007-05-16 Thread Steven Bethard
walterbyrd wrote: > The strings start with whitespace, and have a '*' or an alphanumeric > character. I need to know how many whitespace characters exist at the > beginning of the string. You really need to stop posting the same message multiple times. A possible answer using regular expressions:

Re: How do I tell the difference between the end of a text file, and an empty line in a text file?

2007-05-16 Thread Steven Bethard
walterbyrd wrote: > Python's lack of an EOF character is giving me a hard time. > > I've tried: > > - > s = f.readline() > while s: > . > . > s = f.readline() > > > and > > --- > s = f.readline() > while s != '' > . > . > s = f.readline() > --- > > > In both cases, the lo

Re: how do I count spaces at the beginning of a string?

2007-05-16 Thread Anthony Irwin
walterbyrd wrote: > The strings start with whitespace, and have a '*' or an alphanumeric > character. I need to know how many whitespace characters exist at the > beginning of the string. > Hi, I am new to python and just really learning but this is what I came up with. #!/usr/bin/env python

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Gregor Horvath
[EMAIL PROTECTED] schrieb: > On May 16, 12:54 pm, Gregor Horvath <[EMAIL PROTECTED]> wrote: >> Istvan Albert schrieb: >> >> So the solution is to forbid Chinese XP ? >> > > It's one solution, depending on your support needs. > That would be a rather arrogant solution. You would consider droppin

Re: zipfile stupidly broken

2007-05-16 Thread Gabriel Genellina
En Wed, 16 May 2007 23:14:38 -0300, Asun Friere <[EMAIL PROTECTED]> escribió: > On May 17, 5:38 am, "Gabriel Genellina" <[EMAIL PROTECTED]> > wrote: > >> This is not a good place for reporting bugs - use >> http://sourceforge.net/bugs/?group_id=5470 > > I disagree. Given that most suspected

Re: Python Web Programming - looking for examples of solid high-traffic sites

2007-05-16 Thread John Nagle
Victor Kryukov wrote: > Hello list, > > our team is going to rewrite our existing web-site, which has a lot of > dynamic content and was quickly prototyped some time ago. ... > Our main requirement for tools we're going to use is rock-solid > stability. As one of our team-members puts it, "We want

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Gregor Horvath
[EMAIL PROTECTED] schrieb: >> 2) Create a way to internationalize the standard library (and possibly >> the language keywords, too). Ideally, create a general standardized way >> to internationalize code, possibly similiar to how people >> internationalize strings today. > > Why? Or more acurate

Re: Jessica Simpson Sports new "Boob Job"!!!@

2007-05-16 Thread The Librarian
On May 16, 3:44 pm, "gtski" <[EMAIL PROTECTED]> wrote: > "wb" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED]> On May 14, 2:09 am, [EMAIL PROTECTED] wrote: > > > If her boobs getting any bigger she won't be able to stand up. > > Im afraid of boobs. they are not on men I suck. oh ye

Re: In a text file: how do I tell the EOF, from a blank line?

2007-05-16 Thread Steve Holden
walterbyrd wrote: > How do I test for the end of a file, in such a why that python can > tell the EOF from a blank line? > Only when the EOF is reached will you read an entirely empty line. Real empty lines read as a newline terminator. However, there are any better ways to process the lines of

In a text file: how do I tell the EOF, from a blank line?

2007-05-16 Thread walterbyrd
How do I test for the end of a file, in such a why that python can tell the EOF from a blank line? -- http://mail.python.org/mailman/listinfo/python-list

Re: zipfile stupidly broken

2007-05-16 Thread Asun Friere
On May 17, 5:38 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > This is not a good place for reporting bugs - use > http://sourceforge.net/bugs/?group_id=5470 I disagree. Given that most suspected bugs aren't, new users especially would be wise to post their "bugs' here before filing a bu

how do I count spaces at the beginning of a string?

2007-05-16 Thread walterbyrd
The strings start with whitespace, and have a '*' or an alphanumeric character. I need to know how many whitespace characters exist at the beginning of the string. -- http://mail.python.org/mailman/listinfo/python-list

_ctypes.so for aix 5.3

2007-05-16 Thread yangjh
Hi all, I want to use the ctypes module on AIX 5.3, I download the lastest 2.5.1 from python.org, but build failed with cc_r(gcc not installed). download activepython 2.5.1 for aix, but it don't contail the ctypes module, Is there a binary version _ctypes.so for aix 5

Re: python shell

2007-05-16 Thread James T. Dennis
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > On May 16, 12:38 pm, Krypto <[EMAIL PROTECTED]> wrote: >> I have been using python shell to test small parts of the big program. >> What other ways can I use the shell effectively. My mentor told me >> that you can virtually do anything from testing yo

Re: remove all elements in a list with a particular value

2007-05-16 Thread James Stroud
John Zenger wrote: print [x for x in items if x != ''] > > ['SRCPARAM', '1', '6.35e-07', '15.00', '340.00', '1.10', '3.0'] > This can be shortened to [x for x in items if x] James -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie Question: Getting a list of files

2007-05-16 Thread Brian
Thank you very much for your examples! Much appreciated. Dusty --- Ant wrote: > On May 16, 3:07 pm, Gerard Flanagan <[EMAIL PROTECTED]> wrote: > ... >> import os >> >> def iter_dirs(root, dirs=False): > ... > > Rather than rolling your own directory walker: > > The same iterator using os.walk

Re: Typed named groups in regular expression

2007-05-16 Thread Miki
Hello Hugo, > Is it possible to "automagically" coerce the named groups to python types? > e.g.: Not that I know of, however I use the following idiom: match = my_regexp.find(some_string) def t(name, convert=str): return convert(match.group(name)) myint = t("field1", int) HTH, -- Miki <[EM

Re: Declaring variables

2007-05-16 Thread Steve Holden
Matimus wrote: > On May 16, 9:57 am, HMS Surprise <[EMAIL PROTECTED]> wrote: >> I looked in the language but did not find a switch for requiring >> variables to be declared before use. >> >> Is such an option available? >> >> Thanks, >> >> jvh > > You do have to declare a variable before use. You

Re: Declaring variables

2007-05-16 Thread Matimus
On May 16, 9:57 am, HMS Surprise <[EMAIL PROTECTED]> wrote: > I looked in the language but did not find a switch for requiring > variables to be declared before use. > > Is such an option available? > > Thanks, > > jvh You do have to declare a variable before use. You do so by assigning it a value

Re: Quote aware split

2007-05-16 Thread obaudys
On May 16, 8:51 pm, "BJörn Lindqvist" <[EMAIL PROTECTED]> wrote: > How is the code different from shlex.split? Shlex only splits by whitespace. I needed something to split out SQL statements from a Postgresql dump, so the ideal way of doing that is to split by semicolons. However, postgresql fun

refcount differences in 2.5

2007-05-16 Thread Gabriel Genellina
Hi With Python 2.5, there is a change on the reference count of objects compared with previous versions (as reported by sys.getrefcount). All Python versions from 2.1 thru 2.4 gave these same results: Python 2.1.3 (#35, Apr 8 2002, 17:47:50) [MSC 32 bit (Intel)] on win32 Type "copyright", "cr

Re: python shell

2007-05-16 Thread [EMAIL PROTECTED]
On May 16, 12:38 pm, Krypto <[EMAIL PROTECTED]> wrote: > I have been using python shell to test small parts of the big program. > What other ways can I use the shell effectively. My mentor told me > that you can virtually do anything from testing your program to > anything in the shell. Any incite

Re: zipfile stupidly broken

2007-05-16 Thread Larry Bates
Martin Maney wrote: > To quote from zipfile.py (2.4 library): > > # Search the last END_BLOCK bytes of the file for the record signature. > # The comment is appended to the ZIP file and has a 16 bit length. > # So the comment may be up to 64K long. We limit the search for the > #

Re: cPickle.dumps differs from Pickle.dumps; looks like a bug.

2007-05-16 Thread Daniel Nogradi
> > > > I've found the following strange behavior of cPickle. Do you think > > > > it's a bug, or is it by design? > > > > > > > > Best regards, > > > > Victor. > > > > > > > > from pickle import dumps > > > > from cPickle import dumps as cdumps > > > > > > > > print dumps('1001799')==dumps(str(100

pyExcelerator bug?

2007-05-16 Thread tkpmep
My program creates three lists: the first has dates expressed as strings, the second has floats that are strictly positive, and the third has floats that are strictly negative. I have no trouble writing the data in these lists to a .csv file using the csv module using the following code. outfile =

Re: A bug in cPickle?

2007-05-16 Thread infidel
ActivePython 2.5.1.1 as well: PythonWin 2.5.1 (r251:54863, May 1 2007, 17:47:05) [MSC v.1310 32 bit (Intel)] on win32. Portions Copyright 1994-2006 Mark Hammond - see 'Help/About PythonWin' for further copyright information. >>> from pickle import dumps >>> from cPickle import dumps as cdumps >>>

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread rurpy
On May 16, 11:41 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Christophe wrote: snip... > > Who displays stack frames? Your code. Whose code includes unicode > > identifiers? Your code. Whose fault is it to create a stack trace > > display procedure that cannot handle unicode? You. > >

Re: cPickle.dumps differs from Pickle.dumps; looks like a bug.

2007-05-16 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Daniel Nogradi wrote: > The OP was not comparing identity but equality. So it looks like a > real bug, I think the following should be True for any function f: > > if a == b: f(a) == f(b) > > or not? In [74]: def f(x): : return x / 2 : In [75]: a = 5

Re: cPickle.dumps differs from Pickle.dumps; looks like a bug.

2007-05-16 Thread Chris Mellon
On 5/16/07, Daniel Nogradi <[EMAIL PROTECTED]> wrote: > > > I've found the following strange behavior of cPickle. Do you think > > > it's a bug, or is it by design? > > > > > > Best regards, > > > Victor. > > > > > > from pickle import dumps > > > from cPickle import dumps as cdumps > > > > > > pri

Re: cPickle.dumps differs from Pickle.dumps; looks like a bug.

2007-05-16 Thread Nick Vatamaniuc
On May 16, 1:13 pm, Victor Kryukov <[EMAIL PROTECTED]> wrote: > Hello list, > > I've found the following strange behavior of cPickle. Do you think > it's a bug, or is it by design? > > Best regards, > Victor. > > from pickle import dumps > from cPickle import dumps as cdumps > > print dumps('100179

Re: A new project.

2007-05-16 Thread John Nagle
Clement wrote: > On May 16, 1:09 pm, [EMAIL PROTECTED] wrote: > >>I am interested in organizing and taking part in a project that would >>create a virtual world much like the one described in Neal >>Stephenson's 'Snow Crash'. That's a perfectly reasonable idea. It takes money and people to p

Re: cPickle.dumps differs from Pickle.dumps; looks like a bug.

2007-05-16 Thread Daniel Nogradi
> > I've found the following strange behavior of cPickle. Do you think > > it's a bug, or is it by design? > > > > Best regards, > > Victor. > > > > from pickle import dumps > > from cPickle import dumps as cdumps > > > > print dumps('1001799')==dumps(str(1001799)) > > print cdumps('1001799')==cdum

Re: How do I count the number of spaces at the left end of a string?

2007-05-16 Thread Steven Howe
walterbyrd wrote: > I don't know exactly what the first non-space character is. I know the > first non-space character will be * or an alphanumeric character. > > using builtin function rindex st = 'asblde ' >>> st.rindex(' ') sph -- HEX: 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0

Re: How do I tell the difference between the end of a text file, and an empty line in a text file?

2007-05-16 Thread James Stroud
Grant Edwards wrote: > On 2007-05-16, walterbyrd <[EMAIL PROTECTED]> wrote: > > >>Python's lack of an EOF character is giving me a hard time. > > > No it isn't. > > >>s = f.readline() >>while s: >>. >>. >>s = f.readline() > > > > >>s = f.readline() >>while s != '' >>. >>. >>s = f.readline

Re: How do I count the number of spaces at the left end of a string?

2007-05-16 Thread James Stroud
walterbyrd wrote: > I don't know exactly what the first non-space character is. I know the > first non-space character will be * or an alphanumeric character. > This is another of the hundreds of ways: py> for i,c in enumerate(astring): ... if c != ' ': break ... py> print i -- http://mail.p

Re: How do I tell the difference between the end of a text file, and an empty line in a text file?

2007-05-16 Thread Grant Edwards
On 2007-05-16, walterbyrd <[EMAIL PROTECTED]> wrote: > Python's lack of an EOF character is giving me a hard time. No it isn't. > s = f.readline() > while s: > . > . > s = f.readline() > s = f.readline() > while s != '' > . > . > s = f.readline() Neither one of your examples is legal Python

Re: How do I tell the difference between the end of a text file, and an empty line in a text file?

2007-05-16 Thread James Stroud
walterbyrd wrote: > Python's lack of an EOF character is giving me a hard time. > > I've tried: > [ stuff ] for s in f: do_whatever_with_s(s) James -- http://mail.python.org/mailman/listinfo/python-list

Re: cPickle.dumps differs from Pickle.dumps; looks like a bug.

2007-05-16 Thread Nick Vatamaniuc
On May 16, 1:13 pm, Victor Kryukov <[EMAIL PROTECTED]> wrote: > Hello list, > > I've found the following strange behavior of cPickle. Do you think > it's a bug, or is it by design? > > Best regards, > Victor. > > from pickle import dumps > from cPickle import dumps as cdumps > > print dumps('100179

How do I tell the difference between the end of a text file, and an empty line in a text file?

2007-05-16 Thread walterbyrd
Python's lack of an EOF character is giving me a hard time. I've tried: - s = f.readline() while s: . . s = f.readline() and --- s = f.readline() while s != '' . . s = f.readline() --- In both cases, the loop ends as soon it encounters an empty line in the file, i.e. xx

Re: How do I count the number of spaces at the left end of a string?

2007-05-16 Thread Daniel Nogradi
> I don't know exactly what the first non-space character is. I know the > first non-space character will be * or an alphanumeric character. How about: >>> mystring = 'ksjfkfjkfjds ' >>> print len( mystring ) - len( mystring.lstrip( ) ) 4 HTH, Daniel -- http://mail.python.org/mailman/li

How do I count the number of spaces at the left end of a string?

2007-05-16 Thread walterbyrd
I don't know exactly what the first non-space character is. I know the first non-space character will be * or an alphanumeric character. -- http://mail.python.org/mailman/listinfo/python-list

Re: try

2007-05-16 Thread Robert Kern
HMS Surprise wrote: > I read in the ref man that try-except-finally did not work in earlier > versions, I am using jython 2.2. Does this imply that try-except > without finally does not work either? I get a syntax error on the else > below. Some of the functions embedded in the try section try to >

try

2007-05-16 Thread HMS Surprise
I read in the ref man that try-except-finally did not work in earlier versions, I am using jython 2.2. Does this imply that try-except without finally does not work either? I get a syntax error on the else below. Some of the functions embedded in the try section try to convert strings to ints, etc

Python Web Programming - looking for examples of solid high-traffic sites

2007-05-16 Thread Victor Kryukov
Hello list, our team is going to rewrite our existing web-site, which has a lot of dynamic content and was quickly prototyped some time ago. Today, as we get better idea of what we need, we're going to re-write everything from scratch. Python is an obvious candidate for our team: everybody knows

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread rurpy
On May 16, 1:44 am, René Fleschenberg <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] schrieb: > > I'm not sure how you conclude that no problem exists. > > - Meaningful identifiers are critical in creating good code. > > I agree. > > > - Non-english speakers can not create or understand > > engli

Re: Jessica Simpson Sports new "Boob Job"!!!@

2007-05-16 Thread gtski
"wb" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On May 14, 2:09 am, [EMAIL PROTECTED] wrote: > > > If her boobs getting any bigger she won't be able to stand up. > Im afraid of boobs. they are not on men I suck. -- http://mail.python.org/mailman/listinfo/python-list

Re: Typed named groups in regular expression

2007-05-16 Thread Steve Holden
Hugo Ferreira wrote: > Hi! > > Is it possible to "automagically" coerce the named groups to python types? > e.g.: > type(re.match('(?P\d*)', '123').groupdict()['x']) > > > But what I'm looking forward is for the type to be 'int'. > > Cheers! > > Hugo Ferreira So apply the "int()" funct

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Matthew Woodcraft
Eric Brunel <[EMAIL PROTECTED]> wrote: > Joke aside, this just means that I won't ever be able to program math in > ADA, because I have absolutely no idea on how to do a 'pi' character on my > keyboard. Just in case it wasn't clear: you could of course continue to use the old name 'Pi' instead

Re: Execute commands from file

2007-05-16 Thread Steve Holden
Martin Blume wrote: > "tmp123" schrieb > >> We have very big files with python commands >> (more or less, 50 commands each file). >> >> It is possible to execute them command by command, > > inp = open(cmd_file) > for line in inp: > exec line > > might help. You don't get quite the sam

Re: removing common elemets in a list

2007-05-16 Thread Michael Bentley
On May 16, 2007, at 10:36 AM, John Zenger wrote: > On May 16, 2:17 am, [EMAIL PROTECTED] wrote: >> Hi, >> Suppose i have a list v which collects some numbers,how do i >> remove the common elements from it ,without using the set() opeartor. >>

Re: How to do basic CRUD apps with Python

2007-05-16 Thread Joshua J. Kugler
Sorry about the duplicate post! My news reader never showed my first reply! j -- Posted via a free Usenet account from http://www.teranews.com -- http://mail.python.org/mailman/listinfo/python-list

Re: zipfile stupidly broken

2007-05-16 Thread Gabriel Genellina
En Wed, 16 May 2007 12:18:35 -0300, Martin Maney <[EMAIL PROTECTED]> escribió: > So the author knows that there's a hard limit of 64K on the comment > size, but feels it's more important to fail a little more quickly when > fed something that's not a zipfile - or a perfectly legitimate zipfile >

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread [EMAIL PROTECTED]
On May 16, 12:54 pm, Gregor Horvath <[EMAIL PROTECTED]> wrote: > Istvan Albert schrieb: > > > Here is something that just happened and relates to this subject: I > > had to help a student run some python code on her laptop, she had > > Windows XP that hid the extensions. I wanted to set it up such

Re: How to do basic CRUD apps with Python

2007-05-16 Thread Joshua J. Kugler
On Monday 14 May 2007 18:46, James T. Dennis wrote: > I'm thinking of some sort of class/module that would generate > various sorts of HTML forms by default, but also allow one to > sub-class each of the form/query types to customize the contents. Turbogears has catwalk, which is already an int

Re: Spotting Crashed Application

2007-05-16 Thread MRAB
On May 16, 1:55 am, Steve Holden <[EMAIL PROTECTED]> wrote: > Robert Rawlins - Think Blue wrote: > > > Hello Guys, > > > I've got an application that I've written, and it sits in an embedded > > system, from time to time the application will crash, I'm not quite sure > > what's causing this, but as

Re: Declaring variables

2007-05-16 Thread HMS Surprise
No haven't had to endure Pascal. Mostly C/C++, Tcl, and assembler. Oh yeah, and a (thankfully) short stint of Ada. But I glad to hear of the proofing tools. Working a lot of data parsed from web pages and the developer there a different naming convention from what I am accustomed so sometimes I i

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread rurpy
"Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > <[EMAIL PROTECTED]> wrote: > > First "while" is a keyword and will remain "while" so > > that has nothing to do with anything. > > I think this cuts right down to why I oppose the PEP. > It is not so much for techn

Re: tkinter button state = DISABLED

2007-05-16 Thread Gabriel Genellina
En Wed, 16 May 2007 03:22:17 -0300, Hendrik van Rooyen <[EMAIL PROTECTED]> escribió: > "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > >> Maybe there is a confusion here. You code above means that, when the >> event >> "The leftmost MOUSE BUTTON was released" happens over your BUTTON WIDGET

Python-URL! - weekly Python news and links (May 16)

2007-05-16 Thread Cameron Laird
QOTW: "Sometimes you just have to take the path of least distaste". - Grant Edwards "I want to choose my words carefully here, so I'm not misunderstood. They're a bunch of fucking idiots." - Charles Wang, billionaire chairman of software giant Computer Associates, asked to assess the quality of

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread laurentszyster
On May 13, 5:44 pm, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > PEP 1 specifies that PEP authors need to collect feedback from the > community. As the author of PEP 3131, I'd like to encourage comments > to the PEP included below, either here (comp.lang.python), or to > [EMAIL PROTECTED] > > In

Re: python shell

2007-05-16 Thread Thorsten Kampe
* Krypto (16 May 2007 10:38:27 -0700) > I have been using python shell to test small parts of the big program. > What other ways can I use the shell effectively. My mentor told me > that you can virtually do anything from testing your program to > anything in the shell. Any incite would be useful.

Python + Cairo widget examples.. where can i get them?

2007-05-16 Thread Mark
Hey, a while ago i found a widget somewhere that was written in python with the cairo extension. that widget wasn't just a window.. it was a window without decorations and a red round thing in it. now i was trying to find that thing again and i`ve searched over a million blogs (oke not that much

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread rurpy
On May 16, 9:04 am, "Eric Brunel" <[EMAIL PROTECTED]> wrote: > On Wed, 16 May 2007 16:29:27 +0200, Neil Hodgson   > > <[EMAIL PROTECTED]> wrote: ...snip... > > Each of these can be handled reasonably considering their frequency of   > > occurrence. I have never learned Japanese but have had to deal

Re: A new project.

2007-05-16 Thread Clement
On May 16, 1:09 pm, [EMAIL PROTECTED] wrote: > I am interested in organizing and taking part in a project that would > create a virtual world much like the one described in Neal > Stephenson's 'Snow Crash'. I'm not necessarily talking about > something 3d and I'm not talking about a game either.

Re: Trying to choose between python and java

2007-05-16 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Paul Melis <[EMAIL PROTECTED]> wrote: . . . >your program comes out on the other platforms. You could use a GUI >toolkit that draws its own widgets instead of one that uses the native >control

Re: Trying to choose between python and java

2007-05-16 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Paul Melis <[EMAIL PROTECTED]> wrote: >Anthony Irwin wrote: >> Hi All, >> >> I am currently trying to decide between using python or java and have a >> few quick questions about python that you may be able to help with. >> >> #1 Does python have something like ja

Re: Trying to choose between python and java

2007-05-16 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Terry Reedy <[EMAIL PROTECTED]> wrote: > >"Anthony Irwin" <[EMAIL PROTECTED]> wrote in message >news:[EMAIL PROTECTED] . . . >| #5 someone said that they used to use python but stopped because t

Typed named groups in regular expression

2007-05-16 Thread Hugo Ferreira
Hi! Is it possible to "automagically" coerce the named groups to python types? e.g.: >>> type(re.match('(?P\d*)', '123').groupdict()['x']) But what I'm looking forward is for the type to be 'int'. Cheers! Hugo Ferreira -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread [EMAIL PROTECTED]
Christophe wrote: > [EMAIL PROTECTED] a ecrit : > > Christophe wrote: > >> [EMAIL PROTECTED] a ecrit : > >>> Steven D'Aprano wrote: > I would find it useful to be able to use non-ASCII characters for heavily > mathematical programs. There would be a closer correspondence between the > >>>

python shell

2007-05-16 Thread Krypto
I have been using python shell to test small parts of the big program. What other ways can I use the shell effectively. My mentor told me that you can virtually do anything from testing your program to anything in the shell. Any incite would be useful. -- http://mail.python.org/mailman/listinfo/p

pyhdf

2007-05-16 Thread jsaacmk
Has anyone had success installing the pyhdf library with python 2.4 under linux 2.6.18 (debian)? I have installed the HDF library and development package from apt and have downloaded the pyhdf installation files. I've had failures in two ways: 1) When I install, I do not wish to use the szip libr

Re: pymssql query

2007-05-16 Thread Tim Golden
[EMAIL PROTECTED] wrote: > Hi, > > I'm trying to use pymssql to execute a stored procedure. Currently, I > have an Excel spreadsheet that uses VBA in this manner: > > Private Function CreateNewParrot(connDb As ADODB.Connection) As Long > Dim objCommand As ADODB.Command > Dim iParrot As Long >

Re: A bug in cPickle?

2007-05-16 Thread Chris Cioffi
On 16 May 2007 10:06:20 -0700, Victor Kryukov <[EMAIL PROTECTED]> wrote: > Hello list, > > The following behavior is completely unexpected. Is it a bug or a by- > design feature? > > Regards, > Victor. > > - > > from pickle import dumps > from cPickle import dumps as cdumps > > prin

Re: Interesting list Validity (True/False)

2007-05-16 Thread [EMAIL PROTECTED]
On May 16, 4:12 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Wed, 16 May 2007 03:16:59 -0300, [EMAIL PROTECTED] > <[EMAIL PROTECTED]> escribió: > > > > > > > On May 15, 7:07 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> > > wrote: > >> import gmpy > >> a = 2**177149-1 > >>

~!~ Britneys New BOOBS

2007-05-16 Thread deepbroke6
http://scargo.in - Download pics and videos of Britneys new Boob job see her new tits naked! -- http://mail.python.org/mailman/listinfo/python-list

cPickle.dumps differs from Pickle.dumps; looks like a bug.

2007-05-16 Thread Victor Kryukov
Hello list, I've found the following strange behavior of cPickle. Do you think it's a bug, or is it by design? Best regards, Victor. from pickle import dumps from cPickle import dumps as cdumps print dumps('1001799')==dumps(str(1001799)) print cdumps('1001799')==cdumps(str(1001799)) outputs T

A bug in cPickle?

2007-05-16 Thread Victor Kryukov
Hello list, The following behavior is completely unexpected. Is it a bug or a by- design feature? Regards, Victor. - from pickle import dumps from cPickle import dumps as cdumps print dumps('1001799')==dumps(str(1001799)) print cdumps('1001799')==cdumps(str(1001799)) outpu

zipfile stupidly broken

2007-05-16 Thread Martin Maney
To quote from zipfile.py (2.4 library): # Search the last END_BLOCK bytes of the file for the record signature. # The comment is appended to the ZIP file and has a 16 bit length. # So the comment may be up to 64K long. We limit the search for the # signature to a few Kbytes at th

  1   2   3   >