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

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

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

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

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

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

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

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
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: subprocess.call(*args **kwargs) on Linux

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

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

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

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

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

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

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?

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

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

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.

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

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

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 (

*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

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

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 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: 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 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: 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: 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: Python choice of database

2005-06-21 Thread Philippe C. Martin
I guess I use databases to store data ;-) and I do not wish to worry about the type of data I'm storing. That's why I love to pickle. I understand that during an optimization phase, decisions might be taken to handle data otherwise. Regards, Philippe GMane Python wrote: > For my databa

article on PyNSol in CISE

2005-06-21 Thread beliavsky
The July/August 2005 issue of Computing in Science & Engineering has an article by Michael Tobis about PyNSol (slides from the talk at http://geosci.uchicago.edu/~tobis/PS0/PS3.html ). It appears to be a code generation tool that takes a few equations specified by the user and translates them to Py

Re: Create our own python source repository

2005-06-21 Thread gene tani
Practical Python is quite a good book. And to re-iterate again, teh humongous tutorial list which has Hetland's Instant python among others: http://www.awaretek.com/tutorials.html Brian van den Broek wrote: > Michele Simionato said unto the world upon 21/06/2005 07:58: > > qwwee: > > > >>for a c

Re: utf8 silly question

2005-06-21 Thread Jeff Epler
If you want to work with unicode, then write us = u"\N{COPYRIGHT SIGN} some text" You can also write this as us = unichr(169) + u" some text" When you have a Unicode string, you can convert it to a particular encoding stored in a byte string with bs = us.encode("utf-8") It's gen

Re: Create our own python source repository

2005-06-21 Thread Brian van den Broek
Michele Simionato said unto the world upon 21/06/2005 07:58: > qwwee: > >>for a certain argument I'd prefer an application fully >>explained (also if not covering all the features) to a more general >>tutorial with only brief and unrelated code snippets. >>Unfortunately, that's not the way things

looking for beginner projects to help out with

2005-06-21 Thread Brown, Alysia
I’m new to the list. I work for a US Gov’t agency & have been learning Python. I’ve been doing web development work for some years now & got involved with Python/Zope/Plone last fall. I’ve had formal Zope/Plone training. I’ve also been working my way through Deitel’s “Python How to Program”

Re: utf8 silly question

2005-06-21 Thread Steven Bethard
Grig Gheorghiu wrote: import codecs print codecs.encode(c, 'utf-8') > > © some text Or simply: py> print c.encode('utf-8') © some text -- http://mail.python.org/mailman/listinfo/python-list

Re: utf8 silly question

2005-06-21 Thread Qiangning Hong
Catalin Constantin wrote: > i have the following code: > > c=chr(169)+" some text" > > how can i utf8 encode the variable above ? > something like in php utf8_encode($var);?! > > chr(169) is the © (c) sign ! > > 10x for your help ! > > p.s.: i tryed using codecs, etc but always get an error me

Re: Embedded Systems Python?

2005-06-21 Thread Dennis Clark
Guys, Thanks, that was all information that I wanted to hear. I have a Cirrus Logic Linux port for the ARM9. I've no idea what the code base is, I've not figured that out yet. I should just need to re- compile on the platform. thanks, DLC --

Re: utf8 silly question

2005-06-21 Thread Grig Gheorghiu
Salut, Catalin You can first convert your c string to unicode, and in the process specify an encoding that understands non-ASCII characters (if you don't specify an encoding, it will try to use your default, which is most likely ASCII, and you'll get the error you mentioned.). In the following exa

Re: smtplib and TLS

2005-06-21 Thread Jp Calderone
On 21 Jun 2005 08:39:02 -0700, Matthias Kluwe <[EMAIL PROTECTED]> wrote: >> From: "Paul Rubin" "http://phr.cx"@NOSPAM.invalid > >>> "Matthias Kluwe" <[EMAIL PROTECTED]> writes: >>> After getting a @gmail.com address, I recognized I had to use TLS in my >>> python scripts using smtplib in order to g

Re: smtplib and TLS

2005-06-21 Thread Tim Williams
- Original Message - From: "Matthias Kluwe" <[EMAIL PROTECTED]> > > Have you verified that its your end that is broken, not gmail's, do other > > servers give the same response ? > > No, I have not -- I should have, as I know now: Connecting, starttls, > login and sending mail works fin

utf8 silly question

2005-06-21 Thread Catalin Constantin
i have the following code: c=chr(169)+" some text" how can i utf8 encode the variable above ? something like in php utf8_encode($var);?! chr(169) is the © (c) sign ! 10x for your help ! p.s.: i tryed using codecs, etc but always get an error message like: 'ascii' codec can't decode byte 0xa9 i

Re: use a regex or not?

2005-06-21 Thread Paul McGuire
Here's a hybrid solution, using pyparsing to parse your input pattern string (p), and transforming it into a regexp string. Then uses re.match using the regexp to process string (s), and then builds a dictionary from the matched groups. Download pyparsing at http://pyparsing.sourceforge.net. --

Re: smtplib and TLS

2005-06-21 Thread Matthias Kluwe
> From: "Paul Rubin" "http://phr.cx"@NOSPAM.invalid >> "Matthias Kluwe" <[EMAIL PROTECTED]> writes: >> After getting a @gmail.com address, I recognized I had to use TLS in my >> python scripts using smtplib in order to get mail to the smtp.gmail.com >> server. >> [...] >> The server accepts and

Re: Using print with format to stdout generates unwanted space

2005-06-21 Thread Michael Hoffman
[Tim Williams] >>For quick and simple removal of the extra space, append a '\b' >>backspace character to your output "string" [Jorgen Grahn] > For things that are only ever to be viewed on the terminal, yes. > But this does, of course, print an actual backspace character. > If you feed this outpu

RE: Running WMI within a Windows service

2005-06-21 Thread Tim Golden
[EMAIL PROTECTED] | Hi, | | When trying to import the WMI module in a Python Windows | Service, I get | the following: | | dynamic module does not define init function (initwmi) | | The WMI version is 0.6. Python 2.4 on Win32, Python Win32 extensions | version 203 This is almost certainly

Re: use a regex or not?

2005-06-21 Thread Kent Johnson
Joost Jacob wrote: > I am looking for a function that takes an input string > and a pattern, and outputs a dictionary. Here is one way. I won't say it's pretty but it is fairly straightforward and it passes all your tests. Kent def fill(s, p): """ >>> fill('ab', p='aA') {'A': 'b'}

Re: Loop until condition is true

2005-06-21 Thread Stelios Xanthakis
Magnus Lycka wrote: > Konstantin Veretennicov wrote: > >> On 6/21/05, Magnus Lycka <[EMAIL PROTECTED]> wrote: >> >>> I don't know anything about the Python compiler internals, >>> but it doesn't seem very hard to identify simple literals following >>> while and if, and to skip the runtime test. (P

Re: eval() in python

2005-06-21 Thread Martin Blume
"Xah Lee" schrieb > > perhaps i'm tired, but why can't i run: > > t='m=3' > print eval(t) > Perhaps you didn't read the documentation? :-) Perhaps you didn't try hard enough? C:\WINNT>c:\programme\python\python Python 2.4 (#60, Nov 30 2004, 11:49:19) [MSC v.1310 32 bit (Intel)] on win32 Type "hel

Re: asynchronous comunication, wxPython and threads.

2005-06-21 Thread Peter Hansen
Zunbeltz Izaola wrote: > I'm developing a GUI program (wxPython). This program has to comunicate > (TCP) whit other program that controls a laboratory machine to do a > measurement. I have a dialog box, wiht two buttoms "Start measurement" and > "Stop". "Start" executes a function that do the measu

Re: Loop until condition is true

2005-06-21 Thread Magnus Lycka
Konstantin Veretennicov wrote: > On 6/21/05, Magnus Lycka <[EMAIL PROTECTED]> wrote: > >>I don't know anything about the Python compiler internals, >>but it doesn't seem very hard to identify simple literals following >>while and if, and to skip the runtime test. (Perhaps it's done >>already?) >

Re: asynchronous comunication, wxPython and threads.

2005-06-21 Thread Zunbeltz Izaola
On Tue, 21 Jun 2005 15:30:41 +0100, Toby Dickenson wrote: > On Tuesday 21 June 2005 14:22, Zunbeltz Izaola wrote: > > > I guess you are accessing the socket from both your GUI thread and > communications thread. Dont do that. An action in the GUI thread should > signal the communictions thread

Nested lists [was Re: tree functions daily exercise: Table]

2005-06-21 Thread Steven D'Aprano
Removing cross-posts to java and scheme lists. On Tue, 21 Jun 2005 01:54:40 -0700, Xah Lee wrote: > here's the Python spec for the Table function: > > '''Table(f,[iStart,iEnd,iStep]) returns a list of f applied to the > range range(iStart,iEnd,iStep). > Example: Table(f,[3,10,2]) returns [f(

Running WMI within a Windows service

2005-06-21 Thread cameron . mccloud
Hi, When trying to import the WMI module in a Python Windows Service, I get the following: dynamic module does not define init function (initwmi) The WMI version is 0.6. Python 2.4 on Win32, Python Win32 extensions version 203 Code below, Cam. def SvcDoRun(self): import servi

Re: Python choice of database

2005-06-21 Thread Peter Hansen
GMane Python wrote: > For my database, I have a table of user information with a unique > identifier, and then I save to the filesystem my bitmap files, placing the > unique identifier, date and time information into the filename. Why stick a > photo into a database? There are various possible re

Re: tree functions daily exercise: Table

2005-06-21 Thread David Van Horn
Xah Lee wrote: > here's the Python spec for the Table function: ... > References: > > • for a context of this message, see: http://xahlee.org/tree/tree.htm Here is a Scheme implementation of Table. As noted on your web page and the Mathematica documentation, the first argument of Table "evaluat

Re: multi threading and win9x

2005-06-21 Thread fraca7
Tim Peters a écrit : > All versions of Windows >= Win95 use threads heavily, have very solid > thread support, and the Win32 API was thread-aware from the start > Thread _scheduling_ is pretty bizarre <= WinME, but process scheduling > is too. Don't try to use hundreds of threads <= WinME and yo

Re: asynchronous comunication, wxPython and threads.

2005-06-21 Thread Toby Dickenson
On Tuesday 21 June 2005 14:22, Zunbeltz Izaola wrote: > This comunication is done in a new thread not to frezee the GUI. > The problem is that when "Stop" is done (it kills the thread) some > confirmation sockets are mixed (are not receibed in the correct order > although i use tcp). I guess you

Re: use a regex or not?

2005-06-21 Thread Joost Jacob
Oops, the 3rd test should be fill('bb', p='Aa') resulting in the empty dict {} because no binding for A can be found. -- http://mail.python.org/mailman/listinfo/python-list

Re: Loop until condition is true

2005-06-21 Thread Konstantin Veretennicov
On 6/21/05, Magnus Lycka <[EMAIL PROTECTED]> wrote: > I don't know anything about the Python compiler internals, > but it doesn't seem very hard to identify simple literals following > while and if, and to skip the runtime test. (Perhaps it's done > already?) True doesn't seem to be a literal, it

Re: Python choice of database

2005-06-21 Thread GMane Python
For my database, I have a table of user information with a unique identifier, and then I save to the filesystem my bitmap files, placing the unique identifier, date and time information into the filename. Why stick a photo into a database? For instance: User Table: uniqueID: 0001 lNane: Rose fNa

Re: UML to Python/Java code generation

2005-06-21 Thread Mike P.
"Magnus Lycka" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > James wrote: > > The brain may be fine for generating Python from UML but it is MANY > > MANY orders of magnitude harder to generate UML from code with just > > your brain than using a tool (usually zero effort and error

Re: How do I access avariable named "return"?

2005-06-21 Thread Holger Wirtz
Brian Beck wrote: >> I think this seems to be a problem due to the use of a forbidden word. >> But I have no chance to change the WSDL definition, so: How can I get the >> variable resp.return? Any suggestions? > > To get it: getattr(resp, 'return') > To set it: setattr(resp, 'return', value) >

Re: Python can do it for me?

2005-06-21 Thread Richard Lewis
On 21 Jun 2005 06:51:16 -0700, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> said: > Really? I see Python is very good general-purpose language. I studing > TCL, C++ and Java too. > > And remote conection? Do you know something? > You mean connecting to a database from a remote machine? Most (probabl

use a regex or not?

2005-06-21 Thread Joost Jacob
I am looking for a function that takes an input string and a pattern, and outputs a dictionary. # @param s str, lowercase letters # @param p str, lowercase and uppercase letters # @return dict def fill(s, p): d = {} return d String s has characters from the lowercase letters. Str

Re: How do I access avariable named "return"?

2005-06-21 Thread Brian Beck
> I think this seems to be a problem due to the use of a forbidden word. But I > have no chance to change the WSDL definition, so: How can I get the > variable resp.return? Any suggestions? To get it: getattr(resp, 'return') To set it: setattr(resp, 'return', value) -- Brian Beck Adventurer of th

How do I access avariable named "return"?

2005-06-21 Thread Holger Wirtz
Hi, I have a small problem: I have a WSDL file where different functions are described. It worked perfectly until I have a function which has a return-value named "return": Here is my program: --- cut here --- from SOAPpy import WSDL wsdlFile = 'mypbx.wsdl' server = WSDL.Proxy(wsdlFile

asynchronous comunication, wxPython and threads.

2005-06-21 Thread Zunbeltz Izaola
Hi, I have the following problem. I'm developing a GUI program (wxPython). This program has to comunicate (TCP) whit other program that controls a laboratory machine to do a measurement. I have a dialog box, wiht two buttoms "Start measurement" and "Stop". "Start" executes a function that do the

Re: Loop until condition is true

2005-06-21 Thread Magnus Lycka
Benji York wrote: > If by "economy" you mean "optimization", then I would suggest that the > difference would be unnoticeable. If there is a measurable performance gain in skipping the runtime test in "while True", then this is a compiler issue, not a language issue. I don't know anything about t

Re: Loop until condition is true

2005-06-21 Thread Fredrik Lundh
Remi Villatel wrote: > 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 opposite of "while".

Re: Python choice of database

2005-06-21 Thread Konstantin Veretennicov
On 6/21/05, Charles Krug <[EMAIL PROTECTED]> wrote: > > Related question: > > What if I need to create/modify MS-Access or SQL Server dbs? You could use ADO + adodbapi for both. http://adodbapi.sourceforge.net/ - kv -- http://mail.python.org/mailman/listinfo/python-list

Re: Using code objects?

2005-06-21 Thread Konstantin Veretennicov
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 correct > technique in this situation)? > > The two different ways are illustrated below: ... > >>> obj1

Re: Install MySQL-python-0.9.1

2005-06-21 Thread Andy Dustman
Cathy Hui wrote: > I am trying to install MySQL-Python 0.9.1 on my Solaris 8 system. The > system has Python 2.3.3 and Mysql 4.0.21 installed. You're wasting your time. Use MySQL-python-1.2.0. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python can do it for me?

2005-06-21 Thread [EMAIL PROTECTED]
Really? I see Python is very good general-purpose language. I studing TCL, C++ and Java too. And remote conection? Do you know something? Thank you very much! Bye! -- http://mail.python.org/mailman/listinfo/python-list

Re: FAQ: __str__ vs __repr__

2005-06-21 Thread Skip Montanaro
>> __repr__ shouldn't be anything, if you don't have an actual need for >> it. Neither should __str__. Simon> Oh, I don't know. __str__ is so frequently useful in debugging Simon> and logging that I always try and do something useful with it. And sometimes __repr__ inherited fro

Re: tree functions daily exercise: Table

2005-06-21 Thread Duncan Booth
Xah Lee wrote: > '''Table(f,[iStart,iEnd,iStep]) returns a list of f applied to the > range range(iStart,iEnd,iStep). Example: Table(f,[3,10,2]) returns > [f(3),f(5),f(7),f(9)] Table(f,[iStart,iEnd,iStep], > [jStart,jEnd,jStep], ...) returns a nested list of f(i,j,...) applied > thru the iterator

Re: A tool for Python - request for some advice

2005-06-21 Thread Peter Maas
TPJ schrieb: > First I have to admit that my English isn't good enough. I'm still > studying and sometimes I just can't express what I want to express. No excuses, please! Keep in mind that your English is much better than the Polish of most of us. And just in case you were fishing for compliments

Re: Python can do it for me?

2005-06-21 Thread Benji York
[EMAIL PROTECTED] wrote: > MySQL or Potsgree SQL ***remote connection***(it's the most important). > GUI interface. > Report generator. > Barcode printing. I've done all of these very successfully in Python. > Maybe PyGTK can do it for me? What do you think? I've never used PyGTK, but it looks n

Re: Python can do it for me?

2005-06-21 Thread Grigoris Tsolakidis
PyQt for example will do all this + Python but the desition is not that easy <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello people! I think it is my first message here. > > Well, I would go to start a Delphi database program, but now my client > want a program that runs

Re: Loop until condition is true

2005-06-21 Thread Charles Krug
On Tue, 21 Jun 2005 12:05:25 +0200, Magnus Lycka <[EMAIL PROTECTED]> wrote: > Remi Villatel wrote: >> while True: >> some(code) >> if final_condition is True: >> break >> # >> # >> >> What I don't find so "nice" is to have to build an infinite loop only to >> break it. > > Th

Re: Howto access a enumeration in a COM TypeLib

2005-06-21 Thread Alexander Eisenhuth
Thanks, thats it. Konstantin Veretennicov schrieb: import myserver print myserver.constants. P_OK > 0 > > Maybe you can access constants without makepy, I don't know. > > - kv -- http://mail.python.org/mailman/listinfo/python-list

Re: Embedding Python - Deleting a class instance

2005-06-21 Thread Bue Krogh Vedel-Larsen
Jeff Epler <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > > Unless there's a cycle and GC gets involved, all there is to deleting > *anything* in Python is correctly managing the refcount. On the other > hand, you can never free an object while it is still reachable. Some > local name

Re: Python choice of database

2005-06-21 Thread Charles Krug
On Mon, 20 Jun 2005 23:42:21 -0800, EP <[EMAIL PROTECTED]> wrote: > Oren suggested: > >> How about using the filesystem as a database? For the number of records >> you describe it may work surprisingly well. A bonus is that the >> database is easy to manage manually. > > I tried this for one appl

Re: Want to learn a language - is Python right?

2005-06-21 Thread sjmsoft
Aziz McTang wrote: > What I'm looking for is more to learn one good, comprehensive > programming language well than several approximately on an ad hoc > basis. What I also failed to mention is the desire to develop my > presently limited computer skills a lot further. I've programmed in perhaps 20

Re: after transfer of data from MS-outlook(mail ids) to application, mail ids are consisting of strange characters

2005-06-21 Thread Beat Bolli
> [Å@ [Å. [Å,©Ä@ ©Ä. ©Ä etc. This looks like UTF-8 encoding Beat -- mail: echo '<[EMAIL PROTECTED]>' | tr -d '[A-S]' pgp: 0x506A903A; 49D5 794A EA77 F907 764F D89E 304B 93CF 506A 903A gsm: 4.7.7.6.0.7.7.9.7.1.4.e164.arpa icbm: 47.0452 N, 7.2715 E "It takes love over gold, and mind over matt

Python can do it for me?

2005-06-21 Thread [EMAIL PROTECTED]
Hello people! I think it is my first message here. Well, I would go to start a Delphi database program, but now my client want a program that runs in Linux. So I want to know your opinion: what best language/IDE I can use for my purposes? I need mainly: MySQL or Potsgree SQL ***remote connection*

Re: eval() in python

2005-06-21 Thread Benji York
harold fellermann wrote: > >>> s="print 'hello Xah Lee :-)'" > >>> exec(s) > hello Xah Lee :-) Note that because "exec" is a statement, the parentheses above are superfluous. -- Benji York -- http://mail.python.org/mailman/listinfo/python-list

Re: Question about HTMLgen

2005-06-21 Thread Sebastian Bassi
Thanks, you are right! On 6/20/05, Konstantin Veretennicov <[EMAIL PROTECTED]> wrote: > > > type="image/svg+xml" name="wmap" wmode="transparent"> > > Works for me... -- http://www.spreadfirefox.com/?q=affiliates&id=24672&t=1";>La web sin popups ni spyware: Usa Firefox en lugar de Internet Ex

  1   2   >