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

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

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

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

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

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

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

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

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

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: 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*'):

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

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

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

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

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

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

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

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

<    1   2   3