Re: Can't get around "IndexError: list index out of range"

2006-10-09 Thread Steve Holden
MonkeeSage wrote: > On Oct 9, 2:31 am, Steve Holden <[EMAIL PROTECTED]> wrote: > >>Keep right on guessing. > > > I hope I'm not offending one whom I consider to be much more skilled > and versed than I am, not only in python, but in programming in > general; but I must say: it seems you are bein

Re: Encode differences between idle python and python

2006-10-09 Thread Peter Otten
[EMAIL PROTECTED] wrote: > >>> u=u'áéíóú' > >>> u > u'\xe1\xe9\xed\xf3\xfa' > >>> print u > áéíóú > >>> a=u.encode('latin-1') > >>> a > '\xe1\xe9\xed\xf3\xfa' > >>> print a > ßÚݾ· That means that Python is better at guessing the correct encoding than you are. Here's how you can make it share its

Re: OT: Sarcasm and irony (was: Dive Into Java?)

2006-10-09 Thread Theerasak Photha
On 10/9/06, Ben Finney <[EMAIL PROTECTED]> wrote: > Bjoern Schliessmann <[EMAIL PROTECTED]> writes: > > > E. g. [in Java there is] no operator overloading, but "+" > > concatenation of strings. What if you'd like to implement your own > > string-derived class? Ah, never mind. Operator overloading i

Encode differences between idle python and python

2006-10-09 Thread pretoriano_2001
Hello: Under win32 XP y select python command line and execute next code with results indicated: Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)] on Type "help", "copyright", "credits" or "license" for more information. >>> u=u'áéíóú' >>> u u'\xe1\xe9\xed\xf3\xfa' >>> prin

Everything is a distributed object

2006-10-09 Thread Martin Drautzburg
Hello all, I've seen various attempts to add distributed computing capabilities on top of an existing language. For a true distributed system I would expect it to be possible to instantiate objects of a remote class or to subclass a remote class and other stuff like this. My impression is that tho

[curses] Instead of window.refresh() or window.redrawwin() ?

2006-10-09 Thread Jia,Lu
Hi all. I wrote a program to get key press and echo to the screen at once. But I found I must use refresh() to let it show in the screen. Is there a method which can show charactors at once without refresh() ?? Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Can't get around "IndexError: list index out of range"

2006-10-09 Thread MonkeeSage
On Oct 9, 2:31 am, Steve Holden <[EMAIL PROTECTED]> wrote: > Keep right on guessing. I hope I'm not offending one whom I consider to be much more skilled and versed than I am, not only in python, but in programming in general; but I must say: it seems you are being rather obtuse here. I think I l

Re: 3D Vector Type Line-Drawing Program

2006-10-09 Thread Scott David Daniels
James Stroud wrote: >> I'm looking for a program to do line-drawings in 3d, with output to >> postscript or svg or pdf, etc. I would like to describe a scene with >> certain 1-3d elements oriented in 3d space with dashed or colored >> lines and filled or transparent surfaces (or maybe semitransp

Re: problem with split

2006-10-09 Thread Theerasak Photha
On 10/9/06, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > hanumizzle wrote: > (snip) > > Regexes are usually passed as literals directly to re.compile(). > > For which definition of "usually" ? >From definition of personal experience: all of the code I've written or seen that used small regexes

Dr. Dobb's Python-URL! - weekly Python news and links (Oct 10)

2006-10-09 Thread Cameron Laird
QOTW: "... [N]ow that I've made the switch to python, I'm several orders of magnitude more productive ..." - Rob Knapp http://groups.google.com/group/comp.lang.python/msg/8a4efd549bfb451a "Hanging out around the Python community will make you a better VB, dotNet or C++ programmer ..." - Carl

Re: Python component model

2006-10-09 Thread Robert Kern
Edward Diener No Spam wrote: > Robert Kern wrote: >> Edward Diener No Spam wrote: >> >>> There's nothing wrong with Python's introspection. In fact Python's >>> facilities in this area and its support for metadata are stronger than >>> any of these other languages ! However there is no common com

Re: Dive Into Java?

2006-10-09 Thread Dan Bishop
On Oct 9, 11:40 am, Bjoern Schliessmann <[EMAIL PROTECTED]> wrote: > Diez B. Roggisch wrote: ... > >> because [Java] wanted to be new and good but took over much of C++'s > >> syntax and made it even weirder, > > Even weirder? Care to explain?Example: > > int spam = 5; > > but > > String eggs = new

Re: Python component model

2006-10-09 Thread Edward Diener No Spam
Michael wrote: > Edward Diener No Spam wrote: > >> Has there ever been, or is there presently anybody, in the Python >> developer community who sees the same need and is working toward that >> goal of a common component model in Python, blessed and encouraged by >> those who maintain the Python la

Re: doesNotUnderstand?

2006-10-09 Thread Gabriel Genellina
At Monday 9/10/2006 21:15, Liquid Snake wrote: >Hello :). Some days ago i went to a seminar >about Metaprograming and Reflection. >I was a little famirialized with the subject, >and wanted to explore it further. >The seminar was great, but the point is that >every example was programmed in smal

Re: (semi-troll): Is Jython development dead?

2006-10-09 Thread Ray
[EMAIL PROTECTED] wrote: > Is Jython development dead or has it just seemed that way for over a > year?. The jython.org website has a recent new appearance (but no new > content) and there is some message traffic on the developer site at > Sourceforge. However nothing has been released for over a

Re: Names changed to protect the guilty

2006-10-09 Thread Ben Finney
"Andy Salnikov" <[EMAIL PROTECTED]> writes: > "Aahz" <[EMAIL PROTECTED]> wrote: > > Antoon Pardon <[EMAIL PROTECTED]> wrote: > >>The problem is there is also ground for bugs if you don't use > >>"blah is True". If some application naturally seems to ask for a > >>variable that can be valued False,

Good sign for Roundup as Python bug tracker (was: Python to use a non open source bug tracker?)

2006-10-09 Thread Ben Finney
Magnus Lycka <[EMAIL PROTECTED]> writes: > Fredrik Lundh wrote: > > python.org could still need a few more roundup volunteers, but > > it's not like nobody's prepared to contribute manhours. don't > > underestimate the community. > > So, how many have offered to help? Is this information available

Re: Names changed to protect the guilty

2006-10-09 Thread Andy Salnikov
"Aahz" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > In article <[EMAIL PROTECTED]>, Antoon Pardon > <[EMAIL PROTECTED]> wrote: >> >>The problem is there is also ground for bugs if you don't use "blah is >>True". If some application naturally seems to ask for a variable that >>ca

A problem about File path encode

2006-10-09 Thread Kevien Lee
Hi everyone,   There is a problem about File path encode ,when i want to parse an xml file.   The code as follow:   -- from xml.dom import minidomdef ReadXml():xmldoc=minidom.parse("D:\Downloads\1.xml")    print xmldoc.toxml() if

(semi-troll): Is Jython development dead?

2006-10-09 Thread Sloan . Kohler
Is Jython development dead or has it just seemed that way for over a year?. The jython.org website has a recent new appearance (but no new content) and there is some message traffic on the developer site at Sourceforge. However nothing has been released for over a year (i.e. no support for Python

Re: doesNotUnderstand?

2006-10-09 Thread Ben Finney
"Liquid Snake" <[EMAIL PROTECTED]> writes: > But i still want to know if theres a method like __insertMethodNameHere__  > that does it for > me... or if you think it's a nice thing to have... > i'm REALLY SORRY for my REALLY BAD English... so..., don't hate me please.. > And I'm sorry if this que

Re: Python component model

2006-10-09 Thread Michael
Edward Diener No Spam wrote: > Has there ever been, or is there presently anybody, in the Python > developer community who sees the same need and is working toward that > goal of a common component model in Python, blessed and encouraged by > those who maintain the Python language and standard mod

Re: People's names (was Re: sqlite3 error)

2006-10-09 Thread John Machin
John J. Lee wrote: > "John Machin" <[EMAIL PROTECTED]> writes: > [...] > > This is all a bit OT. Before we close the thread down > > Do you have a warrant for that? I have some signed-but-otherwise-blank warrants, but I'm saving them for other threads :-) > > > , let me leave > > you with one w

Re: print time comparison: IDLE versus terminal on ultra 20

2006-10-09 Thread MrJean1
With the binaries /usr/sfw/bin/python and /usr/sfw/bin/idle the results are 0.002279 resp. 0.222831 secs for the same print test. The Python version is 2.3.3 and IDLE version 1.0.2 on the same Ultra 20 Opteron box running Solaris 10. /Jean Brouwers sam wrote: > i forgot to mention that i'm ru

doesNotUnderstand?

2006-10-09 Thread Liquid Snake
Hello :). Some days ago i went to a seminar about Metaprograming and Reflection.I was a little famirialized with the subject, and wanted to explore it further.The seminar was great, but the point is that every example was programmed in smalltalk. I know smalltalk, and never have much use for the do

Re: Help with first script please. files, directories, autocomplete

2006-10-09 Thread Gabriel Genellina
At Saturday 7/10/2006 16:34, Rainy wrote: You can store the dir name as a variable: >>> d = 'c:\home' >>> from os import * >>> listdir(d) ['.Config.pm.swp', '.run.bat.swp', 'AHK scripts', 'Archive', 'Config.pm', 'Docs', 'Images', 'Links', 'Music', 'Projects', 'Python programs', 'run.bat', 'Shar

Re: 3D Vector Type Line-Drawing Program

2006-10-09 Thread James Stroud
James Stroud wrote: > Hello All, > > I'm looking for a program to do line-drawings in 3d, with output to > postscript or svg or pdf, etc. I would like to describe a scene with > certain 1-3d elements oriented in 3d space with dashed or colored lines > and filled or transparent surfaces (or mayb

Re: Initialization of variables using no-arg constructor

2006-10-09 Thread Ben Finney
"Edward Waugh" <[EMAIL PROTECTED]> writes: > Consider the following (working) Python code: > > import sys > > def sum(list): > # total = 0 does not work for non-numeric types > total = list[0].__class__() > for v in list: > total += v > return total Your function assumes t

Re: Subclassing built-in classes

2006-10-09 Thread Gabriel Genellina
At Saturday 7/10/2006 04:35, hanumizzle wrote: > >As the first post said "...couldn't python (in theory)...", I was discussing > >if it would be possible for python (in some future version) to manage the > >literals so that they use the constructors in the __builtin__ module, I > >didn't say it

3D Vector Type Line-Drawing Program

2006-10-09 Thread James Stroud
Hello All, I'm looking for a program to do line-drawings in 3d, with output to postscript or svg or pdf, etc. I would like to describe a scene with certain 1-3d elements oriented in 3d space with dashed or colored lines and filled or transparent surfaces (or maybe semitransparent). I would the

does raw_input() return unicode?

2006-10-09 Thread Stuart McGraw
In the announcement for Python-2.3 http://groups.google.com/group/comp.lang.python/msg/287e94d9fe25388d?hl=en it says "raw_input(): can now return Unicode objects". But I didn't see anything about this in Andrew Kuchling's "2.3 What's New", nor does the current python docs for raw_input() say an

Re: A curses-game I need help with.

2006-10-09 Thread Ben Finney
"Gasten" <[EMAIL PROTECTED]> writes: > I would like to know what I did wrong. Too´many spellingmisstakes? > Shitty code? No one understands? No one got the answer? Should I > wait a little longer? Thank you. For my part, I skipped over your post because the code was far too long. If you have a

Chicago Python User Group Thurs October 12, 2006

2006-10-09 Thread bray
Thurs. October 12th, 2006. 7pm. This will be our best meeting, yet. David Beasley http://www.dabeaz.com, software developer, writer, and jazz musician will present on PLY. It's 100% Python and very cool. Do not miss this one! Topics -- * PLY (Python Lex Yacc) David Beazley * Performance Pyt

OT: Sarcasm and irony (was: Dive Into Java?)

2006-10-09 Thread Ben Finney
Bjoern Schliessmann <[EMAIL PROTECTED]> writes: > E. g. [in Java there is] no operator overloading, but "+" > concatenation of strings. What if you'd like to implement your own > string-derived class? Ah, never mind. Operator overloading is > bad(tm) ;) <= Irony, definitely Definitely? That one s

Re: distutils:permissions problems

2006-10-09 Thread Eric S. Johansson
Martin v. Löwis wrote: > Eric S. Johansson schrieb: >> The problem is that, because of a quirk (or misfeature) of VM Ware >> shared filesystem, all of the directories and files are owned by root >> with a 700 permissions. When I run setup.py install, they are installed >> as root with 700 permissi

Re: Python to use a non open source bug tracker?

2006-10-09 Thread Ben Finney
"Paul Boddie" <[EMAIL PROTECTED]> writes: > Indeed, as someone who merely browses python-dev, perhaps I > shouldn't care how the core developers track their bugs: if they > struggle to manage that information in future, why should I care? > Well, the reason I should care is related to the reason w

Re: distutils:permissions problems

2006-10-09 Thread Martin v. Löwis
Eric S. Johansson schrieb: > The problem is that, because of a quirk (or misfeature) of VM Ware > shared filesystem, all of the directories and files are owned by root > with a 700 permissions. When I run setup.py install, they are installed > as root with 700 permissions. How can I alter the beh

Re: People's names (was Re: sqlite3 error)

2006-10-09 Thread John J. Lee
"John Machin" <[EMAIL PROTECTED]> writes: [...] > This is all a bit OT. Before we close the thread down Do you have a warrant for that? > , let me leave > you with one warning: > Beware of enthusiastic maintenance programmers on a mission to clean up > the dirty names in your database: > E.g. (1

Re: pythonw documentation?

2006-10-09 Thread Martin v. Löwis
Roger Miller schrieb: > However on a more general note, the only references to pythonw that I > could find in the Python 2.5 documentation are in the Macintosh > section. Have I overlooked something, or is this a deficiency that > should be addressed? You are right that it currently isn't document

Re: distutils: optionally build C bindings to an external library

2006-10-09 Thread Martin v. Löwis
Kirill Simonov schrieb: > I've written a pure Python module, which could optionally use an > external C library. The external library is not required to be on the > user computer however, so I'd like not to build the bindings by default, > but allow a user to turn the build on by specifying some pa

Re: People's names (was Re: sqlite3 error)

2006-10-09 Thread John J. Lee
Steve Holden <[EMAIL PROTECTED]> writes: [...] > > There would also need to be a flag field to indicate the canonical > > ordering > > for writing out the full name: e.g. family-name-first, given-names-first. > > Do we need something else for the Vietnamese case? > > You'd think some standards bod

Re: Initialization of variables using no-arg constructor

2006-10-09 Thread Paul Rubin
"Chris Mellon" <[EMAIL PROTECTED]> writes: > I'm not sure if regular slice notation makes a copy of the list or > not, if it does you can use itertools: > > >>> def sum(list): > ... total = list[0] > ... for v in itertools.islice(list, 1, len(list)): > ... total += v > ... retu

Re: Initialization of variables using no-arg constructor

2006-10-09 Thread Paul Rubin
> In order for sum() to be generic I initialize total to the value of > list[0].__class__(). This works but I would like to know if this is > the correct or preferred way of doing it. More natural would be (untested): def sum(list): assert list# both versions fail if list is empty

Re: Initialization of variables using no-arg constructor

2006-10-09 Thread Calvin Spealman
On 10/9/06, Edward Waugh <[EMAIL PROTECTED]> wrote: > Consider the following (working) Python code: > > import sys > > def sum(list): > # total = 0 does not work for non-numeric types > total = list[0].__class__() > for v in list: > total += v > return total > > l = [1, 2, 3

Re: Python component model

2006-10-09 Thread Edward Diener No Spam
goon wrote: >> or IBM's Eclipse for Java > > Or Eclipse for Python using PyDev? [0] Those are very nice features but there is no re-usable Python bean support like there is a Java bean. That was my initial point. -- http://mail.python.org/mailman/listinfo/python-list

Re: Initialization of variables using no-arg constructor

2006-10-09 Thread Chris Mellon
On 10/9/06, Edward Waugh <[EMAIL PROTECTED]> wrote: > Consider the following (working) Python code: > > import sys > > def sum(list): > # total = 0 does not work for non-numeric types > total = list[0].__class__() > for v in list: > total += v > return total > > l = [1, 2, 3

Re: Python component model

2006-10-09 Thread Edward Diener No Spam
Robert Kern wrote: > Edward Diener No Spam wrote: > >> There's nothing wrong with Python's introspection. In fact Python's >> facilities in this area and its support for metadata are stronger than >> any of these other languages ! However there is no common component >> model which specifies th

Re: operator overloading + - / * = etc...

2006-10-09 Thread Terry Reedy
"Bruno Desthuilliers" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > The current namespace object, of course. Implementing a namespace as a Python object (ie, dict) is completely optional and implementation dependent. For CPython, the local namespace of a function is generall

Initialization of variables using no-arg constructor

2006-10-09 Thread Edward Waugh
Consider the following (working) Python code: import sys def sum(list): # total = 0 does not work for non-numeric types total = list[0].__class__() for v in list: total += v return total l = [1, 2, 3] print sum(l) l = [1.1, 2.2, 3.3] print sum(l) l = ["a", "b", "c"] pri

distutils:permissions problems

2006-10-09 Thread Eric S. Johansson
I'm developing Python code on multiple VM Ware guest OS running ubuntu. I need to share common file space so that each of these guest instances will have complete access to the to all of the files. The problem is that, because of a quirk (or misfeature) of VM Ware shared filesystem, all of th

Re: Python component model

2006-10-09 Thread goon
> or IBM's Eclipse for Java Or Eclipse for Python using PyDev? [0] Reference [0] PyDev, 'Fabio Zadrozny, Aleks Totic, plugin allowing Python/Jython to use Eclipse as an IDE' [Accessed Tuesday, 10 October 2006] -- http://mail.python.org/mailman/listinfo/python-l

Re: Python component model

2006-10-09 Thread Robert Kern
Edward Diener No Spam wrote: > There's nothing wrong with Python's introspection. In fact Python's > facilities in this area and its support for metadata are stronger than > any of these other languages ! However there is no common component > model which specifies that X is a "property" or Y i

Re: print time comparison: IDLE versus terminal on ultra 20

2006-10-09 Thread sam
i forgot to mention that i'm running a version of python 2.3 (think it's 2.3.5), as that's what was installed and i'm not hooked up to the internet with the ultra 20 yet. that may account for some of the difference. sam -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter: Making a window disappear

2006-10-09 Thread James Stroud
Claus Tondering wrote: > I am trying to make a Tkinter main window appear and disappear, but I > have problems with that. > > Here is a small code sample: > > class MyDialog(Frame): > def __init__(self): > Frame.__init__(self, None) > Label(self, text="Hello").

Re: Python component model

2006-10-09 Thread [EMAIL PROTECTED]
Edward Diener No Spam wrote: > Chaz Ginger wrote: > > Why not propose something. That is the easiest way to get things moving. > > How does one do that ? Propose something here on this NG or is there > some other official way ? Come up with a specification, with examples. Ideally have working cod

Re: Python component model

2006-10-09 Thread Daniel Nogradi
> > Why not propose something. That is the easiest way to get things moving. > > How does one do that ? Propose something here on this NG or is there > some other official way ? I'm by no means an expert here but the usual procedure as far as I can see is this: 1. propose something here and get

Re: Names changed to protect the guilty

2006-10-09 Thread John J. Lee
[EMAIL PROTECTED] (Aahz) writes: [...] > >I think I was reading the same code recently (epydoc?) and was also > >momentarily horrified ;-) until I realized that it was quite > >deliberately using three-valued logic (True, False, None) for some > >presumably-sensible reason. Since None is false, th

Re: Names changed to protect the guilty

2006-10-09 Thread John J. Lee
Ben Finney <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] (John J. Lee) writes: > > > [EMAIL PROTECTED] (Aahz) writes: > > > if schema.elements.has_key(key) is False: > > > > I think I was reading the same code recently (epydoc?) and was also > > momentarily horrified ;-) until I realized th

Re: Names changed to protect the guilty

2006-10-09 Thread Aahz
In article <[EMAIL PROTECTED]>, Antoon Pardon <[EMAIL PROTECTED]> wrote: >On 2006-10-08, Aahz <[EMAIL PROTECTED]> wrote: >> In article <[EMAIL PROTECTED]>, John J. Lee <[EMAIL PROTECTED]> wrote: >>>[EMAIL PROTECTED] (Aahz) writes: The following line of lightly munged code was found in a

Re: Python component model

2006-10-09 Thread Edward Diener No Spam
Chaz Ginger wrote: > Edward Diener No Spam wrote: >> [EMAIL PROTECTED] wrote: >>> Edward> The definition of a component model I use below is a class >>> which >>> Edward> allows properties, methods, and events in a structured way >>> which >>> Edward> can be recognized, usually through

Re: A curses-game I need help with.

2006-10-09 Thread Rob Wolfe
"Gasten" <[EMAIL PROTECTED]> writes: > Can you help? I'm not a guru on curses by any means, but I've moved one line of your code and IMHO it works fine now. Look below for the code I've changed. > I'll just append all my code here (for anyone to test), so you who > doesn't want to read this humb

Re: How to execute a python script in .NET application

2006-10-09 Thread Chandra
Thanks all of them, i used the command line process (executing the script in cmd shell) method for executing python script. Regards, Chandra Gerard Flanagan wrote: > Chandra wrote: > > > Hi, > > > > Is there a way to execute a python script(file) in ASP.NET application > > (programmatically)?? >

distutils: optionally build C bindings to an external library

2006-10-09 Thread Kirill Simonov
Hi, I've written a pure Python module, which could optionally use an external C library. The external library is not required to be on the user computer however, so I'd like not to build the bindings by default, but allow a user to turn the build on by specifying some parameter to `setup.py`. Basi

pythonw documentation?

2006-10-09 Thread Roger Miller
I was going to ask how to a program can tell whether it was started by python.exe or pythonw.exe, but after some experimentation I noticed that sys.stdin.fileno() is -1 in the latter case. However on a more general note, the only references to pythonw that I could find in the Python 2.5 documentat

Re: switching to numpy and failing, a user story

2006-10-09 Thread Robert Kern
Apologies for the dupe. It looked like something went wrong with the first send (and the first post was partly incorrect to begin with). -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as

change directory when closing curses program

2006-10-09 Thread Fabian Braennstroem
Hi, I am using lfm, a curses based file manager, and want to change into the last directory of my lfm-session after closing it. To be more clear: 1) run lfm from console in the home directory ~ 2) move to ~/something 3) close lfm 4) be in ~/something on the console Is that possible in any way? l

[ANN] argparse 0.1 - Command-line parsing library

2006-10-09 Thread Steven Bethard
Announcing argparse 0.1 --- argparse home: http://argparse.python-hosting.com/ argparse at PyPI: http://www.python.org/pypi/argparse/0.1.0 argparse module download: http://argparse.python-hosting.com/file/trunk/argparse.py?format=raw About this release ===

Re: help on pickle tool

2006-10-09 Thread Kirill Simonov
Hi, I'm somewhat late to this discussion, but as the author of PyYAML, I'd like to put my 2c in. On Thu, Oct 05, 2006 at 09:52:56PM -0700, virg wrote: > Is it possible to deserialize the data by java which serialized by > Python or is there any compatibility issue. Is there any equivalent > pic

Re: Python component model

2006-10-09 Thread Edward Diener No Spam
Echo wrote: > On 10/9/06, Edward Diener No Spam <[EMAIL PROTECTED]> > wrote: >> The definition of a component model I use below is a class which allows >> properties, methods, and events in a structured way which can be >> recognized, usually through some form of introspection outside of that >> c

Re: Python component model

2006-10-09 Thread Chaz Ginger
Edward Diener No Spam wrote: > [EMAIL PROTECTED] wrote: >> Edward> The definition of a component model I use below is a class >> which >> Edward> allows properties, methods, and events in a structured way >> which >> Edward> can be recognized, usually through some form of introspection

Re: Newbie - Stuck

2006-10-09 Thread Gary Herron
[EMAIL PROTECTED] wrote: > The perl version of this code works but not the python version. What am > I doing wrong? > > message = "abc" > password = "z12" > > scrambled = message ^ password > The error message (which you should have supplied) tells you why it fails. That operator does not operat

Re: Python component model

2006-10-09 Thread Edward Diener No Spam
[EMAIL PROTECTED] wrote: > Edward> The definition of a component model I use below is a class which > Edward> allows properties, methods, and events in a structured way which > Edward> can be recognized, usually through some form of introspection > Edward> outside of that class. Thi

Re: Newbie - Stuck

2006-10-09 Thread Christoph Haas
On Sunday 08 October 2006 14:09, [EMAIL PROTECTED] wrote: > The perl version of this code works but not the python version. What am > I doing wrong? > > message = "abc" > password = "z12" > > scrambled = message ^ password "abc" XOR "z12"? Strings don't have an __xor__ method. > I also wondered w

Re: Python component model

2006-10-09 Thread Echo
On 10/9/06, Edward Diener No Spam <[EMAIL PROTECTED]> wrote: > The definition of a component model I use below is a class which allows > properties, methods, and events in a structured way which can be > recognized, usually through some form of introspection outside of that > class. This structured

Re: intercepting keypresses, mouse movements, joystick movements.

2006-10-09 Thread Jordan
Another option is to look at pywin32, which I believe has the SetWindowsHook[Ex] commands, or to use ctypes (which is built in if you're using python2.5) to load the neccessary dll's to use that function. However, pyHook should be good unless you need something for the joystick (don't think that'

Re: People's names (was Re: sqlite3 error)

2006-10-09 Thread Hendrik van Rooyen
"Dennis Lee Bieber" <[EMAIL PROTECTED]>wrote: 8<-- > In the days of paper filing (I actually took Shorthand, and a > Business Machines & Filing course in High School to avoid Phys.Ed.) the > training for things like oriental names was to choose one for "surname

Newbie - Stuck

2006-10-09 Thread r3bol
The perl version of this code works but not the python version. What am I doing wrong? message = "abc" password = "z12" scrambled = message ^ password I also wondered why this errored as well... int(messege) Is it not meant to convert a string to a number? -- http://mail.python.org/mailman/l

Re: operator overloading + - / * = etc...

2006-10-09 Thread Georg Brandl
Bruno Desthuilliers wrote: > Steven D'Aprano wrote: >> On Sat, 07 Oct 2006 17:21:55 -0500, Tim Chase wrote: >> > With the caveat of the "=" mentioned in the subject-line (being > different from "==")...I haven't found any way to override > assignment in the general case. Why would

Re: file system iteration

2006-10-09 Thread rick
Thanks Tim and Rob... this works really well! -- http://mail.python.org/mailman/listinfo/python-list

Re: Python component model

2006-10-09 Thread skip
Edward> The definition of a component model I use below is a class which Edward> allows properties, methods, and events in a structured way which Edward> can be recognized, usually through some form of introspection Edward> outside of that class. This structured way allows visual t

Re: switching to numpy and failing, a user story

2006-10-09 Thread Robert Kern
Istvan Albert wrote: > No one is questioning one's right to try to sell a product/book etc. > But I happen to believe that trying to make money by selling the docs > is stupid, you'll scare away potential users, hinder the acceptance of > the product, further fragment the community of users needing

Re: Python component model

2006-10-09 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Edward Diener No Spam wrote: > I believe that Python should have a common components model for all RAD > development environments, as that would allow the Python programmer to > create a set of classes representing components which would work in any > environment. I want

Re: switching to numpy and failing, a user story

2006-10-09 Thread Robert Kern
Istvan Albert wrote: > No one is questioning one's right to try to sell a product/book etc. > But I happen to believe that trying to make money by selling the docs > is stupid, you'll scare away potential users, hinder the acceptance of > the product, further fragment the community of users needing

Python component model

2006-10-09 Thread Edward Diener No Spam
The definition of a component model I use below is a class which allows properties, methods, and events in a structured way which can be recognized, usually through some form of introspection outside of that class. This structured way allows visual tools to host components, and allows programme

Re: file system iteration

2006-10-09 Thread Duncan Booth
rick <[EMAIL PROTECTED]> wrote: > Georg Brandl wrote: > >> Which application needs to walk over ALL files? Normally, you just >> have a starting path and walk over everything under it. > > Searching for a file by name. Scanning for viruses. Etc. There are > lots of legitimate reason to walk all

Re: ANN: SimpleJSONRPCServer

2006-10-09 Thread Istvan Albert
Sybren Stuvel wrote: > aum enlightened us with: > > I've built a module called SimpleJSONRPCServer, which is essentially > > the same as the familiar python library module SimpleXMLRPCServer, > > except that it uses the JSON-RPC protocol. > > Thanks a lot! I've used XML-RPC on a low-speed device, a

Re: Tkinter & systray

2006-10-09 Thread hg
billie wrote: > Hi all. I'd like to develop a GUI-based application the most portable > as possible, able to run in systray. > I think that, for portability reasons, Tkinter could be the best > choice, so I tried to google a little bit about it. > According to this : > http://mail.python.org/piperm

Re: WSGI - How Does It Affect Me?

2006-10-09 Thread Gregory Piñero
Thanks for all the answers everyone. It's finally starting to come together for me. Bruno, I tried reading some tutorials but perhaps I made the content out to be more complicated than it really was and got confused. So my final question is if WSGI will work on any web hosting company that suppo

Re: A curses-game I need help with.

2006-10-09 Thread Gasten
Hi. I would like to know why no one have answered my post http://groups.google.com/group/comp.lang.python/browse_thread/thread/8424904058bd1734 . It were my first post here (and on the Usenet overall), so I would like to know what I did wrong. Too´many spellingmisstakes? Shitty code? No one underst

Re: intercepting keypresses, mouse movements, joystick movements.

2006-10-09 Thread TheSeeker
bryan rasmussen wrote: > Hi, > > I've been looking at autohotkey to do some different usability hacks > for windows http://www.autohotkey.com/ > one of the benefits of this language is it allows one to catch > keyboard usage, joystick usage, and mouse usage inputs very easily at > a global level o

Re: Dive Into Java?

2006-10-09 Thread Bjoern Schliessmann
Diez B. Roggisch wrote: > What do you mean by "from dumbness"? It didn't originate from the "dumbness" area of my brain (== it wasn't my honest opinion). It was meant satirical. > And in context of somebody seeking enlightment regarding java, > it's especially unhelpful and confusing I think. Wh

Re: Python to use a non open source bug tracker?

2006-10-09 Thread Paul Boddie
A.M. Kuchling wrote: > On 9 Oct 2006 06:36:30 -0700, > Paul Boddie <[EMAIL PROTECTED]> wrote: > > ... Meanwhile, despite the python.org codebase presumably running > > various commercial sites, ... > > Nothing should have given you this impression! python.org's > formatting is handled through a

Re: problem with split

2006-10-09 Thread Bruno Desthuilliers
hanumizzle wrote: (snip) > Regexes are usually passed as literals directly to re.compile(). For which definition of "usually" ? -- bruno desthuilliers python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for p in '[EMAIL PROTECTED]'.split('@')])" -- http://mail.python.org/mailma

Re: WSGI - How Does It Affect Me?

2006-10-09 Thread Ian Bicking
Gregory Piñero wrote: > What I'm most confused about is how it affects me. I've been writing > small CGI programs in Python for a while now whenever I have a need > for a web program. Is CGI now considered "Bad"? I've just always > found it easier to write something quickly with the CGI library

Re: operator overloading + - / * = etc...

2006-10-09 Thread Bruno Desthuilliers
Steven D'Aprano wrote: > On Sat, 07 Oct 2006 17:21:55 -0500, Tim Chase wrote: > With the caveat of the "=" mentioned in the subject-line (being different from "==")...I haven't found any way to override assignment in the general case. >>> Why would you want to do that? >> For the sa

Re: file system iteration

2006-10-09 Thread Georg Brandl
Jonathan Hartley wrote: > Georg Brandl wrote: > >> Which application needs to walk over ALL files? > > How about 'updatedb' for starters, the index-maintainer for the common > *nix command-line utility 'locate'. > > I'm pretty sure that os.walk( ) deals with symbolic links (by not > visiting t

Re: file system iteration

2006-10-09 Thread Georg Brandl
rick wrote: > Georg Brandl wrote: > >> Which application needs to walk over ALL files? Normally, you just have a >> starting path and walk over everything under it. > > Searching for a file by name. Scanning for viruses. Etc. There are lots > of legitimate reason to walk all paths from a central

Re: Python to use a non open source bug tracker?

2006-10-09 Thread A.M. Kuchling
On 9 Oct 2006 06:36:30 -0700, Paul Boddie <[EMAIL PROTECTED]> wrote: > ... Meanwhile, despite the python.org codebase presumably running > various commercial sites, ... Nothing should have given you this impression! python.org's formatting is handled through a custom script called Pyram

Re: can compile function have a bug?

2006-10-09 Thread ygao
Peter Otten wrote: > ygao wrote: > > compile('U"中"','c:/test','single') > > > d=compile('U"中"','c:/test','single') > d > > > exec(d) > > u'\xd6\xd0' > U"中" > > u'\u4e2d' > > > > > why is the result different? > > a bug or another reason? > > How that particular outp

Re: file system iteration

2006-10-09 Thread Jonathan Hartley
Georg Brandl wrote: >> Which application needs to walk over ALL files? How about 'updatedb' for starters, the index-maintainer for the common *nix command-line utility 'locate'. I'm pretty sure that os.walk( ) deals with symbolic links (by not visiting them) and ' /proc' type complexities by

  1   2   >