ANN: wxPython 2.7.1.1 released

2006-10-20 Thread Robin Dunn
Announcing -- The 2.7.1.1 release of wxPython is now available for download at http://wxpython.org/download.php. This release is the first offical release in the 2.7.x development series, and includes a lot of new features, enhancements and fixes. Source and binaries are available for

help with my first use of a class

2006-10-20 Thread BartlebyScrivener
I am a mere hobbyist. Spent several hours trying to make a class, because I think this is an occasion where I need one. But I can't make it work. This code works (only because of the global c, which I know I'm supposed to avoid, by using a Class). I edited the rest to leave out the irrelevant

How to upgrade python from 2.4.3 to 2.4.4 ?

2006-10-20 Thread [EMAIL PROTECTED]
Hi, I just want to upgrade my python version from 2.4.3 to 2.4.4,do I need to uninstall python 2.4.3 first ? I'd rather not to do so, because I have installed some other python packages for python2.4.3. Thanks. xiaojf -- http://mail.python.org/mailman/listinfo/python-list

Re: Need help in Py2exe

2006-10-20 Thread Kirt
there's a page on the py2exe site about tweaks necessary for specific modules: http://www.py2exe.org/index.cgi/WorkingWithVariousPackagesAndModules look for: If you're getting File xml\sax\saxexts.pyc, line 77, in make_parser; xml.sax._exceptions.SAXReaderNotAvailable: No

Re: Help: Python2.3 Python2.4 on RHEL4 x86_64

2006-10-20 Thread Martin v. Löwis
Christopher Taylor schrieb: This basically means to me that Python2.4 is loading gloab.py from /usr/lib64/Python2.3 insead of /usr/lib/Python2.4 (even thought I wanted to install the related files in /usr/lib64/Python2.4) Can someome please help! Can you please report what sys.path is? Do

Re: How to upgrade python from 2.4.3 to 2.4.4 ?

2006-10-20 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: I just want to upgrade my python version from 2.4.3 to 2.4.4,do I need to uninstall python 2.4.3 first ? afaik, no. /F -- http://mail.python.org/mailman/listinfo/python-list

Re: How to upgrade python from 2.4.3 to 2.4.4 ?

2006-10-20 Thread Martin v. Löwis
[EMAIL PROTECTED] schrieb: I just want to upgrade my python version from 2.4.3 to 2.4.4,do I need to uninstall python 2.4.3 first ? I'd rather not to do so, because I have installed some other python packages for python2.4.3. You don't have to uninstall. Installing on top will work just

ANN compiler2 : Produce bytecode from Python 2.5 Abstract Syntax Trees

2006-10-20 Thread Michael Spencer
Announcing: compiler2 - For all you bytecode enthusiasts: 'compiler2' is an alternative to the standard library 'compiler' package, with several advantages. Improved pure-python compiler - Produces identical bytecode* to the built-in compile function for all /Lib and

Re: help with my first use of a class

2006-10-20 Thread BartlebyScrivener
Whoah. At least I got the connection. I think. Maybe I can figure more on my own. Any help appreciated. Thanks - class Connection: def __init__(self, aDatasource): self.db = aDatasource self.conn = odbc.DriverConnect(self.db) self.conn.cursor() def

Re: help with my first use of a class

2006-10-20 Thread [EMAIL PROTECTED]
BartlebyScrivener wrote: I am a mere hobbyist. Spent several hours trying to make a class, because I think this is an occasion where I need one. But I can't make it work. This code works (only because of the global c, which I know I'm supposed to avoid, by using a Class). I edited the rest

Re: help with my first use of a class

2006-10-20 Thread James Stroud
BartlebyScrivener wrote: I am a mere hobbyist. Spent several hours trying to make a class, because I think this is an occasion where I need one. But I can't make it work. This code works (only because of the global c, which I know I'm supposed to avoid, by using a Class). I edited the rest

Re: help with my first use of a class

2006-10-20 Thread BartlebyScrivener
Wow, That's great, James. Thanks. I shall put it together. Appreciate it. rd -- http://mail.python.org/mailman/listinfo/python-list

Re: Decorators and how they relate to Python - A little insight please!

2006-10-20 Thread Gabriel Genellina
At Friday 20/10/2006 02:38, [EMAIL PROTECTED] wrote: it's handy for doing things like validation of parameter and return types. Like... @accepts(int,int) @returns(int) def add(a,b): return a+b So, it's handy for converting Python into another language :) -- Gabriel Genellina Softlab

Re: invert or reverse a string... warning this is a rant

2006-10-20 Thread Hendrik van Rooyen
Fredrik Lundh [EMAIL PROTECTED]wrote: 8--- 'a man a plan a canal panama' is not a palindrome ? not if spaces count - able was I ere I saw elba - is one - but its a tougher test... - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: Converting existing module/objects to threads

2006-10-20 Thread Hendrik van Rooyen
[EMAIL PROTECTED] wrote: I have inheirted some existing code, that i will explain in a moment, have needed to extend and ultimately should be able to run in threads. I've done a bunch of work with python but very little with threads and am looking for some pointers on how to implement, and if

Re: invert or reverse a string... warning this is a rant

2006-10-20 Thread Hendrik van Rooyen
Brad [EMAIL PROTECTED] wrote: Steven D'Aprano wrote: Gah!!! That's *awful* in so many ways. Thanks... I'm used to hearing encouragement like that. After a while you begin to believe that everything you do will be awful, so why even bother trying? rant It has been my experience that

Re: invert or reverse a string... warning this is a rant

2006-10-20 Thread Simon Forman
rick wrote: ... see that the sequence is reversed. Backwards is pure, simple and easy. This is not so in Python and it should be. foo[::-1] isn't pure, simple and easy? It derives cleanly from the slice notation, it does exactly what you want, and it even works with lists and tuples and any

Re: invert or reverse a string... warning this is a rant

2006-10-20 Thread I V
On Fri, 20 Oct 2006 09:04:07 +1000, Steven D'Aprano wrote: I agree -- the reversed() function appears to be an obvious case of purity overriding practicality :( str(reversed(some string)) 'reversed object at 0xb7edca4c' repr(reversed(some string)) 'reversed object at 0xb7edca4c' This

Downloading images with python

2006-10-20 Thread Hans Olav Hygen
On 23. of October last year a the follwing was posted to this group: htmlSource=urllib.urlopen(http://www.godandscience.org/images/nebula.jpg;) # Read from the object, storing the page's contents in 's'. s = htmlSource.read() htmlSource.close() myfile = open(myfile.jpg, w) myfile.write(s)

RE: invert or reverse a string... warning this is a rant

2006-10-20 Thread Demel, Jeff
Paul wrote: .join(sum(map(list,zip(s,s[len(s)/2:])),[])) perhaps? Not quite as elegant as a string.shuffle would be, am I right? -Jeff This email is intended only for the individual or entity to which it is addressed. This email may contain information that is privileged, confidential or

Re: Downloading images with python

2006-10-20 Thread Fredrik Lundh
Hans Olav Hygen wrote: myfile = open(P:\Jobb\Prosjekt\Maanedsoversikt\myfile.jpg, wb) myfile.write(s) myfile.close make that myfile.close() But the images get cropped at the bottom. files are closed when the program exits (unless it does so in an uncontrolled way), so I assume you were

Convert binary image to JPEG with 72 dpi

2006-10-20 Thread Nico Grubert
Dear list members,I have the binary content of an image file and it's filename.I neither know the resolution nor the dpi of the image.No I need to convert this binary content into a 72 dpi jpeg image. Furthermore I have to resize the image so neither the width nor the height is bigger than 250

Re: invert or reverse a string... warning this is a rant

2006-10-20 Thread Kay Schluehr
The Ruby approach makes sense to me as a human being. http://happyfuncog.blogspot.com/2006/09/confessions-of-pseudo-misanthrope.html The Python approach is not easy for me (as a human being) to remember. I always thought we Pythonistas are already idiots but whenever I meet a Rubist it ( the

BeautifulSoup problem

2006-10-20 Thread placid
Hi all, Just wondering if anyone knows how to get the text between the tags of the following Tag object? span class=nametextHello/span Cheers -- http://mail.python.org/mailman/listinfo/python-list

Re: invert or reverse a string... warning this is a rant

2006-10-20 Thread Fredrik Lundh
Brad [EMAIL PROTECTED] wrote: Do you have children? How would your child feel if he brought you something he had made and you then told him it was awful in *sooo* many ways. If you're arguing that everything a child does and says should be rewarded, I seriously doubt that you have any. (on

Re: invert or reverse a string... warning this is a rant

2006-10-20 Thread Fredrik Lundh
Hendrik van Rooyen wrote: 'a man a plan a canal panama' is not a palindrome not if spaces count - which they do if you rely on a single reverse operation (my point was that it takes a bit more work than that to check for a palindrome). /F --

Re: a little about regex

2006-10-20 Thread Fulvio
On Wednesday 18 October 2006 23:05, Ant wrote:     allow = re.compile(r'.*(?!\.com)\.my(|$)')  # negative lookbehind     if allow.search(adr):         return True     return False I'd point out that : allow = re.search(r'.*(?!\.com)\.my(|$)',adr) Will do as yours, since the call to 're'

Re: Tkinter--does anyone use it for sophisticated GUI development?

2006-10-20 Thread Alexander Burger
Paul Rubin http://[EMAIL PROTECTED] wrote: There's a language called Picolisp in which this is the standard way to do a gui. Picolisp includes a java applet that can do some stuff that standard html widgets can't. These days I suppose it should use AJAX. Yes, in fact it does. The currently

Re: Lead Software Engineer

2006-10-20 Thread Nicola Musatti
James Stroud wrote: alex23 wrote: Emma wrote: 5. Please provide us with a comparison of the following music discovery sites: http://www.blogmusik.net http://www.seeqpod.com/music http://www.finetune.com http://www.webjay.com For each of these we like to know: A) What you like

I like python.

2006-10-20 Thread Fidel
I'm not a coder.. I'm just a person that trys to do things with languages he likes. Sometimes I'm successful, mostly not. I do know that before I bother a list with a silly question I should do my best to research for an answer myself. ala RTFM. That said my searches haven't found me what I am

Re: I like python.

2006-10-20 Thread Fredrik Lundh
Fidel wrote: Could someone please tell me what I need to put into a python script to not have a window come up however briefly? assuming Windows, and assuming that you have a standard Python install for Windows: use pyw instead of py as the script's extension. (Windows applications come in

new multiplayer game (made with pygame) platform

2006-10-20 Thread maxime_phan
hello we would like to make you discover a new and free multiplayer game platform: GameLAN. All game are made with pygame, we have 3 multiplayer games now (Tetris like game, Heroic fantaisy tactic game and gomoku game). We invite you on the 22th of October at 4pm (Paris Time) to discover this

Re: BeautifulSoup problem

2006-10-20 Thread Marc 'BlackJack' Rintsch
In [EMAIL PROTECTED], placid wrote: Hi all, Just wondering if anyone knows how to get the text between the tags of the following Tag object? span class=nametextHello/span Are you looking for a way to search for tag *and* attributes? What about this:: In [12]: soup.find('span',

Re: Can I use decorators to manipulate return type or create methods?

2006-10-20 Thread Diez B. Roggisch
WakeBdr schrieb: Diez, I get what that accomplishes now, but I'm having problems in my implementation. I was able to write a standalone class that worked correctly. However, in my code the class that I need to exhibit this functionality inherits from another class. This seems to cause

Unicode support in python

2006-10-20 Thread sonald
Hi, I am using python2.4.1 I need to pass russian text into python and validate the same. Can u plz guide me on how to make my existing code support the russian text. Is there any module that can be used for unicode support in python? Incase of decimal numbers, how to handle comma as a decimal

Re: Unicode support in python

2006-10-20 Thread Fredrik Lundh
sonald wrote: I need to pass russian text into python and validate the same. Can u plz guide me on how to make my existing code support the russian text. Is there any module that can be used for unicode support in python? Python has built-in Unicode support (which you would probably have

Re: Unicode support in python

2006-10-20 Thread Fredrik Lundh
http://www.google.com/search?q=python+unicode (and before anyone starts screaming about how they hate RTFM replies, look at the search result) /F -- http://mail.python.org/mailman/listinfo/python-list

Why the result

2006-10-20 Thread HYRY
Why the third print stement output 'comments': [(1, 2, 3)], I think it should be []. I am using Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)] on win32. # program class PicInfo: def __init__(self, intro=, tags=, comments=[]): self.picintro = intro

Re: help with my first use of a class

2006-10-20 Thread Bruno Desthuilliers
BartlebyScrivener wrote: I am a mere hobbyist. Spent several hours trying to make a class, because I think this is an occasion where I need one. But I can't make it work. This code works (only because of the global c, which I know I'm supposed to avoid, by using a Class). I edited the rest

Re: help with my first use of a class

2006-10-20 Thread Bruno Desthuilliers
BartlebyScrivener wrote: Whoah. At least I got the connection. I think. Maybe I can figure more on my own. Any help appreciated. Thanks - class Connection: def __init__(self, aDatasource): self.db = aDatasource self.conn = odbc.DriverConnect(self.db)

Re: Why the result

2006-10-20 Thread Fredrik Lundh
HYRY [EMAIL PROTECTED] wrote: Why the third print stement output 'comments': [(1, 2, 3)], I think it should be []. default arguments are calculated once. for details, see the tutorial http://docs.python.org/tut/node6.html#SECTION00671 and the FAQ:

Re: help with my first use of a class

2006-10-20 Thread Fredrik Lundh
Bruno Desthuilliers wrote: First, notice that you *don't* need a class here to avoid globals. Learning to use function as *functions* (ie: taking arguments and returning values) instead of procedure would help: def random_quote(cursor): c.execute (SELECT COUNT(Quote) FROM PythonQuoteQuery)

Re: Why the result

2006-10-20 Thread Bruno Desthuilliers
HYRY wrote: Why the third print stement output 'comments': [(1, 2, 3)], I think it should be []. I am using Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)] on win32. # program class PicInfo: def __init__(self, intro=, tags=, comments=[]): This is a FAQ - and

Re: Flexible Collating (feedback please)

2006-10-20 Thread Leo Kislov
Ron Adam wrote: Leo Kislov wrote: Ron Adam wrote: locale.setlocale(locale.LC_ALL, '') # use current locale settings It's not current locale settings, it's user's locale settings. Application can actually use something else and you will overwrite that. You can also affect

Webprogr: Link with automatic submit

2006-10-20 Thread Gregor Horvath
Hi, As I am no expert web programmer I thought I'd better ask the experts if there is a simpler or better solution to my problem than the one I am thinking of. (using TurboGears) The problem --- I have a form. Ok. you can submit, validate it etc. Now I have a link on that form to

Re: comparing Unicode and string

2006-10-20 Thread Leo Kislov
[EMAIL PROTECTED] wrote: Thanks, John and Neil, for your explanations. Still I find it rather difficult to explain to a Python beginner why this error occurs. Suggestion: shouldn't an error raise already when I try to assign s2? A normal string should never be allowed to contain characters

Re: comparing Unicode and string

2006-10-20 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: Suggestion: shouldn't an error raise already when I try to assign s2? variables are not typed in Python. plain assignment will never raise an exception. /F -- http://mail.python.org/mailman/listinfo/python-list

Re: right curly quote and unicode

2006-10-20 Thread Leo Kislov
On 10/19/06, TiNo [EMAIL PROTECTED] wrote: Now I know where the problem lies. The character in the actual file path is u+00B4 (Acute accent) and in the Itunes library it is u+2019 (a right curly quote). Somehow Itunes manages to make these two the same...? As it is the only file that gave me

list2str and performance

2006-10-20 Thread spr
Hi, I'm trying to learn Python and I'd appreciate any comments about my small snippets of code. I read an old anecdote about performance here: http://www.python.org/doc/essays/list2str/ First, I tried to figure out what would be the most pythonic approach by today's standards: def

Re: list2str and performance

2006-10-20 Thread Fredrik Lundh
spr wrote: When performance matters and you have to develop a CPU-bound application, do you think it is possible to eventually achieve nearly the best performance by extending Python with C or C++ modules, or is it better to take the embedding approach, that is, use a C or C++ core that

RE: Tkinter--does anyone use it for sophisticated GUI development?

2006-10-20 Thread Matthew Warren
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] rg] On Behalf Of Fredrik Lundh Sent: 20 October 2006 06:43 To: python-list@python.org Subject: Re: Tkinter--does anyone use it for sophisticated GUI development? Kevin Walzer wrote: Coming from

Re: BeautifulSoup problem

2006-10-20 Thread placid
Marc 'BlackJack' Rintsch wrote: In [EMAIL PROTECTED], placid wrote: Hi all, Just wondering if anyone knows how to get the text between the tags of the following Tag object? span class=nametextHello/span Are you looking for a way to search for tag *and* attributes? What about

Re: Webprogr: Link with automatic submit

2006-10-20 Thread Bruno Desthuilliers
Gregor Horvath wrote: Hi, As I am no expert web programmer I thought I'd better ask the experts if there is a simpler or better solution to my problem than the one I am thinking of. (using TurboGears) The problem --- I have a form. Ok. you can submit, validate it etc. Now I

Re: help with my first use of a class

2006-10-20 Thread Bruno Desthuilliers
Fredrik Lundh wrote: Bruno Desthuilliers wrote: First, notice that you *don't* need a class here to avoid globals. Learning to use function as *functions* (ie: taking arguments and returning values) instead of procedure would help: def random_quote(cursor): c.execute (SELECT COUNT(Quote)

RE: [Tutor] How to get the width of teh button widget..??

2006-10-20 Thread Matthew Warren
Folks, Sorry for asking you such a trivial question.!!! But i want to size up all the buttons with the same size as the largest one in the interface.. And thats why I am asking this question.. Regards, Asrarahmed Hi Asrarahmed. I think, from your

python under the hood

2006-10-20 Thread tpochep
Hello. Is there any good information about python's internals and semantic? I mean under the hood. For example, I want to understant what do these strings x = 10 y = 10 x = 20 mean (memory allocation for object? ctors? etc.) Unfortynatly, I'm too lazy to read python's source code :) (and I

Logging with Logger hierarchies

2006-10-20 Thread Robert
Hi all I have been trying to set up a framework with logging implemented using the built in Python logging module. For better or worse, I have decided to base the logger names on the module names. This means that I am using multiple layers of name, eg logging.getLogger(a.b.c). I am also using

Re: python under the hood

2006-10-20 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: Is there any good information about python's internals and semantic? I mean under the hood. For example, I want to understant what do these strings x = 10 y = 10 x = 20 mean (memory allocation for object? ctors? etc.) reading this might help:

Re: invert or reverse a string... warning this is a rant

2006-10-20 Thread rick
Fredrik Lundh wrote: Brad [EMAIL PROTECTED] wrote: Do you have children? How would your child feel if he brought you something he had made and you then told him it was awful in *sooo* many ways. If you're arguing that everything a child does and says should be rewarded... I'm not

Re: wxPython and PIL

2006-10-20 Thread Odalrick
Thanks for the answer. -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode support in python

2006-10-20 Thread sonald
Fredrik Lundh wrote: http://www.google.com/search?q=python+unicode (and before anyone starts screaming about how they hate RTFM replies, look at the search result) /F Thanks!! but i have already tried this... and let me tell you what i am trying now... I have added the following line

Re: Book about database application development?

2006-10-20 Thread Wolfgang Keller
does anyone know of a good book that about development of database applications? Scott Ambler's Agile Database Techniques Thanks for the hint, the summaries indicate that this one could be very useful indeed. Sincerely, Wolfgang Keller -- My email-address is correct. Do NOT remove

list comprehension (searching for onliners)

2006-10-20 Thread Gerardo Herzig
Hi all: I have this list thing as a result of a db.query: (short version) result = [{'service_id' : 1, 'value': 10}, {'service_id': 2, 'value': 5}, {'service_id': 1, 'value': 15}, {'service_id': 2, 'value': 15}, ] and so on...what i

Re: python under the hood

2006-10-20 Thread A.T.Hofkamp
On 2006-10-20, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello. Is there any good information about python's internals and semantic? I mean under the hood. Not exactly 'under the hood', but very close is the Python/C API. You can learn a great deal by reading the ExtendingEmbedding manual as

RE: invert or reverse a string... warning this is a rant

2006-10-20 Thread Duncan Booth
Demel, Jeff [EMAIL PROTECTED] wrote: I've been programming professionally for over 10 years, and have never once needed to reverse a string. Maybe it's a lack of imagination on my part, but I can't think of a single instance this might be necessary. I did want to reverse some strings once,

Re: help with my first use of a class

2006-10-20 Thread BartlebyScrivener
Thanks, Bruno. Very educational. rd Bruno Desthuilliers wrote: Think of a class as both a blueprint for objects and a factory creating these objects. The class lets you define the attributes and behaviors of it's instances. First, notice that you *don't* need a class here to avoid globals.

Re: help with my first use of a class

2006-10-20 Thread BartlebyScrivener
Thank you all! My main problem is going away from Python and programming for weeks or months at a time, then picking up where I left off. But Python is much better in this regard than Perl. I appreciate the help. rd - Dennis Lee Bieber wrote: If using a db-api compliant

Re: list comprehension (searching for onliners)

2006-10-20 Thread Max Erickson
Gerardo Herzig [EMAIL PROTECTED] wrote: Hi all: I have this list thing as a result of a db.query: (short version) result = [{'service_id' : 1, 'value': 10}, {'service_id': 2, 'value': 5}, {'service_id': 1, 'value': 15}, {'service_id': 2,

Re: Integration of globalization data in Python web frameworks

2006-10-20 Thread GinTon
The project web is activated http://webda.python-hosting.com/ GinTon wrote: I have created several tables in CSV format with globalization data (G11n). There are tables for countries, areas, languages, countries languages, time zones, phones. And they are licensed under a Creative Commons

Re: list comprehension (searching for onliners)

2006-10-20 Thread Tim Chase
result = [{'service_id' : 1, 'value': 10}, {'service_id': 2, 'value': 5}, {'service_id': 1, 'value': 15}, {'service_id': 2, 'value': 15}, ] and so on...what i need to do is some list comprehension that returns me something like

Re: Unicode support in python

2006-10-20 Thread Diez B. Roggisch
sonald schrieb: Fredrik Lundh wrote: http://www.google.com/search?q=python+unicode (and before anyone starts screaming about how they hate RTFM replies, look at the search result) /F Thanks!! but i have already tried this... Tried - might be. But you certainly didn't understand it. So I

Re: Unicode support in python

2006-10-20 Thread Fredrik Lundh
sonald wrote: I have added the following line in the script # -*- coding: utf-8 -*- that's good. I have also modified the site.py that's bad, because this means that your code won't work on standard Python installations. Now when I try to validate the data in the text file say abc.txt

Re: advice for web-based image annotation

2006-10-20 Thread Brian Blais
Paul Rubin wrote: Brian Blais [EMAIL PROTECTED] writes: I want to set up a system where I can have my family members write comments about a number of pictures, as part of a family tree project. ...Any suggestions would be greatly appreciated! How about a wiki? So I thought about a wiki

Re: list comprehension (searching for onliners)

2006-10-20 Thread Jon Clements
Gerardo Herzig wrote: Hi all: I have this list thing as a result of a db.query: (short version) result = [{'service_id' : 1, 'value': 10}, {'service_id': 2, 'value': 5}, {'service_id': 1, 'value': 15}, {'service_id': 2, 'value': 15},

Re: Tkinter--does anyone use it for sophisticated GUI development?

2006-10-20 Thread Kevin Walzer
James Stroud wrote: Also, look at my modest program at passerby.sf.net. Not so sophisticated, but not completely simple either. I did look at passerby--a nice app, and in a native Mac OS X version also! (I'm a Mac developer.) Thanks for the pointer. -- Kevin Walzer Poetic Code

Re: advice for web-based image annotation

2006-10-20 Thread Paul Rubin
Brian Blais [EMAIL PROTECTED] writes: How about a wiki? So I thought about a wiki (again having no experience there either...sigh). You can put images in a wiki? I had a quick look at pytw, but haven't had the time to really dive into it to see if I could get it going, and if it would

Re: python module for finite element program

2006-10-20 Thread Larry Bates
[EMAIL PROTECTED] wrote: Hello, Is there any add on python modules suitable for finite element 3D mesh such as to create (beam, plate, etc) ? Best Regards, ajikoe Google is your friend: http://www.python.org/pycon/papers/pysparse.html http://sourceforge.net/projects/feval/

Re: Tkinter--does anyone use it for sophisticated GUI development?

2006-10-20 Thread Kevin Walzer
Fredrik Lundh wrote: on the other hand, such wrappers are usually extremely simple, and the mapping between Python and Tk is trivial. there's simply not much to add to the existing Tk module docs. I think I might simply have to bite the bullet, actually use some of these documented

Re: Can I use decorators to manipulate return type or create methods?

2006-10-20 Thread WakeBdr
OK, I think I'm close now. I just can't get past this one error. Here is my code, followed by the output produced when I run it. class Magic(type): def __new__(cls, name, bases, d): for name, function in d.items(): try:

FTP over SSL

2006-10-20 Thread Tor Erik Soenvisen
Hi, Anyone know about existing code supporting FTP over SSL? I guess pycurl http://pycurl.sourceforge.net/ could be used, but that requires knowledge of libcurl, which I haven't. regards -- http://mail.python.org/mailman/listinfo/python-list

Re: Logging with Logger hierarchies

2006-10-20 Thread Vinay Sajip
I delved in the code and found that when my logger a.b.c is created, it doesn't create Loggers for a.b or a but rather instances of a PlaceHolder class. If I actually call logging.getLogger(a.b) and logging.getLogger(a) then the PlaceHolders get converted to Loggers and the hierarchy

Re: invert or reverse a string... warning this is a rant

2006-10-20 Thread Tim N. van der Leeuw
I V wrote: On Fri, 20 Oct 2006 09:04:07 +1000, Steven D'Aprano wrote: I agree -- the reversed() function appears to be an obvious case of purity overriding practicality :( str(reversed(some string)) 'reversed object at 0xb7edca4c' repr(reversed(some string)) 'reversed object at

Re: Can I use decorators to manipulate return type or create methods?

2006-10-20 Thread Diez B. Roggisch
WakeBdr schrieb: OK, I think I'm close now. I just can't get past this one error. Here is my code, followed by the output produced when I run it. Stupid mistake of me - I didn't properly create a closure for the functions to set. See the corrected version in the attachment. Diez

Re: invert or reverse a string... warning this is a rant

2006-10-20 Thread Fredrik Lundh
Tim N. van der Leeuw wrote: In practice, the short-term fix would be to add a __str__ method to the 'reversed' object so what should str(reversed(range(10))) do ? and perhaps to all iterators too (so that trying to build a string from an iterator would do the obvious thing). all

User Access to the docstring of a property

2006-10-20 Thread Colin J. Williams
Is there some way that the user can access the docstring specified for a property? Please see the example below: # propDocTest class A(object): def __init__(self, value): self.value= value def vGet(self): return self.value V= property (fget= vGet, doc=Get Value.) a= A(22)

Re: [OT] a little about regex

2006-10-20 Thread Fulvio
On Friday 20 October 2006 02:40, Ron Adam wrote: I see, is this a cleanup script to remove the least wanted items? Yes. Probably will remain in this mode for a while. I'm not prepaired to bring out a new algorithm Or is it a bit of both?  Why the score? As exposed on another post. There

Re: I would like write some data recovery software

2006-10-20 Thread Fulvio
*** Your mail has been scanned by InterScan MSS. *** On Friday 20 October 2006 07:29, gel wrote: Once you get a way to access the bytes to recover... the Hachoir library can be interresting as a model to map structures on these data.   

Re: help with my first use of a class

2006-10-20 Thread Fulvio
*** Your mail has been scanned by InterScan MSS. *** On Friday 20 October 2006 14:34, James Stroud wrote: You really don't need classes for this I'm in that matter too. Doesn't classes make the main program neater? Fundamentally OOP is the way to

Use I the classes?

2006-10-20 Thread Fulvio
*** Your mail has been scanned by InterScan MSS. *** Hello, I'm used to put up programs (small right now), but I could find the only way to define some functions. I'm interested to split some function into class, but I don't have know-how for these

Re: User Access to the docstring of a property

2006-10-20 Thread Diez B. Roggisch
Colin J. Williams schrieb: Is there some way that the user can access the docstring specified for a property? You need to access it using the class, not an instance of it. class Foo(object): @apply def prop(): def fget(self): return 10 def fset(self,

Re: Tkinter--does anyone use it for sophisticated GUI development?

2006-10-20 Thread Christophe
Kevin Walzer a écrit : Am I better off biting the bullet and learning wxPython--a different GUI paradigm to go with the new language I'm trying to learn? I had hoped to reduce my learning curve, but I'm very concerned that I simply can't do what I want to do with Tkinter. What do other Tkinter

Re: Logging with Logger hierarchies

2006-10-20 Thread Robert
Hi again I have seen my error! I was mistakenly occasionally creating the logger using logger = logging.Logger(a.b.c) instead of logger = logging.getLogger(a.b.c) Doh. I miss my private constructors to save me from such embarrasment ;^) Cheers Robert --

FOR statement

2006-10-20 Thread Lad
If I have a list Mylist=[1,2,3,4,5] I can print it for i in Mylist: print i and results is 1 2 3 4 5 But how can I print it in a reverse order so that I get 5 4 3 2 1 ? Thanks. L -- http://mail.python.org/mailman/listinfo/python-list

Re: Use I the classes?

2006-10-20 Thread BartlebyScrivener
Fulvio wrote: Looking for documents (free download) which clearly explain the way of programming python classes and lots of examples as a bonus. http://www.freenetpages.co.uk/hp/alan.gauld/ On the frames page, go down to Advanced Topics and Object Oriented Programming And from the other

Re: FOR statement

2006-10-20 Thread Christophe
Lad a écrit : If I have a list Mylist=[1,2,3,4,5] I can print it for i in Mylist: print i and results is 1 2 3 4 5 But how can I print it in a reverse order so that I get 5 4 3 2 1 ? Thanks. L for i in reversed(Mylist): print i --

Re: list comprehension (searching for onliners)

2006-10-20 Thread Gerardo Herzig
You are the man, you are the man!! Yes, i need those dicts in order to assign them to a nested TMPL_LOOP for the htmltmpl templating engine. Thats why i cant use the solution provided by Max, and thanks to Jon too!! Thanks a lot dudes, i hope someday ill turn myself into some of you guys who

Re: list comprehension (searching for onliners)

2006-10-20 Thread Paul Rubin
Gerardo Herzig [EMAIL PROTECTED] writes: You are the man, you are the man!! Yes, i need those dicts in order to assign them to a nested TMPL_LOOP for the htmltmpl templating engine. Thats why i cant use the solution provided by Max, and thanks to Jon too!! I'm confused, can't you write a

Re: FOR statement

2006-10-20 Thread [EMAIL PROTECTED]
Lad wrote: If I have a list Mylist=[1,2,3,4,5] I can print it for i in Mylist: print i and results is 1 2 3 4 5 But how can I print it in a reverse order so that I get 5 4 3 2 1 ? Thanks. L reverse the list in place with reverse method l.reverse() for i in l:

Re: list comprehension (searching for onliners)

2006-10-20 Thread Fredrik Lundh
Gerardo Herzig wrote: Thanks a lot dudes, i hope someday ill turn myself into some of you guys who can actually answer questions ;) if you want to become a good Python programmer, you really need to get over that I need a oneliner idea. /F --

Re: list comprehension (searching for onliners)

2006-10-20 Thread Roberto Bonvallet
Gerardo Herzig wrote: [...] and so on...what i need to do is some list comprehension that returns me something like [...] You don't _need_ a list comprehension, you just _want_ one :) [...] Ill keeping blew off my hair and drinking more cofee while searching for this damn onliner im

  1   2   3   >