Re: Using percent signs with SafeConfigParser

2009-04-12 Thread Peter Otten
Márcio Faustino wrote: > On 11 Abr, 20:06, Peter Otten <__pete...@web.de> wrote: >> (2) _interpvar_re has already butchered values like "%%(alpha)s" to "%" > > Isn't that expected? I mean, one wouldn't write "%%(alpha)s", but > instead "%%%(alpha)s" or "%(alpha)s" right? "%%(alpha)s" would mean

Re: How to create a virtual serial port?

2009-04-12 Thread Lawrence D'Oliveiro
In message , JanC wrote: > USB *is* a serial port... that's what the "S" stands for. ;) And the "B" stands for "bus". It's a serial bus, not a serial port. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and XML Help

2009-04-12 Thread Diez B. Roggisch
ookrin schrieb: I'm in the process of learning python and PyQt4. I had decided to make myself a simple app and soon discovered that I needed to crash into xml to use some of the data I was going to be getting off of the server. I picked up enough xml to use the sax parser to get the data out of

Re: Using percent signs with SafeConfigParser

2009-04-12 Thread Peter Otten
MRAB wrote: > Márcio Faustino wrote: > > On 11 Abr, 20:06, Peter Otten <__pete...@web.de> wrote: > >> I think you are right. Please file a bug report . > > > > I will. > > > >> IMO this doesn't fix the problem because > >> > >> (1) it allows "%%%" which is also incorrect > > > > You're r

Re: Unsupported operand types in if/else list comprehension

2009-04-12 Thread Diez B. Roggisch
Mike H schrieb: Sigh. One more. And again, thank you for all of the help. I realized that the last version that I posted took care of an SQL injection problem for the values, but not for the fields. So, I went ahead and modified the code: def new_insert_cmd(myTable, myFields, myValues): """

video capture in Python ?

2009-04-12 Thread Stef Mientki
hello, has anyone got video capturing (from a webcam) successful running in a wxPython application under winXP ? I got some links, but it seems quit complicated to get everything installed, and all the packages you need don't describe which versions of the other parts you need, so a lot tri

Re: Q:Pythonic way to create list of lists

2009-04-12 Thread Arnaud Delobelle
grkunt...@gmail.com writes: > I am just learning Python. > > I am trying to create a list of empty lists: [[], [], [], ...] (10 > items total). > > What is the most Pythonic way to do this? > > If I use a list comprehension (as in myList = [[] for item in xrange > (0, 10)]), Netbeans warns me that

Re: Definition of Pythonic?

2009-04-12 Thread Lawrence D'Oliveiro
Pythonic--an acid, capable of reacting with bases to form pythanates? Would it be an organic or inorganic acid? Deprive it of a bit of oxygen, and it becomes pythonous, reacting to form pythonites. What do you mean, the fume cupboard's broken down? Honestly I feel fine... -- http://mail.python

Re: Multithreading / multiprocess

2009-04-12 Thread TennesseeLeeuwenburg
On Apr 11, 10:39 pm, "Diez B. Roggisch" wrote: > tleeuwenb...@gmail.com schrieb: > > > Is there anyway to begin a thread and execute a finite number of lines > > of code, or a finite amount of time within it? > > > For example, say I create three child threads and I want to guarantee > > equal tim

Re: Multithreading / multiprocess

2009-04-12 Thread TennesseeLeeuwenburg
On Apr 12, 2:59 am, a...@pythoncraft.com (Aahz) wrote: > In article > <57065c62-2024-47b5-a07e-1d60ff85b...@y10g2000prc.googlegroups.com>, > > tleeuwenb...@gmail.com wrote: > > >Is there anyway to begin a thread and execute a finite number of lines > >of code, or a finite amount of time within it

Re: Q:Pythonic way to create list of lists

2009-04-12 Thread Tino Wildenhain
grkunt...@gmail.com wrote: I am just learning Python. I am trying to create a list of empty lists: [[], [], [], ...] (10 items total). Apart from the solutions shown, why would you do that in the first place? Creating such a structure is probably not so pythonic so the way to create it does n

Re: any(), all() and empty iterable

2009-04-12 Thread Tim Chase
From the docs: all(iterable) Return True if all elements of the iterable are true. Equivalent to: def all(iterable): for element in iterable: if not element: return False return True Then I'

Re: any(), all() and empty iterable

2009-04-12 Thread Paul Rubin
Tim Chase writes: > > Return True if all elements of the iterable are > > true. ... > Then I'd say the comment is misleading. An empty list has no item > that is true (or false), yet it returns true. The comment is correct. "All the items of the iterable are true" means EXACTLY

Re: Re: Generators/iterators, Pythonicity, and primes

2009-04-12 Thread Duncan Booth
John Posner wrote: > Do know what in the itertools implementation causes adding a 'if p <= > sqrt(n)' clause to *decrease* performance, while adding a > 'takewhile()' clause *increases* performance? I haven't timed it, but I would guess that the takewhile was faster only because the sqrt(n) ha

Re: How to create a virtual serial port?

2009-04-12 Thread Grant Edwards
On 2009-04-12, JanC wrote: > Grant Edwards wrote: > >> On 2009-04-10, Stuart Davenport wrote: >> >>> I am trying to work out if its possible, to create a virtual serial >>> port with Python? >> >> On Linux: no. > > I wonder if there is no way to emulate ptys from userspace? Didn't I just answer

GUI Programming

2009-04-12 Thread Gabriel
Hello, I'm python newbie and i need to write gui for my school work in python. I need to write it really quick, because i haven't much time .) So question is, which of gui toolkits should i pick and learn? I heard PyGTK and Glade are best for quick gui programming? Is it good for beginner? Or i

Re: a newbie question

2009-04-12 Thread Peter Otten
zhangle2...@gmail.com wrote: > I am just learning Python and get a problem when trying this example: > > from urllib import urlopen > doc=urlopen("http://www.python.org";).read() > print(doc) > > when i run this, i was tould that 'cannot import name "urlopen" > > > What's wrong with this code?

Re: Generators/iterators, Pythonicity, and primes

2009-04-12 Thread Arnaud Delobelle
Duncan Booth writes: > John Posner wrote: > >> Do know what in the itertools implementation causes adding a 'if p <= >> sqrt(n)' clause to *decrease* performance, while adding a >> 'takewhile()' clause *increases* performance? > > I haven't timed it, but I would guess that the takewhile was fas

Re: a newbie question

2009-04-12 Thread Eugene Perederey
use urllib2 2009/4/12 : > hi, > > I am just learning Python and get a problem when trying this example: > > from urllib import urlopen > doc=urlopen("http://www.python.org";).read() > print(doc) > > when i run this, i was tould that 'cannot import name "urlopen" > > > What's wrong with this code?

Re: llvm vs. parrot

2009-04-12 Thread Fuzzyman
On Apr 11, 12:16 am, Paul Watson wrote: > Is Parrot out of favor these days?  It appears that Google is going to > use llvm. > > http://code.google.com/p/unladen-swallow/ Has Parrot ever been in favour? Actually they're quite different things. Michael -- http://www.ironpythoninaction.com/ -- ht

Re: any(), all() and empty iterable

2009-04-12 Thread Arnaud Delobelle
Paul Rubin writes: > Tim Chase writes: >> > Return True if all elements of the iterable are >> > true. ... >> Then I'd say the comment is misleading. An empty list has no item >> that is true (or false), yet it returns true. > > The comment is corr

Re: any(), all() and empty iterable

2009-04-12 Thread Tim Chase
Arnaud Delobelle wrote: Paul Rubin writes: Tim Chase writes: Return True if all elements of the iterable are true. ... Then I'd say the comment is misleading. An empty list has no item that is true (or false), yet it returns true. The comment

Subscribe My Feed RSS And Commenting Then I Will To Do Too!

2009-04-12 Thread clickkt.com
Subscribe My Feed RSS And Commenting Then I Will To Do Too! My Feed: http://feeds2.feedburner.com/clickkt My blog http://clickkt.com And if you and my link at your blog, I will to do too! -- http://mail.python.org/mailman/listinfo/python-list

a newbie question

2009-04-12 Thread zhangle2002
hi, I am just learning Python and get a problem when trying this example: from urllib import urlopen doc=urlopen("http://www.python.org";).read() print(doc) when i run this, i was tould that 'cannot import name "urlopen" What's wrong with this code? Do i need to place my code in some specific

Re: GUI Programming

2009-04-12 Thread r
On Apr 12, 8:07 am, Gabriel wrote: > Hello, > > I'm python newbie and i need to write gui for my school work in python. > I need to write it really quick, [snip] Tkinter is built-in, why not start there? from Tkinter import * root = Tk() root.mainloop() -- http://mail.python.org/mailman/lis

Extracting zip files containing directories with ZipFile

2009-04-12 Thread Márcio Faustino
Hi, Does the ZipFile class correctly handles directories contained within zip files? For example, calling "extractall" on an archive with only "folder/ file.txt" in it results in an IOError saying "No such file or directory" for "./folder/file.txt", because it created a file named "folder" instea

Re: Extracting zip files containing directories with ZipFile

2009-04-12 Thread MRAB
Márcio Faustino wrote: Hi, Does the ZipFile class correctly handles directories contained within zip files? For example, calling "extractall" on an archive with only "folder/ file.txt" in it results in an IOError saying "No such file or directory" for "./folder/file.txt", because it created a f

Re: GUI Programming

2009-04-12 Thread Gabriel
r wrote: On Apr 12, 8:07 am, Gabriel wrote: Hello, I'm python newbie and i need to write gui for my school work in python. I need to write it really quick, [snip] Tkinter is built-in, why not start there? from Tkinter import * root = Tk() root.mainloop() -- http://mail.python.o

Re: any(), all() and empty iterable

2009-04-12 Thread John O'Hagan
On Sun, 12 Apr 2009, Paul Rubin wrote: > Tim Chase writes: > > > Return True if all elements of the iterable are > > > true. ... > > > > Then I'd say the comment is misleading. An empty list has no item > > that is true (or false), yet it returns true. > > The comment is correct.

Re: any(), all() and empty iterable

2009-04-12 Thread Arnaud Delobelle
Tim Chase writes: > Arnaud Delobelle wrote: >> Paul Rubin writes: >> >>> Tim Chase writes: > Return True if all elements of the iterable are > true. ... Then I'd say the comment is misleading. An empty list has no item that is tru

Re: GUI Programming

2009-04-12 Thread r
On Apr 12, 11:04 am, Gabriel wrote: [snip] > > It seems ugly to me.. OK, i shall inform the BDFL of this "inadequacy". Good Luck! -- http://mail.python.org/mailman/listinfo/python-list

Re: How to create a virtual serial port?

2009-04-12 Thread Stuart Davenport
On Apr 11, 6:56 pm, Grant Edwards wrote: > On 2009-04-11, Grant Edwards wrote: > > > You can write a port redirector in user-space in MS-Windows, > > but you can't in Linux/Unix.  On Unix systems you have to > > write a kernel module that sits below the tty layer. > > Perhaps I should elucidate f

[ANN] Pyjamas 0.5p1 Web Widget Set and python-to-javascript Compiler released

2009-04-12 Thread Luke Kenneth Casson Leighton
Pyjamas 0.5p1 - http://pyjs.org - is a bug-fix release. Pyjamas is a Web Widget Framework, written in python, that is compiled to javascript using its stand-alone python-to-javascript compiler. It began as a port of GWT, to python. Many of the issues faced by web developers - javascript and CSS

Re: any(), all() and empty iterable

2009-04-12 Thread John O'Hagan
On Sun, 12 Apr 2009, Chris Rebert wrote: > On Sat, Apr 11, 2009 at 9:00 PM, John O'Hagan wrote: > > Hi, > > > > I was getting some surprising false positives as a result of not > > expecting this: > > > > all(element in item for item in iterable) > > > > to return True when 'iterable' is empty. [

Re: GUI Programming

2009-04-12 Thread edexter
On Apr 12, 8:07 am, Gabriel wrote: > Hello, > > I'm python newbie and i need to write gui for my school work in python. > I need to write it really quick, because i haven't much time .) > So question is, which of gui toolkits should i pick and learn? I heard > PyGTK and Glade are best for quick gu

Re: moving to processing from threading, global variables

2009-04-12 Thread rkmr...@gmail.com
no one? how can i share variables in processing? please help out! On Thu, Apr 9, 2009 at 8:05 AM, rkmr...@gmail.com wrote: > hi > i am trying to move from threading to processing package. this is the > controller i used to spawn new threads, and it used the global > variable done to check if it

Re: any(), all() and empty iterable

2009-04-12 Thread Peter Otten
John O'Hagan wrote: > Or to put it another way, if I ask someone "Amongst your books, is one of > them 'Robinson Crusoe'?", and they don't have any books, they could > answer 'yes' (or 'no' equally truthfully), but I'd rather they told me > that no, they don't have  'Robinson Crusoe'. That's why

Re: Best Compatible JS Lib for Django

2009-04-12 Thread lkcl
On Apr 4, 7:20 pm, Daniel Fetchinson wrote: > > Does anyone have experience with using JS Libraries with Django? yes - pyjamas - http://pyjs.org - although, strictly speaking, it's a python widget-set and python-to-javascript compiler. the possibility now of being able to program in python bot

Re: GUI Programming

2009-04-12 Thread Steven D'Aprano
On Sun, 12 Apr 2009 15:07:11 +0200, Gabriel wrote: > Hello, > > I'm python newbie and i need to write gui for my school work in python. > I need to write it really quick, because i haven't much time .) So > question is, which of gui toolkits should i pick and learn? I heard > PyGTK and Glade are

Re: multiprocessing and Locks

2009-04-12 Thread Piet van Oostrum
> gvv (G) wrote: >G> Hi All, >G> I am trying to understand multiprocessing, but I am getting a Runtime >G> error on the >G> code below. What am I missing or doing wrong? >G> Error is: >G> RuntimeError: Lock objects should only be shared between processes >G> through inheritance [code deleted]

Re: GUI Programming

2009-04-12 Thread Ryniek90
I think you should get involved with Eagle Python GUI or Kiwi GUI Framework . Good luck. -- http://mail.python.org/mailman/listinfo/python-list

Re: any(), all() and empty iterable

2009-04-12 Thread Tim Chase
That's why you ask "Do you have any books called 'Robinson Crusoe'?" rather than "Are all your books called 'Robinson Crusoe'?". Mu. If I don't have any books..."Have you stopped beating all your wives?" The question makes the presumption that I have books (or that you've been beating your w

Re: any(), all() and empty iterable

2009-04-12 Thread Eduardo O. Padoan
On Sun, Apr 12, 2009 at 8:53 AM, Tim Chase wrote: >>> From the docs: >> >> all(iterable) >>                Return True if all elements of the iterable are true. >> Equivalent >>        to: >>                def all(iterable): >>            for element in iterable: >>                if not element:

Re: Re: Re: Generators/iterators, Pythonicity, and primes

2009-04-12 Thread John Posner
Duncan Booth wrote: John Posner wrote: Do know what in the itertools implementation causes adding a 'if p <= sqrt(n)' clause to *decrease* performance, while adding a 'takewhile()' clause *increases* performance? I haven't timed it, but I would guess that the takewhile was faster on

Re: design question, metaclasses?

2009-04-12 Thread Darren Dale
On Apr 11, 2:15 pm, Darren Dale wrote: > I am working on a project that provides a high level interface to hdf5 > files by implementing a thin wrapper around h5py. I would like to > generalize the project so the same API can be used with other formats, > like netcdf or ascii files. The format spec

Re: GUI Programming

2009-04-12 Thread Gabriel
edexter wrote: On Apr 12, 8:07 am, Gabriel wrote: Hello, I'm python newbie and i need to write gui for my school work in python. I need to write it really quick, because i haven't much time .) So question is, which of gui toolkits should i pick and learn? I heard PyGTK and Glade are best fo

Re: moving to processing from threading, global variables

2009-04-12 Thread MRAB
rkmr...@gmail.com wrote: no one? It's Easter! :-) how can i share variables in processing? please help out! Threads run in the same address space, so they can share variables; processes run in different address spaces, so they can't (normally). You'll need to read the documentation careful

Re: GUI Programming

2009-04-12 Thread Emmanuel Surleau
Howdy, > I'm python newbie and i need to write gui for my school work in python. > I need to write it really quick, because i haven't much time .) > So question is, which of gui toolkits should i pick and learn? I heard > PyGTK and Glade are best for quick gui programming? Is it good for > beginne

Re: Extracting zip files containing directories with ZipFile

2009-04-12 Thread Martin v. Löwis
> Does the ZipFile class correctly handles directories contained within > zip files? That depends on the version of Python you are using. See http://bugs.python.org/4710 Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

How to check if a list contains an item

2009-04-12 Thread online . service . com
python doesn't have a list.contains() method? thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: design question, metaclasses?

2009-04-12 Thread Aaron Brady
On Apr 12, 1:30 pm, Darren Dale wrote: > On Apr 11, 2:15 pm, Darren Dale wrote: > > _ > > > format1.Group # implementation of group in format1 > > format2.Group # ... > > Base.DerivedGroup # base implementation of DerivedGroup, not directly > > useful > > format1.DerivedGroup = Base.DerivedGroup(

Re: How to check if a list contains an item

2009-04-12 Thread Esmail
online.service@gmail.com wrote: python doesn't have a list.contains() method? How about the 'in' operator? In [1]: l1=['aa', 'bb', 'cc'] In [2]: 'aa' in l1 Out[2]: True In [3]: 'ab' in l1 Out[3]: False In [4]: 'cc' in l1 Out[4]: True Will this help? Esmail -- http://mail.python.o

Re: How to check if a list contains an item

2009-04-12 Thread MRAB
online.service@gmail.com wrote: python doesn't have a list.contains() method? It does have a __contains__ method, but that's not called directly. Use "item in my_list" instead (and the opposite is "item not in my_list"). -- http://mail.python.org/mailman/listinfo/python-list

Re: How to check if a list contains an item

2009-04-12 Thread Peter Otten
online.service@gmail.com wrote: > python doesn't have a list.contains() method? It has. It's called list.__contains__() and used indirectly through the 'in' operator: >>> "red" in ["red", "green", "blue"] True >>> "yellow" in ["red", "green", "blue"] False -- http://mail.python.org/mailma

Re: How to check if a list contains an item

2009-04-12 Thread Tim Chase
online.service@gmail.com wrote: python doesn't have a list.contains() method? Because it doesn't need one? >>> x = [1,2,3,4] >>> 2 in x True >>> 42 in x False pedantic side-note, objects can have a __contains__ method which is used under the covers for "in" testing, so your

Re: design question, metaclasses?

2009-04-12 Thread Darren Dale
On Apr 12, 3:23 pm, Aaron Brady wrote: > On Apr 12, 1:30 pm, Darren Dale wrote: > > > > > On Apr 11, 2:15 pm, Darren Dale wrote: > > _ > > > > format1.Group # implementation of group in format1 > > > format2.Group # ... > > > Base.DerivedGroup # base implementation of DerivedGroup, not directly

Re: moving to processing from threading, global variables

2009-04-12 Thread Dave Angel
rkmr...@gmail.com wrote: no one? how can i share variables in processing? please help out! On Thu, Apr 9, 2009 at 8:05 AM, rkmr...@gmail.com wrote: hi i am trying to move from threading to processing package. this is the controller i used to spawn new threads, and it used the global variab

Re: Reading only headers

2009-04-12 Thread Gabriel Genellina
En Thu, 09 Apr 2009 07:13:08 -0300, S.Selvam escribió: I want to read headers from web page and check whether its Content-Type is xml or not.I used the following code ... request = urllib2.Request(url, None, USER_AGENT) opener = urllib2.build_opener() datastream = opener.open(request)

Re: Recommendations on Pythonic tree data structure design techniques

2009-04-12 Thread Gabriel Genellina
En Thu, 09 Apr 2009 13:18:27 -0300, escribió: Any recommendations on Python based tree data structures that I can study? I'm working on an application that will model a basic outline structure (simple tree) and am looking for ideas on Pythonic implementation techniques. I'd use ElementTree. A

Re: design question, metaclasses?

2009-04-12 Thread Kay Schluehr
On 11 Apr., 20:15, Darren Dale wrote: > I am working on a project that provides a high level interface to hdf5 > files by implementing a thin wrapper around h5py. > I would like to > generalize the project so the same API can be used with other formats, > like netcdf or ascii files. The format sp

Re: Re: Generators/iterators, Pythonicity, and primes

2009-04-12 Thread Duncan Booth
Duncan Booth wrote: > John Posner wrote: > >> Do know what in the itertools implementation causes adding a 'if p <= >> sqrt(n)' clause to *decrease* performance, while adding a >> 'takewhile()' clause *increases* performance? > > I haven't timed it, but I would guess that the takewhile was fa

Re: save error with embedded python 2.5

2009-04-12 Thread Gabriel Genellina
En Fri, 10 Apr 2009 09:40:11 -0300, eric_dex...@msn.com escribió: I seem to be getting one extra value when I create my values with for yy in range(1, maxy): for xx in range(1, maxx): count = count + 1 #squaret.append[count] squaret.append( squar

Re: design question, metaclasses?

2009-04-12 Thread Darren Dale
On Apr 12, 4:50 pm, Kay Schluehr wrote: > On 11 Apr., 20:15, Darren Dale wrote: > > > I am working on a project that provides a high level interface to hdf5 > > files by implementing a thin wrapper around h5py. > > I would like to > > generalize the project so the same API can be used with other

Re: named pipe and Linux

2009-04-12 Thread Cameron Simpson
On 08Apr2009 16:13, Thomas Bellman wrote: | Cameron Simpson wrote: | > On 07Apr2009 10:08, akineko wrote: | >| I'm trying to use named pipes to fuse a Python program and a C | >| program. | >| One side creates pipes using os.mkfifo() and both sides use the same | >| named pipes (one side reads,

Re: Extracting zip files containing directories with ZipFile

2009-04-12 Thread Márcio Faustino
On Apr 12, 5:01 pm, MRAB wrote: > Strictly speaking, zip files don't contain nested folders, but only a > flat list of files. Didn't know that, thanks. On Apr 12, 8:01 pm, "Martin v. Löwis" wrote: > That depends on the version of Python you are using. > Seehttp://bugs.python.org/4710 Thanks.

OverflowError while sending large file via socket

2009-04-12 Thread Ryniek90
When i wanted to send an .iso file of 4GB length, i had traceback: "OverflowError: requested number of bytes is more than a Python string can hold" Sockets are being used in every network app, i.e: p2p progs (like BitTorrent), and exchanged data is often bigger than 4GB. So why i've had that

Re: GUI Programming

2009-04-12 Thread Python
On 12 apr 2009, at 15:07, Gabriel wrote: Hello, I'm python newbie and i need to write gui for my school work in python. I need to write it really quick, because i haven't much time .) So question is, which of gui toolkits should i pick and learn? I heard PyGTK and Glade are best for quick

Re: OverflowError while sending large file via socket

2009-04-12 Thread Paul Rubin
Ryniek90 writes: > When i wanted to send an .iso file of 4GB length, i had traceback: > "OverflowError: requested number of bytes is more than a Python string > can hold" You're not supposed to put the 4GB all in one string. Open the socket and send smaller packets through it. -- http://mail.pyt

Pydev 1.4.5 Released

2009-04-12 Thread Fabio Zadrozny
Hi All, Pydev and Pydev Extensions 1.4.5 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: Python-list Digest, Vol 67, Issue 192

2009-04-12 Thread Ryniek90
Temat: Re: OverflowError while sending large file via socket Od: Paul Rubin Data: 12 Apr 2009 15:28:43 -0700 Do: python-list@python.org Do: python-list@python.org Ryniek90 writes: Whe

Re: Python-list Digest, Vol 67, Issue 192

2009-04-12 Thread Chris Rebert
On Sun, Apr 12, 2009 at 3:38 PM, Ryniek90 wrote: >> Paul Rubin >> Ryniek90 writes: >> >>> >>> When i wanted to send an .iso file of 4GB length, i had traceback: >>> "OverflowError: requested number of bytes is more than a Python string >>> can hold" >>> >> >> You're

Re: PyHeapTypeObject

2009-04-12 Thread Benjamin Peterson
Brendan Miller catphive.net> writes: > > What's the point of PyHeapTypeObject in Include/object.h? Why does the > layout of object types need to be different on the heap vs statically > allocated? Heap types have to do some extra book-keeping like garbage collection. -- http://mail.python.o

Re: Regex similar to "^(?u)\w$", but without digits?

2009-04-12 Thread Andreas Pfrengle
On 12 Apr., 02:31, "Mark Tolonen" wrote: > "Andreas" wrote in message > > news:f953c845-3660-4bb5-8ba7-00b93989c...@b1g2000vbc.googlegroups.com... > > > Hello, > > > I'd like to create a regex that captures any unicode character, but > > not the underscore and the digits 0-9. "^(?u)\w$" captures

Re: Regex similar to "^(?u)\w$", but without digits?

2009-04-12 Thread Andreas Pfrengle
On 12 Apr., 02:31, "Mark Tolonen" wrote: > "Andreas" wrote in message > > news:f953c845-3660-4bb5-8ba7-00b93989c...@b1g2000vbc.googlegroups.com... > > > Hello, > > > I'd like to create a regex that captures any unicode character, but > > not the underscore and the digits 0-9. "^(?u)\w$" captures

Re: Python-list Digest, Vol 67, Issue 192

2009-04-12 Thread Ryniek90
Chris Rebert pisze: On Sun, Apr 12, 2009 at 3:38 PM, Ryniek90 wrote: Paul Rubin Ryniek90 writes: When i wanted to send an .iso file of 4GB length, i had traceback: "OverflowError: requested number of bytes is more than a Python string can hold"

Re: How to create a virtual serial port?

2009-04-12 Thread Lawrence D'Oliveiro
In message , Grant Edwards wrote: > On Linux: no. What about this . -- http://mail.python.org/mailman/listinfo/python-list

Re: win32 wins settings

2009-04-12 Thread Aahz
In article , Toff wrote: > >I don't understand why this doesn't woks. In what way is it not working? BTW, you should look up "raw strings". See also http://www.catb.org/~esr/faqs/smart-questions.html -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ Why is this

choosing background color in tkfiledialog.askopenfile()

2009-04-12 Thread Soumen banerjee
Hello, I want to know how i can choose a background color in tkfiledialog.askopenfilename()? Due to a certain theme i am using, i cant see any text and changing the theme settings dont seem to affect the file dialog -- http://mail.python.org/mailman/listinfo/python-list

ANN: PyGUI 2.0.1

2009-04-12 Thread Greg Ewing
PyGUI 2.0.1 is available: http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/ Fixes some problems in setup.py affecting installation on Linux and Windows. What is PyGUI? -- PyGUI is a cross-platform GUI toolkit designed to be lightweight and have a highly Pythonic API. -- G

Re: OverflowError while sending large file via socket

2009-04-12 Thread Steven D'Aprano
On Mon, 13 Apr 2009 00:21:34 +0200, Ryniek90 wrote: > When i wanted to send an .iso file of 4GB length, i had traceback: > "OverflowError: requested number of bytes is more than a Python string > can hold" > > Sockets are being used in every network app, i.e: p2p progs (like > BitTorrent), and ex

Re: OverflowError while sending large file via socket

2009-04-12 Thread Jean-Paul Calderone
On 13 Apr 2009 01:45:56 GMT, Steven D'Aprano wrote: On Mon, 13 Apr 2009 00:21:34 +0200, Ryniek90 wrote: When i wanted to send an .iso file of 4GB length, i had traceback: "OverflowError: requested number of bytes is more than a Python string can hold" Sockets are being used in every network

Login to Drupal 6 site using pycurl

2009-04-12 Thread David
I can not get this to work; #!/usr/bin/python import urllib import pycurl user_agent = 'Mozilla/4.0 (compatible: MSIE 6.0)' crl = pycurl.Curl() crl.setopt(pycurl.URL, 'http://beta.gentooligans.com') crl.setopt(pycurl.HEADER, 1) crl.setopt(pycurl.USERAGENT, user_agent) crl.setopt(pycurl.FOLLOWLOC

Re: OverflowError while sending large file via socket

2009-04-12 Thread Benjamin Peterson
Steven D'Aprano REMOVE-THIS-cybersource.com.au> writes: > > which suggests to me that it will be implementation dependent The length of sequences is constrained by sys.maxsize (and no, you can't change it). -- http://mail.python.org/mailman/listinfo/python-list

Re: How to create a virtual serial port?

2009-04-12 Thread Grant Edwards
On 2009-04-13, Lawrence D'Oliveiro wrote: > In message , Grant > Edwards wrote: > >> On Linux: no. > > What about this . It's a kernel-mode serial driver that talks to an Ethernet-attached device server. We were talking about an application in user-space creating

Ann: WHIFF -- WSGI/HTTP INTEGRATED FILESYSTEM FRAMES

2009-04-12 Thread Aaron Watters
announcing: WHIFF -- WSGI/HTTP INTEGRATED FILESYSTEM FRAMES WHIFF is an infrastructure for easily building complex Python/WSGI Web applications by combining smaller and simpler WSGI components organized within file system trees. To read about WHIFF view the WHIFF documentation at http://aa

Data Model:

2009-04-12 Thread Anthony
I'm struggling on whether or not to implement GroupItem (below) with two separate models, or with one model that has a distinguishing key: Given: class ParentGroup: a group of values represented by class GroupItem class ChildGroup: a group of values represented by class GroupItem fore

Re: video capture in Python ?

2009-04-12 Thread Tim Roberts
Stef Mientki wrote: > >has anyone got video capturing (from a webcam) successful running >in a wxPython application under winXP ? > >I got some links, but it seems quit complicated to get everything >installed, >and all the packages you need don't describe which versions of the other >parts yo

Re: Data Model:

2009-04-12 Thread Aaron Watters
On Apr 12, 10:14 pm, Anthony wrote: > I'm struggling on whether or not to implement GroupItem (below) with > two separate models, or with one model that has a distinguishing key: > > Given: > class ParentGroup: >     a group of values represented by class GroupItem > > class ChildGroup: >     a gr

regex for multiple whitespace-only lines

2009-04-12 Thread Phil Mayes
I am trying to search for 1 or more empty or white-space-only lines. Empty lines work: >>> re.compile('(?m)(^$){1,2}') <_sre.SRE_Pattern object at 0x010F9218> One line with possible whitespace works: >>> re.compile('(?m)(^\s*$)') <_sre.SRE_Pattern object at 0x010F7860> Multiple lines with possib

Re: design question, metaclasses?

2009-04-12 Thread Aaron Brady
On Apr 12, 4:53 pm, Darren Dale wrote: > On Apr 12, 4:50 pm, Kay Schluehr wrote: > > > > > On 11 Apr., 20:15, Darren Dale wrote: > > > > I am working on a project that provides a high level interface to hdf5 > > > files by implementing a thin wrapper around h5py. > > > I would like to > > > gene

Overflow error (was Vol 67, Issue 192)

2009-04-12 Thread Dave Angel
Ryniek90 wrote: Chris Rebert pisze: On Sun, Apr 12, 2009 at 3:38 PM, Ryniek90 wrote: Paul Rubin Ryniek90 writes: When i wanted to send an .iso file of 4GB length, i had traceback: "OverflowError: requested number of bytes is more than a Python string can h

Re: Data Model:

2009-04-12 Thread Anthony
On Apr 12, 7:46 pm, Aaron Watters wrote: > On Apr 12, 10:14 pm, Anthony wrote: > > > > > I'm struggling on whether or not to implement GroupItem (below) with > > two separate models, or with one model that has a distinguishing key: > > > Given: > > class ParentGroup: > >     a group of values rep

Re: Data Model:

2009-04-12 Thread Aaron Brady
On Apr 12, 9:14 pm, Anthony wrote: > I'm struggling on whether or not to implement GroupItem (below) with > two separate models, or with one model that has a distinguishing key: > > Given: > class ParentGroup: >     a group of values represented by class GroupItem > > class ChildGroup: >     a gro

Re: Python-list Digest, Vol 67, Issue 192

2009-04-12 Thread Aaron Brady
On Apr 12, 6:29 pm, Ryniek90 wrote: > Chris Rebert pisze: > > > > > On Sun, Apr 12, 2009 at 3:38 PM, Ryniek90 wrote: > > >>> Paul Rubin > >>> Ryniek90 writes: > > When i wanted to send an .iso file of 4GB length, i had traceback: > "OverflowError: request

Re: video capture in Python ? (Tim Roberts)

2009-04-12 Thread Miles Lee
Hi, You could try the python wrapper for OpenCV, here is the link: http://code.google.com/p/ctypes-opencv/ Regards Miles -- http://mail.python.org/mailman/listinfo/python-list

Re: Data Model:

2009-04-12 Thread Anthony
On Apr 12, 8:10 pm, Aaron Brady wrote: > On Apr 12, 9:14 pm, Anthony wrote: > > > > > I'm struggling on whether or not to implement GroupItem (below) with > > two separate models, or with one model that has a distinguishing key: > > > Given: > > class ParentGroup: > >     a group of values repres

Re: regex for multiple whitespace-only lines

2009-04-12 Thread Mark Tolonen
"Phil Mayes" wrote in message news:5.2.1.1.0.20090412194731.013d0...@olivebr.com... I am trying to search for 1 or more empty or white-space-only lines. Empty lines work: >>> re.compile('(?m)(^$){1,2}') <_sre.SRE_Pattern object at 0x010F9218> One line with possible whitespace works: >>> re.co

Re: Regex similar to "^(?u)\w$", but without digits?

2009-04-12 Thread Mark Tolonen
"Andreas Pfrengle" wrote in message news:26d3bec3-8329-4432-a680-05c17f930...@3g2000yqk.googlegroups.com... On 12 Apr., 02:31, "Mark Tolonen" wrote: "Andreas" wrote in message news:f953c845-3660-4bb5-8ba7-00b93989c...@b1g2000vbc.googlegroups.com... > Hello, > I'd like to create a regex t

Re: Data Model:

2009-04-12 Thread Aaron Brady
On Apr 12, 10:33 pm, Anthony wrote: > On Apr 12, 8:10 pm, Aaron Brady wrote: > > > > > On Apr 12, 9:14 pm, Anthony wrote: > > > > I'm struggling on whether or not to implement GroupItem (below) with > > > two separate models, or with one model that has a distinguishing key: > > > > Given: > > >

Re: "str object is not callable" error

2009-04-12 Thread Gabriel Genellina
En Wed, 08 Apr 2009 18:11:37 -0300, venkat sanaka escribió: i was using python/c api to call a python function from c and I know the name of the function which i want to call.Is there any way to do that?? This is the method i tried... for eg:This is the python function i wants to call. >>>d

  1   2   >