Re: UML to Python/Java code generation

2005-06-21 Thread Philippe C. Martin
Try this: http://uml.sourceforge.net/index.php Regards, Philippe Maurice LING wrote: > Hi, > > Is there any UML tools that is able to take UML and generate Python codes? > > Cheers > Maurice -- http://mail.python.org/mailman/listinfo/python-list

Re: sudoku dictionary attack

2005-06-21 Thread Nick Atty
On Mon, 20 Jun 2005 23:30:27 +0200, Oliver Albrecht <[EMAIL PROTECTED]> wrote: >Has some one an sodoku-task-generator? >Here another solutions-ways: >http://www.python-forum.de/viewtopic.php?t=3378 It's presumably easy to turn a solver into a generator. Start with a random grid, and remove squar

Re: tree functions daily exercise: Table

2005-06-21 Thread Xah Lee
oops, another error. The example should be: Table(f,[1,2,1],[2,6,2]) returns [[f(1,2),f(1,4),f(1,6)],[f(2,2),f(2,4),f(2,6)]] > Wouldn't it be more sensible just to take the iterators directly as > arguments, so for this example you would do: > > Table(f, range(1,3), range(2,7,2)) well yes... but

Re: Using code objects?

2005-06-21 Thread Chinook
On Tue, 21 Jun 2005 09:56:27 -0400, Konstantin Veretennicov wrote (in message <[EMAIL PROTECTED]>): > On 6/21/05, Chinook <[EMAIL PROTECTED]> wrote: >> >> When I create the code objects though, it seems a couple different ways work >> and I'm wondering which is better and why (or is there a more

Re: tree functions daily exercise: Table

2005-06-21 Thread alex goldman
Xah Lee wrote: > > well yes... but this was emulation of Mathematica functions. > (Disclaimer: Mathematica is a trademark of Wolfram Research Inc, who is > not affliated with this project) You could have fooled me. -- http://mail.python.org/mailman/listinfo/python-list

Re: utf8 silly question

2005-06-21 Thread Konstantin Veretennicov
On 6/21/05, Jeff Epler <[EMAIL PROTECTED]> wrote: > If you want to work with unicode, then write > us = u"\N{COPYRIGHT SIGN} some text" ...and you can get unicode character names like that from unicodedata module: >>> import unicodedata >>> unicodedata.name(unichr(169)) 'COPYRIGHT SIGN' See a

Re: tree functions daily exercise: Table

2005-06-21 Thread Xah Lee
Very very nice! I don't know scheme well... but oh the macros, such a wonderful facility... Functional lang never let me down. I haven't worked on a Java version yet... but i wonder what pain i'll have to endure for a lang that lacks eval. Since i'm not Java expert... i wonder if i can even do it

*Python* Power Tools

2005-06-21 Thread Micah
Anyone know if there is any organized effort underway to implement the Python equivalent of "Perl Power Tools" ? If not, would starting this be a waste of effort since: - it's already being done in Perl? - cygwin thrives? - UNIX is already pervasive :-) ? Or would people re

Getting/Saving email attachments w/ poplib and email modules

2005-06-21 Thread brettk
Hello All, Here's what I'm trying to do: I need to connect to a pop3 server, download all messages, and copy all of the attachments into a specific directory. The actual email message is unimportant. Now, I've found plenty of examples that strip the attachments from an email message, but most (

pickle broken: can't handle NaN or Infinity under win32

2005-06-21 Thread Grant Edwards
I finally figured out why one of my apps sometimes fails under Win32 when it always works fine under Linux: Under Win32, the pickle module only works with a subset of floating point values. In particular the if you try to dump/load an infinity or nan value, the load operation chokes: Under Lin

Re: pickle broken: can't handle NaN or Infinity under win32

2005-06-21 Thread Grant Edwards
On 2005-06-21, Grant Edwards <[EMAIL PROTECTED]> wrote: > I finally figured out why one of my apps sometimes fails under > Win32 when it always works fine under Linux [...] Oh, I forgot, here's pickletest.py: #!/usr/bin/python import pickle f1 = (1e300*1e300) f2 = f1/f1 o = (f1,f2) s = pickle.d

Re: references/addrresses in imperative languages

2005-06-21 Thread Andrea Griffini
On 20 Jun 2005 23:30:40 -0700, "Xah Lee" <[EMAIL PROTECTED]> wrote: >Dear Andrea Griffini, > >Thanks for explaning this tricky underneath stuff. Actually it's the very logical consequence of the most basic rule about python. Variables are just pointers to values; so every time you assign to a var

Re: utf8 silly question

2005-06-21 Thread John Machin
Jeff Epler wrote: > If you want to work with unicode, then write > us = u"\N{COPYRIGHT SIGN} some text" You can avoid almost all the wear and tear on your shift keys: >>> u"\N{copyright sign}" u'\xa9' ... you are stuck with \N for reasons that should be obvious :-) Cheers, John -- htt

Re: *Python* Power Tools

2005-06-21 Thread John Machin
Micah wrote: > Anyone know if there is any organized effort underway to implement the > Python equivalent of "Perl Power Tools" ? > > If not, would starting this be a waste of effort since: +1 WOFTAM-of-the-year > > - it's already being done in Perl? > - cygwin thrives? F

Re: Loop until condition is true

2005-06-21 Thread Remi Villatel
Fredrik Lundh wrote: >>while True: >> some(code) >> if final_condition is True: >> break >> # >># > checking if a logical expression is true by comparing it to True is bad > style, and comparing values using "is" is also bad style. Erm... You totally missed the point.

need to strip stuff off email

2005-06-21 Thread nephish
hey there, i have a script that retrieves my email, but i need it to be able to strip all the stuff off except the body (the message itself) so i can later write it to a text file. anyone know how to accomplish this? thanks -- http://mail.python.org/mailman/listinfo/python-list

Compiling C++ extensions with distutils on Cygwin

2005-06-21 Thread George Sakkis
I'm trying to build a C++ extension on Cygwin, but it fails because distutils invokes gcc instead of g++. Looking into distutils internals, it turns out that compilation is assumed to be independent of the target language, while linking is not (CCompiler.compile() doesn't take a target_lang argumen

Re: need to strip stuff off email

2005-06-21 Thread John Roth
"nephish" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > hey there, > i have a script that retrieves my email, but i need it to > be able to strip all the stuff off except the body (the message itself) > so i can later write it to a text file. > > anyone know how to accomplish this?

Need Python web hosting ASAP

2005-06-21 Thread whisper
Medium/small site with mod_python and sqllite or mySQL running Python 2.3.3 or later on Apache 2.x. I can do the python and CGI, but might need a _little_ hand holding for the rest. Will also need SSL and a certificate. Also mailboxes for ~12 people (to start). We don't do unsolicited mailing

Installing MySQL-Python

2005-06-21 Thread Cathy Hui
Do u know why do i get the following message when trying to build the MySql-Python (1.2.0) on my Solaris 8 system? (with mysql 4.0.21 and python 2.4). thanks! error mesg: ld: fatal: relocations remain against allocatable but non-writable sections collect2: ld returned 1 exit status error: comman

Re: Need Python web hosting ASAP

2005-06-21 Thread Benji York
<[EMAIL PROTECTED] asked about Python hosting> I have been *very* happy with Hard Hat Hosting (http://hardhathosting.com). (I don't have any connection with them, other than being a satisfied customer for several years.) If you want more providers you might be interested in http://wiki.python

Re: tree functions daily exercise: Table

2005-06-21 Thread Jeremy Jones
Xah Lee wrote: >Very very nice! I don't know scheme well... but oh the macros, such a >wonderful facility... > > Macros suck. They created by moron so-called computer scientists and IT puntits in order opress the programming masses. But I say we must bring freedom to all programmers. In ord

oddness in shelve module

2005-06-21 Thread Michael P. Soulier
I'm trying to add objects to a shelve db object via hash assignment, but I'm getting an odd exception. Traceback (most recent call last): File "RemGui.py", line 117, in onMonitorButton self.startMonitoring() File "RemGui.py", line 163, in startMonitoring self.monitor() File "RemGui.

Re: oddness in shelve module

2005-06-21 Thread John Machin
Michael P. Soulier wrote: > I'm trying to add objects to a shelve db object via hash assignment, but > I'm getting an odd exception. > > Traceback (most recent call last): > File "RemGui.py", line 117, in onMonitorButton > self.startMonitoring() > File "RemGui.py", line 163, in startMonit

Re: subprocess.call(*args **kwargs) on Linux

2005-06-21 Thread McBooCzech
Thanks a lot :) Petr -- http://mail.python.org/mailman/listinfo/python-list

Re: extreme newbie

2005-06-21 Thread Mike Meyer
Grant Edwards <[EMAIL PROTECTED]> writes: > Under Unix it's not all that hard to accidentally create files > like that. Sometimes you have to resort to blasting them away > by i-node number, or by moving the files you want to keep and > then nuking the directory. A standard practice on our early U

Re: Loop until condition is true

2005-06-21 Thread Steven D'Aprano
On Wed, 22 Jun 2005 02:01:14 +0200, Remi Villatel wrote: > Fredrik Lundh wrote: > >>>while True: >>> some(code) >>> if final_condition is True: >>> break >>> # >>># > >> checking if a logical expression is true by comparing it to True is bad >> style, and comparing values

Re: extreme newbie

2005-06-21 Thread Mike Meyer
Steven D'Aprano <[EMAIL PROTECTED]> writes: > On Sat, 18 Jun 2005 15:00:02 +0200, Renato Ramonda wrote: > Hiding the source code does not make software more secure. Any bugs and > security holes will be there whether the software is distributed in source > code, object code, or something in betwee

A World Beyond Capitalism 2005, An Annual International Multiracial Alliance Building Peace Conference Is Accepting Proposals...

2005-06-21 Thread Jenta
A World Beyond Capitalism 2005, An Annual International Multiracial Alliance Building Peace Conference Is Accepting Proposals... ..and Online Registration is now available if you plan to table and participate in the International Grassroots Exhibition: http://www.lfhniiv.info/awbcgrassroots

Re: Loop until condition is true

2005-06-21 Thread Shane Hathaway
Remi Villatel wrote: > Hi there, > > There is always a "nice" way to do things in Python but this time I can't > find one. > > What I'm trying to achieve is a conditionnal loop of which the condition > test would be done at the end so the loop is executed at least once. It's > some way the opp

need help with mod_python in RH 9

2005-06-21 Thread Titi Anggono
Hi all, I use apache2.0, mod_python 3.0, and python2.2.2. In /etc/httpd/conf.d/python.conf, I added following (as I read in the manual) AddHandler python-program .py PythonHandler mptest PythonDebug On and create mptest.py under directory /var/www/html/htdocs, (as I read in the manual) ---

Re: need help with mod_python in RH 9

2005-06-21 Thread grahamd
Read: http://www.dscpl.com.au/projects/vampire/articles/modpython-001.html It addresses the more common problems and how to sort out what you may not have done right. Anyway, I don't seem to see any problems with what you have said you have done, so work through the referenced document. Especi

Weekly Python Patch/Bug Summary

2005-06-21 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 338 open ( +0) / 2866 closed ( +5) / 3204 total ( +5) Bugs: 914 open ( +5) / 5060 closed (+13) / 5974 total (+18) RFE : 188 open ( +0) / 170 closed ( +0) / 358 total ( +0) New / Reopened Patches __ update th

Re: need help with mod_python in RH 9

2005-06-21 Thread grahamd
Oh, one minor thing. Your content type should be "text/plain" and not "text/html" as you aren't returning HTML This isn't going to be causing the problem you are seeing though. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Install MySQL-python-0.9.1

2005-06-21 Thread Cathy Hui
Thanks, now I am trying with Mysql-python-1.2.0. There is an other issue I am encoutering when trying to build, do u know why? (please see below) === ld: fatal: relocations remain against allocatable but non-writable sections collect2: ld returned 1 exit

Re: A World Beyond Capitalism 2005, An Annual International Multiracial Alliance Building Peace Conference Is Accepting Proposals...

2005-06-21 Thread Jack Diederich
On Tue, Jun 21, 2005 at 11:30:19PM -0400, Jenta wrote: > A World Beyond Capitalism 2005, An Annual International Multiracial > Alliance Building Peace Conference Is Accepting Proposals... > This must be a joke (and please please be a joke like the recent viral website competition[1] that featured

Re: references/addrresses in imperative languages

2005-06-21 Thread Terry Hancock
On Tuesday 21 June 2005 06:27 pm, Andrea Griffini wrote: > On 20 Jun 2005 23:30:40 -0700, "Xah Lee" <[EMAIL PROTECTED]> wrote: > >Thanks for explaning this tricky underneath stuff. > > Surely this is different from C/C++/Java, but it's > IMO all but tricky or underneath. Made me feel like an idio

Re: *Python* Power Tools

2005-06-21 Thread Terry Hancock
On Tuesday 21 June 2005 06:53 pm, John Machin wrote: > Micah wrote: > > Anyone know if there is any organized effort underway to implement the > > Python equivalent of "Perl Power Tools" ? > > > > If not, would starting this be a waste of effort since: > > +1 WOFTAM-of-the-y

getting an object name

2005-06-21 Thread David Bear
Let's say I have a list called, alist. If I pass alist to a function, how can I get the name of it? alist = range(10) def afunction(list): listName = list.__name__ (fails for a list object) -- http://mail.python.org/mailman/listinfo/python-list

Re: tree functions daily exercise: Table

2005-06-21 Thread gene tani
Dear Mr. Jones: Our team of 3,972 expert testers judged the output of your troll-spewing neural net virtually indistinguishable from the original. Given this, I am please to announce that our firm is willing to discuss arrangements for an exclusive license that you would likely find financially c

Re: getting an object name

2005-06-21 Thread Robert Kern
David Bear wrote: > Let's say I have a list called, alist. If I pass alist to a function, > how can I get the name of it? > > alist = range(10) > > def afunction(list): > listName = list.__name__ (fails for a list object) In general, you don't. A particular object can have any number of name

<    1   2