Re: regex with specific list of string

2007-09-26 Thread Carsten Haese
On Wed, 2007-09-26 at 15:42 +, james_027 wrote: > hi, > > how do I regex that could check on any of the value that match any one > of these ... 'jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', > 'sep', 'oct', 'nov', 'dec' Why regex? You can simply check if the given value is contained

Re: Asynchronous Messaging

2007-09-26 Thread Fredrik Lundh
wink wrote: > But its performance is poor if the number of items on a > Queue becomes large because it is implemented using a list. > One of the things I was thinking of was doing another implementation > using of Queue which was based on deque. Updating from 2.3 to something newer will fix that

Re: Missing documentation for ElementTree?

2007-09-26 Thread Fredrik Lundh
Robert Dailey wrote: > This is the documentation for 3.0a1? This is exactly what I was looking > for. Thank you. > > @Gabriel > Your documentation is also useful, it never occurred to me to check the > ElementTree website for documentation. Since it came with Python I > expected it to be cover

Re: An Editor that Skips to the End of a Def

2007-09-26 Thread Jason M Barnes
On 9/26/07, Neil Cerutti <[EMAIL PROTECTED]> wrote: > On 2007-09-26, Jason M Barnes <[EMAIL PROTECTED]> wrote: > > Off the top of my head, I can think of a few vim commands that > > have come in handy. I can search through a webpage in Firefox > > by using the same '/' search command that vim has.

Re: regex with specific list of string

2007-09-26 Thread Steve Holden
james_027 wrote: > hi, > > how do I regex that could check on any of the value that match any one > of these ... 'jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', > 'sep', 'oct', 'nov', 'dec' > > Thanks >>> patr = re.compile('jan|feb|mar|apr|may|jun|jul|aug|sep|nov|oct|dec') >>> patr.mat

Re: Python class method as an argument of a function in a C extension

2007-09-26 Thread Matimus
> Can anybody give me an hint (or some link) on how to define > 'aCFunction' and how to call 'self.myMethod' in the C source code? A python function defined in C accepts a pointer to self and a tuple of arguments, each of which is also a PyObject. If you pass a function or method, it will be inclu

Re: regex with specific list of string

2007-09-26 Thread Pablo Ziliani
Carsten Haese wrote: > On Wed, 2007-09-26 at 15:42 +, james_027 wrote: > >> hi, >> >> how do I regex that could check on any of the value that match any one >> of these ... 'jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', >> 'sep', 'oct', 'nov', 'dec' >> > > Why regex? You can si

Matplotlib TkAgg WindowsXP ImportError

2007-09-26 Thread Simon Forman
Hello, I just installed Matplotlib (and NumPy) on a windows XP machine, and I'm getting the following traceback when I try to use the TkAgg backend. Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more info

Re: regex with specific list of string

2007-09-26 Thread Carsten Haese
On Wed, 2007-09-26 at 12:49 -0400, Steve Holden wrote: > james_027 wrote: > > hi, > > > > how do I regex that could check on any of the value that match any one > > of these ... 'jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', > > 'sep', 'oct', 'nov', 'dec' > > > > Thanks > > >>> patr =

Re: regex with specific list of string

2007-09-26 Thread Steve Holden
Carsten Haese wrote: > On Wed, 2007-09-26 at 12:49 -0400, Steve Holden wrote: >> james_027 wrote: >>> hi, >>> >>> how do I regex that could check on any of the value that match any one >>> of these ... 'jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', >>> 'sep', 'oct', 'nov', 'dec' >>> >>> Th

Guitars for 0$ !!!!!

2007-09-26 Thread nutsbreaker2
http://free-guitars.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Travel USA

2007-09-26 Thread travelingwebs1
http://world-traveling-destinations.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: sorteddict PEP proposal [started off as orderedict]

2007-09-26 Thread Raymond Hettinger
[Mark Summerfield] > Below is a PEP proposal for a sorteddict. It arises out of a > discussion on this list that began a few weeks ago with the subject of > "An ordered dictionary for the Python library?" It is worth remembering that the long sought after datatype was a dict that could loop over k

Re: regex with specific list of string

2007-09-26 Thread Pablo Ziliani
Carsten Haese wrote: > On Wed, 2007-09-26 at 12:49 -0400, Steve Holden wrote: >> james_027 wrote: >>> hi, >>> >>> how do I regex that could check on any of the value that match any one >>> of these ... 'jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', >>> 'sep', 'oct', 'nov', 'dec' >>> >>> Th

A question on python performance.

2007-09-26 Thread Joe Goldthwaite
Hi everyone, I'm a developer who's been using python for a couple of years. I wrote a fairly large application using it but I was learning the language at the same time so it most of the code kind of sucks. I've learned a lot since then and I've been going through my code trying to organize it b

Re: regex with specific list of string

2007-09-26 Thread Carsten Haese
On Wed, 2007-09-26 at 15:13 -0300, Pablo Ziliani wrote: > Carsten Haese wrote: > > Unfortunately, that also matches margarine, mayonnaise, and octopus, > > just to name a few ;-) > > (and so does the solution you sent before :) No, it doesn't. >>> s = set(['jan', 'feb', 'mar', 'apr', 'may', 'jun

Re: A question on python performance.

2007-09-26 Thread chris . monsanto
On Sep 26, 2:26 pm, "Joe Goldthwaite" <[EMAIL PROTECTED]> wrote: > Hi everyone, > > I'm a developer who's been using python for a couple of years. I wrote a > fairly large application using it but I was learning the language at the > same time so it most of the code kind of sucks. > > I've learned

Re: sorteddict PEP proposal [started off as orderedict]

2007-09-26 Thread Paul Rubin
Mark Summerfield <[EMAIL PROTECTED]> writes: > The sorteddict API that has emerged so far is (1) apart from the > constructor, everything is identical to dict, I don't see this as necessary, it's ok if it resembles dict as much as dbm does. > (2) the constructor takes the same args as sorted(),

Re: sorteddict PEP proposal [started off as orderedict]

2007-09-26 Thread James Stroud
Raymond Hettinger wrote: > As one who was submitted many PEPs, I can advise that the quickest way > to irrevocably kill an idea is to submit a PEP to early (we almost > didn't get genexps because the PEP was submitted pre-maturely). Maybe its the PEP killers who act prematurely because I friggin'

Re: An Editor that Skips to the End of a Def

2007-09-26 Thread Simon Brunning
On 9/26/07, Bjoern Schliessmann <[EMAIL PROTECTED]> > You definitely used the wrong languages :) > > http://worsethanfailure.com/Articles/The-Other-Kind-of-RPG.aspx Ah, but one edits RPG with SEU[1], Undo - who needs it? -- Cheers, Simon B. [EMAIL PROTECTED] [1] http://tinyurl.com/yvra7l -- htt

Re: A question on python performance.

2007-09-26 Thread Erik Jones
On Sep 26, 2007, at 1:26 PM, Joe Goldthwaite wrote: > Hi everyone, > > I'm a developer who's been using python for a couple of years. I > wrote a > fairly large application using it but I was learning the language > at the > same time so it most of the code kind of sucks. > > I've learned a l

Re: regex with specific list of string

2007-09-26 Thread Steve Holden
Carsten Haese wrote: > On Wed, 2007-09-26 at 15:13 -0300, Pablo Ziliani wrote: >> Carsten Haese wrote: >>> Unfortunately, that also matches margarine, mayonnaise, and octopus, >>> just to name a few ;-) >> (and so does the solution you sent before :) > > No, it doesn't. > s = set(['jan', 'fe

Re: sorteddict PEP proposal [started off as orderedict]

2007-09-26 Thread Raymond Hettinger
[James Stroud ] > Maybe its the PEP killers who act prematurely because I friggin' love > genexps and the little generators they generate. No, it's the PEP author who controls when they ask for pronouncement. The natural instinct is to ask for pronouncement as soon as you have an implementation an

Delete values from a string using the index

2007-09-26 Thread koutoo
How do I delete or remove values from a list or string using the index. If a = [1,2,3,4,5,6,7,8] and I want to get rid of 1 -5, how would I do that? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: PyS60

2007-09-26 Thread cyberco
I have used PyS60 quite a lot a while ago, but what is it you exactly wanted to know? One thing I can tell you is that it's a pity that it only runs on Series 60 phones and that the security restrictions of third edition devices severely limited the options for developers. 2B -- http://mail.pyth

Re: stdout and embedding into Windows apps

2007-09-26 Thread Thomas Schreiner
Hi, > I'm extending a windows application (C++) by embedding Python calls. > It seems to be a known problem that windows applications detach > immediately from the calling console, so that all output to stdout > (from both C++ and Python) doesn't get shown anywhere. > > A workaround seems to be

Re: Delete values from a string using the index

2007-09-26 Thread Ricardo Aráoz
[EMAIL PROTECTED] wrote: > How do I delete or remove values from a list or string using the > index. > > If a = [1,2,3,4,5,6,7,8] and I want to get rid of 1 -5, how would I do > that? > > Thanks. > del a[1] del a[-5] -- http://mail.python.org/mailman/listinfo/python-list

Re: Delete values from a string using the index

2007-09-26 Thread Erik Jones
On Sep 26, 2007, at 3:25 PM, [EMAIL PROTECTED] wrote: > How do I delete or remove values from a list or string using the > index. > > If a = [1,2,3,4,5,6,7,8] and I want to get rid of 1 -5, how would I do > that? > > Thanks. > > -- > http://mail.python.org/mailman/listinfo/python-list >>> l = [

Tkinter / Tk 8.5

2007-09-26 Thread Michal Bozon
Today has been released a first beta of Tk 8.5, including a Ttk (tile) style engine, which makes possible the native look of widgets on MS platform, without having to install any extension. http://wiki.tcl.tk/11075 http://sourceforge.net/mailarchive/message.php?msg_name=1190813039.46fa5d6f6a06b%40

Re: Delete values from a string using the index

2007-09-26 Thread Bjoern Schliessmann
[EMAIL PROTECTED] wrote: > How do I delete or remove values from a list or string using the > index. > > If a = [1,2,3,4,5,6,7,8] and I want to get rid of 1 -5, how would > I do that? del a[0:5] Be sure to check out the relevant section of the Python tutorial. http://docs.python.org/tut/node7.

Re: Delete values from a string using the index

2007-09-26 Thread Ricardo Aráoz
[EMAIL PROTECTED] wrote: > How do I delete or remove values from a list or string using the > index. > > If a = [1,2,3,4,5,6,7,8] and I want to get rid of 1 -5, how would I do > that? > > Thanks. > If you want to do it all at once : del a[1:4:2] -- http://mail.python.org/mailman/listinfo/pyth

Re: Script to extract text from PDF files

2007-09-26 Thread Svenn Are Bjerkem
On Sep 25, 9:18 pm, [EMAIL PROTECTED] wrote: > On Sep 25, 3:02 pm, Paul Hankin <[EMAIL PROTECTED]> wrote: > > > Googling for 'pdf to text python' and following the first link > > giveshttp://pybrary.net/pyPdf/ > > Doesn't work that well, I've tried it, you should too... the author > even admits th

Re: sorteddict PEP proposal [started off as orderedict]

2007-09-26 Thread Duncan Booth
Paul Hankin <[EMAIL PROTECTED]> wrote: >> So should Duncan's >> >> def __removekey(self, key): >> if key in self.__addkeys: >> del self.__addkeys[key] >> else: >> self.__delkeys.add(key) >> >> be changed to: >> >> def __removekey(self, key): >>

Re: Matplotlib TkAgg WindowsXP ImportError

2007-09-26 Thread Simon Forman
On 9/26/07, Simon Forman <[EMAIL PROTECTED]> wrote: > Hello, > > I just installed Matplotlib (and NumPy) on a windows XP machine, and > I'm getting the following traceback when I try to use the TkAgg > backend. > > Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit > (Intel)] on >

Re: Matplotlib TkAgg WindowsXP ImportError

2007-09-26 Thread Simon Forman
On Sep 26, 1:19 pm, Simon Forman <[EMAIL PROTECTED]> wrote: > Hello, > > I just installed Matplotlib (and NumPy) on a windows XP machine, and > I'm getting the following traceback when I try to use the TkAgg > backend. > > Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit > (Intel

Re: setuptools without unexpected downloads

2007-09-26 Thread kyosohma
On Sep 26, 8:30 am, Steve Holden <[EMAIL PROTECTED]> wrote: > Fredrik Lundh wrote: > > Paul Boddie wrote: > > >> P.S. Of course, the package maintainer problem manifests itself most > >> prominently on Windows where you often see people asking for pre-built > >> packages or installers. > > > for th

Re: Script to extract text from PDF files

2007-09-26 Thread byte8bits
On Sep 26, 4:49 pm, Svenn Are Bjerkem <[EMAIL PROTECTED]> wrote: > I have downloaded this package and installed it and found that the > text-extraction is more or less useless. Looking into the code and > comparing with the PDF spec show a very early implementation of text > extraction. Luckily it

Re: Simple threading example freezes IDLE?

2007-09-26 Thread Sergio Correia
I think the -print- command, as used in IDLE, is not thread-safe. I was bitten by an issue like that today, and the problem ended up being the -print- command I used. On the cmd line, it works per-fect-ly.. but IDLE seems to be the culprit. A possible answer seems to be to write a wrapper for prin

~ bit-wise unary operator

2007-09-26 Thread Ladislav Andel
Hello, why ~ bit-wise unary operator returns -(x+1) and not bit inversion of the given integer? example: a = 7978 a = ~a python returns -7979 but I need to get back 57557 as in C language. which is also in binary 000100101010 and inverted 111011010101 Is here any other operator or do I

GUI for viewing/editing python data structures?

2007-09-26 Thread Joshua J. Kugler
A while back, I seem to remember coming across a small program that could view and edit python data structures via a nice expanding tree view. I'm now in need of something like that (to verify data is imported correctly into a shelve file) and having a GUI would be much simpler than trying to wade

Re: ~ bit-wise unary operator

2007-09-26 Thread Paul Hankin
On Sep 26, 11:14 pm, Ladislav Andel <[EMAIL PROTECTED]> wrote: > Hello, > why ~ bit-wise unary operator returns -(x+1) and not bit inversion of > the given integer? > > example: > a = 7978 > a = ~a > python returns -7979 > > but I need to get back 57557 as in C language. > > which is also in binary

Re: ~ bit-wise unary operator

2007-09-26 Thread Hrvoje Niksic
Ladislav Andel <[EMAIL PROTECTED]> writes: > Hello, why ~ bit-wise unary operator returns -(x+1) and not bit > inversion of the given integer? On 2s-complement architectures, -(x+1) *is* bit inversion of the given integer. > example: > a = 7978 > a = ~a > python returns -7979 > > but I need to g

Re: sorteddict PEP proposal [started off as orderedict]

2007-09-26 Thread Paul Hankin
On Sep 26, 9:52 pm, Duncan Booth <[EMAIL PROTECTED]> wrote: > Paul Hankin <[EMAIL PROTECTED]> wrote: > >> So should Duncan's > > >> def __removekey(self, key): > >> if key in self.__addkeys: > >> del self.__addkeys[key] > >> else: > >> self.__delkeys.add(

Re: setuptools without unexpected downloads

2007-09-26 Thread Steve Holden
[EMAIL PROTECTED] wrote: > On Sep 26, 8:30 am, Steve Holden <[EMAIL PROTECTED]> wrote: >> Fredrik Lundh wrote: >>> Paul Boddie wrote: P.S. Of course, the package maintainer problem manifests itself most prominently on Windows where you often see people asking for pre-built packages o

Re: Script to extract text from PDF files

2007-09-26 Thread David Boddie
On Wed Sep 26 23:50:16 CEST 2007, byte8bits wrote: > On Sep 26, 4:49 pm, Svenn Are Bjerkem > wrote: > > > I have downloaded this package and installed it and found that the > > text-extraction is more or less useless. Looking into the code and > > comparing with the PDF spec show a very early im

Re: regex with specific list of string

2007-09-26 Thread james_027
Hi all, > This is fine IMO since the OP didn't specify the opposite. > Thanks for all your replies, though I don't understand quite well the going argument? What do you mean when you say "the OP didn't specify the opposite"? There reason for using regex is because I am going to use it in Django'

Re: Simple threading example freezes IDLE?

2007-09-26 Thread Sergio Correia
I think I have pinpointed the error: When the -print- command fills the screen, IDLE crashes. That is, if i have 30 empty lines before I start to push the current screen upwards, when the last of those lines is used, and its time to push the screen upwards, IDLE crashes. I'm using IDLE 1.2.1, Pyt

Re: regex with specific list of string

2007-09-26 Thread Steve Holden
james_027 wrote: > Hi all, > >> This is fine IMO since the OP didn't specify the opposite. >> > > Thanks for all your replies, though I don't understand quite well the > going argument? What do you mean when you say "the OP didn't specify > the opposite"? > > There reason for using regex is beca

Re: ~ bit-wise unary operator

2007-09-26 Thread Grant Edwards
On 2007-09-26, Ladislav Andel <[EMAIL PROTECTED]> wrote: > Hello, > why ~ bit-wise unary operator returns -(x+1) and not bit inversion of > the given integer? > > example: > a = 7978 > a = ~a > python returns -7979 > > but I need to get back 57557 as in C language. It's not what C language return

Re: A question on python performance.

2007-09-26 Thread Paul Hankin
On Sep 26, 7:26 pm, "Joe Goldthwaite" <[EMAIL PROTECTED]> wrote: > The code gets kind of wordy so I started trying to figure out how to call > them dynamically since the param type is the same as the method the > retrieves it. I came up with this; > > def getValue(trend, param, per): >return t

Re: Test-driven development and code size

2007-09-26 Thread Ben Finney
(Joel, please preserve attribution lines on your quoted material so we can see who wrote it.) Joel Hedlund <[EMAIL PROTECTED]> writes: > My presumption has been that in order to do proper test-driven > development I would have to make enormous test suites covering all > bases for my small hacks b

Re: Packaging and dependencies

2007-09-26 Thread Ben Finney
Steve Holden <[EMAIL PROTECTED]> writes: > Ben Finney wrote: > > So, if fifteen different programs depend on library X, we'd have > > fifteen *separate* installations of library X on the same machine? > > > You need to get your opinions up to date. Fifteen copies of a single > library is nothing i

Re: ~ bit-wise unary operator

2007-09-26 Thread Michal Bozon
cau, maybe int is represented internally as a signed integer you can use numpy types: >>> import numpy >>> ~ numpy.uint16(7978) 57557 -m. On Thu, 27 Sep 2007 00:14:49 +0200, Ladislav Andel wrote: > Hello, > why ~ bit-wise unary operator returns -(x+1) and not bit inversion of > the given in

Re: Delete values from a string using the index

2007-09-26 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > How do I delete or remove values from a list del > or string You can't. Python's strings are immutables. > using the > index. > > If a = [1,2,3,4,5,6,7,8] and I want to get rid of 1 -5, how would I do > that? del a[0:5] print a -- http://mail.python.org/mailman

Re: A question on python performance.

2007-09-26 Thread Bruno Desthuilliers
Joe Goldthwaite a écrit : > Hi everyone, > > I'm a developer who's been using python for a couple of years. I wrote a > fairly large application using it but I was learning the language at the > same time so it most of the code kind of sucks. > > I've learned a lot since then and I've been going

Using closures and partial functions to eliminate redundant code

2007-09-26 Thread Matthew Wilson
I wrote some code to create a user and update a user on a remote box by sending emails to that remote box. When I was done, I realized that my create_user function and my update_user function were effectively identical except for different docstrings and a single different value inside: ### V

Re: Using closures and partial functions to eliminate redundant code

2007-09-26 Thread Paul McGuire
On Sep 26, 9:01 pm, Matthew Wilson <[EMAIL PROTECTED]> wrote: > I wrote some code to create a user and update a user on a remote box by > sending emails to that remote box. When I was done, I realized that my > create_user function and my update_user function were effectively > identical except fo

Re: Tkinter / Tk 8.5

2007-09-26 Thread Scott David Daniels
Michal Bozon wrote: > Today has been released a first beta of Tk 8.5, including a Ttk > (tile) style engine, which makes possible the native look > of widgets on MS platform, without having to install any extension. > > Is there a chance it will be included in 2.5.x, 2.6 or 3.0 ? This is just a g

Re: Using closures and partial functions to eliminate redundant code

2007-09-26 Thread timaranz
On Sep 27, 2:01 pm, Matthew Wilson <[EMAIL PROTECTED]> wrote: > I wrote some code to create a user and update a user on a remote box by > sending emails to that remote box. When I was done, I realized that my > create_user function and my update_user function were effectively > identical except fo

Re: database persistence with mysql, sqlite

2007-09-26 Thread Bryan Olson
Lawrence D'Oliveiro wrote: > In Bryan Olson wrote: > >> coldpizza wrote: >>> It turned out that the method above ('SELECT * FROM TABLE LIMIT L1, >>> L2') works ok both with mysql and sqlite3, therefore I have decided to >>> stick with it until I find something better. With Sqlite3 you are >>> supp

Re: Best way to do attribute docstrings?

2007-09-26 Thread Ken Kuhlman
On Sep 26, 12:25 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Tue, 25 Sep 2007 22:41:31 -0300,KenKuhlman<[EMAIL PROTECTED]> > escribi?: > > > Replying to myself in case someone finds this interesting. > > > Anyway, I took another shot at this with a little fresher mind, and it > > was qu

Re: scope, modyfing outside object from inside the method

2007-09-26 Thread Gabriel Genellina
En Wed, 26 Sep 2007 10:39:22 -0300, Marcin Stępnicki <[EMAIL PROTECTED]> escribi�: > At first glance (before adding id()) it's a little bit weird. The > original > object was supposedly "overwritten", but as one can see it has different > id then the new one. mystruct still holds references to

Re: Asynchronous Messaging

2007-09-26 Thread wink
Fredrik, You are most correct, but Queue is slow compared to deque but not for the reason I guessed. Apparently it's because deque is implemented in C while Queue is in python. Using the program below it looks there is about a 35:1 speed difference. 100 d.append 0.11s 0.1097us p

Re: ~ bit-wise unary operator

2007-09-26 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Hrvoje Niksic wrote: > If you want 16-bit unsigned arithmetic, use 2**16 + ~a, which yields > 57557. Or why not use "0x ^ a", which returns the same thing. -- http://mail.python.org/mailman/listinfo/python-list

Re: database persistence with mysql, sqlite

2007-09-26 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Bryan Olson wrote: > Lawrence D'Oliveiro wrote: >> In Bryan Olson wrote: >> >>> coldpizza wrote: It turned out that the method above ('SELECT * FROM TABLE LIMIT L1, L2') works ok both with mysql and sqlite3, therefore I have decided to stick with it

How do I get the value out of a DOM Element

2007-09-26 Thread kj7ny
I have been able to get xml.dom.minidom.parse('somefile.xml') and then dom.getElementsByTagName('LLobjectID') to work to the point where I get something like: [] which I can get down to but then I can't find any way to just get the value out from the thing! .toxml() returns something like: u''.

Re: Delete values from a string using the index

2007-09-26 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > How do I delete or remove values from a list or string using the > index. Note you can't do it with a string, since that's not mutable. -- http://mail.python.org/mailman/listinfo/python-list

Re: Using closures and partial functions to eliminate redundant code

2007-09-26 Thread Gabriel Genellina
En Wed, 26 Sep 2007 23:01:17 -0300, Matthew Wilson <[EMAIL PROTECTED]> escribi�: > I wrote some code to create a user and update a user on a remote box by > sending emails to that remote box. When I was done, I realized that my > create_user function and my update_user function were effectively

Re: database persistence with mysql, sqlite

2007-09-26 Thread Bryan Olson
Lawrence D'Oliveiro wrote: > Bryan Olson wrote: > >> Lawrence D'Oliveiro wrote: >>> In Bryan Olson wrote: >>> coldpizza wrote: > It turned out that the method above ('SELECT * FROM TABLE LIMIT L1, > L2') works ok both with mysql and sqlite3, therefore I have decided to > stick wit

Re: Python class method as an argument of a function in a C extension

2007-09-26 Thread mauro
On 26 Set, 19:00, Matimus <[EMAIL PROTECTED]> wrote: > > Can anybody give me an hint (or some link) on how to define > > 'aCFunction' and how to call 'self.myMethod' in the C source code? > > A python function defined in C accepts a pointer to self and a tuple > of arguments, each of which is also

Re: Asynchronous Messaging

2007-09-26 Thread Gabriel Genellina
En Thu, 27 Sep 2007 01:43:32 -0300, wink <[EMAIL PROTECTED]> escribi�: > You are most correct, but Queue is slow compared to deque but > not for the reason I guessed. Apparently it's because deque is > implemented in C while Queue is in python. Using the program below > it looks there is about a 3

Re: ~ bit-wise unary operator

2007-09-26 Thread Ladislav Andel
Wow, so many answers :). Thank you, guys :). Lada Michal Bozon wrote: > cau, > maybe int is represented internally as a signed integer > > you can use numpy types: > > import numpy ~ numpy.uint16(7978) > 57557 > > -m. > > > On Thu, 27 Sep 2007 00:14:49 +0200, Ladislav

Re: Google and Python

2007-09-26 Thread Hendrik van Rooyen
"Nick Craig-Wood" wrote: > Hendrik van Rooyen wrote: > > "Paul Rubin" wrote: > > > > > "Hendrik van Rooyen" writes: > > Ok got it - so instead of starting a thread, as is current practice, you fork > > a process (possibly on another machine) and "hand over" the clie

Re: sorteddict PEP proposal [started off as orderedict]

2007-09-26 Thread Antoon Pardon
On 2007-09-26, Mark Summerfield <[EMAIL PROTECTED]> wrote: > On 26 Sep, 13:22, Antoon Pardon <[EMAIL PROTECTED]> wrote: >> >> Well you should decide what you want. In a previous exchange one of the >> things that was wanted was that you could already seed a tree by using >> key word arguments so th

<    1   2