Google Checkout Level 1 and Level 2 ported to the Google App Engine

2008-10-29 Thread Massimo Di Pierro
Live demo with examples: http://web2py.appspot.com/plugin_checkout Source code: http://mdp.cti.depaul.edu/appliances/default/show/43 -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation:

Re: How to get high precision timer in python?

2008-10-29 Thread Tim Roberts
[EMAIL PROTECTED] wrote: 2008/10/29 James Mills [EMAIL PROTECTED]: On Wed, Oct 29, 2008 at 12:14 PM, [EMAIL PROTECTED] wrote: I use python2.5 in WindowsXP. If using time.time() as timer, it seems On the win32 platform should you not be using time.clock vs. time.time ? Well,

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

2008-10-29 Thread Nick Mellor
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 python's native bignum capabilities. In many cryptographic applications there is

Re: 2.6, 3.0, and truly independent intepreters

2008-10-29 Thread Patrick Stinson
Close, I work currently for EastWest :) Well, I actually like almost everything else about CPython, considering my audio work the only major problem I've had is with the GIL. I like the purist community, and I like the code, since integrating it on both platforms has been relatively clean, and

separate shared libraries or different Linux/Unix

2008-10-29 Thread stuntgoat
Hi, I want to start using Python 2.6 and 3000. I have several questions. What, in your experiences, is a functionally elegant solution to installing 2.6 and 3 from source without breaking package dependencies on your favorite Linux/Unix flavor? Is compiling Python 2.6 and 3.0 on a *nix

Re: 2.6, 3.0, and truly independent intepreters

2008-10-29 Thread Patrick Stinson
Wow, man. Excellent post. You want a job? The gui could use PyA threads for sure, and the audio thread could use PyC threads. It would not be a problem to limit the audio thread to only reentrant libraries. This kind of thought is what I had in mind about finding a compromise, especially in the

Re: 2.6, 3.0, and truly independent intepreters

2008-10-29 Thread Patrick Stinson
On Fri, Oct 24, 2008 at 12:51 PM, Andy O'Meara [EMAIL PROTECTED] wrote: Another great post, Glenn!! Very well laid-out and posed!! Thanks for taking the time to lay all that out. Questions for Andy: is the type of work you want to do in independent threads mostly pure Python? Or with

Re: Specifying an IP address for outbound connections?

2008-10-29 Thread Martin v. Löwis
erikcw wrote: Python seems to default to the main system IP for outbound connections (such as urllib), but I want to bind to one of my other IPs for outbound connections. Any ideas? Just use the .bind method of a socket to bind it to a specific address. If you then want to continue to use

Re: separate shared libraries or different Linux/Unix

2008-10-29 Thread Martin v. Löwis
What, in your experiences, is a functionally elegant solution to installing 2.6 and 3 from source without breaking package dependencies on your favorite Linux/Unix flavor? Is compiling Python 2.6 and 3.0 on a *nix development machine and having it work seamlessly as simple as choosing a

Re: How to get high precision timer in python?

2008-10-29 Thread James Mills
On Wed, Oct 29, 2008 at 4:22 PM, Tim Roberts [EMAIL PROTECTED] wrote: I'm not sure you understood what he was saying. time.time() and time.clock() can both be used for elapsed timing, but because of a fluke of implementation, time.time() is more precise on Linux, and time.clock() is more

Re: @property decorator doesn't raise exceptions

2008-10-29 Thread Rafe
OT... Sorry about he spam. Thanks for taking the time to post this Duncan. I had the same thought. I have posted to this list before but never experienced anything like this wait. I figured it was possible that I hit Reply to Author the first time so I sent it again. I waited about 8 hours before

Re: @property decorator doesn't raise exceptions

2008-10-29 Thread Rafe
On Oct 27, 2:47 pm, Peter Otten [EMAIL PROTECTED] wrote: Rafewrote: Can anyone explain why this is happening? When an attribute error is raised that is an indication that the requested attribute doesn't exist, and __getattr__() must be called as a fallback. I can hack a work-around, but

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

2008-10-29 Thread davy zhang
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) # create formatter formatter = logging.Formatter(%(asctime)s - %(name)s -

Re: Deviation from object-relational mapping (pySQLFace)

2008-10-29 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : On okt. 22, 06:27, huy [EMAIL PROTECTED] wrote: (snip) Best use of XML for SQL generation/use I have seen is Ibatis SQLMAPS. This focuses on the right things i.e queries and mapping values to/ from objects. It would be great if python had such a tool. I have

Car Loans banned in 7 nations

2008-10-29 Thread blixs9
GMAC Financial Services said Tuesday that it no longer will make auto loans in seven European countries, citing troubles in the lending industry that have forced it to adjust its operations. The financing arm of Detroit-based General Motors Corp. said as of Nov. 1, it no longer will originate

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

2008-10-29 Thread davy zhang
thanks so much , I ganna check the formatter str for more info:) On Wed, Oct 29, 2008 at 5:10 PM, Diez B. Roggisch [EMAIL PROTECTED] wrote: davy zhang schrieb: mport logging import pickle # create logger logger = logging.getLogger(simple_example) logger.setLevel(logging.DEBUG) # create

[2.5.1] UnicodeDecodeError: 'ascii' codec can't decode byte?

2008-10-29 Thread Gilles Ganault
Hello I'm getting this error while downloading and parsing web pages: = title = m.group(1) UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 48: ordinal not in range(128) = From what I understand, it's because some strings are Unicode, and hence contain

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

2008-10-29 Thread Diez B. Roggisch
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) # create formatter formatter =

Re: @property decorator doesn't raise exceptions

2008-10-29 Thread Peter Otten
Rafe wrote: Thanks for the idea Peter. What confuses me is why this only happens to @Property (and I assume other decorator related bindings?). Does it have something to do with the way the class gets built? 'Normal' attributes will raise AttributeErrors as expected, without triggering

free IDE with removing import and refactoring

2008-10-29 Thread pihentagy
Hi! I am looking for a python IDE which can remove my unused imports, and can do basic refactoring under windows. Can somebody advice me such an IDE? I have played with eclipse and netbeans, but I cannot find such a functionality (but maybe I looked it over). Besides, an installation howto

Re: [2.5.1] UnicodeDecodeError: 'ascii' codec can't decode byte?

2008-10-29 Thread Ulrich Eckhardt
Gilles Ganault wrote: I'm getting this error while downloading and parsing web pages: = title = m.group(1) UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 48: ordinal not in range(128) = From what I understand, it's because some strings are Unicode, and

Export email contact

2008-10-29 Thread xspiritualoraclex
Hi everyone :) I'd like export email contact from gmail, hotmail and yahoo account. How can I do that? thanks and excuse me for my english :P -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get high precision timer in python?

2008-10-29 Thread Steve Holden
甜瓜 wrote: ^_^ Oh! I did not read the document for time.clock before, and supposed it was same with time.time(). Thank you very much. If you are using wxPython then you should probably see whether a wxTimer would meet your needs. regards Steve -- Steve Holden+1 571 484 6266 +1

Re: Finding the instance reference of an object

2008-10-29 Thread Antoon Pardon
On 2008-10-17, Joe Strout [EMAIL PROTECTED] wrote: Python's assignment semantics (as opposed to its object handling, a term for which I have no referent) are not the same as those of, say C. They are, though. The only difference you've pointed out is that *numbers* are different in

Re: [Novice]Installing eric4 with python 2.6

2008-10-29 Thread Steve Holden
Saurabh Agrawal wrote: Hi, I am fairly new to python. Coming from a world of IDEs, I wanted a fancier one than IDLE. Hence, I downloaded eric4. When I tried to compile it, it asked for PyQt4, which I again downloaded (exe for Windows XP) and installed it. It seems to be properly installed

Is ctypes appropriate in my case?

2008-10-29 Thread dudeja . rajat
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? I know ctypes modules and have used it before. As far as I know ctypes is only used to call the dll functions in a python module. This

Re: parsing MS word docs -- tutorial request

2008-10-29 Thread Okko Willeboordsed
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. Can / would anyone refer me to a tutorial on how to do that? (perhaps from

Re: Python memory usage

2008-10-29 Thread [EMAIL PROTECTED]
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 following small script to understand what might happen: snip AFAIK, python uses malloc behind

Amharic Question Answering

2008-10-29 Thread seid muhie
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. Now I need, 1. If python could help me in doing the QA system 2. if any QA system been

Re: [Tkinter-discuss] WxPython - Tkinter

2008-10-29 Thread Guilherme Polo
On 10/29/08, Olrik Lenstra [EMAIL PROTECTED] wrote: Hello everyone, A while ago I joined the Tutor mailing list, and they helped me out with a question regarding wxPython. Now however, I have tried a program in Tkinter and I would like to see if there is a similar command to

Re: [Tkinter-discuss] WxPython - Tkinter

2008-10-29 Thread Guilherme Polo
On 10/29/08, Guilherme Polo [EMAIL PROTECTED] wrote: On 10/29/08, Olrik Lenstra [EMAIL PROTECTED] wrote: Hello everyone, A while ago I joined the Tutor mailing list, and they helped me out with a question regarding wxPython. Now however, I have tried a program in Tkinter and I

Re: [Novice]Installing eric4 with python 2.6

2008-10-29 Thread Phil Thompson
On Wed, 29 Oct 2008 06:51:10 -0400, Steve Holden [EMAIL PROTECTED] wrote: Saurabh Agrawal wrote: Hi, I am fairly new to python. Coming from a world of IDEs, I wanted a fancier one than IDLE. Hence, I downloaded eric4. When I tried to compile it, it asked for PyQt4, which I again downloaded

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

2008-10-29 Thread davy zhang
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, just basic functions

Re: Improving interpreter startup speed

2008-10-29 Thread Lie
On Oct 27, 2:36 pm, Paul Rubin http://[EMAIL PROTECTED] wrote: James Mills [EMAIL PROTECTED] writes: Heaven knows! I hardly think invoking hundreds and possibly thousands of short-lived python interpreters to be an optimal solution that may have spawned this particular thread. It's not

Re: free IDE with removing import and refactoring

2008-10-29 Thread [EMAIL PROTECTED]
HI! Did you tried the ERIC python IDE? Rew pihentagy írta: Hi! I am looking for a python IDE which can remove my unused imports, and can do basic refactoring under windows. Can somebody advice me such an IDE? I have played with eclipse and netbeans, but I cannot find such a

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

2008-10-29 Thread Steve Holden
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) # create formatter

Re: [2.5.1] UnicodeDecodeError: 'ascii' codec can't decode byte?

2008-10-29 Thread Steve Holden
Ulrich Eckhardt wrote: Gilles Ganault wrote: I'm getting this error while downloading and parsing web pages: = title = m.group(1) UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 48: ordinal not in range(128) = From what I understand, it's because some

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

2008-10-29 Thread [EMAIL PROTECTED]
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', '11'], [1, 3,

Re: Improving interpreter startup speed

2008-10-29 Thread James Mills
On Wed, Oct 29, 2008 at 9:43 PM, Lie [EMAIL PROTECTED] wrote: On Oct 27, 2:36 pm, Paul Rubin http://[EMAIL PROTECTED] wrote: It's not optimal but it is very common (CGI for example). CGI? When you're talking about CGI, network traffic is simply the biggest bottleneck, not something like

Re: question about the textwrap module

2008-10-29 Thread Sion Arrowsmith
Gabriel Genellina [EMAIL PROTECTED] wrote: py text = 'This is some \t text with multiple\n\n spaces.' py import re py re.sub(r'\s+', ' ', text) 'This is some text with multiple spaces.' py ' '.join(text.split()) 'This is some text with multiple spaces.' -- \S -- [EMAIL PROTECTED]

Re: Improving interpreter startup speed

2008-10-29 Thread J. Clifford Dyer
Maybe Ruby is the right language for your need. Just sayin'. On Sun, 2008-10-26 at 13:19 +, Pedro Borges wrote: The scripts i need to run but be executed with no apparent delay specially when the text transforms are simple. On Oct 26, 2008, at 11:13 AM, James Mills wrote: On

PyCon 2009 - Call for tutorials nearing the end

2008-10-29 Thread Greg Lindstrom
The period for submitting tutorial proposals for Pycon 2009 (US) is open and will continue through Friday, October 31th. This year features two pre-conference days devoted to tutorials on Wednesday March 25 Thursday March 26 in Chicago. This allows for more classes than ever. Tutorials are

Re: Improving interpreter startup speed

2008-10-29 Thread bearophileHUGS
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. Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

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

2008-10-29 Thread Vinay Sajip
On Oct 29, 11:24 am, Steve Holden [EMAIL PROTECTED] wrote: One deficiency of this approach, however, is that the string formatting is performed even when nologgingis required, thereby wasting a certain amount of effort on unnecessary formatting. Though you can mitigate this using the

Re: 2.6, 3.0, and truly independent intepreters

2008-10-29 Thread Paul Boddie
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. Did anyone come up with a reason why shared memory couldn't be used for

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

2008-10-29 Thread Mudcat
Sounds like that would work really well. Problem is I can't get it to work. ... AttributeError: Text instance has no attribute 'count' ... I think my usage is correct. I don't have any params at the moment, but I was just checking the functionality. numlines = widget.count() According to the

Re: Finding the instance reference of an object

2008-10-29 Thread Grant Edwards
On 2008-10-29, Antoon Pardon [EMAIL PROTECTED] wrote: On 2008-10-17, Joe Strout [EMAIL PROTECTED] wrote: Python's assignment semantics (as opposed to its object handling, a term for which I have no referent) are not the same as those of, say C. They are, though. The only difference you've

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

2008-10-29 Thread ShanMayne
The simplest and best option here is to store the objects in a dictionary with their keys being the generated names. Thanks. Indeed Alex, that may well be the simplest way, to have an overarching Dictionary of references/names and objects. However this does not help me to use the

Re: Improving interpreter startup speed

2008-10-29 Thread BJörn Lindqvist
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 editors). Having fast command line tools

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

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 names

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 moment, but

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.  Can / would

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

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: 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 following small

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_result:

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_objects())

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, and

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: 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 to debug ch =

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

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 i f1() f1()

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

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

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] tr align=centerth width=5%a onclick=t('Only|G|BoT|05','#1'); href=##1/a/thtd width=10%44.4MB/tdtd width=90%

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 will parse

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: [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 -- http://mail.python.org/mailman/listinfo/python-list Thanks Phil, it worked. My

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: 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 am

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

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

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

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 arrayobject

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

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: 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

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 with a

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 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 an object. You

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 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 python's native

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,

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

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: 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

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 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: 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) #

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: 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, Stef

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 idea

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 now

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: 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,

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 prefixing a number with

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,

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. Did anyone

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

  1   2   >