Re: scipy.stats.itemfreq: overflow with add.reduce

2005-12-21 Thread Hans Georg Krauthaeuser
Hans Georg Krauthaeuser schrieb: > Hans Georg Krauthaeuser schrieb: > >> Hi All, >> >> I was playing with scipy.stats.itemfreq when I observed the following >> overflow: >> >> In [119]:for i in [254,255,256,257,258]: >>.:l=[0]*i >>.:print i, stats.itemfreq(l), l.count(0) >

Re: Please enlighten me about PyPy

2005-12-21 Thread Ray
Hi Luis! Thanks for your reply :) Some further questions below... > So its author decided that having a python implementation written in > python would laid a much better basis for implementing psyco-like > techniques. OK, so far I get it... I think. So it's implementing the Python interpreter i

Re: Guido at Google

2005-12-21 Thread bonono
Anand wrote: > This is very good news. I wish Guido all the best! > > I wonder if this has got to do something with Microsoft developing > IronPython. Incidentellay it is reaching a 1.0 release pretty soon. > Perhaps Google has some cards up their sleeve. What other best way to > counter this than

Re: Guido at Google

2005-12-21 Thread Ilias Lazaridis
Greg Stein wrote: > Yeah... we recognize that we could certainly open-source more of our > software. While we've released some stuff > (code.google.com/projects.html), there is a LOT more that we want to http://code.google.com/projects.html > do. Getting engineers' 20% time to do that has been di

[Announce] pydsc

2005-12-21 Thread Roman Yakovenko
Hi, I would like to announce new module - pydsc. pydsc is Python documentation spell checker. This modules checks documentation string and comments for spelling errors. pydsc uses PyEnchant (http://pyenchant.sourceforge.net/) as spell checking engine. Example of usage: import pydsc #all modules

Re: Guido at Google

2005-12-21 Thread Anand
This is very good news. I wish Guido all the best! I wonder if this has got to do something with Microsoft developing IronPython. Incidentellay it is reaching a 1.0 release pretty soon. Perhaps Google has some cards up their sleeve. What other best way to counter this than to hire the big fish him

Re: Wingide is a beautiful application

2005-12-21 Thread [EMAIL PROTECTED]
Tony Nelson wrote: > So, you bind check_current_block() to the Enter key? Yeah. The binding's not quite just "check_current_block()" because you need a bit of magic to keep autoindent working. I'll post it with my conf files next week, essentially use = with an empty vim function wrapper around

Re: Which package to choose?

2005-12-21 Thread ankit
Thanks for replying. Can you tell me how stable is this package ? I mean to say how upto the standards it is. And also after seeing into the details I concluded that it also doesnot provide minidom support. Can I use libxml2dom or libgdome2 with it ? :-) Thanks ... -- http://mail.python.org/mai

Re: Which package to choose?

2005-12-21 Thread ankit
Thanks for replying. Can you tell me how stable is this package ? I mean to say how upto the standards it is. And also after seeing into the details I concluded that it also doesnot provide minidom support. Can I use libxml2dom or libgdome2 with it ? :-) Thanks ... -- http://mail.python.org/mai

Re: parsing engineering symbols

2005-12-21 Thread Jacob Rael
Wow!! 261 v. 75 lines!! jr -- http://mail.python.org/mailman/listinfo/python-list

Re: Please enlighten me about PyPy

2005-12-21 Thread Kevin Yuan
21 Dec 2005 19:33:20 -0800, Luis M. González <[EMAIL PROTECTED]>: ... ...This implementation requires a minimal core, writen in a restrictedsubset of python called "rpython". This subset avoids many of the mostdynamic aspects of python, making it easier to authomatically translate it to C through a

Re: Py_Initialize(); undefined reference...

2005-12-21 Thread Markus Heller
> I want to embed python into C++ and I have followed the documentation as > given here: > http://docs.python.org/api/ > I have stated an include to "Python.h" and now I want to initialize the > Python framework. My compiler though says that the call to the function > Py_Initialize() is an undefine

Py_Initialize(); undefined reference...

2005-12-21 Thread Markus Heller
Dear Gurus, I want to embed python into C++ and I have followed the documentation as given here: http://docs.python.org/api/ I have stated an include to "Python.h" and now I want to initialize the Python framework. My compiler though says that the call to the function Py_Initialize() is an undefin

Re: Parsing a date-time string?

2005-12-21 Thread Murtog (sent by Nabble.com)
Isnt possible to do something like: In [4]: s = s.split() In [1]: s = "Mon Dec 19 11:06:12:333 CET 2005" In [5]: s Out[5]: ['Mon', 'Dec', '19', '11:06:12:333', 'CET', '2005'] In [6]: day = s[0] In [7]: month = s[1] In [8]: day_number = s[3] In [9]: time = s[4] In [10]: # ? So you treat the

Re: Wingide is a beautiful application

2005-12-21 Thread Tony Nelson
In article <[EMAIL PROTECTED]>, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Tony Nelson wrote: > > OK, I can tell that this is Python code, not VI script stuff. I'll need > > to see how your vimrc sets this up. > > vim has a Python interpreter embedded in it (assuming it's a reasonably > c

Re: Please enlighten me about PyPy

2005-12-21 Thread Luis M. González
Hmmm... I know it's complicated, and all these questions can make your head explode. I'll tell you what I understand about Pypy and, at the same time, I'll leave the door open for further explanations or corrections. As you know, python is a dynamic language. It means, amongst other things, that t

Find out the schema with psycopg?

2005-12-21 Thread survivalist
I am trying to discover the schema of a PostgreSQL database programatically at runtime. I'm using psycopg (I assume that's still the best library). Is there a way to query the schema other than opening a system pipe like "psql -d '\d'", "psql -d '\d tablename'", etc.? DBIAPI 2.0 shows that the C

Re: Which Python web framework is most like Ruby on Rails?

2005-12-21 Thread Kent Johnson
Paul Rubin wrote: > [Kent Johnson] > Where would you draw the line? Suppose I want to use a GPLed library > in my Python code, does that mean I have to distribute my code under > the GPL if I distribute them together? > > Yes, that's the point of using the GPL on a library instead

Please enlighten me about PyPy

2005-12-21 Thread Ray
Hello! I've been reading about PyPy, but there are some things that I don't understand about it. I hope I can get some enlightenment in this newsgroup :) First, the intro: "The PyPy project aims at producing a flexible and fast Python implementation. The guiding idea is to translate a Python-le

Re: Guido at Google

2005-12-21 Thread Peter Hansen
Bengt Richter wrote: [roughly "an inch is not exactly 25.4mm"] > At least according to my dusty 37th Edition Handbook of Chemistry and Physics > (c) 1955. > Maybe things have changed since then ;-) Wikipedia concurs with Jim, though it says the official change dates from 1958. Better throw that

Re: Parsing a date-time string?

2005-12-21 Thread linda.s
I did check and found 'dateutil' is under the folder of python-dateutil-1.0 very confused, :( On 12/21/05, linda.s <[EMAIL PROTECTED]> wrote: > Hi Fuzzyman, > I also wanted to install the DateUtil module from > http://labix.org/python-dateutil > but had problems (using Windows). > C:\Python24>pyth

Re: Parsing a date-time string?

2005-12-21 Thread linda.s
Hi Fuzzyman, I also wanted to install the DateUtil module from http://labix.org/python-dateutil but had problems (using Windows). C:\Python24>python python-dateutil-1.0\setup.py build running build running build_py error: package directory 'dateutil' does not exist Can you tell me why? Linda On 21

Re: Tk not displaying correctly

2005-12-21 Thread Tuvas
Any way you could provide a fairly simple example, or a website that shows it? I understand that I must create a thread for mainloop, however, I can't see how to make that work, every time I do, it ends the program only a few seconds late. Will I have to make an even for all buttons, etc that are o

Re: Guido at Google

2005-12-21 Thread Jim Benson
On Thu, 22 Dec 2005, Bengt Richter wrote: > >> > >> For Americans: 15 meters is roughly 50 feet. > > > >Google can do that too, of course. > > > >http://www.google.com/search?q=convert+15+meters+to+feet > > > >(49.2125984 feet to be more precise) > > > Actually that looks like it's based on the

Re: Guido at Google

2005-12-21 Thread [EMAIL PROTECTED]
Nicola Musatti wrote: > > By the way, I hear that you've become collegues also with Matt Austern, > formerly of Apple, and Danny Thorpe, formerly of Borland. I guess we > mere mortals don't stand a chance of being hired, but if the trend > continues there are going to be a lot of very interesting p

PyPy Sprint Palma de Mallorca in January 2006

2005-12-21 Thread Carl Friedrich Bolz
Palma de Mallorca PyPy Sprint II: 23rd - 29th January 2006 The next PyPy sprint is scheduled to be in January 2006 in Palma De Mallorca, Balearic Isles, Spain. We'll give newcomer-friendly introductions. Its focus will mainly be on the

Re: Guido at Google

2005-12-21 Thread Bengt Richter
On Wed, 21 Dec 2005 16:40:15 -0500, Peter Hansen <[EMAIL PROTECTED]> wrote: >rbt wrote: >> Alex Martelli wrote: >> >>>I don't think there was any official announcement, but it's true -- he >>>sits about 15 meters away from me;-). >> >> For Americans: 15 meters is roughly 50 feet. > >Google can d

Re: type error on porting outfile.write

2005-12-21 Thread Eric McCoy
Dave Hansen wrote: > or even (closer to the original code) > >outfile.write(str(object.id)+", ") That was going to be my suggestion too, but that can mask the underlying bug since a lot of types have __str__ methods. Not only could those types theoretically return a valid stringified integer

Re: libxml2 and mindom

2005-12-21 Thread Paul Boddie
ankit wrote: > I checked for it and here are my comments on it: > libxml2dom has Alpha release . So there may be some bugs in it. In our > project we cant take risk to move back after deciding for one. Thanks > for your reply. Understood. I accept that there's some way to go before libxml2dom can

Re: pyUnit and dynamic test functions

2005-12-21 Thread Sakcee
Thanks for reply, here is the script with trucated datafile The data file is following , --- data file getUSStates~~dict~ {AK: Alaska, AL: Alabama, AR: Arkansas, AZ: Arizona, CA: California, CO: Colorado, WY: Wyoming } data file I want to test function:ge

Re: Trying to find regex for any script in an html source

2005-12-21 Thread Paul McGuire
"28tommy" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > I'm trying to find scripts in html source of a page retrieved from the > web. > I'm trying to use the following rule: > > match = re.compile('') > > 28tommy - pyparsing includes a built-in HTML tag definitio

Re: Guido at Google

2005-12-21 Thread Dave Hansen
On Wed, 21 Dec 2005 16:14:16 -0600 in comp.lang.python, Rocco Moretti <[EMAIL PROTECTED]> wrote: [...] >15 meters (150 decimeter, 1500 cm, etc ...) >590 inches >49 feet >16 yards >0.0093 miles >0.008 nautical miles >3 rods >0.075 furlongs >1800 barleycorns >147.63 hands >66 spans >33 cubits >13 el

Re: How to check if a string "is" an int?

2005-12-21 Thread Dave Hansen
On 21 Dec 2005 14:36:32 -0800 in comp.lang.python, Paul Rubin wrote: >There is a third choice which is the natural and obvious one: have the >function do what its name indicates. Return true if the arg is a >digit and false otherwise. If iterating over the whole strin

Re: Wingide is a beautiful application

2005-12-21 Thread [EMAIL PROTECTED]
Tony Nelson wrote: > OK, I can tell that this is Python code, not VI script stuff. I'll need > to see how your vimrc sets this up. vim has a Python interpreter embedded in it (assuming it's a reasonably complete build--it's possible to leave the interpreter, or even parts of the vim scripting stu

Re: How to check if a string "is" an int?

2005-12-21 Thread David Rasmussen
Daniel Schüle wrote: > > others already answered, this is just an idea > I guess, if we want to avoid the exception paradigm for a particular problem, we could just do something like: def isNumber(n): try: dummy = int(n) return True except ValueError: return

Re: Tk not displaying correctly

2005-12-21 Thread Paul Rubin
"Tuvas" <[EMAIL PROTECTED]> writes: > What (I think) will happen is when you hit the button, until x=100, the > display will stop updating, and when the command has left it's thread, > it will return to updating again. Is there a way to make it so it > always will update, irreguardless if it's in a

Re: Resizing of PIL images

2005-12-21 Thread Tuvas
I used thumbnail originally, and am using resize now. Perhaps it has to do with the image type (That is based on strings), but the resize function just didn't do it for me. No idea why... Oh well, probably just a problem for me, but, I've found a way around it, for the time being. -- http://mail.

Re: Guido at Google

2005-12-21 Thread Gerard Flanagan
Rocco Moretti wrote: > Jack Diederich wrote: > > On Wed, Dec 21, 2005 at 01:36:42PM -0500, rbt wrote: > > > >>Alex Martelli wrote: > >> > >>>I don't think there was any official announcement, but it's true -- he > >>>sits about 15 meters away from me;-). > >> > >>For Americans: 15 meters is roughl

Re: pyUnit and dynamic test functions

2005-12-21 Thread Kent Johnson
Sakcee wrote: > Hi > > I am trying to use pyUnit to create a framework for testing functions > > I am reading function name, expected output, from a text file. Can you show a sample of what the text file might look like, and what tests you want to generate from it? > and in python generating

Re: How to check if a string "is" an int?

2005-12-21 Thread Paul Rubin
Erik Max Francis <[EMAIL PROTECTED]> writes: > The primary purpose of the .isdigit, etc. methods is to test whether a > single character has a certain property. There is, however, no > special character data type in Python, and so by necessity those > methods must be on strings, not characters. R

Tk not displaying correctly

2005-12-21 Thread Tuvas
I am building a TK interface, that has several threads. If all threads are running actively, including the main one, the interface doesn't update. For example, I have something like this, although more complex import time, threading master=Tk() def thread: global x x=0 while(TRUE): x=x

Re: Guido at Google

2005-12-21 Thread Rocco Moretti
Jack Diederich wrote: > On Wed, Dec 21, 2005 at 01:36:42PM -0500, rbt wrote: > >>Alex Martelli wrote: >> >>>I don't think there was any official announcement, but it's true -- he >>>sits about 15 meters away from me;-). >> >>For Americans: 15 meters is roughly 50 feet. > > > Right, so that is ab

embed xterm into qt application on linux

2005-12-21 Thread jpaulus
I'd like to embed an xterm into a larger qt application running on linux into which I can direct commands and allow users to interact with existing scripts that would require their command line input. Does anyone have code that they would like to share to help out a relative python newbie? thanks

Re: Globals, Locals Dictionaries + Callbacks Question

2005-12-21 Thread Faisal Alquaddoomi
Steve Holden wrote: > Faisal Alquaddoomi wrote: > >> Hello, >> >> I'm having a bit of trouble isolating my scripts from each other in my >> embedded Python interpreter, so that their global namespaces don't get >> all entangled. > > > [tales of woe ...] > > Would it help to use PyNewInterpre

Re: Trying to find regex for any script in an html source

2005-12-21 Thread Mitja Trampus
28tommy wrote: > Hi, > I'm trying to find scripts in html source of a page retrieved from the > web. > I'm trying to use the following rule: > > match = re.compile('') > > I'm testing it on a page that includes the following source: > >