Re: What is different with Python ?

2005-06-16 Thread Andrea Griffini
On Thu, 16 Jun 2005 10:30:04 -0400, "Jeffrey Maitland" <[EMAIL PROTECTED]> wrote: >Also I think the fact that you think your were diteriating just goes to show >how dedicated you are to detail, and making sure you give the right advice >or ask the right question. [totally-OT] Not really, unfo

Re: dir() with string as argument

2005-06-16 Thread Terry Hancock
On Thursday 16 June 2005 02:19 pm, harold fellermann wrote: > On 16.06.2005, at 20:59, Shankar Iyer ([EMAIL PROTECTED]) wrote: > > Suppose I have a string, sModuleName, that contains the name of a > > module. I now want to see what functions are in that module, but if I > > call dir(sModuleName)

Re: 1980's Home Computer-style Package.

2005-06-16 Thread Terry Hancock
On Thursday 16 June 2005 11:09 am, Ralph Corderoy wrote: > > > Some years ago I saw a Python package or program that gave a > > > programming environment similar to the BASICs of 1980's home > > > computers. You got a cursor-addressable screen, e.g. PRINT TAB(10, > > > 20) "Hello", and some simple

Re: DB API 2.0 and transactions

2005-06-16 Thread Stuart Bishop
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Magnus Lycka wrote: > Another option would be to investigate if any of the other postgreSQL > drivers have a more correct behaviour. The non-standard behaviour that > you describe it obvious from the pgdb source. See: > http://www.pygresql.org/cvsweb.

Re: substitue for LISTS and TUPLEs in C++

2005-06-16 Thread Roy Smith
"GujuBoy" <[EMAIL PROTECTED]> wrote: > I am trying to transfer some code from PYTHON to C++. What is the best > substitute for a LIST and TUPLE in C++. Depending on exactly what operations you plan to do with it, the Python list will translate into some kind of STL sequence container like vector.

Re: "also" to balance "else" ?

2005-06-16 Thread Tim Roberts
Nicolas Fleury <[EMAIL PROTECTED]> wrote: > >But the feature is already there: > >for x in : > BLOCK1 > if : > ALSO-BLOCK > break >else: > BLOCK2 I've been using Python for 8 years. I never knew that feature was in there. -- - Tim Roberts, [EMAIL PROTECTED] Providen

Re: thread.start_new_thread question

2005-06-16 Thread Brian
Hi KV, Here's a site that provides an easy, beginners example of how to do threading. You might find this useful too... :-) http://www.codesampler.com/python.htm (Look for the "Spawning Threads" section.) Brian --- Konstantin Veretennicov wrote: > Hi, > > Just curious: > import threa

Re: Is Python Suitable for Large Find & Replace Operations?

2005-06-16 Thread John Machin
rbt wrote: > On Tue, 2005-06-14 at 11:34 +1000, John Machin wrote: > >>rbt wrote: >> >>>Here's the scenario: >>> >>>You have many hundred gigabytes of data... possible even a terabyte or >>>two. Within this data, you have private, sensitive information (US >>>social security numbers) about your

Re: Alternative Ways to install Python 2.4?

2005-06-16 Thread David Van Mosselbeen
James wrote: I have also some troubleshouting when i will work on mapped drives. Let's take a example : A Word doc on a mapped drive. Double click on it (i try to open it). And waiting ... waiting... nothing do > If this is a bug with the standard distribution alone, maybe he can try > ActiveStat

substitue for LISTS and TUPLEs in C++

2005-06-16 Thread GujuBoy
I am trying to transfer some code from PYTHON to C++. What is the best substitute for a LIST and TUPLE in C++. please advice. -- http://mail.python.org/mailman/listinfo/python-list

PEP 304 "Controlling Generation of Bytecode Files" - patch updated

2005-06-16 Thread Skip Montanaro
I updated the patch that supports PEP 304, "Controlling Generation of Bytecode Files" to apply cleanly against current CVS. I've tested it on Mac OS X (straight Unix build only). I'd appreciate it if some Linux, Windows and Mac framework folks could apply the patch, rebuild, then run the tests (

[no subject]

2005-06-16 Thread Marva Pryor
-- http://mail.python.org/mailman/listinfo/python-list

thread.start_new_thread question

2005-06-16 Thread Konstantin Veretennicov
Hi, Just curious: >>> import thread >>> help(thread.start_new_thread) . . . start_new_thread(function, args[, kwargs]) . . . Second argument is mandatory. Is it incidental or for a reason? - kv -- http://mail.python.org/mailman/listinfo/python-list

Re: which ports to use for SOAP?

2005-06-16 Thread Konstantin Veretennicov
On 6/17/05, Maurice LING <[EMAIL PROTECTED]> wrote: > Hi, > > I'm writing something that specifies the use of SOAP. One requirement > that fumbles me is the port number(s) to use. (I assume you're talking about TCP ports, not SOAP ports.) > Is there any way to find > out which ports are not used

which ports to use for SOAP?

2005-06-16 Thread Maurice LING
Hi, I'm writing something that specifies the use of SOAP. One requirement that fumbles me is the port number(s) to use. Is there any way to find out which ports are not used by the system? I've looked in the library reference and doesn't seems to get anything. Is there a problem with say 2 pro

Re: UML to Python/Java code generation

2005-06-16 Thread Maurice LING
Thanks James. I've googled a few times and it is always tools that generates UML from Python codes that comes up in the top hits, which brings me to wonder if there is something that does the opposite. maurice James wrote: >>Is there any UML tools that is able to take UML and generate Python co

Re: Set of Dictionary

2005-06-16 Thread Steven D'Aprano
On Thu, 16 Jun 2005 21:21:50 +0300, Konstantin Veretennicov wrote: > On 6/16/05, Vibha Tripathi <[EMAIL PROTECTED]> wrote: >> I need sets as sets in mathematics: > > That's tough. First of all, mathematical sets can be infinite. It's > just too much memory :) > Software implementations can't full

Re: New WYSIWYG Python IDE in the works

2005-06-16 Thread McBooCzech
sorry for bothering you with my comment. From my point of view, the situation on the IDE (GUI??) development field for Python is really strange. Just try to imagine the same situation around the Python. Plenty of different approaches, versions, philosophies etc. Why people they really know the ways

Re: utf8 and ftplib

2005-06-16 Thread John Machin
Richard Lewis wrote: > Hi there, > > I'm having a problem with unicode files and ftplib (using Python 2.3.5). > > I've got this code: > > xml_source = codecs.open("foo.xml", 'w+b', "utf8") > #xml_source = file("foo.xml", 'w+b') > > ftp.retrbinary("RETR foo.xml", xml_source.write) > #ftp.retrlin

import error on solaris

2005-06-16 Thread Atul Kshirsagar
Hello, I am embedding python in C++ using SWIG. * The appication runs as a server. * Mutiple clients send requests which execute some python scripts with import statements. * Each request is handled in a separate thread which has its own interepreter for script execution. * Requests are succesfu

wx GUI with other classes

2005-06-16 Thread [EMAIL PROTECTED]
hey, My situation is like this- whenever I create an application with a gui I put the gui source in one file that calls all the other classes (from imported modules). This creates a problem when needing to print something out on a gui control or something similar. It is then needed to send the call

Re: 1980's Home Computer-style Package.

2005-06-16 Thread Lee Harr
On 2005-06-16, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2005-06-16, Ralph Corderoy <[EMAIL PROTECTED]> wrote: > >>> Wild-ass guess, but you might try googling for "turtle python". >> >> OK, I've done that but it didn't help; it wasn't tied in with >> Turtle graphics, with which I'm familiar. >

Re: poker card game revisited (code included)

2005-06-16 Thread flupke
John Hazen wrote: > [Erik Max Francis] > Searching for straights and flushes is much better done by masks. > > > Interesting. I've been thinking about playing with this stuff too, but > hadn't considered masks. So each card has a representation: > > n bits for rank, then m bits for suit.

Re: Alternative Ways to install Python 2.4?

2005-06-16 Thread James
If this is a bug with the standard distribution alone, maybe he can try ActiveState's distribution (ActivePython) instead. -- http://mail.python.org/mailman/listinfo/python-list

Re: UML to Python/Java code generation

2005-06-16 Thread James
> Is there any UML tools that is able to take UML and generate Python codes? Dia2code generates Python from UML. Boa Constructor generates UML from Python. PyUt. Object Domain's UML Tool (Commercial) You need to use Google. -- http://mail.python.org/mailman/listinfo/python-list

Re: How should threads be terminated? (related to 'Help with thread related tracebacks')

2005-06-16 Thread Peter Hansen
Maxwell Hammer wrote: > This is related to an earlier post 'Help with thread related > tracebacks'...for which I have had no feedback yet :-( If the question was well formulated, and it's been more than a couple of days, you should consider reposting. It's very unusual for a post with such a su

Re: Alternative Ways to install Python 2.4?

2005-06-16 Thread Peter A.Schott
Not sure if this was ever resolved or not, but I've also had issues trying to install from a mapped drive. Once I copied the file locally and installed, it ran smoothly. -Pete Michael Goettsche <[EMAIL PROTECTED]> wrote: > On Monday 24 January 2005 00:29, "Martin v. Löwis" wrote: > > Michael Go

Re: How should threads be terminated? (related to 'Help with thread related tracebacks')

2005-06-16 Thread Brian
Here's a site that provides an easy, *beginners* example of how to do threading. You might find this useful too... :-) http://www.codesampler.com/python.htm (Look for the "Spawning Threads" section.) Brian --- [EMAIL PROTECTED] wrote: > see http://aspn.activestate.com/ASPN/Cookbook/Python/Re

Re: Single test for a class and all its subclasses?

2005-06-16 Thread Anthra Norell
- Original Message - From: "Konstantin Veretennicov" <[EMAIL PROTECTED]> To: "Anthra Norell" <[EMAIL PROTECTED]> Cc: "Python SIG" Sent: Wednesday, June 15, 2005 11:28 AM Subject: Re: Single test for a class and all its subclasses? > On 6/15/05, Anthra Norell <[EMAIL PROTECTED]> wrote: >

Re: log in to a website

2005-06-16 Thread Jeff Epler
You may find the third-party modules "ClientForm" and "ClientCookie" to be useful. Using ClientForm, the following code uploads a file to a particular web form: forms = ClientForm.ParseResponse(urllib2.urlopen(url)) f = forms[0] f.add_file(open(local, "rb"), filename=remote, name="file

Re: dir() with string as argument

2005-06-16 Thread Steve Holden
Shankar Iyer ([EMAIL PROTECTED]) wrote: > Hi, > > Suppose I have a string, sModuleName, that contains the name of a module. I > now want to see what functions are in that module, but if I call > dir(sModuleName), I instead get the list of operations that can be done on a > string. Is there an

Re: dir() with string as argument

2005-06-16 Thread [EMAIL PROTECTED]
What about [EMAIL PROTECTED]:~ $ python Python 2.4.1 (#2, Mar 30 2005, 21:51:10) [GCC 3.3.5 (Debian 1:3.3.5-8ubuntu2)] on linux2 Type "help", "copyright", "credits" or "license" for more information. py > x = __import__('sys') py > dir(x) ['__displayhook__', '__doc__', '__excepthook__', '__name__',

Re: dir() with string as argument

2005-06-16 Thread harold fellermann
On 16.06.2005, at 20:59, Shankar Iyer ([EMAIL PROTECTED]) wrote: > Hi, > > Suppose I have a string, sModuleName, that contains the name of a > module. I now want to see what functions are in that module, but if I > call dir(sModuleName), I instead get the list of operations that can > be done

whos -- a function listing objects

2005-06-16 Thread benyang22
I have been a long time Matlab user. I Python, I miss Matlab's whos command. So I have written a little utility whos.py, which can be downloaded here: http://beluga.eos.ubc.ca/~tang/softwares/python/ Here is the doc string: # Before using whos, do: execfile('whos.py') #=== EXAMPLES === # to see

dir() with string as argument

2005-06-16 Thread Shankar Iyer ([EMAIL PROTECTED])
Hi, Suppose I have a string, sModuleName, that contains the name of a module. I now want to see what functions are in that module, but if I call dir(sModuleName), I instead get the list of operations that can be done on a string. Is there any way to convert the string into a format that I cou

Multiple instances of a python program

2005-06-16 Thread Rahul
Hi. I am part of a group in my univ where we organize a programming contest. In this contest we have a UDP based server. The server simulates a game and each contestant is to develop a team of virtual players. Each team is composed of 75 similar bots...i.e. governed by the same logic. Thus the cont

Re: Set of Dictionary

2005-06-16 Thread Vibha Tripathi
Thanks for the responses! I tried using list - the real question now is how do I remove duplicate dictionaries? I will try things to work around it...suggestions are welcome. peace. --- Konstantin Veretennicov <[EMAIL PROTECTED]> wrote: > On 6/16/05, Vibha Tripathi <[EMAIL PROTECTED]> > wrote

Re: Set of Dictionary

2005-06-16 Thread Konstantin Veretennicov
On 6/16/05, Vibha Tripathi <[EMAIL PROTECTED]> wrote: > I need sets as sets in mathematics: That's tough. First of all, mathematical sets can be infinite. It's just too much memory :) Software implementations can't fully match mathematical abstractions. >sets of any unique type of objects inc

Re: utf8 and ftplib

2005-06-16 Thread John Roth
"Richard Lewis" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi there, > > I'm having a problem with unicode files and ftplib (using Python 2.3.5). > > I've got this code: > > xml_source = codecs.open("foo.xml", 'w+b', "utf8") > #xml_source = file("foo.xml", 'w+b') > > ftp.retrbin

Re: access properties of parent widget in Tkinter

2005-06-16 Thread William Gill
Kent Johnson wrote: > William Gill wrote: > >> Kent Johnson wrote: >> >> If I change the area code in one record only the phonenumber table >> needs to be updated, but since areaCode is a child of phones, >> phones.hasChanged needs to be set to True by the areaCode entry widget. > > > One poss

Re: Python & firewall control (Win32)

2005-06-16 Thread Tom Anderson
On Thu, 16 Jun 2005, Tim Williams wrote: > Does anyone know of (personal/desktop) firewall that can be controlled > via Python, or a Python Firewall package, or even something like DAXFi > but not dormant ? > > The XP native firewall appears to have an API, but I'm not convinced I > want to go

Re: access properties of parent widget in Tkinter

2005-06-16 Thread Kent Johnson
William Gill wrote: > Kent Johnson wrote: > > If I change the area code in one record only the phonenumber table needs > to be updated, but since areaCode is a child of phones, > phones.hasChanged needs to be set to True by the areaCode entry widget. One possibility is for the phones.hasChanged

Re: How should threads be terminated? (related to 'Help with thread related tracebacks')

2005-06-16 Thread [EMAIL PROTECTED]
see http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65448 for a useful recipe on how to do threading -- http://mail.python.org/mailman/listinfo/python-list

Re: access properties of parent widget in Tkinter

2005-06-16 Thread William Gill
Kent Johnson wrote: > William Gill wrote: > >> I am trying to get & set the properties of a widget's parent widget. >> What I have works, but seems like a long way around the block. First >> I get the widget name using w.winfo_parent(), then i convert the name >> to a reference using nametowid

log in to a website

2005-06-16 Thread passion_to_be_free
I'm learning python, and my goal is to write a script that will log into a website for me. The site uses HTTPS, the form uses the "POST" method. >From what I've been able to find so far, it looks like i need to use the urllib2 module...does anyone know where I can find some good sample code to rea

Re: Subprocess and time-out

2005-06-16 Thread Jeremy Sanders
On Thu, 16 Jun 2005 18:36:52 +0200, Gilles Lenfant wrote: > Grabbing the various docs of Python, I didn't find how to do this : > > I Use popen2 to run wvware that transforms lots of M$ word docs to plain > text. Sometimes wvware runs in a deadlock and I can't control this from > Python app. >

Subprocess and time-out

2005-06-16 Thread Gilles Lenfant
Hi, Grabbing the various docs of Python, I didn't find how to do this : I Use popen2 to run wvware that transforms lots of M$ word docs to plain text. Sometimes wvware runs in a deadlock and I can't control this from Python app. I need to stop wvware processing after 30 seconds (considered

Re: 1980's Home Computer-style Package.

2005-06-16 Thread Grant Edwards
On 2005-06-16, Ralph Corderoy <[EMAIL PROTECTED]> wrote: >> Wild-ass guess, but you might try googling for "turtle python". > > OK, I've done that but it didn't help; it wasn't tied in with > Turtle graphics, with which I'm familiar. Googling for '"python turtle" graphics programming' leads to h

Re: How should threads be terminated? (related to 'Help with thread related tracebacks')

2005-06-16 Thread Brian
Hi Maxwell, Yes, to terminate a thread in Python early, use the following: import sys; sys.exit(0) This kills the particular thread without wiping out the entire Python application. Hope this helps, Brian :-) --- Maxwell Hammer wrote: > Hi all, > > This is related to an earlier post

Re: Tiff Image Reader/writer

2005-06-16 Thread James Carroll
I did a test with wxPython 2.6.1 on Windows. I created a G4 TIFF image that was 4400 x 3599 big, and the following code took under a half second. import wx import time def readImage(filename): img = wx.Image(filename) w = img.GetWidth() h = img.GetHeight() value = img.GetGreen(w

Re: __str__ vs __repr__

2005-06-16 Thread Donn Cave
In article <[EMAIL PROTECTED]>, "John Roth" <[EMAIL PROTECTED]> wrote: > "Donn Cave" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Quoth "John Roth" <[EMAIL PROTECTED]>: > > ... > > | str() should be something that's meaningful to a human being when > > | it's printed or othe

Re: Dealing with marketing types...

2005-06-16 Thread Kay Schluehr
Sorry, Cameron, if I twist meanings. Thomas argues that Python programmers are more expensive than Java ones. But if one needs more Java programmers to fit into the project plan one needs probably more managenment/admistration staff ( ~ ratio = 1/3) and managers are usually more expensive than pro

How should threads be terminated? (related to 'Help with thread related tracebacks')

2005-06-16 Thread Maxwell Hammer
Hi all, This is related to an earlier post 'Help with thread related tracebacks'...for which I have had no feedback yet :-( How should a thread complete i.e. how should it exit? Reading the python online docs one gets the idea that simply returning is OK - but I'm not sure. Is it ok to do a sys.e

Re: 1980's Home Computer-style Package.

2005-06-16 Thread Ralph Corderoy
Hi Skip, > > Some years ago I saw a Python package or program that gave a > > programming environment similar to the BASICs of 1980's home > > computers. You got a cursor-addressable screen, e.g. PRINT TAB(10, > > 20) "Hello", and some simple pixel-setting functions, e.g. RECTANGLE > > FILL 0, 1

Re: Set of Dictionary

2005-06-16 Thread Vibha Tripathi
I need sets as sets in mathematics: sets of any unique type of objects including those of dictionaries, I should then be able to do: a_set.__contains__(a_dictionary) and things like that. Can sets in Python 2.4.1, be reimplemented from scratch to not have it work on top of dict? Peace. Vibha

Re: access properties of parent widget in Tkinter

2005-06-16 Thread William Gill
Kent Johnson wrote: > William Gill wrote: > >> I am trying to get & set the properties of a widget's parent widget. >> What I have works, but seems like a long way around the block. First >> I get the widget name using w.winfo_parent(), then i convert the name >> to a reference using nametowid

Re: Set of Dictionary

2005-06-16 Thread Piet van Oostrum
> Vibha Tripathi <[EMAIL PROTECTED]> (VT) wrote: >VT> Hi Folks, >VT> I know sets have been implemented using dictionary but >VT> I absolutely need to have a set of dictionaries...any >VT> ideas how to do that? A set cannot contain duplicates. What happens when one of the dictionaries in the s

Re: Unbound names in __del__

2005-06-16 Thread Terry Reedy
"Torsten Bronger" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >Is there a way to detect whether the program is being terminated? See atexit module to register cleanup functions that run *before* the interpreter starts haphazardly deleting stuff. Terry J. Reedy -- http://ma

pty code from 2.3.4 not working in 2.3.5

2005-06-16 Thread Adriaan Renting
I hope you might be able to help me, as I can't find the cause of my problem. My sysadmin has upgraded Python from 2.3.4 (SuSE 9.2) to 2.3.5 (from python.org) Now my code for running an external program no longer works. My code is largely based on pexcpect.py and quite complex, but the example bel

utf8 and ftplib

2005-06-16 Thread Richard Lewis
Hi there, I'm having a problem with unicode files and ftplib (using Python 2.3.5). I've got this code: xml_source = codecs.open("foo.xml", 'w+b', "utf8") #xml_source = file("foo.xml", 'w+b') ftp.retrbinary("RETR foo.xml", xml_source.write) #ftp.retrlines("RETR foo.xml", xml_source.write) It op

Re: Set of Dictionary

2005-06-16 Thread Scott David Daniels
Vibha Tripathi wrote: > Hi Folks, > > I know sets have been implemented using dictionary but > I absolutely need to have a set of dictionaries...any > ideas how to do that? > > Peace. > Vibha > > "Things are only impossible until they are not." > > > > __

Re: implicit variable declaration and access

2005-06-16 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Christopher Subich <[EMAIL PROTECTED]> wrote: . . . >Out of curiosity, where would you classify interpreters for secondary >app-specific programming languages? Specifically, mud-client stored

Re: What language to manipulate text files

2005-06-16 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> wrote: >ross wrote: >> Roose wrote: >> > Why do people keep asking what language to use for certain things in the >> > Python newsgroup? Obviously the answer is going to biased. >> > >> > Not that it's a bad thing because I love Python, but it d

Re: Dealing with marketing types...

2005-06-16 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Kay Schluehr <[EMAIL PROTECTED]> wrote: . . . >less expensive. Arguing that a Python project definitely needs less >programmers than the Java counterpart ( which is very cost effective >because y

Re: 1980's Home Computer-style Package.

2005-06-16 Thread Skip Montanaro
Ralph> Some years ago I saw a Python package or program that gave a Ralph> programming environment similar to the BASICs of 1980's home Ralph> computers. You got a cursor-addressable screen, e.g. PRINT Ralph> TAB(10, 20) "Hello", and some simple pixel-setting functions, Ralph>

Re: Multithreaded Python FSM (Harel State Machines)

2005-06-16 Thread fraca7
Leonard J. Reder a écrit : > [snip] http://smc.sourceforge.net/ It's probably not what you're looking for, but it's the closest I can think of. -- http://mail.python.org/mailman/listinfo/python-list

Re: Set of Dictionary

2005-06-16 Thread Konstantin Veretennicov
On 6/16/05, Vibha Tripathi <[EMAIL PROTECTED]> wrote: > Hi Folks, > > I know sets have been implemented using dictionary but > I absolutely need to have a set of dictionaries... While you can't have a set of mutable objects (even dictionaries :)), you can have a set of immutable snapshots of thos

Re: What is different with Python ?

2005-06-16 Thread Claudio Grondi
>> "Also I think the fact that you think your were diteriating just goes to >> show [...]" should be probably: "In my opinion the fact that you consider you were deteriorating just shows [...]" but it can be understood as it is anyway, right? Written maybe exactly as it is, with the only purpo

Set of Dictionary

2005-06-16 Thread Vibha Tripathi
Hi Folks, I know sets have been implemented using dictionary but I absolutely need to have a set of dictionaries...any ideas how to do that? Peace. Vibha "Things are only impossible until they are not." __ Discover Yahoo! Find restaurants, mov

Re: Where is Word?

2005-06-16 Thread Guy Lateur
Ok, I've tried various proposed solutions, and this is what I've come up with: # get Word path wordKey = win32api.RegOpenKeyEx(win32con.HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths', 0, win32con.KEY_READ) wPath = win32api.RegQueryValue(wordKey, 'winword.exe') win32ap

Re: the python way?

2005-06-16 Thread TZOTZIOY
On Mon, 06 Jun 2005 14:52:04 -0400, rumours say that Kent Johnson <[EMAIL PROTECTED]> might have written: >def newZip(a1,a2): >""" reassemble """ >l1=len(a1) >l2=len(a2) >longest, shortest = [[a1,a2], [a2,a1]][l1 Other ways to write the last line: -

Re: What is different with Python ?

2005-06-16 Thread Jeffrey Maitland
Well as for the communication skills dropping. I highly doubt that, if anything you are just picking up on things you never noticed before (and your communication skills far surpass the average person that writes anything in todays' society). A good example for me is that I am noticing that I

Re: access properties of parent widget in Tkinter

2005-06-16 Thread William Gill
Kent Johnson wrote: > William Gill wrote: > >> I am trying to get & set the properties of a widget's parent widget. >> What I have works, but seems like a long way around the block. First >> I get the widget name using w.winfo_parent(), then i convert the name >> to a reference using nametowid

Re: What is different with Python ?

2005-06-16 Thread Claudio Grondi
> My communication ability is dropping every day at Probably no reason to worry. Reading your post I haven't even noticed the unnecessary "not", because the message was clear as intended even with it, anyway. Should I start to be seriously in doubt about own physiological problems only because ove

ANN: GallerPy 0.7.0

2005-06-16 Thread Freddie
GallerPy is a fairly basic dynamic web gallery written in Python and uses the Python Imaging Library. It is licensed under the terms of the BSD License. Features include: * Fluid CSS layout * SCGI support * Other exciting stuff GallerPy is available for download from the MadCowDiseas

Re: Using PAMIE to upload and download files...is it possible?

2005-06-16 Thread scrimp
Well, thanx to Erin I got everything I needed to do to work. I basically used 2 classes and wrote a driver using PAMIE 1 for the two File Download windows and 1 for the Save As window Here are the classes I used. I took out the comments, but its really not too hard to understand class FileDownloa

Re: dynamic

2005-06-16 Thread James Carroll
Oh, I see. Yeah, having the code look like you're instantiating one class, but really getting a different one is really horrible. Sorry I didn't catch on to the subtlety. I'm always complaining about code that looks like it does one thing, but really does another. -Jim On 15 Jun 2005 22:24:28

Unbound names in __del__

2005-06-16 Thread Torsten Bronger
Hallöchen! When my __del__ methods are called because the program is being terminated, I experience difficulties in calling functions that I need for a clean shutdown of my instances. So far, there has been only one of these functions, and a class-local alias solved the problem. However, now the

Re: Regex for repeated character?

2005-06-16 Thread Paul McGuire
One more bit, add this on to the code in the previous post: print "collapse repeated characters" repeats.setParseAction(lambda s,l,toks: toks[0][0]) print test,"->",repeats.transformString(test) Gives: collapse repeated characters foo ooobaaazZZ -> fo obazZ -- http://mail.python.org/mailman/li

Re: Regex for repeated character?

2005-06-16 Thread Paul McGuire
A brute-force pyparsing approach - define an alternation of all possible Words made up of the same letter. Plus an alternate version that just picks out the repeats, and gives their location in the input string: from pyparsing import ZeroOrMore, MatchFirst, Word, alphas print "group string by cha

Re: Is Python Suitable for Large Find & Replace Operations?

2005-06-16 Thread rbt
On Tue, 2005-06-14 at 19:51 +0200, Gilles Lenfant wrote: > rbt a écrit : > > Here's the scenario: > > > > You have many hundred gigabytes of data... possible even a terabyte or > > two. Within this data, you have private, sensitive information (US > > social security numbers) about your company'

Re: Is Python Suitable for Large Find & Replace Operations?

2005-06-16 Thread rbt
On Tue, 2005-06-14 at 19:51 +0200, Gilles Lenfant wrote: > rbt a écrit : > > Here's the scenario: > > > > You have many hundred gigabytes of data... possible even a terabyte or > > two. Within this data, you have private, sensitive information (US > > social security numbers) about your company'

Re: What is different with Python ? (OT I guess)

2005-06-16 Thread Tom Anderson
On Wed, 15 Jun 2005, Terry Hancock wrote: > On Tuesday 14 June 2005 08:12 am, Magnus Lycka wrote: > >> Oh well, I guess it's a bit late to try to rename the Computer >> Science discipline now. > > Computer programming is a trade skill, not a science. It's like > being a machinist or a carpenter --

Re: Is Python Suitable for Large Find & Replace Operations?

2005-06-16 Thread rbt
On Tue, 2005-06-14 at 11:34 +1000, John Machin wrote: > rbt wrote: > > Here's the scenario: > > > > You have many hundred gigabytes of data... possible even a terabyte or > > two. Within this data, you have private, sensitive information (US > > social security numbers) about your company's clie

Re: Regex for repeated character?

2005-06-16 Thread John Machin
Peter Otten wrote: > Leif K-Brooks wrote: > > >>How do I make a regular expression which will match the same character >>repeated one or more times, instead of matching repetitions of any >>(possibly non-same) characters like ".+" does? In other words, I want a >>pattern like this: >> >> >>> re.f

Re: UML to Python/Java code generation

2005-06-16 Thread Paul McGuire
Enterprise Architect (http://www.sparxsystems.com.au/) supports an add-in that will generate Python from UML diagrams. Once you install EA, follow the instructions for adding the Python technology resource, which is a free download from the EA website. Will also generate UML from Python source.

Re: Is Python Suitable for Large Find & Replace Operations?

2005-06-16 Thread rbt
On Tue, 2005-06-14 at 19:51 +0200, Gilles Lenfant wrote: > rbt a écrit : > > Here's the scenario: > > > > You have many hundred gigabytes of data... possible even a terabyte or > > two. Within this data, you have private, sensitive information (US > > social security numbers) about your company'

Python & firewall control (Win32)

2005-06-16 Thread Tim Williams
Does anyone know of (personal/desktop) firewall that can be controlled via Python, or a Python Firewall package, or even something like DAXFi but not dormant ? The XP native firewall appears to have an API, but I'm not convinced I want to go that route unless it is relatively simple. Google is

Re: Is Python Suitable for Large Find & Replace Operations?

2005-06-16 Thread rbt
On Tue, 2005-06-14 at 19:51 +0200, Gilles Lenfant wrote: > rbt a écrit : > > Here's the scenario: > > > > You have many hundred gigabytes of data... possible even a terabyte or > > two. Within this data, you have private, sensitive information (US > > social security numbers) about your company'

RE: access properties of parent widget in Tkinter

2005-06-16 Thread Silvia Rovati
Hi. I think that using "backgrounding" doesn't solve your problem. I suppose that you must fork the processes to let them run independently and separately. Best regards Silvia -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Kent Johnson Sent: giovedi 16 giugn

Re: access properties of parent widget in Tkinter

2005-06-16 Thread Kent Johnson
William Gill wrote: > I am trying to get & set the properties of a widget's parent widget. > What I have works, but seems like a long way around the block. First I > get the widget name using w.winfo_parent(), then i convert the name to a > reference using nametowidget(). > > self.nametowidg

Re: pyunit: remove a test case on the fly

2005-06-16 Thread Kent Johnson
chris wrote: > We have a number of TestCase classes that have multiple test methods. > We are interested in removing any of the individual test methods on the > fly (dynamically, at runtime, whatever). > > We currently have an "isSupported" method in the TestCase classes that > return a bool by wh

Re: __str__ vs __repr__

2005-06-16 Thread John Roth
"Donn Cave" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Quoth "John Roth" <[EMAIL PROTECTED]>: > ... > | str() should be something that's meaningful to a human being when > | it's printed or otherwise rendered. > > I can't believe how many people cite this explanation - meaningf

Re: What is different with Python ?

2005-06-16 Thread Roy Smith
Andrea Griffini <[EMAIL PROTECTED]> wrote: > That strings in python are immutable it's surely > just a detail, and it's implementation specific, > but this doesn't means it's not something you can > ignore for a while. I disagree. It is indeed something you can ignore for a while. The first pro

Re: UML to Python/Java code generation

2005-06-16 Thread Grigoris Tsolakidis
There is tool to generate UML from Python Code... "Maurice LING" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > 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: help with sending mail in Program

2005-06-16 Thread Tim Williams
- Original Message - From: "Ivan Shevanski" <[EMAIL PROTECTED]> > > if __name__ == '__main__': >body = 'x is',x,'y is',y,'.Lets hope that works!' >subject = 'Neo' >sendToMe(subject, body) > > I really have no idea whats going on. . .help? > > -Ivan Ivan, you need to pass the

Re: What is different with Python ?

2005-06-16 Thread agriff
Andrea Griffini wrote: > That strings in python are immutable it's surely > just a detail, and it's implementation specific, > but this doesn't means it's not something you can > ignore for a while. If you use python this is a > *fundamental* property. My communication ability is dropping every d

1980's Home Computer-style Package.

2005-06-16 Thread Ralph Corderoy
Hi, Some years ago I saw a Python package or program that gave a programming environment similar to the BASICs of 1980's home computers. You got a cursor-addressable screen, e.g. PRINT TAB(10, 20) "Hello", and some simple pixel-setting functions, e.g. RECTANGLE FILL 0, 10, 20, 30. It probably u

Re: Tkinter Question

2005-06-16 Thread Martin Franklin
Fredrik Lundh wrote: > [EMAIL PROTECTED] wrote: > > >>Thanks for all the help guys... I'm a bit confused as to the inner >>workings of the Tkinter system (I'm both a Python and a GUI n00b). I was >>hoping that by slapping the x on button python was doing some cool >>dynamic variable creation (i.e

Re: Regex for repeated character?

2005-06-16 Thread Peter Otten
Leif K-Brooks wrote: > How do I make a regular expression which will match the same character > repeated one or more times, instead of matching repetitions of any > (possibly non-same) characters like ".+" does? In other words, I want a > pattern like this: > > >>> re.findall(".+", "foo") # not

  1   2   >