Re: is there a way to access postgresql in python3.0rc1

2008-10-29 Thread davy zhang
thanks, I'll wait a month and see, in the mean time I can use 2.x for my prototyping, hope python3.0 final can drop a nuke on the ground :D On Thu, Oct 30, 2008 at 12:31 PM, Steve Holden <[EMAIL PROTECTED]> wrote: > Terry Reedy wrote: >> davy zhang wrote: >>> I'm currently on a project, it could

Re: beutifulsoup

2008-10-29 Thread Kay Schluehr
On 29 Okt., 17:45, luca72 <[EMAIL PROTECTED]> wrote: > Hello > I try to use beautifulsoup > i have this: > sito = urllib.urlopen('http://www.prova.com/') > esamino = BeautifulSoup(sito) > luca = esamino.findAll('tr', align='center') > > print luca[0] > > >> >>href="#">#144.4MB >>align="left"> Pc-pr

Re: beutifulsoup

2008-10-29 Thread Stefan Behnel
Peter Pearson wrote: > Like you, I struggle with BeautifulSoup Well, there's always lxml.html if you need it. http://codespeak.net/lxml/ Stefan -- http://mail.python.org/mailman/listinfo/python-list

How to open a shell prompt from an existing shell prompt

2008-10-29 Thread gaurav kashyap
Dear all. On windows platform python 2.4,i can use os.startfile("filename") to execute a file on a new command prompt but on unix platform and python 2.3 what is the alternate for executing a file like above in a new shell prompt -- http://mail.python.org/mailman/listinfo/python-list

Re: Why gives "k = 09" a syntax error ?

2008-10-29 Thread Terry Reedy
Mensanator wrote: On Oct 29, 4:17�pm, [EMAIL PROTECTED] (Cameron Laird) wrote: I contest that; my observation is that it's entirely an artifact of legacy software, Really? Don't they still use octal for this stuff? $ ls -l total 1717 -r-xr-x---+ 1 mensanator Users 57 Mar 29 2008 Cygwin

Re: Fastest way to convert sql result into a dict or list ?

2008-10-29 Thread Steve Holden
[EMAIL PROTECTED] wrote: > Hello, > > I'm trying to find the fastest way to convert an sql result into a > dict or list. > What i mean, for example: > my sql result: > contact_id, field_id, field_name, value > sql_result=[[1, 1, 'address', 'something street'], > [1, 2, 'telnumber'

Re: Finding the instance reference of an object

2008-10-29 Thread Steve Holden
Joe Strout wrote: > On Oct 29, 2008, at 4:52 PM, Fuzzyman wrote: > >> You're pretty straightforwardly wrong. In Python the 'value' of a >> variable is not the reference itself. > > That's the misconception that is leading some folks around here into > tangled nots of twisty mislogic, ultimately c

Re: how to use logging module to log an object like print()

2008-10-29 Thread Steve Holden
Diez B. Roggisch wrote: > Steve Holden schrieb: >> Diez B. Roggisch wrote: >>> davy zhang schrieb: mport logging import pickle # create logger logger = logging.getLogger("simple_example") logger.setLevel(logging.DEBUG) # create console handler and set level t

Re: Why gives "k = 09" a syntax error ?

2008-10-29 Thread Steve Holden
Cameron Laird wrote: > In article <[EMAIL PROTECTED]>, > Mensanator <[EMAIL PROTECTED]> wrote: >> On Oct 29, 2:44 pm, Stef Mientki <[EMAIL PROTECTED]> wrote: >>> Guilherme Polo wrote: On 10/29/08, Stef Mientki <[EMAIL PROTECTED]> wrote: > hello, > Why gives "k = 09" a syntax error ?

Re: Why gives "k = 09" a syntax error ?

2008-10-29 Thread Mensanator
On Oct 29, 4:17�pm, [EMAIL PROTECTED] (Cameron Laird) wrote: > In article <[EMAIL PROTECTED]>, > > > > Mensanator �<[EMAIL PROTECTED]> wrote: > >On Oct 29, 2:44�pm, Stef Mientki <[EMAIL PROTECTED]> wrote: > >> Guilherme Polo wrote: > >> > On 10/29/08, Stef Mientki <[EMAIL PROTECTED]> wrote: > > >>

Re: is there a way to access postgresql in python3.0rc1

2008-10-29 Thread Steve Holden
Terry Reedy wrote: > davy zhang wrote: >> I'm currently on a project, it could last for at least 1 or 2 years. >> so I choose python3 as server side programing language. >> All I found on are python2.x ready libraries, Is there any library is >> python3.0 ready? or just under alpha ,beta or someth

Re: how to use logging module to log an object like print()

2008-10-29 Thread Steve Holden
[EMAIL PROTECTED] wrote: > On 29 Ott, 12:24, Steve Holden <[EMAIL PROTECTED]> wrote: >> Diez B. Roggisch wrote: >>> davy zhang schrieb: mport logging import pickle # create logger logger = logging.getLogger("simple_example") logger.setLevel(logging.DEBUG) # create cons

Re: [Novice]Installing eric4 with python 2.6

2008-10-29 Thread Steve Holden
Saurabh Agrawal wrote: > > PyQt supported Python 2.6 on the day it was released. > > A snapshot of the PyQt Windows installer for Python 2.6 can be > downloaded > from the same page as you downloaded the installer for Python 2.5. > > Phil > -- >

Re: Improving interpreter startup speed

2008-10-29 Thread Steve Holden
BJörn Lindqvist wrote: > 2008/10/27 James Mills <[EMAIL PROTECTED]>: >> On Mon, Oct 27, 2008 at 5:40 PM, David Cournapeau <[EMAIL PROTECTED]> wrote: >>> Depends on the tool: build tool and source control tools are example >>> it matters (specially when you start interfaciing them with IDE or >>> ed

Regarding shared memory

2008-10-29 Thread gaurav kashyap
Dear all, I have a server program that listens to a particular port and a number of client programs that connect to the server. Now i want to put some data in form of python list in main memory on server.Hence whenver a client program is run it connects to the server and access the data in main m

download image from flickr.com

2008-10-29 Thread He Jibo
Dear Pythoners, Could you please help me look at a code, which is to download image from flickr.com? I wish to download images from flickr.com automatically. You can get the code at http://cid-bbc15003189d7799.skydrive.live.com/self.aspx/Public/FImageCrawl.py. There is still some problem with the

Re: set/dict comp in Py2.6

2008-10-29 Thread Benjamin
On Oct 27, 3:38 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Sat, 25 Oct 2008 23:44:46 -0200, Benjamin <[EMAIL PROTECTED]>   > escribió: > > > On Oct 25, 3:13 am, [EMAIL PROTECTED] wrote: > >> I'd like to know why Python 2.6 doesn't have the syntax to create sets/ > >> dicts of Python 3.

Need some help speeding up this loop

2008-10-29 Thread erikcw
Hi all, I'm trying to write a loop that will build a list of "template strings". My current implementation is *really slow*. It took 15 minutes to finish. (final len(list) was about 16k entries.) #combinations = 12 small template strings ie "{{ city }}, {{ state }}..." #states = either a django

Earn 5000$ To 10000$ In every Month.

2008-10-29 Thread chinu
hai, i am srinu from india. i am sending a blog url for yours use. Right side Of The Blog Awsurvey Banner will appear. click on the banner and get a free signup with 6$ bonus and you will get more surveys. once you have completed one survey you will get minimem 4$ and more left side of the blog

Re: math equation, svg and matplotlib

2008-10-29 Thread André
On Oct 29, 6:34 pm, kib2 <[EMAIL PROTECTED]> wrote: > André a écrit : > > > Would anyone have a "quick and dirty" code sample to create an svg > > output of a sample math equation using matplotlib? > > > André > > Hi André, > > maybe that's not what you want be there's something like this here (a >

Re: guenstige kredite

2008-10-29 Thread [EMAIL PROTECTED]
http://www.officeformac.com/ProductForums/WindowsMediaPlayerMac/275 - kredit ohne schufa ohne kredit ohne schufa ohne vorkosten http://www.officeformac.com/ProductForums/WindowsMediaPlayerMac/275 - kredit ohne schufa ohne kredit ohne schufa ohne vorkosten http://www.officeformac.com/ProductForums/W

Re: Graphical object browser

2008-10-29 Thread Jason
Hooray! I discovered PyCrust. I made this script (for Linux - under Win, you could just have all but the first line as a python file and run it directly): #!/usr/bin/python import wx import wx.py.PyCrust if __name__ == '__main__' : app = wx.App() pc = wx.py.PyCrust.App(app) pc.MainLoo

Re: Finding the instance reference of an object

2008-10-29 Thread Joe Strout
On Oct 29, 2008, at 4:52 PM, Fuzzyman wrote: You're pretty straightforwardly wrong. In Python the 'value' of a variable is not the reference itself. That's the misconception that is leading some folks around here into tangled nots of twisty mislogic, ultimately causing them to make up new

Re: Filter function and lists

2008-10-29 Thread Mensanator
On Oct 29, 4:28 pm, Terry Reedy <[EMAIL PROTECTED]> wrote: > John Townsend wrote: > > I’m trying to figure out how to use filter to walk through a list. > > > If I try a simple scripts like this: > > > def greaterthanten (number): > >                 #pdb.set_trace() > >                 if (number

Re: Why gives "k = 09" a syntax error ?

2008-10-29 Thread Terry Reedy
Mensanator wrote: On Oct 29, 4:25 pm, Terry Reedy <[EMAIL PROTECTED]> wrote: Stef Mientki wrote: hello, Why gives "k = 09" a syntax error ? You have gotten the 2.x answer. In 3.0, 0b,0o,0x prefixes are valid and required for binary, octal, and hexadecimal literals. 0digits is invalid. exc

Re: Finding the instance reference of an object

2008-10-29 Thread Steven D'Aprano
On Wed, 29 Oct 2008 08:27:07 -0700, Dale Roberts wrote: > On Oct 28, 11:59 am, Joe Strout <[EMAIL PROTECTED]> wrote: >> ... >> >> There are only the two cases, which Greg quite succinctly and >> accurately described above.  One is by value, the other is by >> reference.  Python quite clearly uses

Re: how to get the thighest bit position in big integers?

2008-10-29 Thread Terry Reedy
Mensanator wrote: You would think when you add a new function, you would also add it's documentation, but maybe that was an oversight. I don't have 3.0, but maybe it can be found in that set of docs. 3.0c1 >>> help(bin) Help on built-in function bin in module builtins: bin(...) bin(number)

Re: Finding the instance reference of an object

2008-10-29 Thread Fuzzyman
On Oct 28, 3:59 pm, Joe Strout <[EMAIL PROTECTED]> wrote: > On Oct 27, 2008, at 11:28 PM, Gabriel Genellina wrote: > > > > > En Tue, 28 Oct 2008 00:58:10 -0200, greg   > > <[EMAIL PROTECTED]> escribió: > > >> Let's look at the definitions of the terms: > > >> (1) Call by value: The actual parameter

Re: 2.6, 3.0, and truly independent intepreters

2008-10-29 Thread Patrick Stinson
If you are dealing with "lots" of data like in video or sound editing, you would just keep the data in shared memory and send the reference over IPC to the worker process. Otherwise, if you marshal and send you are looking at a temporary doubling of the memory footprint of your app because the data

Re: beutifulsoup

2008-10-29 Thread Peter Pearson
On Wed, 29 Oct 2008 09:45:31 -0700 (PDT), luca72 <[EMAIL PROTECTED]> wrote: > Hello > I try to use beautifulsoup > i have this: > sito = urllib.urlopen('http://www.prova.com/') > esamino = BeautifulSoup(sito) > luca = esamino.findAll('tr', align='center') > > print luca[0] > [The following long str

Re: free IDE with removing import and refactoring

2008-10-29 Thread Fabio Zadrozny
> I am looking for a python IDE which can remove my unused imports, and > can do basic refactoring under windows. If you have Pydev Extensions, it analyzes your source for undefined tokens and is able to make the imports for you (but it doesn't remove the unused imports... especially because this

Re: Why gives "k = 09" a syntax error ?

2008-10-29 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Mensanator <[EMAIL PROTECTED]> wrote: >On Oct 29, 2:44 pm, Stef Mientki <[EMAIL PROTECTED]> wrote: >> Guilherme Polo wrote: >> > On 10/29/08, Stef Mientki <[EMAIL PROTECTED]> wrote: >> >> >> hello, >> >> >>  Why gives "k = 09"  a syntax error ? >> >> > 09 is not a v

Re: How to Implement an XMLRPC Server in Python?

2008-10-29 Thread Zix
On Oct 29, 11:26 pm, "Daniel Fetchinson" <[EMAIL PROTECTED]> wrote: > These pages might be useful, they include example code: Thanks Daniel, they do help. On Oct 29, 11:42 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: > Why did you decide to "expose" a web service through xmlrpc instead of > ac

Re: Finding the instance reference of an object

2008-10-29 Thread Chuckk Hubbard
On Wed, Oct 29, 2008 at 5:27 PM, Dale Roberts <[EMAIL PROTECTED]> wrote: > Don't you know? There is really only *ONE* case, and, you are right, > it is Pass By Value. There is no such thing as Pass By Reference at > the physical CPU level at all, right? If there is, show it to me. Pass > By Referen

Re: Why gives "k = 09" a syntax error ?

2008-10-29 Thread Robert Kern
Mensanator wrote: On Oct 29, 4:25 pm, Terry Reedy <[EMAIL PROTECTED]> wrote: Stef Mientki wrote: hello, Why gives "k = 09" a syntax error ? You have gotten the 2.x answer. In 3.0, 0b,0o,0x prefixes are valid and required for binary, octal, and hexadecimal literals. 0digits is invalid. tjr

Re: Why gives "k = 09" a syntax error ?

2008-10-29 Thread Mensanator
On Oct 29, 4:25 pm, Terry Reedy <[EMAIL PROTECTED]> wrote: > Stef Mientki wrote: > > hello, > > > Why gives "k = 09"  a syntax error ? > > You have gotten the 2.x answer.  In 3.0, 0b,0o,0x prefixes are valid and > required for binary, octal, and hexadecimal literals.  0digits is invalid. > > tjr I

Re: how to get the thighest bit position in big integers?

2008-10-29 Thread Mensanator
On Oct 29, 4:16 pm, Glenn Linderman <[EMAIL PROTECTED]> wrote: > On approximately 10/29/2008 11:51 AM, came the following characters from > the keyboard of Mensanator: > > > or in 2.6 > > > print 'highest bit position: %d' % (len(bin(3328)[2:])-1) > > > highest bit position: 11 > > This works, but

Re: math equation, svg and matplotlib

2008-10-29 Thread kib2
André a écrit : Would anyone have a "quick and dirty" code sample to create an svg output of a sample math equation using matplotlib? André Hi André, maybe that's not what you want be there's something like this here (a converter from DVI to SVG in pure Python), look at the samples at the bo

Re: project in python

2008-10-29 Thread Terry Reedy
asit wrote: On Oct 28, 10:02 am, alex23 <[EMAIL PROTECTED]> wrote: On Oct 26, 2:51 am, Stefan Behnel <[EMAIL PROTECTED]> wrote: The more you spam people with your repetitive postings, the less likely it becomes that they are willing to answer you. In asit's defence, the Google Groups interfac

Re: Filter function and lists

2008-10-29 Thread Terry Reedy
John Townsend wrote: I’m trying to figure out how to use filter to walk through a list. If I try a simple scripts like this: def greaterthanten (number): #pdb.set_trace() if (number > 10): ret_val = 1

win32pipe.popen4 howto example

2008-10-29 Thread yaipa
trying to remind myself that running a subprocess under Win32 isn't a pain in the ass... ];^) ### #!/usr/bin/env python ''' original author credits: chris levis original sources found: http://mail.python.org/pipermail/python-list/2

Re: Why gives "k = 09" a syntax error ?

2008-10-29 Thread Terry Reedy
Stef Mientki wrote: hello, Why gives "k = 09" a syntax error ? You have gotten the 2.x answer. In 3.0, 0b,0o,0x prefixes are valid and required for binary, octal, and hexadecimal literals. 0digits is invalid. tjr -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Regex Question

2008-10-29 Thread Terry Reedy
MalteseUnderdog wrote: Hi there I just started python (but this question isn't that trivial since I couldn't find it in google :) ) I have the following text file entries (simplified) start #frag 1 start x=Dog # frag 1 end stop start# frag 2 start x=Cat # frag 2 end stop start #fra

Re: project in python

2008-10-29 Thread asit
On Oct 28, 10:02 am, alex23 <[EMAIL PROTECTED]> wrote: > On Oct 26, 2:51 am, Stefan Behnel <[EMAIL PROTECTED]> wrote: > > > The more you spam people with your repetitive postings, the less likely it > > becomes that they are willing to answer you. > > In asit's defence, the Google Groups interface

Re: Python/Numeric users be aware!

2008-10-29 Thread Robert Kern
Benyang Tang wrote: I also found that the a[5:] problem is Python version dependent. On a 64-bit linux, of the following combinations I have tried, only the first one has the problem. The other two are ok. * Python 2.5.1 and Numeric 24.2 * Python 2.4.5 and Numeric 24.2 * Python 2.3.7 and Numeric

Re: Python suitable for Midi ?

2008-10-29 Thread J Kenneth King
Derek Martin <[EMAIL PROTECTED]> writes: > On Tue, Oct 28, 2008 at 06:54:57PM +0200, Chuckk Hubbard wrote: >> The problem I've run into is that I can't set the audio to a higher >> priority than the GUI (Tkinter). If I move the mouse over the app, no >> matter what, I get audio dropouts. AFAICT

Re: Why gives "k = 09" a syntax error ?

2008-10-29 Thread Andrii V. Mishkovskyi
2008/10/29 Stef Mientki <[EMAIL PROTECTED]>: > hello, > > Why gives "k = 09" a syntax error ? Because leading zero means that the number is octal, and there is no 9 among octal digits. :) > > thanks, > Stef Mientki > -- > http://mail.python.org/mailman/listinfo/python-list > -- Wbr, Andrii M

Re: Dot operator magic has me stymied...

2008-10-29 Thread Arnaud Delobelle
On Oct 29, 7:46 pm, "Casey Rodarmor" <[EMAIL PROTECTED]> wrote: > Hi All, > > I'm trying to use a class as a decorator for another class method, but > it's giving me a lot of grief. Basically, my problem is with the > example below: > > >>> class decorator: > > ...     def __init__(self, function):

Re: How to Implement an XMLRPC Server in Python?

2008-10-29 Thread Diez B. Roggisch
Guilherme Polo schrieb: On 10/29/08, Zix <[EMAIL PROTECTED]> wrote: Hello, I am a newbie to python and trying to get a hang of some of its advanced features through an application I am building. Basically, I'd like to build a weather forecasting web service. The clients should be able to que

Re: Why gives "k = 09" a syntax error ?

2008-10-29 Thread Diez B. Roggisch
Stef Mientki schrieb: hello, Why gives "k = 09" a syntax error ? because numbers starting with 0 are an octal value, allowing only the literals 0-7. Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: 2.6, 3.0, and truly independent intepreters

2008-10-29 Thread Rhamphoryncus
On Oct 29, 7:20 am, Paul Boddie <[EMAIL PROTECTED]> wrote: > On 28 Okt, 21:03, Rhamphoryncus <[EMAIL PROTECTED]> wrote: > > > * get a short-term bodge that works, like hacking the 3rd party > > library to use your shared-memory allocator.  Should be far less work > > than hacking all of CPython. >

Dot operator magic has me stymied...

2008-10-29 Thread Casey Rodarmor
Hi All, I'm trying to use a class as a decorator for another class method, but it's giving me a lot of grief. Basically, my problem is with the example below: >>> class decorator: ... def __init__(self, function): ... self.function = function ... ... def __call__(self, *args, **kw

Re: Why gives "k = 09" a syntax error ?

2008-10-29 Thread Mensanator
On Oct 29, 2:44 pm, Stef Mientki <[EMAIL PROTECTED]> wrote: > Guilherme Polo wrote: > > On 10/29/08, Stef Mientki <[EMAIL PROTECTED]> wrote: > > >> hello, > > >>  Why gives "k = 09"  a syntax error ? > > > 09 is not a valid octal number. Instead use 011. > > > Ok, I guess you were not aware that pr

Re: Python/Numeric users be aware!

2008-10-29 Thread Benyang Tang
I also found that the a[5:] problem is Python version dependent. On a 64-bit linux, of the following combinations I have tried, only the first one has the problem. The other two are ok. * Python 2.5.1 and Numeric 24.2 * Python 2.4.5 and Numeric 24.2 * Python 2.3.7 and Numeric 24.2 On Oct 29, 10:5

Filter function and lists

2008-10-29 Thread John Townsend
I'm trying to figure out how to use filter to walk through a list. If I try a simple scripts like this: def greaterthanten (number): #pdb.set_trace() if (number > 10): ret_val = 1 else:

Re: Why gives "k = 09" a syntax error ?

2008-10-29 Thread Stef Mientki
Guilherme Polo wrote: On 10/29/08, Stef Mientki <[EMAIL PROTECTED]> wrote: hello, Why gives "k = 09" a syntax error ? 09 is not a valid octal number. Instead use 011. Ok, I guess you were not aware that prefixing a number with a '0' would cause python to parse it as an octal and n

Re: Python Regex Question

2008-10-29 Thread Arnaud Delobelle
On Oct 29, 7:01 pm, Tim Chase <[EMAIL PROTECTED]> wrote: > > I need a regex expression which returns the start to the x=ANIMAL for > > only the x=Dog fragments so all my entries should be start ... > > (something here) ... x=Dog .  So I am really interested in fragments 1 > > and 3 only. > > > My i

Re: Why gives "k = 09" a syntax error ?

2008-10-29 Thread Guilherme Polo
On 10/29/08, Stef Mientki <[EMAIL PROTECTED]> wrote: > hello, > > Why gives "k = 09" a syntax error ? > 09 is not a valid octal number. Instead use 011. Ok, I guess you were not aware that prefixing a number with a '0' would cause python to parse it as an octal and now you know. > thanks, >

Why gives "k = 09" a syntax error ?

2008-10-29 Thread Stef Mientki
hello, Why gives "k = 09" a syntax error ? thanks, Stef Mientki -- http://mail.python.org/mailman/listinfo/python-list

Re: how to use logging module to log an object like print()

2008-10-29 Thread Diez B. Roggisch
Steve Holden schrieb: Diez B. Roggisch wrote: davy zhang schrieb: mport logging import pickle # create logger logger = logging.getLogger("simple_example") logger.setLevel(logging.DEBUG) # create console handler and set level to debug ch = logging.StreamHandler() ch.setLevel(logging.DEBUG) # c

Re: parsing MS word docs -- tutorial request

2008-10-29 Thread bp . tralfamadore
Thanks everyone -- very helpful! I really appreciate your help -- that is what makes the world a wonderful place. peace. ::bp:: -- http://mail.python.org/mailman/listinfo/python-list

Re: Default Argument Question

2008-10-29 Thread Benjamin Kaplan
On Wed, Oct 29, 2008 at 12:44 PM, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Chris Rebert a écrit : > (snip) > >> Note that the "accumulation" behavior of lists is considered an >> aberration >> > > By who ? > All the python newbies who don't read the tutorial and get tripped up by this.

Re: parsing MS word docs -- tutorial request

2008-10-29 Thread Terry Reedy
Kay Schluehr wrote: On 28 Okt., 15:25, [EMAIL PROTECTED] wrote: All, I am trying to write a script that will parse and extract data from a MS Word document. Can / would anyone refer me to a tutorial on how to do that? (perhaps from tables). I am aware of, and have downloaded the pywin32 exte

math equation, svg and matplotlib

2008-10-29 Thread André
Would anyone have a "quick and dirty" code sample to create an svg output of a sample math equation using matplotlib? André -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Regex Question

2008-10-29 Thread Tim Chase
I need a regex expression which returns the start to the x=ANIMAL for only the x=Dog fragments so all my entries should be start ... (something here) ... x=Dog . So I am really interested in fragments 1 and 3 only. My idea (primitive) ^start.*?x=Dog doesn't work because clearly it would return r

Re: is there a way to access postgresql in python3.0rc1

2008-10-29 Thread Terry Reedy
davy zhang wrote: I'm currently on a project, it could last for at least 1 or 2 years. so I choose python3 as server side programing language. All I found on are python2.x ready libraries, Is there any library is python3.0 ready? or just under alpha ,beta or something, I don't much features, jus

Re: how to get the thighest bit position in big integers?

2008-10-29 Thread Mensanator
On Oct 29, 1:26 am, Nick Mellor <[EMAIL PROTECTED]> wrote: > On Oct 6, 3:40 am, Gary Herron <[EMAIL PROTECTED]> wrote: > > > > > > > [EMAIL PROTECTED] wrote: > > > Hi, > > > > I'm using python to develop some proof-of-concept code for a > > > cryptographic application. My code makes extended use of

Re: Is ctypes appropriate in my case?

2008-10-29 Thread Terry Reedy
[EMAIL PROTECTED] wrote: Hi, I've a dll and its header file that controls an hardware. I want to write a wrapper for this dll in Python. What is the best way that I can write a wrapper? What do you want to do with the wrapper? I know ctypes modules and have used it before. As far as I know

Re: How to get an object's name as a string?

2008-10-29 Thread Duncan Booth
Steve Holden <[EMAIL PROTECTED]> wrote: >> That explanation makes no sense. Given the assignment: >> >> x = 57 >> >> if the name of x isn't 'x', then what on earth can it possibly mean to >> ask for the name of a variable? >> > He didn't ask for the name of a variable, he asked for the name of

Re: Python/Numeric users be aware!

2008-10-29 Thread Kirk Strauser
At 2008-10-29T17:53:43Z, Benyang <[EMAIL PROTECTED]> writes: > It is totally screwed up on 64-bit linux machines: > [1 1 1 1 1 1 1 1 1 1] And on 64-bit FreeBSD machines. -- Kirk Strauser The Day Companies -- http://mail.python.org/mailman/listinfo/python-list

Re: How to Implement an XMLRPC Server in Python?

2008-10-29 Thread Guilherme Polo
On 10/29/08, Zix <[EMAIL PROTECTED]> wrote: > Hello, > I am a newbie to python and trying to get a hang of some of its > advanced features through an application I am building. Basically, I'd > like to build a weather forecasting web service. The clients should be > able to query the service wi

Re: free IDE with removing import and refactoring

2008-10-29 Thread Stef Mientki
pihentagy wrote: Hi! I am looking for a python IDE which can remove my unused imports, is that possible in a language like Python ? I can imagine the opposite, importing those things that are necessary. and can do basic refactoring under windows. What kind of refactoring do you think of ?

Python Regex Question

2008-10-29 Thread MalteseUnderdog
Hi there I just started python (but this question isn't that trivial since I couldn't find it in google :) ) I have the following text file entries (simplified) start #frag 1 start x=Dog # frag 1 end stop start# frag 2 start x=Cat # frag 2 end stop start #frag 3 start x=Dog #frag 3

Re: How to Implement an XMLRPC Server in Python?

2008-10-29 Thread Daniel Fetchinson
On 10/29/08, Zix <[EMAIL PROTECTED]> wrote: > Hello, > I am a newbie to python and trying to get a hang of some of its > advanced features through an application I am building. Basically, I'd > like to build a weather forecasting web service. The clients should be > able to query the service with a

Re: Python/Numeric users be aware!

2008-10-29 Thread Jerry Hill
On Wed, Oct 29, 2008 at 1:53 PM, Benyang <[EMAIL PROTECTED]> wrote: > The Python version is 2.5.1, and Numeric is the latest version 24.2. While 24.2 is the latest version of Numeric, it's also three years old and no longer supported. From http://numpy.scipy.org/ - "Numeric was the first arrayobj

Re: Python/Numeric users be aware!

2008-10-29 Thread Carl
Confirmed Benyang wrote: Maybe it has been reported somewhere, but it is a big surprise to me. # Try the following: import Numeric a = Numeric.ones(10) a[5:] = -1 print a It works correctly on 32-bit linux machines and on 32-bit Windows XP: [ 1 1 1 1 1 -1 -1 -1 -1 -1] It is totally screwe

Re: Amharic Question Answering

2008-10-29 Thread Terry Reedy
seid muhie wrote: Dear All I am new to Python. Am new to NLP(NAtural LAnguage Processing) too. But take the initiation to develop Autamatic Amharic Question Answering as part of my MSc. degree partial fuflfilment thesis work. Please excuse my ignorance, but is an Amharic QA system different

Python/Numeric users be aware!

2008-10-29 Thread Benyang
Maybe it has been reported somewhere, but it is a big surprise to me. # Try the following: import Numeric a = Numeric.ones(10) a[5:] = -1 print a It works correctly on 32-bit linux machines and on 32-bit Windows XP: [ 1 1 1 1 1 -1 -1 -1 -1 -1] It is totally screwed up on 64-bit linux machine

Re: parsing MS word docs -- tutorial request

2008-10-29 Thread Kay Schluehr
On 28 Okt., 15:25, [EMAIL PROTECTED] wrote: > All, > > I am trying to write a script that will parse and extract data from a > MS Word document.  Can / would anyone refer me to a tutorial on how to > do that?  (perhaps from tables).  I am aware of, and have downloaded > the pywin32 extensions, but

Re: error estimation in a non-linear least squares fitting

2008-10-29 Thread Evelien
Ok, then I have to look into scipy.odr to see how it can help me move forward. Thanks Robert! Evelien -- http://mail.python.org/mailman/listinfo/python-list

Re: [Novice]Installing eric4 with python 2.6

2008-10-29 Thread Saurabh Agrawal
> > > PyQt supported Python 2.6 on the day it was released. > > A snapshot of the PyQt Windows installer for Python 2.6 can be downloaded > from the same page as you downloaded the installer for Python 2.5. > > Phil > -- > > Thanks Phil, it w

How to Implement an XMLRPC Server in Python?

2008-10-29 Thread Zix
Hello, I am a newbie to python and trying to get a hang of some of its advanced features through an application I am building. Basically, I'd like to build a weather forecasting web service. The clients should be able to query the service with a location and date and get back the weather forecast.

RE: parsing MS word docs -- tutorial request

2008-10-29 Thread Reedick, Andrew
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of > [EMAIL PROTECTED] > Sent: Tuesday, October 28, 2008 10:26 AM > To: python-list@python.org > Subject: parsing MS word docs -- tutorial request > > All, > > I am trying to write a script that w

beutifulsoup

2008-10-29 Thread luca72
Hello I try to use beautifulsoup i have this: sito = urllib.urlopen('http://www.prova.com/') esamino = BeautifulSoup(sito) luca = esamino.findAll('tr', align='center') print luca[0] >>>href="#">#144.4MB>align="left"> Pc-prova.rar I need to get the following information: 1)Only|G|BoT|05 2)#1 3)4

Re: Default Argument Question

2008-10-29 Thread Bruno Desthuilliers
Chris Rebert a écrit : (snip) Note that the "accumulation" behavior of lists is considered an aberration By who ? -- http://mail.python.org/mailman/listinfo/python-list

Re: Default Argument Question

2008-10-29 Thread Bruno Desthuilliers
Paulo J. Matos a écrit : Hi all, Going through the tutorial brought up a question. Consider the functions: def f(a, L=[]): L.append(a) return L print f(3) print f(9) print f(7) def f1(i = 0): i = i + 1 print i f1() f1() f1() f1() Since the f accumulates the values in L, I wa

Re: Default Argument Question

2008-10-29 Thread Chris Rebert
On Wed, Oct 29, 2008 at 9:14 AM, Paulo J. Matos <[EMAIL PROTECTED]> wrote: > Hi all, > > Going through the tutorial brought up a question. Consider the functions: > > def f(a, L=[]): >L.append(a) >return L > > print f(3) > print f(9) > print f(7) > > def f1(i = 0): >i = i + 1 >print

Default Argument Question

2008-10-29 Thread Paulo J. Matos
Hi all, Going through the tutorial brought up a question. Consider the functions: def f(a, L=[]): L.append(a) return L print f(3) print f(9) print f(7) def f1(i = 0): i = i + 1 print i f1() f1() f1() f1() Since the f accumulates the values in L, I was expecting to see i printi

Re: how to use logging module to log an object like print()

2008-10-29 Thread bieffe62
On 29 Ott, 12:24, Steve Holden <[EMAIL PROTECTED]> wrote: > Diez B. Roggisch wrote: > > davy zhang schrieb: > >> mport logging > >> import pickle > > >> # create logger > >> logger = logging.getLogger("simple_example") > >> logger.setLevel(logging.DEBUG) > >> # create console handler and set level

Re: Improving interpreter startup speed

2008-10-29 Thread Michael
Tried using the precache daemon to see if it gives any boost? -- http://mail.python.org/mailman/listinfo/python-list

Re: Finding the instance reference of an object

2008-10-29 Thread Dale Roberts
On Oct 28, 11:59 am, Joe Strout <[EMAIL PROTECTED]> wrote: > ... > > There are only the two cases, which Greg quite succinctly and   > accurately described above.  One is by value, the other is by   > reference.  Python quite clearly uses by value.  Parameters are   > expressions that are evaluated

Re: Python memory usage

2008-10-29 Thread bieffe62
On 21 Ott, 17:19, Rolf Wester <[EMAIL PROTECTED]> wrote: > Hi, > > I have the problem that with long running Python scripts (many loops) > memory consumption increases until the script crashes. I used the > following small script to understand what might happen: > > import gc > > print len(gc.get_o

Re: Fastest way to convert sql result into a dict or list ?

2008-10-29 Thread alex23
On Oct 29, 9:35 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I'm trying to find the fastest way to convert an sql result into a > dict or list. >>> from collections import defaultdict >>> results = defaultdict(defaultdict) >>> for contact_id, field_id, field_name, value in sql_

Re: Python memory usage

2008-10-29 Thread David Cournapeau
On Wed, Oct 29, 2008 at 6:56 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > On Oct 21, 5:19 pm, Rolf Wester <[EMAIL PROTECTED]> wrote: >> Hi, >> >> I have the problem that with long running Python scripts (many loops) >> memory consumption increases until the script crashes. I used the >> follo

Re: Fastest way to convert sql result into a dict or list ?

2008-10-29 Thread Peter Otten
[EMAIL PROTECTED] wrote: > Hello, > > I'm trying to find the fastest way to convert an sql result into a > dict or list. > What i mean, for example: > my sql result: > contact_id, field_id, field_name, value > sql_result=[[1, 1, 'address', 'something street'], > [1, 2, 'telnumber

Re: How to get an object's name as a string?

2008-10-29 Thread ShanMayne
Indeed they do. My delighted thanks. You have most precisely addressed the problem I intended to convey. I should have given the case of module attributes a moments further thought, an obvious answer. The locals() was unknown to me (rookie gaps). Thank you for the elaborated illustration. good s

Re: parsing MS word docs -- tutorial request

2008-10-29 Thread Mike Driscoll
On Oct 29, 4:32 am, Okko Willeboordsed <[EMAIL PROTECTED]> wrote: > Get a copy of;  Python Programming on Win32, ISBN 1-56592-621-8 > Use Google and VBA for help > > [EMAIL PROTECTED] wrote: > > All, > > > I am trying to write a script that will parse and extract data from a > > MS Word document.  

Re: Tkinter: How to get Label wraplength functionality in Text Box

2008-10-29 Thread Guilherme Polo
On 10/29/08, Mudcat <[EMAIL PROTECTED]> wrote: > Sounds like that would work really well. Problem is I can't get it to > work. > > ... > AttributeError: Text instance has no attribute 'count' > ... > Yep, it is not there yet. > I think my usage is correct. I don't have any params at the mome

Re: How to get an object's name as a string?

2008-10-29 Thread alex23
On Oct 29, 11:31 pm, ShanMayne <[EMAIL PROTECTED]> wrote: > However this does not help me to use the reference/name of an object I > imported instead of created. I've never really understood these requests (and they come up a lot). Unless you're doing a '*' import, you'll already know the bound na

Re: Improving interpreter startup speed

2008-10-29 Thread Paul Boddie
On 29 Okt, 13:55, [EMAIL PROTECTED] wrote: > Terry Reedy: > > > The current developers, most of whom use Python daily, [...] > > Thank you for bringing some light in this thread so filled with worse > than useless comments. Indeed. Observing that CGI is old-fashioned, aside from not really helping

  1   2   >