ANNOUNCE: Rx4RDF and Rhizome 0.4.3

2005-02-01 Thread Adam Souzis
Rx4RDF is application stack for building RDF-based applications and web sites implemented in Python. Rhizome is a Wiki-like content management and delivery system built on Rx4RDF that brings the Wiki metaphor to building dynamic web sites. What's new? Major changes since last announced release

Dr. Dobb's Python-URL! - weekly Python news and links (Feb 1)

2005-02-01 Thread Cameron Laird
QOTW: The right solution will end up being unique to Python though. It has to feel like Python. -- Guido van Rossum http://aws.typepad.com/aws/2005/01/amazon_devcon_g_4.html Sparring with Alex Martelli is like boxing Mike Tyson, except that one experiences brain enhancement rather than brain

Re: Suggesion for an undergrad final year project in Python

2005-02-01 Thread David Fraser
Sridhar wrote: Hi, I am doing my undergrade CS course. I am in the final year, and would like to do my project involving Python. Our instructors require the project to have novel ideas. Can the c.l.p people shed light on this topic? You could write a Python program that writes novels. --

Re: what's OOP's jargons and complexities?

2005-02-01 Thread Grumble
Pascal Bourguignon wrote: You forgot to mention the coordinates of your secret mountain compound: 28 deg 5 min N, 86 deg 58 min E Mount Everest? -- http://mail.python.org/mailman/listinfo/python-list

Programming challenge (C++ and Python)

2005-02-01 Thread Ali Polatel
Dear Python friends, I need a favor.I play chess at a chess server with the name ICC(www.chessclub.com). I want to write a plugin for their interface using Python. I don't have any idea about how to write a plugin but I found out that the server administrator has written a Plugin Development

Re: how do i create such a thing?

2005-02-01 Thread Lowell Kirsh
What might these exceptions be? It's HIGHLY advisable to have your __getattr__ methods raise AttributeError for any requested name that starts and ends with double underscores, possibly with some specific and specifically designed exceptions. Alex --

Re: Using HTTPSConnection and verifying server's CRT

2005-02-01 Thread Marc Poulhiès
Marc Poulhiès [EMAIL PROTECTED] writes: [EMAIL PROTECTED] (Ng Pheng Siong) writes: M2Crypto does server cert verification. With M2Crypto's httpslib, you pass in an SSL.Context instance to the HTTPSConnection constructor to configure the SSL; one of the config knobs is cert verification. So,

find isset() php function equivalent in python

2005-02-01 Thread Olivier Noblanc ATOUSOFT
Hello What is the equivalent function of php isset() in python Thank you very much. olivier noblanc http://www.logiciel-erp.fr -- http://mail.python.org/mailman/listinfo/python-list

Re: Forcing interactive interpreter without (-i)

2005-02-01 Thread Thomas Heller
Miki Tebeka [EMAIL PROTECTED] writes: Hello All, If there a way a script can tell Python to enter interactive mode even if the -i command line switch was not given? I want py2exe to create an interactive session, without writing my own REPL. IIRC, in newer Python versions, you can set the

Re: tkinter: Can You Underline More Than 1 Char In A Menu Title

2005-02-01 Thread Tim Daneliuk
Fredrik Lundh wrote: Tim Daneliuk wrote: However, I intend to actually have two separate keys invoke this menu to have it behave differently in different circumstances. You can, of course, CHANGE the underlined character to match the circumstances. Yeah, I understand that ... what I want is two

Re: find isset() php function equivalent in python

2005-02-01 Thread Ola Natvig
Olivier Noblanc ATOUSOFT wrote: Hello What is the equivalent function of php isset() in python Thank you very much. olivier noblanc http://www.logiciel-erp.fr try: if variable: # isset pass except NameError: # not set pass could

Re: find isset() php function equivalent in python

2005-02-01 Thread Max M
Ola Natvig wrote: Olivier Noblanc ATOUSOFT wrote: Hello What is the equivalent function of php isset() in python try: if variable: # isset pass except NameError: # not set pass you could use: 'variable' in vars() But be aware that it is bad bad practice to do it

Re: find isset() php function equivalent in python

2005-02-01 Thread Ola Natvig
Max M wrote: Ola Natvig wrote: Olivier Noblanc ATOUSOFT wrote: Hello What is the equivalent function of php isset() in python try: if variable: # isset pass except NameError: # not set pass you could use: 'variable' in vars() But be aware that it is bad bad

Re: Python's idiom for function overloads

2005-02-01 Thread F. GEIGER
Since Python doesn't have static typing, how is the same result as traditional function overloads results in acheived? The more you program in Python, the less you are missing it. As Philippe already said, use objects that support the protocol or decide what to do with it after having

Re: variable declaration

2005-02-01 Thread Jacek Generowicz
Michael Tobis [EMAIL PROTECTED] writes: In fact, I'd recommend a paragraph early in the Nutshell book saying there are no declarations, no use strict, no implicit none, sorry, forget it, It would have to be a pretty long paragraph, if it were to list all the things that you do NOT find in

Re: Python's idiom for function overloads

2005-02-01 Thread Jacek Generowicz
Philippe Fremy [EMAIL PROTECTED] writes: Hi Frans, Since Python doesn't have static typing, how is the same result as traditional function overloads results in acheived? With dynamic typing obviously. :-) You can not reproduce the C++ overload idiom Of course you can. Use a

Re: variable declaration

2005-02-01 Thread Alex Martelli
Michael Tobis [EMAIL PROTECTED] wrote: Alex Martelli wrote: Michael Tobis [EMAIL PROTECTED] wrote: he can perfectly well correct his misexpression if he cares to -- not my job to try to read his mind and perform exegesis on his words. Well, I hate to try to tell you your job, but it

Re: how do i create such a thing?

2005-02-01 Thread Alex Martelli
Lowell Kirsh [EMAIL PROTECTED] wrote: What might these exceptions be? It's HIGHLY advisable to have your __getattr__ methods raise AttributeError for any requested name that starts and ends with double underscores, possibly with some specific and specifically designed exceptions. For

Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-02-01 Thread Dean N. Williams
Dear Python Community, I am trying to build Python with Tcl/Tk under the Cygwin_NT-5.1 OS. Has anyone done this? Do I need to build tcl8.4.9 and tk8.4.9 under the unix directory or the win directory. I found that the Tcl/Tk unix directories compiled just fine and built the libtcl8.4.a and

Re: Forcing interactive interpreter without (-i)

2005-02-01 Thread Fuzzyman
In Movable Python I use IPython and code.InteractiveConsole to provide interactive sessions. See the file 'movpy.py' in the source distribution to see the code. Note that to get IPython working with py2exe you must effectively do an explicit `import site`. def interactive(localvars=None): A

Re: Python's idiom for function overloads

2005-02-01 Thread Jacek Generowicz
F. GEIGER [EMAIL PROTECTED] writes: As Philippe already said, use objects that support the protocol or decide what to do with it after having checked its type. I do that, if I have to, like so: 1 def doIt(arg): 2if type(arg) == type([]): 3map(doIt, arg) 4 else: 5

Re: Next step after pychecker

2005-02-01 Thread huy
Paul Rubin wrote: Philippe Fremy [EMAIL PROTECTED] writes: I would like to develop a tool that goes one step further than pychecker to ensure python program validity. The idea would be to get close to what people get on ocaml: a static verification of all types of the program, without any kind of

type of simple object

2005-02-01 Thread [EMAIL PROTECTED]
Hi, How do I know type of simple object is tuple or list or integer, for example my function should understand what is the object type passed in its argument Pujo -- http://mail.python.org/mailman/listinfo/python-list

Re: variable declaration

2005-02-01 Thread Arthur
On 31 Jan 2005 19:41:27 -0800, Michael Tobis [EMAIL PROTECTED] wrote: You may call it a strawberry, if you wish, but that doesn't mean it will taste good with fresh cream. It's nothing more and nothing less than an arguably weird syntax for a perfectly executable statement: This may well be

Re: type of simple object

2005-02-01 Thread Jacek Generowicz
[EMAIL PROTECTED] [EMAIL PROTECTED] writes: How do I know type of simple object is tuple or list or integer, for example my function should understand what is the object type passed in its argument Answers ordered in decreasing degree of Pythonicity: 1) You are mistaken, the function almost

Re: Python's idiom for function overloads

2005-02-01 Thread Jacek Generowicz
Philippe Fremy [EMAIL PROTECTED] writes: Enforcing types also brings the benefit that the program is more deterministic. In my experience, there is a lot more benefits to have an object whose type is clearly identified than to have function that accepts generic objects. I would go as far

Re: type of simple object

2005-02-01 Thread [EMAIL PROTECTED]
The result type 'str' How can I check it since it is not a string right? Pujo -- http://mail.python.org/mailman/listinfo/python-list

python ScriptControl error in Excel while running fine in python

2005-02-01 Thread Sebastien de Menten
I am trying to use ScriptControl under Excel (Windows XP) with the code: Global sc As New MSScriptControl.ScriptControl Public Function os_getcwd() sc.Language = python sc.ExecuteStatement (import os) os_getcwd = sc.Eval(os.getcwd()) End Function When setting the language to python

RE: Python's idiom for function overloads

2005-02-01 Thread Tim Golden
[Jacek Generowicz] | | To each his own, and vice versa. Vice versa? :) TJG This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus

Remove HTML tags (except anchor tag) from a string using regular expressions

2005-02-01 Thread Nico Grubert
Hello, I want to remove all html tags from a string content except a ...xxx/a. My script reads like this: ### import re content = re.sub('([^!]([^]|\n)*)', '', content) ### It works fine. It removes all html tags from content. Unfortunately, this also removes a ...xxx/a occurancies. Any idea,

Re: pickle vs. f.write()

2005-02-01 Thread mmiller at tx3 dot com
On 1/26/05 at 1:48 pm, Terry Reedy wrote: For basic builtin objects, repr(ob) generally produces a string that when eval()ed will recreate the object. IE eval(repr(ob) == ob # sometimes I've found extending this property to your own classes often fairly easy to implement (and useful). For

Re: pickle vs. f.write()

2005-02-01 Thread Martin Miller
On 1/26/05 at 1:48 pm, Terry Reedy wrote: For basic builtin objects, repr(ob) generally produces a string that when eval()ed will recreate the object. IE eval(repr(ob) == ob # sometimes I've found extending this property to your own classes often fairly easy to implement (and useful). For

Re: Python's idiom for function overloads

2005-02-01 Thread F. Petitjean
Le Tue, 01 Feb 2005 12:10:47 +0100, Philippe Fremy a écrit : Frequently, in Python, code which checks for types, rather than checking for features, ends up being excessively restrictive and insufficiently general. snip Enforcing types also brings the benefit that the program is more

Re: Suggesion for an undergrad final year project in Python

2005-02-01 Thread Kartic
Sridhar said the following on 2/1/2005 2:11 AM: Hi, I am doing my undergrade CS course. I am in the final year, and would like to do my project involving Python. Our instructors require the project to have novel ideas. Can the c.l.p people shed light on this topic? You try and implement some CS

Re: type of simple object

2005-02-01 Thread Jacek Generowicz
[EMAIL PROTECTED] [EMAIL PROTECTED] writes: The result type 'str' How can I check it since it is not a string right? It is a type, which is a first-class object in its own right. type('hello') == str However, I reiterate, you almost certainly don't really care about what the actual type

Re: type of simple object

2005-02-01 Thread [EMAIL PROTECTED]
Thank you guys. My function should multiply every element of a list, for example something and something can be an integer or another list. If it deals with integer than it is ok, but If it deals with list than it become false for example list*2 = listlist, and what I really want is to mutlitply

Re: Remove HTML tags (except anchor tag) from a string using regular expressions

2005-02-01 Thread Anand
How about... import re content = re.sub('([^!(a)]([^(/a)]|\n)*)', '', content) Seems to work for me. HTH -Anand -- http://mail.python.org/mailman/listinfo/python-list

Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-02-01 Thread Jason Tishler
Dean, On Tue, Feb 01, 2005 at 02:31:03AM -0800, Dean N. Williams wrote: I am trying to build Python with Tcl/Tk under the Cygwin_NT-5.1 OS. Has anyone done this? Yes, Cygwin Python with _tkinter has been part of the standard Cygwin distribution for over three years:

Re: Go visit Xah Lee's home page

2005-02-01 Thread Arthur
On Mon, 31 Jan 2005 16:07:41 -0800, aurora [EMAIL PROTECTED] wrote: Let's stop discussing about the perl-python non-sense. It is so boring. For a break, just visit Mr Xah Lee's personal page (http://xahlee.org/PageTwo_dir/Personal_dir/xah.html). You'll find lot of funny information and

Re: type of simple object

2005-02-01 Thread Jacek Generowicz
[EMAIL PROTECTED] [EMAIL PROTECTED] writes: Thank you guys. My function should multiply every element of a list, for example something and something can be an integer or another list. If it deals with integer than it is ok, but If it deals with list than it become false for example

equivelant of Java's toString() method? (not repr)

2005-02-01 Thread Alex Hunsley
Pretty simple seeming question, but can't find answer via google or docs... I am using urllib2 as follows: handle = urlopen(req, postdata) # and URL to return a handle on ... print handle.info() the print statement prints out the headers: Content-Type: text/html;charset=ISO-8859-1

Re: equivelant of Java's toString() method? (not repr)

2005-02-01 Thread Roy Smith
Alex Hunsley [EMAIL PROTECTED] wrote: I suppose I'm looking for the equivelant of Java's toString() method... That would be str(), which for the most part, just calls your object's __str__() method. If your object doesn't have an __str__() method, there's nothing magic Python can do to invent

Re: Remove HTML tags (except anchor tag) from a string using regular expressions

2005-02-01 Thread Anand
I meant content = re.sub ('[^!(a)]([^]|\n)*[^!(/a)]', '', content) Sorry for the mistake. However this seems to also print tags like b, p etc also. -Anand -- http://mail.python.org/mailman/listinfo/python-list

Re: Advice on OSX cocoa app with Python backend

2005-02-01 Thread Steve Holden
Socheat Sou wrote: After a brief, but informative, discussion on Freenode's #zope chatroom, I was advised to consult the gurus on c.l.p. I'm working for a small company who is in desperate need to rewrite it's 15+ year old, flat-file, client-tracking database. The staff uses OSX, while I

Re: equivelant of Java's toString() method? (not repr)

2005-02-01 Thread Ola Natvig
Alex Hunsley wrote: Pretty simple seeming question, but can't find answer via google or docs... I am using urllib2 as follows: handle = urlopen(req, postdata) # and URL to return a handle on ... print handle.info() the print statement prints out the headers: Content-Type:

PyCon signature advertising

2005-02-01 Thread Steve Holden
You will note that I have changed my signature for newsgroups to include a plug for PyCon. I would very much appreciate any similar changes that c.l.py readers felt able to make to help get the word out that PyCon is *the* place to be for Python users and developers. I appreciate that not

Re: type of simple object

2005-02-01 Thread [EMAIL PROTECTED]
Hello Jacek, Thanks for the answer, Can you tell me how can I check if an object is a sequence (you are right, this is actually what I want)? -- http://mail.python.org/mailman/listinfo/python-list

Re: Suggesion for an undergrad final year project in Python

2005-02-01 Thread Paul Robson
On Tue, 01 Feb 2005 12:11:47 +, Kartic wrote: Sridhar said the following on 2/1/2005 2:11 AM: Hi, I am doing my undergrade CS course. I am in the final year, and would like to do my project involving Python. Our instructors require the project to have novel ideas. Can the c.l.p

[OT] post-structuralist object oriented system

2005-02-01 Thread PA
For your entertainment: Luas Story of O http://alt.textdrive.com/lua/19/lua-story-of-o Cheers -- PA, Onnay Equitursay http://alt.textdrive.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Next step after pychecker

2005-02-01 Thread Sylvain Thenault
On Tue, 01 Feb 2005 05:18:12 +0100, Philippe Fremy wrote: Hi, Hi I would like to develop a tool that goes one step further than pychecker to ensure python program validity. The idea would be to get close to what people get on ocaml: a static verification of all types of the program,

Re: Remove HTML tags (except anchor tag) from a string using regular expressions

2005-02-01 Thread Max M
Nico Grubert wrote: If it's not to learn, and you simply want it to work, try out this library: http://zope.org/Members/chrisw/StripOGram/readme -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python-list

Re: PyCon signature advertising

2005-02-01 Thread Mike C. Fletcher
Steve Holden wrote: ... I appreciate that not everyone has control over their .sig, ... Take control of your sigs, my sisters and brothers! Viva la Revolution! Follow the Steve into the heat and light of PyCon. You can achieve enlightenment if only you go to the District on the Eastern Edge

Re: type of simple object

2005-02-01 Thread Diez B. Roggisch
Can you tell me how can I check if an object is a sequence (you are right, this is actually what I want)? read the docs for the module types. -- Regards, Diez B. Roggisch -- http://mail.python.org/mailman/listinfo/python-list

Re: PyCon signature advertising

2005-02-01 Thread Steve Holden
Mike C. Fletcher wrote: Steve Holden wrote: I appreciate that not everyone has control over their .sig, Take control of your sigs, my sisters and brothers! Viva la Revolution! Follow the Steve into the heat and light of PyCon. You can achieve enlightenment if only you go to the

Re: PyCon signature advertising

2005-02-01 Thread Roy Smith
In article [EMAIL PROTECTED], Mike C. Fletcher [EMAIL PROTECTED] wrote: Steve Holden wrote: ... I appreciate that not everyone has control over their .sig, ... Take control of your sigs, my sisters and brothers! Viva la Revolution! Follow the Steve into the heat and light of

Re: Next step after pychecker

2005-02-01 Thread Peter Maas
Jacek Generowicz schrieb: You also gain not having to clutter your code with all the type declarations. And you gain not having to decide what types you will use too early on in development. But it can be useful to restrict type variety in certain situations e.g. prime number calculation :) And it

Re: variable declaration

2005-02-01 Thread Thomas Bartkus
Carl Banks [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] snip How common is it for a local variable to be bound in more than one place within a function? How common? It shouldn't happen at all and that was the point. The original posters code demonstrates how it can occur

Re: implicit conversion

2005-02-01 Thread John Lenton
On Mon, Jan 31, 2005 at 02:01:56PM +0100, Benjamin Schmeling wrote: Hi, I am working on exposing a bigint class to python. Now I've got the problem that methods which take an bigint as an parameter do not accept Python longs. For example: import _PythonLiDIA x=123L;

Re: import doesn't work as i want

2005-02-01 Thread John Lenton
On Mon, Jan 31, 2005 at 04:52:24PM +0100, Olivier Noblanc ATOUSOFT wrote: Hello, In the botom of this post you will see my source code. The problem is when i launch main.py that doesn't make anything why ? I'm guessing you don't have an __init__.py in inc/ -- John Lenton ([EMAIL

Awkwardness of C API for making tuples

2005-02-01 Thread Dave Opstad
One of the functions in a C extension I'm writing needs to return a tuple of integers, where the length of the tuple is only known at runtime. I'm currently doing a loop calling PyInt_FromLong to make the integers, then PyTuple_New, and finally a loop calling PyTuple_SET_ITEM to set the

Re: Next step after pychecker

2005-02-01 Thread Diez B. Roggisch
But it can be useful to restrict type variety in certain situations e.g. prime number calculation :) And it would probably also be useful to check violations of restrictions before running the program in normal mode. But that's what (oca)ml and the like do - they exactly don't force you to

Dr. Dobb's Python-URL! - weekly Python news and links (Feb 1)

2005-02-01 Thread Cameron Laird
QOTW: The right solution will end up being unique to Python though. It has to feel like Python. -- Guido van Rossum http://aws.typepad.com/aws/2005/01/amazon_devcon_g_4.html Sparring with Alex Martelli is like boxing Mike Tyson, except that one experiences brain enhancement rather than brain

MDaemon Warning - virus found: Returned mail: see transcript for details

2005-02-01 Thread Post Office
*** WARNING ** Este mensaje ha sido analizado por MDaemon AntiVirus y ha encontrado un fichero anexo(s) infectado(s). Por favor revise el reporte de abajo. AttachmentVirus name Action taken

Re: Awkwardness of C API for making tuples

2005-02-01 Thread Diez B. Roggisch
One of the functions in a C extension I'm writing needs to return a tuple of integers, where the length of the tuple is only known at runtime. I'm currently doing a loop calling PyInt_FromLong to make the integers, then PyTuple_New, and finally a loop calling PyTuple_SET_ITEM to set the

pythonic equivalent of Mathematica's FixedPoint function

2005-02-01 Thread jelle
I now some hostility to functional programming is flaming up now and then; still could someone suggest me a pythonic equivalent for Mathematica's FixedPoint function? For those not familiar with Mathematica: FixedPoint[f, expr] starts with expr, then applies f repeatedly until the result no

Re: pythonic equivalent of Mathematica's FixedPoint function

2005-02-01 Thread jelle
doh... https://sourceforge.net/projects/fixedpoint pardon me -- http://mail.python.org/mailman/listinfo/python-list

Re: variable declaration

2005-02-01 Thread Michael Tobis
Given the behavior, the documentation is gratifyingly correct. Given that the syntax is legal, though, the behavior is not what one would intuitively expect, and is therefore unPythonic by (rather dramatically) violating the principle of least surprise. It's also, to me, understandable why it's

Re: Microsoft Visual C++ and pyton

2005-02-01 Thread Christopher De Vries
On Mon, Jan 31, 2005 at 02:42:11PM -0800, mike wrote: I was also advised to build the python core (pythoncore.vcproj) with my C++ program. By that way I would not have to load the python core anymore during runtime. Is this a good approach? I am currently using VC++ 7 and python 2.4. I'm not

one infinite leap and you thought the bible code was somthing!!

2005-02-01 Thread zetasum
one infinite leap and you thought the bible code was somthing!! One Small step one infinite leap by: zeta limit Quantum cryptography Run this in every order 1 correct outcome Run the web site with every word and every order and ever letter in every order then every paragraph then and

Re: variable declaration

2005-02-01 Thread Michael Tobis
How common is it for a local variable to be bound in more than one place within a function? It's more natural for a beginner to read or write .mystr = .for snippet in snippets: . if ilike(snippet): . mystr = mystr + snippet than .mylist = [] .for snippet in snippets: . if

Re: variable declaration

2005-02-01 Thread Steve Holden
Thomas Bartkus wrote: Carl Banks [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] snip How common is it for a local variable to be bound in more than one place within a function? How common? It shouldn't happen at all and that was the point. This seems a little excessive to me. Sample

Re: pythonic equivalent of Mathematica's FixedPoint function

2005-02-01 Thread Michael Tobis
We apologise for the previous apology. http://arago4.tn.utwente.nl/stonedead/albums-cds/sketches/another-monty-python-record/apologies.html -- mt -- http://mail.python.org/mailman/listinfo/python-list

Re: type of simple object

2005-02-01 Thread Jacek Generowicz
[EMAIL PROTECTED] [EMAIL PROTECTED] writes: Hello Jacek, Thanks for the answer, Can you tell me how can I check if an object is a sequence (you are right, this is actually what I want)? You try to use it as a sequence. If it works, then it was a sequence. If it was not a sequence, you

Re: Handling MySQL connection

2005-02-01 Thread Josh
Thanks for the help! I was able to work through it based on you example. It was lack of knowledge of the object class that was throwing me off. Josh -- http://mail.python.org/mailman/listinfo/python-list

Re: Next step after pychecker

2005-02-01 Thread aurora
A frequent error I encounter try: ...do something... except IOError: log('encounter an error %s line %d' % filename) Here in the string interpolation I should supply (filename,lineno). Usually I have a lot of unittesting to catch syntax error in the main code. But it is very

Re: pythonic equivalent of Mathematica's FixedPoint function

2005-02-01 Thread Tim Peters
[jelle] I now some hostility to functional programming is flaming up now and then; still could someone suggest me a pythonic equivalent for Mathematica's FixedPoint function? For those not familiar with Mathematica: FixedPoint[f, expr] starts with expr, then applies f repeatedly until the

Re: one infinite leap and you thought the bible code was somthing!!

2005-02-01 Thread Evan Simpson
zetasum wrote: One Small step one infinite leap I think this is what you're looking for: import itertools for x in itertools.chain('step', itertools.cycle('leap')): print markov_chain_text(net_loon_compendium, seed=x) Cheers, Evan @ 4-am --

Re: The next Xah-lee post contest

2005-02-01 Thread Luis M. Gonzalez
Peter Hansen wrote: Arthur wrote: Steve Holden [EMAIL PROTECTED] wrote: Would there, I wonder, be any enthusiasm for a Best Xah Lee impression prize at PyCon? And the rules of the game, if he shows? Arthur, if Xah Lee shows up at Pycon, he most definitely will not be giving the best

Re: Advice on OSX cocoa app with Python backend

2005-02-01 Thread Socheat Sou
On Tue, 2005-02-01 at 08:24 -0500, Steve Holden wrote: Who told you that MySQL was OO? It's a bog-standard relational back-end with transactional capabilities. After re-reading my message, I saw how unclear I was. :) I didn't mean to say that MySQL was OO. I meant that, we were going to use

Where are list methods documented?

2005-02-01 Thread Grant Edwards
I'm trying to figure out how to sort a list, and I've run into a problem that that I have tripped over constantly for years: where are the methods of basic types documented? The only thing I can find on a list's sort() method is in the tutorial where it states: sort() Sort the items of

Re: Browsing text ; Python the right tool?

2005-02-01 Thread Jorgen Grahn
On 25 Jan 2005 09:40:35 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Here is an elementary suggestion. It would not be difficult to write a Python script to make a csv file from your text files, adding commas at the appropriate places to separate fields. Then the csv file can be browsed

Re: Where are list methods documented?

2005-02-01 Thread Tim Peters
[Grant Edwards] I'm trying to figure out how to sort a list, and I've run into a problem that that I have tripped over constantly for years: where are the methods of basic types documented? The methods on mutable sequence types are documented in the Library manual's section on mutable sequence

Re: variable declaration

2005-02-01 Thread Thomas Bartkus
Steve Holden [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Thomas Bartkus wrote: Carl Banks [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] snip How common is it for a local variable to be bound in more than one place within a function? How common? It

Re: Where are list methods documented?

2005-02-01 Thread wes weston
Grant Edwards wrote: I'm trying to figure out how to sort a list, and I've run into a problem that that I have tripped over constantly for years: where are the methods of basic types documented? The only thing I can find on a list's sort() method is in the tutorial where it states: sort()

Re: Where are list methods documented?

2005-02-01 Thread Grant Edwards
On 2005-02-01, Tim Peters [EMAIL PROTECTED] wrote: [Grant Edwards] I'm trying to figure out how to sort a list, and I've run into a problem that that I have tripped over constantly for years: where are the methods of basic types documented? The methods on mutable sequence types are

Re: Where are list methods documented?

2005-02-01 Thread Grant Edwards
On 2005-02-01, Brian van den Broek [EMAIL PROTECTED] wrote: I'm not positive I understand what you are looking for, but do these help?: http://www.python.org/doc/2.4/lib/built-in-funcs.html#l2h-15 http://www.python.org/doc/2.4/lib/typesseq.html

Re: The next Xah-lee post contest

2005-02-01 Thread Thomas Bartkus
Luis M. Gonzalez [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Have you visited his website? I kind of like this guy... it's like he has a few bugs in his brain, but other parts are surprisingly interesting. I kind of like him too. I hope he manages to find a babe! As human

Re: pythonic equivalent of Mathematica's FixedPoint function

2005-02-01 Thread jelle
Ah, i see, that clears up the monetary context. Thank you for your FixedPoint example. Can i help myself out by mentioning that the most simple things are always most difficult ;-) Thanks, Jelle. -- http://mail.python.org/mailman/listinfo/python-list

Re: Where are list methods documented?

2005-02-01 Thread Thomas Heller
Grant Edwards [EMAIL PROTECTED] writes: On 2005-02-01, Brian van den Broek [EMAIL PROTECTED] wrote: I'm not positive I understand what you are looking for, but do these help?: http://www.python.org/doc/2.4/lib/built-in-funcs.html#l2h-15 http://www.python.org/doc/2.4/lib/typesseq.html

Re: variable declaration

2005-02-01 Thread Jeremy Bowers
On Tue, 01 Feb 2005 09:13:36 -0600, Thomas Bartkus wrote: *Is* there a reason why the interpreter couldn't/shouldn't require formal variable declaration? You mean, other than the reasons already discussed at length in this thread, not to mention many many others? Your not *liking* the reasons

Re: variable declaration

2005-02-01 Thread Alex Martelli
Michael Tobis [EMAIL PROTECTED] wrote: ... I don't know that it's ever necessary to rebind, but it is, in fact, common, and perhaps too easy. In numeric Python, avoiding rebinding turns out to be a nontrivial skill. Well, a for-statement is BASED on rebinding, for example. Maybe you don't

Re: Where are list methods documented?

2005-02-01 Thread Tim Peters
[Tim Peters] You could have found the above by, e.g., looking up sort in the Library manual's index. [Grant Edwards] I did. I looked up sort in the library index, and it took me to 3.3.5 Emulating container types, It doesn't for me. Here:

Re: Where are list methods documented?

2005-02-01 Thread Grant Edwards
On 2005-02-01, Tim Peters [EMAIL PROTECTED] wrote: [Grant Edwards] I did. I looked up sort in the library index, and it took me to 3.3.5 Emulating container types, It doesn't for me. Here: http://docs.python.org/lib/genindex.html#letter-s There are two entries for sort: sort

Re: Where are list methods documented?

2005-02-01 Thread Aahz
In article [EMAIL PROTECTED], Thomas Heller [EMAIL PROTECTED] wrote: You could also have typed 'sort' in the box here: http://starship.python.net/crew/theller/pyhelp.cgi This search is also available in Mark Hammond's Mozilla Python sidebar. ...and as a link from python.org's documentation

Re: cfgparse v01_00 released

2005-02-01 Thread dan . gass
I like this, its really nice that it fits well with optparse. Thanks. I read through the docs, mostly it seems very logical, the following things stood out to me as not really fitting: http://cfgparse.sourceforge.net/cfgparse-round-trip-set.html It doesn't seem logical that in order to

Re: How do you do arrays

2005-02-01 Thread Kartic
Tom, Before you use iMatrix[index], you have to tell python to use iMatrix as an array. You will do that using iMatrix = [] *outside* the loop. iMatrix = [] while index majorlop1: # rest of the loop statements Since you are new, please take a look at the Python tutorial to get you started.

Re: How do you do arrays

2005-02-01 Thread Kartic
and it is called a List in Python parlance. -- http://mail.python.org/mailman/listinfo/python-list

Re: How do you do arrays

2005-02-01 Thread Sean Blakey
On Tue, 01 Feb 2005 10:52:45 -0800, Thomas Bunce [EMAIL PROTECTED] wrote: I am new at Pyton and I am learning from book not classes so please forgive my being slow The below does not work I get an Error of File Matrix[index] = k NameError: name 'iMatrix' is not defined while index

Re: variable declaration

2005-02-01 Thread Nick Vargish
[EMAIL PROTECTED] (Aahz) writes: It's kind of like having a guy who juggles chainsaws wearing body armor arguing with a guy who juggles rubber chickens wearing a T-shirt about who's in more danger. --Roy Smith, c.l.py, 2004.05.23 If it's Nethack, the guy in the T-shirt is in more danger. A

Re: How do you do arrays

2005-02-01 Thread wes weston
Thomas Bunce wrote: I am new at Pyton and I am learning from book not classes so please forgive my being slow The below does not work I get an Error of File Matrix[index] = k NameError: name 'iMatrix' is not defined while index majorlop1: index = index + 1 k = random.choice(listvalues)

  1   2   3   >