Re: Little Q: how to print a variable's name, not its value?

2005-03-29 Thread Ron_Adam
On Tue, 29 Mar 2005 11:23:45 -0500, Bill Mill [EMAIL PROTECTED] wrote: On Tue, 29 Mar 2005 14:34:39 GMT, Ron_Adam [EMAIL PROTECTED] wrote: On 28 Mar 2005 23:01:34 -0800, Dan Bishop [EMAIL PROTECTED] wrote: def print_vars(vars_dict=None): ...if vars_dict is None: ... vars_dict =

Re: Who Knows of a Good Computational Physics Textbook?

2005-03-29 Thread James Stroud
Look into Game Physics by Eberly (Elsevier). On Sunday 13 March 2005 07:27 pm, [EMAIL PROTECTED] wrote: There is some info on teaching computational physics at Rubin Landau's site http://www.physics.orst.edu/~rubin/ . Springer recently published the book Python Scripting for Computational

Re: itertools to iter transition (WAS: Pre-PEP: Dictionary accumulator methods)

2005-03-29 Thread Michael Spencer
Steven Bethard wrote: Ville Vainio wrote: Raymond == Raymond Hettinger [EMAIL PROTECTED] writes: Raymond If the experience works out, then all you're left with is Raymond the trivial matter of convincing Guido that function Raymond attributes are a sure cure for the burden of typing

Re: Which is easier? Translating from C++ or from Java...

2005-03-29 Thread Bill Mill
On 29 Mar 2005 11:02:38 -0800, cjl [EMAIL PROTECTED] wrote: Hey all: Thanks for the responses... I've found a third open source implementation in pascal (delphi), and was wondering how well that would translate to python? cjl, I think that the responses on the list so far collectively

Re: Connecting to a SQL Server

2005-03-29 Thread Jarek Zgoda
ttmi napisa(a): Ok. Understood we can interface ADO from python and connect to MS SQL. But still not so clear where SSH comes in? Can elaborate more? No SSH is involved in this case -- MSSQL OLEdb provider offers SSL encrypted connection out of the box, just set appropriate property to true and

RE: Optimisation Hints (dict processing and strings)

2005-03-29 Thread Peter Hansen
Thanks for the correction. I didn't pause to think as I wrote that... -Peter -Original Message- From: Aaron Bingham [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 29, 2005 11:24 To: Peter Hansen Cc: python-list@python.org Subject: Re: Optimisation Hints (dict processing and

Re: Which is easier? Translating from C++ or from Java...

2005-03-29 Thread Patrick Useldinger
cjl wrote: I've found a third open source implementation in pascal (delphi), and was wondering how well that would translate to python? Being old enough to have programmed in UCSD Pascal on an Apple ][ (with a language card, of course), I'd say: go for Pascal! ;-) --

Re: cgi and multipart/form-data?

2005-03-29 Thread Chris Curvey
Chris Curvey wrote: I have a form like this: form method=post enctype=multipart/form-data input type=file name=myFile input type=text name=foo input type=submit /form When I submit this form to my Python script using the CGI module, I seem to get the myFile variable, but I don't seem

Re: Little Q: how to print a variable's name, not its value?

2005-03-29 Thread Bill Mill
snip Fred = 5 John = 8 Winner = John Both John and Winner are pointing to the literal '8'. ummm, yes, of course they are. What's your point? Hi Bill, My point is if you look up the name and print it, you may get. Instead of: Fred has 5 points John has 8 points

Re: PyParsing module or HTMLParser

2005-03-29 Thread Paul McGuire
La - In general, I have shied away from doing general-purpose HTML parsing with pyparsing. It's a crowded field, and it's likely that there are better candidates out there for your problem. I've heard good things about BeautifulSoup, but I've also heard from at least one person that they prefer

how do you use a closure in a class

2005-03-29 Thread erinhouston
I have several functions that are almost the same in one class I would like to use a closure to get rid of the extra code how would I do this? -- http://mail.python.org/mailman/listinfo/python-list

Re: Need Help: Server to pass py objects

2005-03-29 Thread M.E.Farmer
Fred, Let me see if i understand, you want to 'serve' binary data as PYTHON OBJECTS to a REMOTE client. I am gonna show you how to fish ;) Search strategy: PYthon Remote Objects Python remote python objects I tried them and found plenty of information and code. hint: PYthon Remote Objects hth,

pyopenGL: glutInit : TypeError: not a list

2005-03-29 Thread Rakesh
Hi, I am starting to write this sample program in Python to use the GLUT library. -- from OpenGL.GL import * from OpenGL.GLUT import * def init(): glClearColor(0, 0, 0, 0) glMatrixMode(GL_PROJECTION) glLoadIdentity() glLightfv(GL_LIGHT0, GL_AMBIENT, [0.0, 0.0, 0.0, 1.0])

Re: pyopenGL: glutInit : TypeError: not a list

2005-03-29 Thread Rakesh
After some playing around, here is how my code looks like and it works: from OpenGL.GL import * from OpenGL.GLUT import * import sys def init(): glClearColor(0, 0, 0, 0) glMatrixMode(GL_PROJECTION) glLoadIdentity() glLightfv(GL_LIGHT0, GL_AMBIENT, [0.0, 0.0, 0.0, 1.0])

Re: problem with tkinter

2005-03-29 Thread Pierre Quentel
Instead of indexing self.lab by strings, you can index them by the attributes themselves : self.lab[self.i], and change line 23 into for var in (self.s, self,i) For your example, I wouldn't have used the text option in the definition of the labels, then textvariable in the callback method

Re: Need Help: Server to pass py objects

2005-03-29 Thread Ken Godee
I have a legacy system with data stored in binary files on a remote server. I need to access and modify the content of those files from a webserver running on a different host. (All Linux) I would like to install a server on the legacy host that would use my python code to translate between

Re: Little Q: how to print a variable's name, not its value?

2005-03-29 Thread Ron_Adam
On Tue, 29 Mar 2005 14:58:45 -0500, Bill Mill [EMAIL PROTECTED] wrote: folded Or something else depending on how many references you made to the value 8. Yes, this is true, assuming that he looks for keys with the value 8 in locals(). It's not necessarily true if there's a way to ask python

Re: how do you use a closure in a class

2005-03-29 Thread Paul McGuire
Well, I'm not sure closure is the Pythonic way. But in Python, you can use functions to dynamically create other functions. Here's an example of this feature (although there are far simpler ways to do this), tallying vowels and consonants in an input string by calling a function looked up in a

Python LEGO Mindstorm control...

2005-03-29 Thread Venkat B
Hi all, I have a question re the use of Python to control a robot built with the LEGO Mindstorm system. This is to help my 11yr old with his increased interest in 'programming' and 'robotics'... If not feasible, he wants to use the graphical-tool that comes with it... Would you suggest: 1. Using

Re: itertools to iter transition (WAS: Pre-PEP: Dictionary accumulator methods)

2005-03-29 Thread George Sakkis
Steven Bethard [EMAIL PROTECTED] wrote: [snip] I guess the real questions are[1]: * How much does iter feel like a type? * How closely are the itertools functions associated with iter? STeVe [1] There's also the question of how much you believe in OO tenets like functions closely

Re: Optimisation Hints (dict processing and strings)

2005-03-29 Thread John Machin
OPQ wrote: (2)- in a dict mapping a key to a list of int, remove every entrie where the list of int have of length 2 So far, my attempts are for (2): for k in hash.keys()[:]: # Note : Their may be a lot of keys here if len(hash[k])2: del hash[k] Here again, I think the

How to execute a cmd line program without invoking console window?

2005-03-29 Thread Tian
In Windows, I have been simply using os.system() to run command line program in python. but there will be a black console window. How can I run the program without invoking that window? i guess there are some function with which I can redirect the output? --

Re: Python LEGO Mindstorm control...

2005-03-29 Thread D H
Venkat B wrote: Hi all, I have a question re the use of Python to control a robot built with the LEGO Mindstorm system. This is to help my 11yr old with his increased interest in 'programming' and 'robotics'... If not feasible, he wants to use the graphical-tool that comes with it... Would you

Re: How to execute a cmd line program without invoking console window?

2005-03-29 Thread rbt
Tian wrote: In Windows, I have been simply using os.system() to run command line program in python. but there will be a black console window. How can I run the program without invoking that window? i guess there are some function with which I can redirect the output? name your scripts with .pyw

Re: Grouping code by indentation - feature or ******?

2005-03-29 Thread Diez B. Roggisch
What I or you prefer carries very little weight. I know layout-things stir up a lot of bad feeling, but I honostly think those people should grow up. When I cooperate in a project, I adapt my style to the one used in the project. I may use a tool to change between styles for things I work on

Re: Which is easier? Translating from C++ or from Java...

2005-03-29 Thread Peter Herndon
If you have three different implementations, and can read all three of them well enough to understand the code, use all three. If you are going to port software from one language to another, and want to reimplement it properly in your target language, you won't be porting word-for-word anyway.

automatically mapping builtins (WAS: itertools to iter transition)

2005-03-29 Thread Steven Bethard
Michael Spencer wrote: While we're on the topic, what do you think of having unary, non-summary builtins automatically map themselves when called with an iterable that would otherwise be an illegal argument: e.g., int(iterable) - (int(i) for i in iterable) ord(iterable) - (ord(i) for i in

Re: How to execute a cmd line program without invoking console window?

2005-03-29 Thread raver2046
Or launch it with pythonw.exe ( on windows ) Sorcier glouton http://sorcier-glouton.ath.cx rbt [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] Tian wrote: In Windows, I have been simply using os.system() to run command line program in python. but there will be a black

Re: How do I get better at Python programming?

2005-03-29 Thread alex23
Steve Holden wrote: Where programming's concerned it's never too soon to start reading other people's code, and fortunately there's a huge amount of Python about and available as open source. I found the Cookbook to be especially helpful for this initially: digestable code chunks with plenty

Re: itertools to iter transition (WAS: Pre-PEP: Dictionary accumulator methods)

2005-03-29 Thread Jack Diederich
On Tue, Mar 29, 2005 at 12:38:42PM +0300, Ville Vainio wrote: Raymond == Raymond Hettinger [EMAIL PROTECTED] writes: Raymond If the experience works out, then all you're left with is Raymond the trivial matter of convincing Guido that function Raymond attributes are a sure cure

Re: Problem in designing a global directory in python

2005-03-29 Thread '@'.join([..join(['fred', 'dixon']), ..join(['gmail', 'com'])])
noob warning: what is so wonderful about the NEW class over the old ? -- http://mail.python.org/mailman/listinfo/python-list

Re: itertools to iter transition (WAS: Pre-PEP: Dictionary accumulator methods)

2005-03-29 Thread Bengt Richter
On Tue, 29 Mar 2005 11:32:33 -0800, Michael Spencer [EMAIL PROTECTED] wrote: [...] While we're on the topic, what do you think of having unary, non-summary builtins automatically map themselves when called with an iterable that would otherwise be an illegal argument: That last otherwise is

RE: Python LEGO Mindstorm control...

2005-03-29 Thread Tony Meyer
I have a question re the use of Python to control a robot built with the LEGO Mindstorm system. This is to help my 11yr old with his increased interest in 'programming' and 'robotics'... If not feasible, he wants to use the graphical-tool that comes with it... Would you suggest: 1.

instance vs class attributes

2005-03-29 Thread Sarir Khamsi
I come from a C++ background and am learning some of the details of Python's OO capability and now have some questions. Given: #!/bin/env python class A(object): _x = 10 def __init__(self): self.x = 20 def square(self): return self.x * self.x print 'A.x = %d' % A._x a = A() print 'a.x

How to use __new__?

2005-03-29 Thread could ildg
As there is already __init__, why need a __new__? What can __new__ give us while __init__ can't? In what situations we should use __new__? And in what situations we must use __new__? Can __new__ take the place of __init__? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Finding attributes in a list

2005-03-29 Thread Bengt Richter
On Tue, 29 Mar 2005 11:29:33 -0700, Steven Bethard [EMAIL PROTECTED] wrote: infidel wrote: You can use the new 'sorted' built-in function and custom compare functions to return lists of players sorted according to any criteria: players = [ ... {'name' : 'joe', 'defense' : 8, 'attacking'

Re: Python LEGO Mindstorm control...

2005-03-29 Thread Cameron Laird
In article [EMAIL PROTECTED], D H [EMAIL PROTECTED] wrote: . . . I would use the graphical language environment that comes with Lego Mindstorms. It was designed for kids. I haven't seen anyone show how to program

Re: how do you use a closure in a class

2005-03-29 Thread Cameron Laird
In article [EMAIL PROTECTED], Paul McGuire [EMAIL PROTECTED] wrote: Well, I'm not sure closure is the Pythonic way. But in Python, you can use functions to dynamically create other functions. Here's an example of this feature (although there are far simpler ways to do this), tallying vowels and

Dr. Dobb's Python-URL! - weekly Python news and links (Mar 30)

2005-03-29 Thread Cameron Laird
QOTW: This is a Python newsgroup. Assume that we all have been brainwashed. -- Peter Otten [M]y experience porting Java to Jython is that it mostly involves deleting stuff :-) -- Kent Johnson [K]eep in mind, however, that not all problems in life can be solved with software. -- Roy Smith

Re: How to use __new__?

2005-03-29 Thread Steven Bethard
could ildg wrote: As there is already __init__, why need a __new__? What can __new__ give us while __init__ can't? In what situations we should use __new__? And in what situations we must use __new__? Can __new__ take the place of __init__? I believe the current documentation will be updated when

Re: Python Cookbook, 2'nd. Edition is published

2005-03-29 Thread Cameron Laird
In article [EMAIL PROTECTED], Trent Mick [EMAIL PROTECTED] wrote: I don't have my copy yet. Can you give any guidance on how the 2'nd edition compares to the 1'st edition? Here is an excerpt from the preface (typing errors are mine): If you already own the first edition, you may be

Re: How to use __new__?

2005-03-29 Thread could ildg
Thank you. I'm clear after I read the doc: If __new__() returns an instance of cls, then the new instance's __init__() method will be invoked like __init__(self[, ...]), where self is the new instance and the remaining arguments are the same as were passed to __new__(). If __new__() does not

Re: How to execute a cmd line program without invoking console window?

2005-03-29 Thread Bengt Richter
On 29 Mar 2005 13:23:55 -0800, Tian [EMAIL PROTECTED] wrote: In Windows, I have been simply using os.system() to run command line program in python. but there will be a black console window. How can I run the program without invoking that window? i guess there are some function with which I can

Re: urllib.urlretireve problem

2005-03-29 Thread Larry Bates
I noticed you hadn't gotten a reply. When I execute this it put's the following in the retrieved file: !DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN HTMLHEAD TITLE404 Not Found/TITLE /HEADBODY H1Not Found/H1 The requested URL /pool/updates/main/p/perl/libparl5.6_5.6.1-8.9_i386.deb was no t

Re: instance vs class attributes

2005-03-29 Thread James Stroud
Sarir said: Here are my questions: 1) What are the benefits of using a member variable without the 'self' qualifier? (I think this is because you can use _x without an instance of A().) No such thing as a benefit here. self.a inside a method is the same as a outside (see code below

why and when we should do it?

2005-03-29 Thread Su Wei
hi,everybody,Sorry to bother you. i hvae seen some code like this before: class BusinessBO : dev __init__(slef): #write you own code here dev businessMethod : #write you own code here pass why and when we should add the keyword pass ? and some time i have seen class

Re: instance vs class attributes

2005-03-29 Thread James Stroud
On Tuesday 29 March 2005 05:37 pm, James Stroud wrote: 1) What are the benefits of using a member variable without the 'self'    qualifier? (I think this is because you can use _x without an    instance of A().) No such thing as a benefit here. self.a inside a method is the same as a

Re: Please help for Python programming

2005-03-29 Thread yy0127
Thanks for your help! I am already fix it!! Many thanks! -- http://mail.python.org/mailman/listinfo/python-list

checksum works in unix but not win32 os

2005-03-29 Thread GujuBoy
i have the following code...which works fine in UNIX but then i move it over to WINDOWS XP and check the sum on the same file that i tested on unix and i get different results. def checksum(fileobj): filedata = array.array('B', fileobj.read()) totbytes = len(filedata) result = 0

Re: convert user input to Decimal objects using eval()?

2005-03-29 Thread Terry Reedy
Raymond Hettinger [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [Julian Hernandez Gomez] This is maybe a silly question, but... is there a easy way to make eval() convert all floating numbers to Decimal objects and return a Decimal? from decimal import Decimal import re

Weekly Python Patch/Bug Summary

2005-03-29 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 297 open (+11) / 2812 closed (+11) / 3109 total (+22) Bugs: 871 open ( +1) / 4900 closed (+33) / 5771 total (+34) RFE : 175 open ( +0) / 150 closed ( +0) / 325 total ( +0) New / Reopened Patches __ Decimal

distutils: package data

2005-03-29 Thread Qiangning Hong
I am writing a setup.py for my package. I have a pre-compiled myextmod.pyd file in my package and I want the distutils to automatically copy it to C:\Python23\Lib\site-packages\mypackage\myextmod.pyd. I try to add the following parameter to setup(): data_file = [('mypackage',

Re: why and when we should do it?

2005-03-29 Thread Swaroop C H
On Wed, 30 Mar 2005 09:38:28 +0800, Su Wei [EMAIL PROTECTED] wrote: hi,everybody,Sorry to bother you. why and when we should add the keyword pass ? You can use the 'pass' keyword to indicate an empty block. For example, if True: pass pass is usually used as a placeholder so that you can

Re: checksum works in unix but not win32 os

2005-03-29 Thread Trent Mick
[GujuBoy wrote] i have the following code...which works fine in UNIX but then i move it over to WINDOWS XP and check the sum on the same file that i tested on unix and i get different results. def checksum(fileobj): filedata = array.array('B', fileobj.read()) totbytes =

Weakrefs to classes that derive from str

2005-03-29 Thread Ron Garret
Why doesn't this work? from weakref import ref class C(str): pass ... ref(C()) Traceback (most recent call last): File stdin, line 1, in ? TypeError: cannot create weak reference to 'C' object Note that this does work: class D(int): pass ... ref(D()) weakref at 0x53e10; dead

Re: distance, angle restraint

2005-03-29 Thread Terry Reedy
HYUN-CHUL KIM [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I put more than 10,000 points in a box and then want to get one of many solutions that matches all angle restraints among any 3 points and all distance restraints between any 2 points. It is not clear to me what

Re: checksum works in unix but not win32 os

2005-03-29 Thread Peter Hansen
GujuBoy wrote: i have the following code...which works fine in UNIX but then i move it over to WINDOWS XP and check the sum on the same file that i tested on unix and i get different results. def checksum(fileobj): filedata = array.array('B', fileobj.read()) Did you make sure you opened this

Re: How to use __new__?

2005-03-29 Thread Heiko Wundram
Am Mittwoch, 30. März 2005 03:27 schrieb could ildg: Thank you. I'm clear after I read the doc: If __new__() returns an instance of cls, then the new instance's __init__() method will be invoked like __init__(self[, ...]), where self is the new instance and the remaining arguments are the

Re: Problem in designing a global directory in python

2005-03-29 Thread Terry Reedy
Tian [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I want to create a object directory called Context in my program, which is based on a dict to save and retrieve values/objects by string-type I suspect that you would accomplish your goal much more easily by calling your module

Re: How to use __new__?

2005-03-29 Thread Terry Reedy
could ildg [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] __new__() is intended mainly to allow subclasses of immutable types (like int, str, or tuple) to customize instance creation. Exactly. It is an anwer to the conundrum: How do you give an immutable object its unchangeable

Re: why and when we should do it?

2005-03-29 Thread Terry Reedy
Su Wei [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] i hvae seen some code like this before: I really hope not... class BusinessBO : dev __init__(slef): #write you own code here dev businessMethod : #write you own code here That is 'def', not 'dev' pass

Re: numbering variables

2005-03-29 Thread Steve
Ron_Adam wrote: On Mon, 28 Mar 2005 13:39:17 +0200, remi [EMAIL PROTECTED] wrote: Hello, I have got a list like : mylist = ['item 1', 'item 2','item n'] and I would like to store the string 'item1' in a variable called s_1, 'item2' in s_2,...,'item i' in 's_i',... The lenght of mylist is

Re: automatically mapping builtins (WAS: itertools to iter transition)

2005-03-29 Thread Michael Spencer
Steven Bethard wrote: Michael Spencer wrote: While we're on the topic, what do you think of having unary, non-summary builtins automatically map themselves when called with an iterable that would otherwise be an illegal argument: I personally don't much like the idea because I expect 'int'

Re: Python for a 10-14 years old?

2005-03-29 Thread Greg Ewing
Jot wrote: If she's really gifted i hope she dumps that obsolete monolithic kernel as soon as she realizes that such beautiful language as python shouldn't be used on top of ugly, badly designed software. Maybe she'll go on to write that oft-proposed pure Python operating system, and give us a

Re: Python for a 10-14 years old?

2005-03-29 Thread Joal Heagney
Joal Heagney wrote: Duncan Booth wrote: Joal Heagney wrote: Nice. I still have to download a version of pygame to try this out, but the fact that you can't hide the turtle in python.turtle was bugging me out with my version. (A fair bit of copy/paste in gimp, I can tell you!) What was wrong

reading from a txt file

2005-03-29 Thread jrlen balane
how should i modify this data reader: (assumes that there is only one entry per line followed by '\n') data_file = open(os.path.normpath(self.TextFile.GetValue()), 'r') data = data_file.readlines() self.irradianceStrings = map(str, data) self.irradianceIntegers = map(int, data)

Re: Python for a 10-14 years old?

2005-03-29 Thread Joal Heagney
Joal Heagney wrote: Joal Heagney wrote: Duncan Booth wrote: Joal Heagney wrote: Nice. I still have to download a version of pygame to try this out, but the fact that you can't hide the turtle in python.turtle was bugging me out with my version. (A fair bit of copy/paste in gimp, I can tell

Things you shouldn't do

2005-03-29 Thread Steve
All names have been removed to protect the guilty :-) In an earlier post, I read a piece of code: l1 = [1, 2, 3] l2 = [1, 2, 3] l1 == l2 True I immediately gave a double-take: 11 equals 12? What gives? Can you re-bind literals in Python??? 11 = [1, 2, 3] SyntaxError: can't assign to literal And

Re: Python for a 10-14 years old?

2005-03-29 Thread Joal Heagney
Duncan Booth wrote: Joal Heagney wrote: Nice. I still have to download a version of pygame to try this out, but the fact that you can't hide the turtle in python.turtle was bugging me out with my version. (A fair bit of copy/paste in gimp, I can tell you!) What was wrong with hiding the

Re: Python for a 10-14 years old?

2005-03-29 Thread Greg Ewing
Leif B. Kristensen wrote: I've got a thirteen-year old daughter to whom I have recently taught the HTML basics, but she doesn't readily take to actual programming. If you've got any idea what I should push to her to get her fascinated about _real_ programming, I'd be obliged. If she's interested

Re: Python interpreter error: unsupported operand type(s) for -: 'tuple' and 'int'

2005-03-29 Thread George Yoshida
Rakesh wrote: To quote a much smaller trimmed-down example, here is how it looks like: ## --- # Entry Point to the whole program ## --- def main(): mylist = GenerateList() minnumber =

Re: instance vs class attributes

2005-03-29 Thread Brian van den Broek
James Stroud said unto the world upon 2005-03-29 20:37: Sarir said: Here are my questions: SNIP 3) Should private data be written as self._x instead of self.x? This is a long standing debate. The usual answer is we are all grownups here, meaning that self.x is preferred. However, I personally

Re: how do you use a closure in a class

2005-03-29 Thread Paul McGuire
Well, despite my parenthetical disclaimer, my attempted point was that the OP wanted to avoid replicating several functions that were mostly the same. I think Python's idiom of using a function to create and return callables is a comparable feature to using anonymous closures. Unfortunately, I

Re: Things you shouldn't do

2005-03-29 Thread Paul McGuire
This struck me also when I first saw this post. It reminded me of a body of code I inherited at a former job, that I had to help untangle. The code was filled with two key variables: t_1 and t_l. Printing out the source in a Courier font made these two vars completely indistinguishable, and it

mod_python

2005-03-29 Thread onur2029
Hi everybody, I need mod_python resources,documentation or ebook.But not manual from modpython.org.I'm waiting for your links. ONUR YILMAZ -- http://mail.python.org/mailman/listinfo/python-list

RE: mod_python

2005-03-29 Thread Delaney, Timothy C (Timothy)
onur2029 wrote: I need mod_python resources,documentation or ebook.But not manual from modpython.org.I'm waiting for your links. http://www.catb.org/~esr/faqs/smart-questions.html Tim Delaney -- http://mail.python.org/mailman/listinfo/python-list

Re: instance vs class attributes

2005-03-29 Thread runsun pan
shy._Shy__mangled_method() Ive been mangled! Hi Brian, can you explain how this could possibly work? First of all it's not standard python usage, and secondly it's not working on my computer... pan -- http://mail.python.org/mailman/listinfo/python-list

Re: urllib.urlretireve problem

2005-03-29 Thread gene . tani
Mertz' Text Processing in Python book had a good discussion about trapping 403 and 404's. http://gnosis.cx/TPiP/ Larry Bates wrote: I noticed you hadn't gotten a reply. When I execute this it put's the following in the retrieved file: !DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN

Re: Grouping code by indentation - feature or ******?

2005-03-29 Thread Myles Strous
Javier Bezos wrote: Jacob Lee [EMAIL PROTECTED] escribió en el mensaje satisfy some handy properties, the first of which being: l[:n] + l[n:] = l I don't think l[:5] + l[5:] = l is a handy property and to me is clearly counterintuitive. Further, It can be quite useful for inserting

Re: Grouping code by indentation - feature or ******?

2005-03-29 Thread Myles Strous
I wrote: It can be quite useful for inserting something into a list (or string), after finding the position where you wish to insert it. Oops, I missed Dennis Lee Bieber's working example of exactly that. My apologies. Regars, Myles. -- http://mail.python.org/mailman/listinfo/python-list

Re: BF interpreter in Python

2005-03-29 Thread Do Re Mi chel La Si Do
Hi ! Good idea. I take this interpreter with jubilation. Can I add your URL at http://mclaveau.com/esolang ? Other question : do you know PATH ? (http://pathlang.sourceforge.net) @-salutations Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: instance vs class attributes

2005-03-29 Thread James Stroud
You need 2 underscores to mangle. On Tuesday 29 March 2005 09:58 pm, runsun pan wrote: shy._Shy__mangled_method() Ive been mangled! Hi Brian, can you explain how this could possibly work? First of all it's not standard python usage, and secondly it's not working on my computer... pan

Re: itertools to iter transition (WAS: Pre-PEP: Dictionary accumulator methods)

2005-03-29 Thread Steven Bethard
Terry Reedy wrote: But if classmethods are intended to provide alternate constructors But I do not remember that being given as a reason for classmethod(). But I am not sure what was. Well I haven't searched thoroughly, but I know one place that it's referenced is in descrintro[1]: Factoid:

Re: Grouping code by indentation - feature or ******?

2005-03-29 Thread Tim Roberts
Terry Reedy [EMAIL PROTECTED] wrote: Antoon Pardon [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] 1) The stuff doesn't has to be spread over multiple pages. One can have 2 functions, each about three quarter of a page. The second function will then cross a page boundary. Once

Re: Why tuple with one item is no tuple

2005-03-29 Thread Antoon Pardon
Op 2005-03-29, Ville Vainio schreef [EMAIL PROTECTED]: Antoon == Antoon Pardon [EMAIL PROTECTED] writes: Antoon Op 2005-03-27, Joal Heagney schreef [EMAIL PROTECTED]: Antoon Pardon wrote: snip So python choose a non-deterministic direction. To me (2,3) + (4,5) equals

Re: [maintenance doc updates]

2005-03-29 Thread Do Re Mi chel La Si Do
Hi ! Thanks. But, for previous versions of Python, I downloaded a CHM version; and, at http://docs.python.org/download.html, I don't found this format. is this a lapse of memory? Would it be possible to have a continuity in the availability of the formats? Thanks again. Michel Claveau

Re: Things you shouldn't do

2005-03-29 Thread Andrew Dalke
Steve wrote: [an anecdote on distinguishing l1 and 11] What are some of other people's favourite tips for avoiding bugs in the first place, as opposed to finding them once you know they are there? There's a good book on this topic - Writing Solid Code.

Re: Queue.Queue-like class without the busy-wait

2005-03-29 Thread Paul Rubin
Antoon Pardon [EMAIL PROTECTED] writes: There needs to be a way to send signals to threads, or raise asynchronous exceptions in them. There's been some discussion in sourceforge about that, but the issues involved are complex. Well I have raised this issue before and as far as I

Re: IMAP4.search by message-id ?

2005-03-29 Thread Max M
Sean Dodsworth wrote: Can anyone tell me how to get a message's number from the message-id using IMAP4.search? I've tried this: resp, items = server.search(None, 'HEADER', 'Message-id', msgID) but it gives me a 'bogus search criteria' error Why do you need the 'HEADER' Wouldn't this be

Re: Weakrefs to classes that derive from str

2005-03-29 Thread Ron Garret
In article [EMAIL PROTECTED], Steven Bethard [EMAIL PROTECTED] wrote: Ron Garret wrote: Why doesn't this work? from weakref import ref class C(str): pass ... ref(C()) Traceback (most recent call last): File stdin, line 1, in ? TypeError: cannot create weak reference to 'C'

newbie - threading

2005-03-29 Thread martijn
H!, I have made a spider and now I want to use threading so it will be faster faster and faster :) But I don't understand threading. So I try this but I get a error in windows 2000. --- class connector(threading.Thread): def __init__(self,url): self.url = url

Re: newbie - threading

2005-03-29 Thread MyHaz
Posting the error message could help. Also you might check out this example http://thraxil.org/thread.txt - Haz -- http://mail.python.org/mailman/listinfo/python-list

[ python-Bugs-1166660 ] The readline module can cause python to segfault

2005-03-29 Thread SourceForge.net
Bugs item #110, was opened at 2005-03-19 21:48 Message generated for change (Comment added) made by mwh You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=110group_id=5470 Category: Threads Group: Platform-specific Status: Open Resolution: None

[ python-Bugs-672115 ] Assignment to __bases__ of direct object subclasses

2005-03-29 Thread SourceForge.net
Bugs item #672115, was opened at 2003-01-21 22:45 Message generated for change (Comment added) made by mwh You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=672115group_id=5470 Category: Python Interpreter Core Group: Python 2.3 Status: Open Resolution: None

[ python-Bugs-1165761 ] KeyboardInterrupt causes segmentation fault with threads

2005-03-29 Thread SourceForge.net
Bugs item #1165761, was opened at 2005-03-18 16:18 Message generated for change (Comment added) made by anthonybaxter You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1165761group_id=5470 Category: Threads Group: Python 2.4 Status: Closed Resolution:

[ python-Bugs-1170766 ] weakref.proxy incorrect behaviour

2005-03-29 Thread SourceForge.net
Bugs item #1170766, was opened at 2005-03-25 21:54 Message generated for change (Comment added) made by mwh You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1170766group_id=5470 Category: Python Library Group: Python 2.4 Status: Open Resolution: None

[ python-Bugs-1172581 ] cmp should be key in sort doc

2005-03-29 Thread SourceForge.net
Bugs item #1172581, was opened at 2005-03-29 15:02 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1172581group_id=5470 Category: Documentation Group: Python 2.4 Status: Open

[ python-Bugs-1172554 ] cmp should be key in sort doc

2005-03-29 Thread SourceForge.net
Bugs item #1172554, was opened at 2005-03-29 14:22 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1172554group_id=5470 Category: Documentation Group: Python 2.4 Status: Open

[ python-Bugs-1172554 ] cmp should be key in sort doc

2005-03-29 Thread SourceForge.net
Bugs item #1172554, was opened at 2005-03-29 09:22 Message generated for change (Comment added) made by rhettinger You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1172554group_id=5470 Category: Documentation Group: Python 2.4 Status: Closed Resolution: Out

[ python-Bugs-1172763 ] dumbdbm hoses index on load failure

2005-03-29 Thread SourceForge.net
Bugs item #1172763, was opened at 2005-03-29 15:23 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1172763group_id=5470 Category: Extension Modules Group: Python 2.4 Status: Open

<    1   2   3   >