Re: While and If messing up my program?

2005-10-07 Thread CJ
CJ <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: Thanks! I think I've nailed it. I appreciate all the input! -- http://mail.python.org/mailman/listinfo/python-list

Re: "no variable or argument declarations are necessary."

2005-10-07 Thread Paul Rubin
[EMAIL PROTECTED] (Alex Martelli) writes: > ap.py:4: No global (test) found > ap.py:5: Local variable (ego1d) not used > Helen:/tmp alex$ > > If you're so typo-prone and averse to unittests that you consider this > kind of issue to be a serious problem, just use pychecker and get > informed about

Re: "no variable or argument declarations are necessary."

2005-10-07 Thread Alex Martelli
Antoon Pardon <[EMAIL PROTECTED]> wrote: ... > >> egold = 0: > >> while egold < 10: > >> if test(): > >> ego1d = egold + 1 > >> > > > > Oh come on. That is a completely contrived example, > > No it is not. You may not have had any use for this > kind of code, but unfamiliary with

Re: Pythoncard mental block

2005-10-07 Thread Gregory Piñero
The Python-Card guys are really helpful, <[EMAIL PROTECTED]>, you may have to register on sourceforge to get on their list. In the meantime I went ahead and cc'd them on this.  Python-Card guys, make sure to cc Steven as he may not be on the list. -Greg On 10/7/05, Steven D'Aprano <[EMAIL PROTECT

Re: Best way to share a python list of objects

2005-10-07 Thread George Sakkis
"kyle.tk" <[EMAIL PROTECTED]> wrote: > So I have a central list of python objects that I want to be able to > share between different process that are possibly on different > computers on the network. Some of the processes will add objects to > list and another process will be a GUI that will view

Weekly Python Patch/Bug Summary

2005-10-07 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 341 open ( +4) / 2953 closed ( +6) / 3294 total (+10) Bugs: 884 open (-28) / 5321 closed (+43) / 6205 total (+15) RFE : 196 open ( +1) / 187 closed ( +0) / 383 total ( +1) New / Reopened Patches __ Make fcnt

Re: Objects with different data views

2005-10-07 Thread George Sakkis
"Steven D'Aprano" <[EMAIL PROTECTED]> wrote: > I'm not sure how to do this, or where to start looking for the right > information, so any advice would be appreciated. > > I want to implement a class with two (or more) different ways of looking > at its attributes. > > One example of this might be

Python's Performance

2005-10-07 Thread Dave
Hello All,   I would like to gather some information on Python's runtime performance. As far as I understand, it deals with a lot of string objects. Does it require a lot string processing during program execution? How does it handle such time-consuming operations? Is there a way to find out how m

Re: GUI on Macintosh

2005-10-07 Thread Robert Kern
[EMAIL PROTECTED] wrote: > I am using Python 2.3.3 on an Mac OS9 system. I am looking for a build > of Python 2.3.3+ with a built in GUI, since Tk is missing. One day I > hope to upgrade to a new Mac with OSX on it, so a GUI that is available > on OS9 and OSX is preferable. I don't want to write

Re: PIL Image can't open png file with "I"?

2005-10-07 Thread Do Re Mi chel La Si Do
Hi ! Perhaps... ";" better than "," : im=Image.open(r"C:\vodka3.png"); im.show() Perhaps... more simplist : im=Image.open(r"C:\vodka3.png").show() Perhaps... other thing ? @-salutations Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: noob question Letters in words?

2005-10-07 Thread Steven D'Aprano
On Fri, 07 Oct 2005 22:21:38 -0400, Ivan Shevanski wrote: > Yes, I realize that. . .Heres another question then. I was trying somehting > before so that if the user just pressed enter by accident, it would not > accept the input and ask them to put in another. But the thing is I couldnt > get i

Re: noob question Letters in words?

2005-10-07 Thread Steven D'Aprano
On Sat, 08 Oct 2005 13:19:48 +1000, Steven D'Aprano wrote: > > def count_matches(s, words): > temp = [word.lower().startswith(s) for word in words] > return len(temp) Oops! A *serious* bug in that code :-( Replace "return len(temp)" with "return len(filter(None, temp))". -- Steven.

Re: noob question Letters in words?

2005-10-07 Thread Steven D'Aprano
On Fri, 07 Oct 2005 22:06:31 -0400, Ivan Shevanski wrote: > Right but see what if the user wants to type Start? I've already used the > number menu but too many people get confused by it. . .Any other ideas? Then let them type either the word or the number. Don't penalise your smart users becaus

Re: noob question Letters in words?

2005-10-07 Thread Paul Rubin
"Ivan Shevanski" <[EMAIL PROTECTED]> writes: > Alright, I'm going to stop trying to defend my idea since it's > obviously a bad one. What do you recommend? Just choose the options that you present carefully. If you have unsophisticated users and you want to be a bit fancier, put up a GUI so they

Re: noob question Letters in words?

2005-10-07 Thread Ivan Shevanski
>Is it *really* a good idea if the user types "STOP!!!" and it has the >same effect as if they typed "Start please"? > >I've heard of "Do what I mean, not what I said" systems, which are usually >a really bad idea, but this is the first time I've seen a "Do what I don't >mean, not what I said" syst

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-10-07 Thread Steven D'Aprano
On Fri, 07 Oct 2005 18:03:20 -0700, Luis M. Gonzalez wrote: > Continuing with this off-topic thread about british accent and > movies... > I've always asked myself why do Hollywood movies about the Roman Empire > show the Emperors and all the nobles speaking with british accent? > They were italia

Re: noob question Letters in words?

2005-10-07 Thread Ivan Shevanski
Yes, I realize that. . .Heres another question then. I was trying somehting before so that if the user just pressed enter by accident, it would not accept the input and ask them to put in another. But the thing is I couldnt get it to work. I tryed if choice1 == None it would loop and ask for a n

Re: noob question Letters in words?

2005-10-07 Thread Steven D'Aprano
On Fri, 07 Oct 2005 18:03:02 -0700, [EMAIL PROTECTED] wrote: > Why not just look at the first letter the user types instead of > the whole string? > > if choice1[0] in ('1', 'S', 's'): > #do first option > if choice1[0] in ('2', 'E', 'e'): > #do second option Is it *really* a good id

Re: noob question Letters in words?

2005-10-07 Thread Paul Rubin
"Ivan Shevanski" <[EMAIL PROTECTED]> writes: > choice1 = raw_input("> ") choice1 is now the whole string that the user types > Is there a way (I searched for a module but didnt find one) that I can > do something like this? > > if choice1 in ('1', 'S', 's'): > #do first option You'd use cho

Re: noob question Letters in words?

2005-10-07 Thread Steven D'Aprano
On Fri, 07 Oct 2005 20:46:39 -0400, Ivan Shevanski wrote: > Alright heres another noob question for everyone. Alright, say I have a > menu like this. > > print "1. . .Start" > print "2. . .End" > choice1 = raw_input("> ") > > and then I had this to determine what option. Firstly, you need to

Re: noob question Letters in words?

2005-10-07 Thread Ivan Shevanski
>Perhaps a better idea is to present the user with a choice that cannot >be deviated from, along the lines of... > >def main(): > print "1.\tStart" > print "2.\tSomething Else" > print "3.\tStop" > > x = raw_input() > if x is '1': print 'Start' > elif x is '2': print 'Something else' >

Best way to share a python list of objects

2005-10-07 Thread kyle.tk
So I have a central list of python objects that I want to be able to share between different process that are possibly on different computers on the network. Some of the processes will add objects to list and another process will be a GUI that will view objects in the list. I want this all to happe

Re: GUI on Macintosh

2005-10-07 Thread Rob Cowie
FYI... the preinstalled python distributed with OS X 10.4 includes the Tk and wxPython GUI frameworks. I am unaware of how to get either of these installed on OS 9. -- http://mail.python.org/mailman/listinfo/python-list

Re: Pythoncard mental block

2005-10-07 Thread Steven D'Aprano
On Fri, 07 Oct 2005 10:25:24 -0700, jlocc wrote: > Hi!! > > I am working on a school project and I decided to use PythonCard and > wxPython for my GUI development. I need a password window that will > block unwanted users from the system. I got the pop-up password > question to work... I haven't

Re: noob question Letters in words?

2005-10-07 Thread Rob Cowie
A string can be thought of as a tuple of characters. Tuples support membership testing thus... choice1 = raw_input("> ") if '1' or 's' or 'S' in choice1: #do something elif '2' or 'e' or E' in choice1: #do something It doesn't seem to me to be a good idea; If the input is 'Start', option1 is

Re: [Info] PEP 308 accepted - new conditional expressions

2005-10-07 Thread Steven D'Aprano
On Fri, 07 Oct 2005 18:24:28 +0100, Robin Becker wrote: > Eric Nieuwland wrote: > >> >> >> Ever cared to check what committees can do to a language ;-) >> > > well there goes democracy :( For fans of Terry Pratchett's Discworld series, there is: Vimes had once discussed the Ephebian i

Re: Python, alligator kill each other

2005-10-07 Thread Diez B. Roggisch
infidel wrote: > By Denise Kalette > Associated Press > > MIAMI - The alligator has some foreign competition at the top of the > Everglades food chain, and the results of the struggle are horror-movie > messy. > > A 13-foot Burmese python recently burst after it apparently tried to > swallow a li

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-10-07 Thread [EMAIL PROTECTED]
Luis M. Gonzalez wrote: > Grant Edwards ha escrito: > > While we're off this topic again topic, I was watching a BBC > > series "Space Race" the other night. The British actors did a > > passable job with the American accents in the scenes at Fort > > Bliss in Texas, but the writers wrote British

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-10-07 Thread Luis M. Gonzalez
Grant Edwards ha escrito: > While we're off this topic again topic, I was watching a BBC > series "Space Race" the other night. The British actors did a > passable job with the American accents in the scenes at Fort > Bliss in Texas, but the writers wrote British English lines for > them to speak

Re: noob question Letters in words?

2005-10-07 Thread [EMAIL PROTECTED]
Ivan Shevanski wrote: > Alright heres another noob question for everyone. Alright, say I have a > menu like this. > > print "1. . .Start" > print "2. . .End" > choice1 = raw_input("> ") > > and then I had this to determine what option. > > > if choice1 in ('1', 'Start', 'start'): > #do first

Re: Simulating low bandwidth network on localhost

2005-10-07 Thread Robert Pagano
check out dummynet... http://www.freebsd.org/cgi/man.cgi?query=dummynet&sektion=4 On 7 Oct 2005 16:48:13 -0700, "qvx" <[EMAIL PROTECTED]> wrote: >I would like to test my CherryPy application in varying network >conditions, ranging from localhost full speed to low badwidth (ie. >14.4kbps) and v

Re: C/API Clarification

2005-10-07 Thread Sam
Jeremy Moles writes: in the world I got the idea from! According to the docs, METH_VARARGS is (PyObject*, PyObject*)? Right. My prototype shouldn't even compile... but it Why wouldn't it compile? 2. No where in the docs does it show how to "correctly" create an in

noob question Letters in words?

2005-10-07 Thread Ivan Shevanski
Alright heres another noob question for everyone. Alright, say I have a menu like this. print "1. . .Start" print "2. . .End" choice1 = raw_input("> ") and then I had this to determine what option. if choice1 in ('1', 'Start', 'start'): #do first option if choice1 in ('2', 'End', 'end'):

Re: os.access with wildcards

2005-10-07 Thread mike
Hi Dan, It works, it's elegant, and it uses python strengths. I guess I have to settle the question of who my audience is. That is who do I want to make it readable for. All the solutions so far require some python specific knowledge, and there are some which are horendous even at that. Perhaps

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-10-07 Thread Jack Diederich
On Fri, Oct 07, 2005 at 10:28:18PM -, Grant Edwards wrote: > On 2005-10-07, Jack Diederich <[EMAIL PROTECTED]> wrote: > > > > It is a bit odd that You'uns, yins, and yous are confined to Pennsylvania > > and very distinct east-west regions inside PA at that (Pittsburgh vs > > Philly orbits). >

Re: Simulating low bandwidth network on localhost

2005-10-07 Thread Grant Edwards
On 2005-10-07, qvx <[EMAIL PROTECTED]> wrote: > I would like to test my CherryPy application in varying > network conditions, ranging from localhost full speed to low > badwidth (ie. 14.4kbps) and variable latency from milliseconds > range to seconds range. If you've got a machine with two serial

Re: Simulating low bandwidth network on localhost

2005-10-07 Thread qvx
Thanks. I'll try to find a version that works under Windows. So far I had little luck finding it. qvx -- http://mail.python.org/mailman/listinfo/python-list

Re: Simulating low bandwidth network on localhost

2005-10-07 Thread Grig Gheorghiu
Try dummynet ( and/or Google for it) Grig -- http://mail.python.org/mailman/listinfo/python-list

Re: os.access with wildcards

2005-10-07 Thread Dan Sommers
On 7 Oct 2005 16:17:22 -0700, "mike" <[EMAIL PROTECTED]> wrote: > Thanks Mike. Would there be an idiom using "is"? > somethng like > glob.glob('2005*) is not Empty > I have not figured out what to put on the right hand > side of "is" Don't put anything there: if glob.glob('2005*'):

Simulating low bandwidth network on localhost

2005-10-07 Thread qvx
I would like to test my CherryPy application in varying network conditions, ranging from localhost full speed to low badwidth (ie. 14.4kbps) and variable latency from milliseconds range to seconds range. How can I simulate this? Are there some tricks to be played with Python or is there a speciali

Re: Matching zero only once using RE

2005-10-07 Thread Fredrik Lundh
Mike Meyer wrote: > I think it's time to form a Committee for the Prevention of Regular > Expression Abuse. on the other hand, the RE engine uses a more advanced scanning algorithm than string find, which means that constant RE:s can in fact be faster under some circumstances (certain patterns, t

Re: PyObject_New

2005-10-07 Thread Jeremy Moles
I just noticed this response right as I sent my other message. For some reason my news reader didn't thread it, so it was all by itself... Please disregard the rant concerning creation of objects in C. :) /me hugs Martin /me ducks and hides! On Fri, 2005-10-07 at 09:57 +0200, "Martin v. Löwis" wr

C/API Clarification

2005-10-07 Thread Jeremy Moles
First of all, let me say I really do appreciate--and frequently use--the ample and easy to read Python documentation. However, there are a few things I'm still unclear on, even after asking multiple questions here on the list (thanks everyone!) and reading the "Extending" and "Reference" docs from

Re: Matching zero only once using RE

2005-10-07 Thread Aahz
In article <[EMAIL PROTECTED]>, Mike Meyer <[EMAIL PROTECTED]> wrote: > >I think it's time to form a Committee for the Prevention of Regular >Expression Abuse. 'Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems.' --Jamie

Re: os.access with wildcards

2005-10-07 Thread mike
Thanks Mike. Would there be an idiom using "is"? somethng like glob.glob('2005*) is not Empty I have not figured out what to put on the right hand side of "is" I guess, for readability, nothing has come up that seems _great_. One last effort would be to hide the code behind a method, and u

Re: unable to import os

2005-10-07 Thread Fredrik Lundh
"ktxn1020" wrote: > The script ran well independently using Python's Integrated > Development Environment version 2.4.1. When it is called from Borland > C++ Builder 5 with python for delphi version 3.16, it is complained at > the line "import os", but not at the line "import nt". How can > I reso

unable to import os

2005-10-07 Thread ktxn1020
Hi Experts, I built a scrip file which cleans up the old log files starting from the oldest till the necessary free space on the drive reaches. The script ran well independently using Python's Integrated Development Environment version 2.4.1. When it is called from Borland C++ Builder 5 with pyth

ANN: Frog 1.7 (blog server)

2005-10-07 Thread Irmen de Jong
I'm happy to announce the release of Frog 1.7 Frog is a Blog server application written for Snakelets. It is small but has many features, such as BBcode markup, XHTML+CSS page output, multiple users, no database required, anti-spam measures, email notification, Smileys, RSS feeds, and more. For

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-10-07 Thread Grant Edwards
On 2005-10-07, Jack Diederich <[EMAIL PROTECTED]> wrote: > "What word(s) do you use to address a group of two or more people?" > http://cfprod01.imt.uwm.edu/Dept/FLL/linguistics/dialect/staticmaps/q_50.html > A map from a US dialect survey. Click around for many more questions. Cool. While we'r

Re: Contest snub?

2005-10-07 Thread Lasse Vågsæther Karlsen
[EMAIL PROTECTED] wrote: > Notice anything strange here? The Python entry seems to have edged the PHP > entries, but is not declared the victor. Source is missing as well (the > archive > is empty.) > > http://www.apress.com/promo/fractal/seesource.html > > H... an irrational fear of snakes

Contest snub?

2005-10-07 Thread maxx
Notice anything strange here? The Python entry seems to have edged the PHP entries, but is not declared the victor. Source is missing as well (the archive is empty.) http://www.apress.com/promo/fractal/seesource.html H... an irrational fear of snakes perhaps? -- http://mail.python.org/mail

Re: socketServer questions

2005-10-07 Thread Paul Rubin
rbt <[EMAIL PROTECTED]> writes: > The server just logs data, nothing else. It's not private or important > data... just sys admin type stuff (ip, mac addy, etc.). I just don't > want some script kiddie discovering it and trying to 'hack' it. By doing > so, they'd fill the log up with crap. So, If t

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-10-07 Thread Terry Hancock
On Friday 07 October 2005 04:21 pm, Grant Edwards wrote: > On 2005-10-07, Terry Hancock <[EMAIL PROTECTED]> wrote: > > > Well, there's your problem. He learned from engineers. Engineers > > can't speak English. I was instructed in my "Engineering Statics" > > class that a three-dimensional struct

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-10-07 Thread Jack Diederich
On Fri, Oct 07, 2005 at 09:14:51PM -, Grant Edwards wrote: > On 2005-10-07, Terry Hancock <[EMAIL PROTECTED]> wrote: > > > Of course, just to keep y'all on your toes, we Texans have not only > > construed "their" to singular, but also "you", and added a new > > plural "y'all". > > AFAICT, in

Re: dictionaries/pointers

2005-10-07 Thread Dave Hansen
On 7 Oct 2005 14:23:49 -0700, "Rob Conner" <[EMAIL PROTECTED]> wrote: >I dont know how to do this and can't think of a simple way to. > >All I want is a dictionary where two keys point to the same object. >(to steal the ascii art from >http://starship.python.net/crew/mwh/hacks/objectthink.html) >I

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-10-07 Thread Terry Hancock
On Friday 07 October 2005 03:44 pm, Steve Holden wrote: > Precisely because there *is* such a thing as a saving. If I buy a $100 > gumball for $80 I have achieved a saving of 20%. Nope, that's incorrect American. ;-) You can say "I bought a $100 gumball for $80, saving 20%," or "If I buy a $100

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-10-07 Thread Dave Hansen
On Fri, 7 Oct 2005 16:18:57 -0500, Terry Hancock <[EMAIL PROTECTED]> wrote: >On Friday 07 October 2005 01:31 pm, Dave Hansen wrote: Actually, I didn't, though I did respond to it. Please watch your attributions. Thanks, -=Dave -- Change is inevitable, progress i

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-10-07 Thread Dave Hansen
On Fri, 07 Oct 2005 21:44:29 +0100, Steve Holden <[EMAIL PROTECTED]> wrote: >Terry Hancock wrote: >> On Friday 07 October 2005 03:01 am, Steve Holden wrote: >> >>>OK, so how do you account for the execresence "That will give you a >>>savings of 20%", which usage is common in America? >> >> >>

Re: dictionaries/pointers

2005-10-07 Thread Erik Max Francis
Rob Conner wrote: > I dont know how to do this and can't think of a simple way to. > > All I want is a dictionary where two keys point to the same object. > (to steal the ascii art from > http://starship.python.net/crew/mwh/hacks/objectthink.html) > I want sometihng like this: > > ,--.

dictionaries/pointers

2005-10-07 Thread Rob Conner
I dont know how to do this and can't think of a simple way to. All I want is a dictionary where two keys point to the same object. (to steal the ascii art from http://starship.python.net/crew/mwh/hacks/objectthink.html) I want sometihng like this: ,--. +---+ | dict |-->|+-+|

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-10-07 Thread Grant Edwards
On 2005-10-07, Terry Hancock <[EMAIL PROTECTED]> wrote: > Well, there's your problem. He learned from engineers. Engineers > can't speak English. I was instructed in my "Engineering Statics" > class that a three-dimensional structure connecting non-coplanar > points in space was called a "tetrahe

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-10-07 Thread Grant Edwards
On 2005-10-07, Terry Hancock <[EMAIL PROTECTED]> wrote: > Of course, just to keep y'all on your toes, we Texans have not only > construed "their" to singular, but also "you", and added a new > plural "y'all". AFAICT, in many parts of "The South", y'all is now used in the singular (e.g. "y'all" is

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-10-07 Thread Terry Hancock
On Friday 07 October 2005 01:31 pm, Dave Hansen wrote: > >Don't get me started on _that_ one. I found it particularly > >horrifying that Jimmy Carter pronounced it "nucular" -- he had > >studied nuclear engineering at the naval acadamy, and should at > >least be able pronounce the word. Well, the

Re: [Info] PEP 308 accepted - new conditional expressions

2005-10-07 Thread Terry Hancock
On Friday 07 October 2005 10:52 am, Fredrik Lundh wrote: > Terry Hancock wrote: > > GvR's syntax has the advantage of making grammatical sense in English (i.e. > > reading it as written pretty much makes sense). > > as a native Python speaker, I find that argument being remarkably weak. > things

Re: Where to find python c-sources

2005-10-07 Thread John J. Lee
Terry Hancock <[EMAIL PROTECTED]> writes: > On Friday 30 September 2005 04:37 pm, John J. Lee wrote: > > "Tor Erik Sønvisen" <[EMAIL PROTECTED]> writes: > > > Thanks for the answers... And yes, I have searched google! > > > > How odd -- the most useful link (the viewcvs page for this source > >

Re: How to run python scripts with IDLE

2005-10-07 Thread Vyz
I am trying to modify some of the tools to automate telugu wikipedia maintainence tasks and I have realised that i cannot used cmd.exe as it wont display unicode(atleast telugu). I will try the above and see if it works. can I use the above command in IDLE?? Thanks for the prompt reply Ravi -- ht

Re: socketServer questions

2005-10-07 Thread rbt
On Fri, 2005-10-07 at 09:17 -0700, Paul Rubinhttp: wrote: > > 3. How do I keep people from tampering with the server? The clients > > send strings of data to the server. All the strings start with x and > > end with y and have z in the middle. Is requiring x at the front and > > y at the back and z

Re: Continuous system simulation in Python

2005-10-07 Thread Nicolas Pernetty
Thanks, but what is really difficult is not to understand how to design the program which solve a specific problem but to design a generic framework for solving all these kinds of problem. And in a simple enough way for basic programmers (but good scientists !) to handle it. *** REPLY SEPA

Re: Continuous system simulation in Python

2005-10-07 Thread Nicolas Pernetty
On Thu, 06 Oct 2005 22:30:00 -0700, Robert Kern <[EMAIL PROTECTED]> wrote : > Dennis Lee Bieber wrote: > > On Fri, 7 Oct 2005 01:12:22 +0200, Nicolas Pernetty > > <[EMAIL PROTECTED]> declaimed the following in > > comp.lang.python: > > > > > I'm aware of SimPy for discrete event simulation, but I

Re: Continuous system simulation in Python

2005-10-07 Thread Nicolas Pernetty
Hello Phil, Yes I have considered Octave. In fact I'm already using Matlab and decided to 'reject' it for Python + Numeric/numarray + SciPy because I think you could do more in Python and in more simple ways. Problem is that neither Octave, Matlab and Python offer today a framework to build conti

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-10-07 Thread Terry Hancock
On Friday 07 October 2005 06:24 am, Steven D'Aprano wrote: > > [snip] > > "Some village in Texas is missing their idiot". > > > > I personally found it odd (and essentially > > non-grammatical) not because either the singular or plural forms should > > be mandated but because this one manages

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-10-07 Thread Steve Holden
Terry Hancock wrote: > On Friday 07 October 2005 03:01 am, Steve Holden wrote: > >>OK, so how do you account for the execresence "That will give you a >>savings of 20%", which usage is common in America? > > > In America, anyway, "savings" is a collective abstract noun > (like "physics" or "me

Re: 2d array slicing problem

2005-10-07 Thread jeg
thanks, i ran it -- the only difference i got was the numarray version: 1.1.1 on the 686, and 1.3.3 on the 64bit... but i wouldn't have thought that would make too much difference. -- http://mail.python.org/mailman/listinfo/python-list

GUI on Macintosh

2005-10-07 Thread [EMAIL PROTECTED]
I am using Python 2.3.3 on an Mac OS9 system. I am looking for a build of Python 2.3.3+ with a built in GUI, since Tk is missing. One day I hope to upgrade to a new Mac with OSX on it, so a GUI that is available on OS9 and OSX is preferable. I don't want to write my GUI code from scratch if I ev

Re: When someone from Britain speaks, Americans hear a "Britishaccent"...

2005-10-07 Thread Duncan Smith
Rocco Moretti wrote: > Steve Holden wrote: > >>> On Fri, 07 Oct 2005 00:33:43 -, Grant Edwards <[EMAIL PROTECTED]> >>> wrote: > > For example: In British English one uses a plural verb when the subject consists of more than one person. Sports teams, government departments, st

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-10-07 Thread Fredrik Lundh
Terry Hancock wrote: > By the way, dict.org doesn't think "execresence" is a word, > although I interpret the neologism as meaning something like > "execrable utterance": > > dict.org said: > > No definitions found for 'execresence'! however, 'excrescence' appears to be a perfectly cromulent word

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-10-07 Thread Terry Hancock
On Friday 07 October 2005 03:01 am, Steve Holden wrote: > OK, so how do you account for the execresence "That will give you a > savings of 20%", which usage is common in America? In America, anyway, "savings" is a collective abstract noun (like "physics" or "mechanics"), there's no such noun as

PIL Image can't open png file with "I"?

2005-10-07 Thread James Hu
Hi, I have png file with mode "I", 16 bit, And I tried to open it with im=Image.open("output.png"), im.show() I got all white image. Don't why? Can Image only support 'RGB' or 'RGBA' png files? Thanks James -- http://mail.python.org/mailman/listinfo/python-list

Re: Saving an image to file from windows clipboard

2005-10-07 Thread stephen
Thanks -- works as advertised. Stephen -- http://mail.python.org/mailman/listinfo/python-list

Re: multiple logger

2005-10-07 Thread Vinay Sajip
Just replace logging.basicConfig(level=logging.DEBUG) with logging.getLogger().setLevel(logging.DEBUG) and you will no longer get messages written to the console. The basicConfig() method is meant for really basic use of logging - it allows one call to set level, and to add either a console han

Re: Merging sorted lists/iterators/generators into one stream of values...

2005-10-07 Thread Lasse Vågsæther Karlsen
Lasse Vågsæther Karlsen wrote: > I need to merge several sources of values into one stream of values. All > of the sources are sorted already and I need to retrieve the values from Ok, after working through the various sources and solutions, here's what I finally ended up with: def merge_sort

Re: Python interpreter bug

2005-10-07 Thread Steve Holden
[EMAIL PROTECTED] wrote: >>Steve Holden wrote: >>Consider: > > > >>> a = {1:'one'} > >>> b = {2:'two'} > >>> c = {1:'one'} > >>> a is c > False > >>> a in [b, c] > True > >>> > > >>What would you have Python do differently in these circumstances? > > > You mean: What i would do i if i w

Re: Saving an image to file from windows clipboard

2005-10-07 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > I just threw this together because I find myself needing it now and > then. Requires PIL and optionally ImageMagick to convert to png, since > I think PIL is not able yet to convert a bmp to a png. well, not in one step, but it can load BMP images and save PNG images.

Help creating extension for C function

2005-10-07 Thread Java and Swing
I need to write an extension for a C function so that I can call it from python. C code (myapp.c) == typedef unsigned long MY_LONG; char *DoStuff(char *input, MY_LONG *x) { ... } so you pass in a string and an array of MY_LONGS...such as MY_LONGS vals[10] = {}; char *input = "this is my

Saving an image to file from windows clipboard

2005-10-07 Thread stephen
I just threw this together because I find myself needing it now and then. Requires PIL and optionally ImageMagick to convert to png, since I think PIL is not able yet to convert a bmp to a png. You can of course use the os.path module instead of the path module. I keep it in my windows start menu f

multiple logger

2005-10-07 Thread peiyin . li
Hi, I want to have two loggers that logs to two different files. Here is what I have: import logging import logging.handlers project1Handler = logging.handlers.RotatingFileHandler( 'project1.log', maxBytes=1024) project1Handler.setLevel(logging.INFO) formatter1 = logging.Formatter('%(name)-12s:

Re: Matching zero only once using RE

2005-10-07 Thread GregM
Hi thanks to all of you. Mike I like your committee idea. where can I join? lol Greg. -- http://mail.python.org/mailman/listinfo/python-list

Re: Bug in COM Makepy utility? (ActivePython 2.4)

2005-10-07 Thread Steve M
After exploring the bug database I discovered that this bug has been reported since March, and appears to derive from a bug in Python itself. http://bugs.activestate.com/show_bug.cgi?id=38052 It apparently only happens when the code generated by Makepy is really big (which it is for Word or Excel

Re: Objects with different data views

2005-10-07 Thread Paul Rubin
Yeah, that's what I meant. Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python interpreter bug

2005-10-07 Thread alainpoint
> Steve Holden wrote: >Consider: >>> a = {1:'one'} >>> b = {2:'two'} >>> c = {1:'one'} >>> a is c False >>> a in [b, c] True >>> >What would you have Python do differently in these circumstances? You mean: What i would do i if i was the benevolent dictator ? I would make a distinction bet

SMB Authentication Module

2005-10-07 Thread Derek Perriero
This may be a simple question to answer, but is there any module that will let you authenticate against a SMB server?  An equivalent package in perl would be the Authen::SMB.  That is the realms of what I am looking for, but in Python. -Derek Perriero-- Perriero, Derek[EMAIL PROTECTED] -- http://

Re: 2d array slicing problem

2005-10-07 Thread jepler
Do you have a simple program that demonstrates the problem? I have an x86 machine with Python 2.3, and an x86_64 machine with Python 2.4 available. I wrote a simple test program which performs a slice operation, but it behaves the same on both platforms. Here's the program: #

Re: Book "Python and Tkinter Programming"

2005-10-07 Thread EuGeNe
It is available as PDF from the editor ... Manning. In my recollection for 25 USD projecktzero wrote: > striker wrote: > >>Does anyone who has this book willing to sell it. Please e-mail me the >>condition and any other details if you are interested. >>Thanks, >>Kevin > > > half.com has a cou

Re: 2d array slicing problem

2005-10-07 Thread Robert Kern
jeg wrote: > dear all, > > i'm an astronomer working with 2d images -- 2d numarrays. i have a > script which basically does some operations on some images, and one of > the first steps is to find a galaxy on an image (at, say, a known x,y > coord), and create a sub-image by slicing out part of the

Re: Objects with different data views

2005-10-07 Thread D.Hering
Paul Rubin wrote: > Steven D'Aprano <[EMAIL PROTECTED]> writes: > > class Parrot(object): > x = property(getx, setx) > y = property(gety, sety) > > def getx(self): > return self.a + self.b > def setx(self, x): > y = self.y # calls gety > self.a, self.b = 2*x - y, y-x > >

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-10-07 Thread Dave Hansen
On Fri, 07 Oct 2005 14:24:42 -, Grant Edwards <[EMAIL PROTECTED]> wrote: >On 2005-10-07, Steve Holden <[EMAIL PROTECTED]> wrote: [...] >> >> "Some village in Texas are missing their idiot" > >At least that one is consistent, though it sounds "wrong" to US >ears. The Germans have a word for it

Re: socketServer questions

2005-10-07 Thread Christopher Subich
Paul Rubin wrote: > rbt <[EMAIL PROTECTED]> writes: > >>1. Do I need to use threads to handle requests, if so, how would I >>incorporate them? The clients are light and fast never sending more >>than 270 bytes of data and never connecting for more than 10 seconds >>at a time. There are currently

Re: Why do I get an import error on this?

2005-10-07 Thread Steve
I did "which python" and the two paths were different. Once I fixed the path in the script, it worked fine. Thanks Frederik and Micah! -- http://mail.python.org/mailman/listinfo/python-list

Re: Continuous system simulation in Python

2005-10-07 Thread phil_nospam_schmidt
Nicholas, Have you looked at Octave? It is not Python, but I believe it can talk to Python. Octave is comparable to Matlab for many things, including having ODE solvers. I have successfully used it to model and simulate simple systems. Complex system would be easy to model as well, provided that y

Re: Matching zero only once using RE

2005-10-07 Thread Mike Meyer
"GregM" <[EMAIL PROTECTED]> writes: > I've looked at a lot of pages on the net and still can't seem to nail > this. Would someone more knowledgeable in regular expressions please > provide some help to point out what I'm doing wrong? > > I am trying to see if a web page contains the exact text: > Y

  1   2   3   >