Unicode error in wx_gdi ?

2005-03-04 Thread Erik Bethke
Hello All, I still shaking out my last few bugs in my tile matching game: I am now down to one stumper for me: 1) when I initialize wxPython 2) from an exe that I have created with py2exe 3) when the executable is located on the desktop as opposed to somewhere on C or D directly 4) when My De

Re: file.getvalue() with _ or other characters

2005-03-04 Thread martijn
srry I needed some sleep. it works oke. But if you want to answer a question. I use this code: -- import StringIO import re import urllib2,htmllib, formatter class mvbHTMLParser(htmllib.HTMLParser): def __init__(self, formatter, verbose

Re: PEP 246 revision

2005-03-04 Thread Magnus Lie Hetland
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > > >I had a look at the new reference implementation of PEP 246 >(Object Adaptation) and I feel uneasy with one specific point >of this new version. I don't fully understand why it checks >if *the type of* the protocol has a method "__adapt_

Re: file.getvalue() with _ or other characters

2005-03-04 Thread Peter Otten
[EMAIL PROTECTED] wrote: > class mvbHTMLParser(htmllib.HTMLParser): > def __init__(self, formatter, verbose=0): > htmllib.HTMLParser.__init__(self,formatter,verbose) def anchor_end(self): self.anchor = None [...] > then the output is: > text_text > a_link[1] > >

curses & disable readline & replace stdin

2005-03-04 Thread Brano Zarnovican
Hi ! I'd like to init curses and still have working Python interactive command line. I found that you can replace stdin/stdout/stderr like this: #!/usr/bin/python -i import curses import sys import atexit # this doesn't help, anyway #del sys.modules['readline'] # global variable (curses window

Re: Text To Speech with pyTTS

2005-03-04 Thread Hans Georg Krauthaeuser
Peter wrote: I released a new version of the Windows installer for Python 2.3 that includes the missing _TTSFast.pyd file. Unfortunenately, the file TTSFast.py is missing, not _TTSFast.pyd. Hans Georg -- http://mail.python.org/mailman/listinfo/python-list

Wishful thinking : unix to windows script?

2005-03-04 Thread John Leslie
Or does anyone have a python script which takes a standard unix command as an argument and runs the pyton/windows equivalent on windows? -- http://mail.python.org/mailman/listinfo/python-list

Fast 2d brown/pink noise generation?

2005-03-04 Thread Mathias
Dear NG, I'm looking for a fast way to produce 2d-noise images with 1/f or 1/f^2 spectrum. I currently generate the noise via inverse FFT, but since I need lots of data (~10^7 for a monte carlo simulation) it needs to be really fast. Does someone know a faster way than my approach? - Dimensiona

Re: Ruby on Rails or Perl's Maypole..is there a Python equivalent

2005-03-04 Thread bruno modulix
Gary Nutbeam wrote: I count zpt as xml because page templates can operate in html or xml mode. I can understand this, but from a practical POV, ZPT are mainly (x)html templates. A valid (x)html page is a valid ZPT too. This has nothing in common with the hundreds of complicated XML conf files nee

Re: windows bat file question

2005-03-04 Thread Duncan Booth
Peter Hansen wrote: > Unfortunately, Google makes it hard to search for such things, > but after a while I was able to dig up this master reference: > > http://www.microsoft.com/resources/documentation/windows/xp/all/proddoc > s/en-us/percent.mspx You will find even more information if you try

Re: Communication between python scripts

2005-03-04 Thread Stephen Toledo-Brown
Heiko Wundram wrote: Am Dienstag, 1. März 2005 21:54 schrieb Chris: Is there a preferred method for having different scripts on different computers communicate with each other? You have several options at your disposal. 6) do something else which doesn't come to my mind just now. ;) The main one

"Static" python program

2005-03-04 Thread Daniel Frickemeier
Hi, I have a strange problem. I´m developing a small python-program wiht the mysql-python-module. The program should run on a server without any mysql-installation. Is there any posibility to "kompile" a python with static libaries? thanx Daniel -- http://mail.python.org/mailman/listinfo/pytho

Python glade tute

2005-03-04 Thread somesh
hello, I wrote a small tute for my brother to teach him python + glade, plz see, and suggest to make it more professional , In tute I discussed on Glade + Python for developing Applications too rapidly as ppls used to work on win32 platform with VB. http://www40.brinkster.com/s4somesh/glade/index.

[announcement] - python graph library

2005-03-04 Thread Maxim Khesin
Hello Folks, I recently started working on a graph-algorithms library in Python. What makes this one different from the other couple of libs that are available is a heavy influence from the C++ Boost Graph Library. There are IMO a lot of good ideas there, so I am attempting to translate the spi

Re: newbie, help with pythonpath

2005-03-04 Thread Eduardo Suarez
What do i need to add to the path? I have already tried the same with the PYTHONPATH variable. Thanks in advance, -Eduardo [otto:eduardo/ 501]$ python Python 2.3.5 (#2, Feb 9 2005, 00:38:15) [GCC 3.3.5 (Debian 1:3.3.5-8)] on linux2 Type "help", "copyright", "credits" or "license" for more inform

Re: There's GOT to be a better way!

2005-03-04 Thread [EMAIL PROTECTED]
Good call. I was just trying to be generic in my quickly put-together example. It's been a while since I've used Python so these things I easily forget :) 'object' here would be more aptly named 'MyObject'. -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode error in wx_gdi ?

2005-03-04 Thread Serge Orlov
Erik Bethke wrote: > Hello All, > > I still shaking out my last few bugs in my tile matching game: > > I am now down to one stumper for me: > 1) when I initialize wxPython > 2) from an exe that I have created with py2exe > 3) when the executable is located on the desktop as opposed to > somewhe

Re: Python glade tute

2005-03-04 Thread dimitri pater
nice start! screenshots would improve it a lot greetz, Dimitri On 4 Mar 2005 03:31:34 -0800, somesh <[EMAIL PROTECTED]> wrote: > hello, > I wrote a small tute for my brother to teach him python + glade, > plz see, and suggest to make it more professional , > In tute I discussed on Glade + Python

Creating module skeleton from unit tests

2005-03-04 Thread Edvard Majakari
Greetings, fellow Pythonistas! I'm about to create three modules. As an avid TDD fan I'd like to create typical 'use-cases' for each of these modules. One of them is rather large, and I wondered if it would be easy enough to create a code skeleton out of unit test module. Consider the following,

Re: Python glade tute

2005-03-04 Thread P
somesh wrote: hello, I wrote a small tute for my brother to teach him python + glade, plz see, and suggest to make it more professional , In tute I discussed on Glade + Python for developing Applications too rapidly as ppls used to work on win32 platform with VB. http://www40.brinkster.com/s4somesh

Re: Creating module skeleton from unit tests

2005-03-04 Thread Peter Maas
Edvard Majakari schrieb: Greetings, fellow Pythonistas! I'm about to create three modules. As an avid TDD fan I'd like to create typical 'use-cases' for each of these modules. One of them is rather large, and I wondered if it would be easy enough to create a code skeleton out of unit test module. I

Re: Wishful thinking : unix to windows script?

2005-03-04 Thread Steve Holden
John Leslie wrote: Or does anyone have a python script which takes a standard unix command as an argument and runs the pyton/windows equivalent on windows? This would seem to be a request of overkill of the worst kind, given the existing availability of tools like Cygwin (www.cygwin.com) and, more

Fast 2d brown/pink noise generation?

2005-03-04 Thread Mathias
Dear NG, I'm looking for a fast way to produce 2d-noise images with 1/f or 1/f^2 spectrum. I currently generate the noise via inverse FFT, but since I need lots of data (~10^7 for a monte carlo simulation) it needs to be really fast. Does someone know a faster way than my approach? - Dimensiona

win32 COM and data types / direction

2005-03-04 Thread Alexander Eisenhuth
Hello everybody, i wonder how the win32 COM extension handles different C-int types (short, int, long). Another question for me is weather the "out-direction" of parameter is supported "out of the box" ? To clarify look at the methode "FunWithTwoInts"

Re: Wishful thinking : unix to windows script?

2005-03-04 Thread Patrick Useldinger
John Leslie wrote: Or does anyone have a python script which takes a standard unix command as an argument and runs the pyton/windows equivalent on windows? There's not always an equivalent command. -pu -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating module skeleton from unit tests

2005-03-04 Thread Fabio Zadrozny
I think that the best approach I saw to this was in the Eclipse java ide... You can basically go on the declaration of self.obj = player.Player('Fred the Adventurer') press Ctrl+1 and it adds a suggestion to create the class Player. Then go to assert self.obj.name == 'Fred the Adventurer' press C

Re: Python glade tute

2005-03-04 Thread adamc
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2005-03-04, somesh <[EMAIL PROTECTED]> wrote: > hello, > I wrote a small tute for my brother to teach him python + glade, > plz see, and suggest to make it more professional , > In tute I discussed on Glade + Python for developing Applications too >

Re: Python glade tute

2005-03-04 Thread dimitri pater
hello, I would certainly want to collaborate on writing Python tutorial for kids (I've got a small kids myself (7, 5, 3)). I already wrote some tutorials that make heavy use of screenshots (serpia.com) but they are for big kids like us ;-) Please contact me, maybe we can work something out. I'd be

Re: "Static" python program

2005-03-04 Thread Pink
Daniel Frickemeier wrote: > Hi, > > I have a strange problem. > > I´m developing a small python-program wiht the mysql-python-module. > The program should run on a server without any mysql-installation. > Is there any posibility to "kompile" a python with static libaries? MySQL distributions (a

python upgrade process...

2005-03-04 Thread bruce
hi... i currently have a rh8.0 server that is a little messed up!! i need to know what's the best/right process to upgrade to the latest python/mod_python, and any associated libs i need to make sure that i don't break the gnome/httpd, or any other python dependent app... currently i have di

Re: Wishful thinking : unix to windows script?

2005-03-04 Thread Grant Edwards
On 2005-03-04, Patrick Useldinger <[EMAIL PROTECTED]> wrote: > John Leslie wrote: > >> Or does anyone have a python script which takes a standard unix >> command as an argument and runs the pyton/windows equivalent on >> windows? > > There's not always an equivalent command. If you install cygwin

Geneator/Iterator Nesting Problem - Any Ideas? 2.4

2005-03-04 Thread ChaosKCW
Hi Using Python 2.4 I am trying to procduce a generator which will return the results of dbi SQL statement using fetchmany for performance. So instead of fetching one record for each call, I will fetch batches of X (eg 100) and yeild each record in turn. For reasons of pure asthetics and my own

Re: Call variable as a function

2005-03-04 Thread Nick Coghlan
Steve Holden wrote: There's always a way: >>> def test(): ... print "hello" ... >>> var = "test" >>> eval("%s()" % var) hello I'd go with locals() for the simple case of a name lookup: Py> def test(): ... print "Hi there!" ... Py> var = "test" Py> locals()[var]() Hi there! Cheers, Nick. -- N

Re: Python glade tute

2005-03-04 Thread Harlin Seritt
Not to make light of your tutorial but it can use some editing (the English grammar and spelling is below par). I understand that most likely English is not your first language. Given that, I think you did a great job. If you like, email me back and I'll be glad to help out with that, but I can onl

Re: Setting default option values for Tkinter widgets

2005-03-04 Thread [EMAIL PROTECTED]
Eric, your tagline doesn't parse correctly on my Python 2.4 shell. -- http://mail.python.org/mailman/listinfo/python-list

[Numeric] column vector faster than row vector in mat multiply?

2005-03-04 Thread Zhang Le
Hi, I did a small benchmark of matrix-vector multiply operation using Numeric module. I'm a bit suprised to find matrix*col-vector is much faster than row-vector*matrix. I wonder whether other people have observed this fact too, and why? Below is the code I used, with output from my machine.

Re: Wishful thinking : unix to windows script?

2005-03-04 Thread Steven Bethard
Grant Edwards wrote: On 2005-03-04, Patrick Useldinger <[EMAIL PROTECTED]> wrote: John Leslie wrote: Or does anyone have a python script which takes a standard unix command as an argument and runs the pyton/windows equivalent on windows? There's not always an equivalent command. If you install cy

(no subject)

2005-03-04 Thread python-list-bounces+archive=mail-archive . com
#! rnews 2494 Newsgroups: comp.lang.python Path: news.xs4all.nl!newsspool.news.xs4all.nl!transit.news.xs4all.nl!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!wns13feed!worldnet.att.net!12.120.4.37!attcg2!ip.att.net!xyzzy!nntp From: Jeff Sandys <[EMAIL PROTECTED]> Subject: Re: Delete first line f

Re: Geneator/Iterator Nesting Problem - Any Ideas? 2.4

2005-03-04 Thread Steven Bethard
ChaosKCW wrote: For reasons of pure asthetics and my own learning I wanted it to look like this: def resultsetbatchgen(cursor, size=100): for results in (recordbatch for recordbatch in cursor.fetchmany(size)): for rec in results: yield rec Note that this is equivalent to:

Making things more functional in Python

2005-03-04 Thread gf gf
Is there a better, more FP style, more Pythonic way to write this: def compute_vectors(samples, dset): vectors = {} for d in dset: vectors[d] = [sample.get_val(d) for sample in samples] return vectors Namely, I'd like to get rid of the initilization (vector

Re: Making things more functional in Python

2005-03-04 Thread Michael Hoffman
gf gf wrote: Is there a better, more FP style, more Pythonic way to write this: def compute_vectors(samples, dset): vectors = {} for d in dset: vectors[d] = [sample.get_val(d) for sample in samples] return vectors Namely, I'd like to get rid of the initilizat

Re: Making things more functional in Python

2005-03-04 Thread Steve Holden
gf gf wrote: Is there a better, more FP style, more Pythonic way to write this: def compute_vectors(samples, dset): vectors = {} for d in dset: vectors[d] = [sample.get_val(d) for sample in samples] return vectors Namely, I'd like to get rid of the initilizat

Re: Setting default option values for Tkinter widgets

2005-03-04 Thread Steve Holden
[EMAIL PROTECTED] wrote: Eric, your tagline doesn't parse correctly on my Python 2.4 shell. So, are you using Windows? [EMAIL PROTECTED] /c/Python24/Lib/site-packages $ python -c 'print "".join([chr(154 - ord(c)) for c in "U(17zX(%,5.z5(17l8(%,5.Z*(93-965$l7+-"])' Eric Brunel [EMAIL PROTECTED] re

Re: Making things more functional in Python

2005-03-04 Thread Bill Mill
On Fri, 4 Mar 2005 08:36:49 -0800 (PST), gf gf <[EMAIL PROTECTED]> wrote: > Is there a better, more FP style, more Pythonic way to > write this: > > def compute_vectors(samples, dset): > vectors = {} > for d in dset: > vectors[d] = [sample.get_val(d) for sample in >

Re: winnt win32process.createProcess with stdout to file ?

2005-03-04 Thread david . humpherys
Aweseome! Many many thanks Roger ! You've made my day. The last thing that you may be able to help with... I'm using win32api.TerminateProcess(hProcess,3) to kill this process if it gets outta hand... but when i do so.. it seems that the stdout/stderr don't capture the output. here's my last chun

Re: Geneator/Iterator Nesting Problem - Any Ideas? 2.4

2005-03-04 Thread ChaosKCW
Hi Thanks this was very helpfull. Your final solution seems like the best (most elegant). I was trying to avoid the ugly while loops with breaks and this final one certainly does that. Thanks for your help . -- http://mail.python.org/mailman/listinfo/python-list

Re: Wishful thinking : unix to windows script?

2005-03-04 Thread Patrick Useldinger
Grant Edwards wrote: If you install cygwin there almost always is. If you install cygwin there's no need for what the OP describes. -pu -- http://mail.python.org/mailman/listinfo/python-list

Re: get textual content of a Xml element using 4DOM

2005-03-04 Thread uche . ogbuji
I suggest using minidom or pxdom [1] rather than 4DOM. If you insist on using 4DOM, xml.dom.ext.Print(node) or xml.dom.ext.PrettyPrint(node) does what you want. --Uche -- http://mail.python.org/mailman/listinfo/python-list

Re: get textual content of a Xml element using 4DOM

2005-03-04 Thread uche . ogbuji
I suggest using minidom or pxdom [1] rather than 4DOM. If you insist on using 4DOM, xml.dom.ext.Print(node) or xml.dom.ext.PrettyPrint(node) does what you want. [1] http://www.doxdesk.com/software/py/pxdom.html --Uche -- http://mail.python.org/mailman/listinfo/python-list

Re: best XSLT processor?

2005-03-04 Thread uche . ogbuji
Steve Holden: "I don't know what news reader you are using, but I wonder if I could ask you to retain just a little more context in your posts. If they were personal emails I would probably be able to follow the thread, but in a newsgroup it's always helpful when I see a comment such as your above

Re: Making things more functional in Python

2005-03-04 Thread Michael Hoffman
Steve Holden wrote: return dict([(d, sample.getval(d)) for d in dset for sample in samples]) That won't do what the original code does. This sets dict[d] to samples[-1].getval(d) instead of [sample.getval(d) for sample in samples]. -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/pytho

Re: Making things more functional in Python

2005-03-04 Thread Steve Holden
Michael Hoffman wrote: Steve Holden wrote: return dict([(d, sample.getval(d)) for d in dset for sample in samples]) That won't do what the original code does. This sets dict[d] to samples[-1].getval(d) instead of [sample.getval(d) for sample in samples]. My bad, I didn;t look closely enbough to se

Re: Downloadable python-dev archive February 2005 contains only one mail?

2005-03-04 Thread tlesher
Yes; it seems that the "advance" post by effbot messed up the archiving. If you get http://mail.python.org/pipermail/python-dev/2005-February.txt (without the .gz suffix), you'll get the whole archive. -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there way to determine which class a method is bound to?

2005-03-04 Thread Victor Ng
So I went digging through the documentation more and found the following: http://docs.python.org/ref/types.html There's a section titled "User-defined methods" which covers all the im_self, im_class attributes and what they are responsible for. vic On 25 Feb 2005 10:42:06 -0800, [EMAIL PROTECTE

Re: Unable to run IDLE Under Windows

2005-03-04 Thread maxwell
Peter Otten wrote: > Perhaps your configuration files contain bad data: > > # IDLE reads several config files to determine user preferences. This > # file is the default config file for general idle settings. ... > # On Windows2000 and Windows XP the .idlerc directory is at > # Documents and

[Job - Part Time - Local] Seeking Python Coder in South Alabama area.

2005-03-04 Thread John F.
Startup company in Fairhope, AL is seeking a strong python programmer in the Mobile, AL or Eastern Shore, AL area to assist in the development of legal practice management systems. Candidate must reside in the area. Position will be initially part time. Must be proficient with Freebsd/Postgresql/

Re: Setting default option values for Tkinter widgets

2005-03-04 Thread Kent Johnson
Steve Holden wrote: [EMAIL PROTECTED] wrote: Eric, your tagline doesn't parse correctly on my Python 2.4 shell. So, are you using Windows? If you interchange single and double quotes it works on Windows too python -c "print ''.join([chr(154 - ord(c)) for c in 'U(17zX(%,5.z^5(17l8(%,5.Z*(93-965$l7+

Easy way to check modules for python version compatibility?

2005-03-04 Thread Stephen Toledo-Brown
Given some Python source, is there any tool which can tell the mimimum level of Python required to run that source? If I distribute some code, I need to be able to say which level of Python users require to run it. -- Steve Toledo-Brown Speaking for myself only. Humans please use domain uk.ibm.c

Re: Wishful thinking : unix to windows script?

2005-03-04 Thread Max Erickson
you might also want to take a look at http://unxutils.sourceforge.net/ where are the tools are available in a single zip file. max -- http://mail.python.org/mailman/listinfo/python-list

Q: Module Shared Data

2005-03-04 Thread CatManDo
Disclaimer #1: I am a Python newbie, and I appreciate the vast documentation at python.org -- some of which I expect has the answer to my question if I can find it. I am working on a custom computational fluid dynamics code. I will create one or more compiled Python modules in C/C++ to provide ne

Re: Easy way to check modules for python version compatibility?

2005-03-04 Thread [EMAIL PROTECTED]
I do not think there's a direct way of telling it - but you can try to catch a DeprecationWarning, that is issued by most code deprecated modules -- http://mail.python.org/mailman/listinfo/python-list

Re: greedy match wanted

2005-03-04 Thread alexk
Thanks, I'll try your solution. Alex. -- http://mail.python.org/mailman/listinfo/python-list

Re: Unable to run IDLE Under Windows

2005-03-04 Thread Steve Holden
[EMAIL PROTECTED] wrote: Peter Otten wrote: Perhaps your configuration files contain bad data: # IDLE reads several config files to determine user preferences. This # file is the default config file for general idle settings. ... # On Windows2000 and Windows XP the .idlerc directory is at # D

__contains__ inconsistencies between Python 2.2 and 2.3

2005-03-04 Thread Anand S Bisen
Hello I have been developing a code that works pretty well on my python 2.3 and now when i am running it on my server where it is programmed to run it's giving me errors. I have been using __contains__ method and it fails on python 2.2 For example (Python 2.3) >> x="Hello World" >> print x.__co

Re: __contains__ inconsistencies between Python 2.2 and 2.3

2005-03-04 Thread Steven Bethard
Anand S Bisen wrote: For example (Python 2.3) >> x="Hello World" >> print x.__contains__("Hello") True (Python 2.2) >>> x="Hello world" >>> print x.__contains__("Hello") Traceback (most recent call last): File "", line 1, in ? TypeError: 'in ' requires character as left operand Is there any wo

Re: __contains__ inconsistencies between Python 2.2 and 2.3

2005-03-04 Thread Steve Holden
Anand S Bisen wrote: Hello I have been developing a code that works pretty well on my python 2.3 and now when i am running it on my server where it is programmed to run it's giving me errors. I have been using __contains__ method and it fails on python 2.2 For example (Python 2.3) >> x="Hello

Re: [Numeric] column vector faster than row vector in mat multiply?

2005-03-04 Thread Terry Reedy
"Zhang Le" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > I did a small benchmark of matrix-vector multiply operation using > Numeric module. I'm a bit suprised to find matrix*col-vector is much > faster than row-vector*matrix. I wonder whether other people have > observed t

enum question

2005-03-04 Thread M.N.A.Smadi
does python support a C-like enum statement where one can define a variable with prespesified range of values? thanks m.smadi -- http://mail.python.org/mailman/listinfo/python-list

Re: Communication between python scripts

2005-03-04 Thread [EMAIL PROTECTED]
Another reason NOT to use XML-RPC: PSF-2005-001 - SimpleXMLRPCServer.py allows unrestricted traversal http://python.org/security/PSF-2005-001/ -- http://mail.python.org/mailman/listinfo/python-list

Re: win32 COM and data types / direction

2005-03-04 Thread Thomas Heller
Alexander Eisenhuth <[EMAIL PROTECTED]> writes: > Hello everybody, > > i wonder how the win32 COM extension handles different C-int types > (short, int, long). Another question for me is weather the > "out-direction" of parameter is supported "out of the box" ? > > To clarify look at the methode "

Re: winnt win32process.createProcess with stdout to file ?

2005-03-04 Thread Roger Upole
TerminateProcess doesn't give it a chance to exit normally and do any cleanup that would happen if it exited itself. It may not have been able to flush its file buffers, etc. Does the executable have any way to signal it to exit ? Roger <[EMAIL PROTECTED]> wrote in message news:[EMAIL

Problem with variabels in Tkinter

2005-03-04 Thread Svennglenn
I have a problem with a program i'm making in Tkinter. The code is avaliable at: http://paste.plone.org/943 When i'm running the program and enters a value and press the button in the dialog window that comes up when a press the button "Lägg till spelare" (add a player in swedish) I get this error

Integer From A Float List?!?

2005-03-04 Thread andrea_gavana
Hello NG, I was wondering if there is a way to obtain, from a list of floats, a list of integers without loops. Probably is a basic question, but I can't find an answer... I have had my eyes blinded by Matlab for years, but now that I discovered Python+wxPython there seems to be no limit on wh

Python 2.4 removes None data type?

2005-03-04 Thread [EMAIL PROTECTED]
I just read in the 'What's New in Python 2.4' document that the None data type was converted to a constant: http://python.org/doc/2.4/whatsnew/node15.html """ # None is now a constant; code that binds a new value to the name "None" is now a syntax error. """ So, what's the implications of this?

Re: Integer From A Float List?!?

2005-03-04 Thread Bill Mill
On Fri, 4 Mar 2005 22:35:48 +0100, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hello NG, > > I was wondering if there is a way to obtain, from a list of floats, > a list of integers without loops. Probably is a basic question, but I can't > find an answer... I have had my eyes blinded by Ma

Suspicious header

2005-03-04 Thread phil
everything I post to this list bounces awaiting moderator approval, due to suspicious header. COuld someone tell me what's wrong. I'm on lots of list with no problem. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.4 removes None data type?

2005-03-04 Thread Tim Peters
[EMAIL PROTECTED] > I just read in the 'What's New in Python 2.4' document that the None > data type was converted to a constant: > http://python.org/doc/2.4/whatsnew/node15.html > > """ > # None is now a constant; code that binds a new value to the name > "None" is now a syntax error. > """ > > S

Re: Python 2.4 removes None data type?

2005-03-04 Thread Gary D. Duzan
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > >I just read in the 'What's New in Python 2.4' document that the None >data type was converted to a constant: >http://python.org/doc/2.4/whatsnew/node15.html > >""" ># None is now a constant; code that binds a new valu

Re: Suspicious header

2005-03-04 Thread James Stroud
This was happening to me for a while but stopped. I think it has to do with your mail server. Perhaps you could find another. If you are at a company, you might want to talk to your sysadmin and see if he can change the mail program. How did you get this latest message through? You know, with th

survey

2005-03-04 Thread Dave Zhu
Hello All, Is there any survey on scripting languages? I would like to get information on several scripting languages including Python, Perl, Ruby, Tcl, etc. Thanks Dave __ Celebrate Yahoo!'s 10th Birthday! Yahoo! Netrospective: 100 M

Re: Python 2.4 removes None data type?

2005-03-04 Thread Warren Postma
[EMAIL PROTECTED] wrote: I just read in the 'What's New in Python 2.4' document that the None data type was converted to a constant: http://python.org/doc/2.4/whatsnew/node15.html Implication: A long standing wart in Python now gone. Its time to gloat. Are there any really evil glitches LEFT in P

Indexing strings

2005-03-04 Thread Fred
Hi everybody I am searching for a possibility, to find out, what the index for a certain lettyer in a string is. My example: for x in text: if x == ' ': list = text[: # There I need the index of the space the program found during the loop... Is there and possibility to find the ind

Re: get textual content of a Xml element using 4DOM

2005-03-04 Thread Frank Abel Cancio Bello
Hi: PrettyPrint or Print return the value to the console, and i need keep this value in a string variable to work with it, how can i do this? thanks to Uche Frank Abel -Original Message- From: [EMAIL PROTECTED] To: python-list@python.org Date: 4 Mar 2005 09:23:07 -0800 Subject: Re: get

Re: Problem with variabels in Tkinter

2005-03-04 Thread Steve Holden
Svennglenn wrote: I have a problem with a program i'm making in Tkinter. The code is avaliable at: http://paste.plone.org/943 When i'm running the program and enters a value and press the button in the dialog window that comes up when a press the button "Lägg till spelare" (add a player in swedish)

Re: Indexing strings

2005-03-04 Thread Patrick Useldinger
Fred wrote: I am searching for a possibility, to find out, what the index for a certain lettyer in a string is. My example: for x in text: if x == ' ': list = text[: # There I need the index of the space the program found during the loop... Is there and possibility to find the index o

Re: Indexing strings

2005-03-04 Thread Steve Holden
Fred wrote: Hi everybody I am searching for a possibility, to find out, what the index for a certain lettyer in a string is. My example: for x in text: if x == ' ': list = text[: # There I need the index of the space the program found during the loop... Is there and possibility to fin

Re: Gordon McMillan installer and Python 2.4

2005-03-04 Thread David Bolen
[EMAIL PROTECTED] (Svein Brekke) writes: > Has anyone else succeded in using McMillans installer on 2.4? > Thanks for any help. I have a feeling that it may be related to the fact that the starter modules (run*.exe) were built with VC6, which matches with Python builds up to 2.3, but not 2.4 (whi

Re: Python 2.4 removes None data type?

2005-03-04 Thread Steve Holden
Warren Postma wrote: [EMAIL PROTECTED] wrote: I just read in the 'What's New in Python 2.4' document that the None data type was converted to a constant: http://python.org/doc/2.4/whatsnew/node15.html Implication: A long standing wart in Python now gone. Its time to gloat. Are there any really e

Re: Indexing strings

2005-03-04 Thread Fred
> Use the index method, e.g.: text.index(' '). > What exactly do you want to do? That was exactely what I was searching for. I needed a program, that chopped up a string into its words and then saves them into a list. I think I got this done... Thanks for the help -- http://mail.python.org/mailma

Re: Python 2.4 removes None data type?

2005-03-04 Thread Michael Hoffman
Warren Postma wrote: Implication: A long standing wart in Python now gone. Its time to gloat. Are there any really evil glitches LEFT in Python? Now go look at Perl and come back and say "Thank-deity-of-my-choice-I'm-using-Python". The fact that True and False are not constants? -- Michael Hoffm

Re: Python 2.4 removes None data type?

2005-03-04 Thread Roy Smith
In article <[EMAIL PROTECTED]>, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I just read in the 'What's New in Python 2.4' document that the None > data type was converted to a constant: > http://python.org/doc/2.4/whatsnew/node15.html > > """ > # None is now a constant; code that binds a ne

Re: creating .NET clients with python

2005-03-04 Thread John J. Lee
Guy Robinson <[EMAIL PROTECTED]> writes: > Can anyone confirm if there is a python library that can allow me to > create .NET clients in python. > > My understanding is both IronPython and python for .NET can't create > python .net clients? IIUC, IronPython can, but it's not ready for production

Re: survey

2005-03-04 Thread George Sakkis
"Dave Zhu" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello All, > > Is there any survey on scripting languages? I would > like to get information on several scripting languages > including Python, Perl, Ruby, Tcl, etc. > > Thanks > > Dave After a little googling, that's what I

Re: tkinter entry eat chars?

2005-03-04 Thread Harlin Seritt
You can use the textvariable option for the Entry widget. Set a bind event for this widget that when any key pressed the StringVar() will be polled via StringVar().get(). You do some checking for certain chars you don't want entered and then delete them as they occur. Harlin "phil" <[EMAIL PROTEC

Re: windows bat file question

2005-03-04 Thread Alan Gauld
On 4 Mar 2005 10:18:08 GMT, Duncan Booth <[EMAIL PROTECTED]> wrote: > You will find even more information if you try 'set /?' or 'for /?' at a > command prompt. As you say, you can now do quite complicated scripting in > command files but it needs masochism second only to Perl programming. And u

Re: Explicit or general importing of namespaces?

2005-03-04 Thread Harlin Seritt
I think the bottom line on this is using your own sense of risk/reward with each given module imported. Some modules (Tkinter comes to mind) it makes sense to pollute while others it doesn't. Harlin "Peter Hansen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Peter Mayne wrote:

Re: enum question

2005-03-04 Thread Larry Bates
Not completely sure I understand (my C is weak). But you can do: x=range(9) x's contents will be [0,1,2,3,4,5,6,7,8] or x=range(12,25) x's conetnst will be [12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24] if you mean a way to limit x's contents to a predefined list of values, you need to

Re: survey

2005-03-04 Thread Alan Gauld
On Fri, 4 Mar 2005 14:14:05 -0800 (PST), Dave Zhu <[EMAIL PROTECTED]> wrote: > Is there any survey on scripting languages? I would > like to get information on several scripting languages > including Python, Perl, Ruby, Tcl, etc. There are several such comparisons on the web but most will natural

Re: Ruby on Rails or Perl's Maypole..is there a Python equivalent

2005-03-04 Thread John J. Lee
Gary Nutbeam <[EMAIL PROTECTED]> writes: > D H wrote: [...] > > Check out Castle on Rails for .NET/Mono. It is still in early > > development, but you can use it with C#, VB, or boo, and I'm sure > > eventually with IronPython as well. > > Thanks for the feedback. I should have been more specific

Re: urllib2 meta-refresh

2005-03-04 Thread John J. Lee
JanC <[EMAIL PROTECTED]> writes: > Artificial Life schreef: > > > urllib2 does not seem to be able to handle META-REFRESH in an html > > document. I just get back the html to the page that is supposed to > > forward me to the intended page. Any way around this? > > Have a look at the HTTPRefres

  1   2   >