ANN pyfs: python shell+ftp for PC, Nokia and XBOX

2006-12-16 Thread Michele Andreoli
Pyfs is a (sort of) python replacement for shell+rsh+ftp+telnet, in a very alpha development stage. Pyfs works on every platforms supporting Python, with network connections in mind. Having the pyfs server running on the machine A (a PC, a Nokia phone with Symbian S60, an XBOX console), you can

Re: Roundtrip SQL data especially datetime

2006-12-16 Thread John Machin
John Nagle wrote: dyork wrote: John Machin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] If you have, as you should, Python 2.5, you can use this: Actually, MySQLdb isn't released for Python 2.5 yet Actually, that's interesting information [why should it take so long?],

Re: merits of Lisp vs Python

2006-12-16 Thread Ken Tilton
greg wrote: Ken Tilton wrote: I did explain the last little fun bit (where reverse code miraculously got a case-specific signed-value parameter bound to exactly the right bit of math structure). I didn't mention that because it was addressed by another poster. The signature of the

Re: I'm looking for an intelligent date conversion module

2006-12-16 Thread Will McGugan
mthorley wrote: Greetings, I'm looking for a python module that will take a datetime obj and convert it into relative time in english. For example: 10 minutes ago, 1 Hour ago, Yesterday, A few day ago, Last Week, etc I feel for you. I'm always on the lookout for an intelligent date. --

Re: parsing a dictionary from a string

2006-12-16 Thread Paul McGuire
Benjamin Georgi [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello list, I could use some help extracting the keys/values of a list of dictionaries from a string that is just the str() representation of the list (the problem is related to some flat file format I'm using for

Re: parsing a dictionary from a string

2006-12-16 Thread Peter Otten
Benjamin Georgi wrote: I could use some help extracting the keys/values of a list of dictionaries from a string that is just the str() representation of the list (the problem is related to some flat file format I'm using for file IO). Example: s = str(dict_list) s '[{0: [2], 1: []},

[ANN]: 'twander' 3.204 Released And Available

2006-12-16 Thread Tim Daneliuk
'twander' Version 3.204 is now released and available for download at: http://www.tundraware.com/Software/twander The last public release was 3.195. If you are unfamiliar with this program, see the end of this message for a brief description.

Re: tuple.index()

2006-12-16 Thread Christoph Zwerschke
Hendrik van Rooyen wrote: From a practical point of view, the only reason to use a tuple instead of a list for anything seems to be that you want to use it as a key in a dict... Otherwise, why bother with these recalcitrant things that you can't change or index, or append to or anything

Re: tuple.index()

2006-12-16 Thread Christoph Zwerschke
James Stroud wrote: Christoph Zwerschke wrote: Maybe there would be less dispute if this dogma/convention(?) Tuples are for heterogeneous data, list are for homogeneous data would be written down somewhere in the tutorial, reference or in PEP8, so people would be aware of it. This is a

Re: Designing a cancellable function

2006-12-16 Thread Giovanni Bajo
Gabriel Genellina wrote: I now would also like to add the possibility to allow the user to *cancel* the execution of foo() during the processing, and I am wondering what the best / most Pythonic way to design this is. I can't say if this is the best/more Pythonic way, but a simple way

Re: I'm looking for an intelligent date conversion module

2006-12-16 Thread neoedmund
I'm more familiar with java. maybe java.util.Calendar can be port to python? i donnt know. mthorley のメッセージ: Greetings, I'm looking for a python module that will take a datetime obj and convert it into relative time in english. For example: 10 minutes ago, 1 Hour ago, Yesterday, A few day

Re: merits of Lisp vs Python

2006-12-16 Thread Kay Schluehr
Ken Tilton schrieb: Looks promising. How does a generic engine that sees only a solution (a list of mathematical expressions and for each the transformations, results, and opnds logged by individual TF functions) build up this environment such that it has named attributes such as

Re: merits of Lisp vs Python

2006-12-16 Thread Christophe Cavalaria
Paul Rubin wrote: Kirk Sluder [EMAIL PROTECTED] writes: Personally, I've always preferred use the imperative to describe basic math rather than the passive. This would seem to map better to RPN than infix. For writing down complicated, nested expressions too? That's very unusual. E.g.

Re: tuple.index()

2006-12-16 Thread Nick Maclaren
In article [EMAIL PROTECTED], Christoph Zwerschke [EMAIL PROTECTED] writes: | | I just found that there is indeed some mentioning in the FAQ here: | http://www.python.org/doc/faq/general/#why-are-there-separate-tuple-and-list-data-types | But it is a bit vague, too, and does not mention whether

Re: merits of Lisp vs Python

2006-12-16 Thread Juan R.
greg ha escrito: I don't know about the other Pythonistas in this discussion, but personally I do have experience with Lisp, and I understand what you're saying. I have nothing against Lisp parentheses, I just don't agree that the Lisp way is superior to the Python way in all respects, based

Re: CLPython (was Re: merits of Lisp vs Python)

2006-12-16 Thread metawilm
Paul Rubin wrote: [EMAIL PROTECTED] writes: a = 'hello' a[0] = 'H' # attempt to change first letter to upper case As CLPython mirrors Python semantics, this results in a TypeError. The internal representation of an immutable Python string is a mutable Lisp string, but there is

catching exceptions

2006-12-16 Thread [EMAIL PROTECTED]
Hi, In the following program, I have a class Test which has a property x. Its setx function gets a string value and converts it into a float and stores into it. class Test(object): def _getx(self): return self._x def _setx(self,strvalue): try: self._x =

Re: job posting: Sr Systems Programmer needed

2006-12-16 Thread Paul McGuire
And why would you even use the word iceberg in an ad for a position in Minnesota? You might as well refer to: - the blizzard of opportunties for career growth in this position - how you'll slide through the job startup process as if you were on ice - the comfort of working in a small town,

Re: catching exceptions

2006-12-16 Thread Amit Khemka
On 16 Dec 2006 03:54:52 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, In the following program, I have a class Test which has a property x. Its setx function gets a string value and converts it into a float and stores into it. class Test(object): def _getx(self): return

Re: Has comparison of instancemethods changed between python 2.5 and 2.4?

2006-12-16 Thread Frank Niessink
Frank Niessink: OK, so that explains why the id of (two references to the same) instancemethod(s) may differ. But I'm still confused why two instancemethods of two different instances can compare as equal. I tried to lookup the python source code where the actual comparison happens. I think

Re: catching exceptions

2006-12-16 Thread Steven D'Aprano
On Sat, 16 Dec 2006 03:54:52 -0800, [EMAIL PROTECTED] wrote: Hi, In the following program, I have a class Test which has a property x. Its setx function gets a string value and converts it into a float and stores into it. [snip code] Python isn't Java. Are you sure you need properties? I

Re: catching exceptions

2006-12-16 Thread Steven D'Aprano
On Sat, 16 Dec 2006 17:36:00 +0530, Amit Khemka wrote: If I gather correctly, i guess in case of errors/exceptions in a class function, you want to get the error string. One thing that comes straight to my mind is, in such a case use a return statement in functions with two arguments. for

Re: merits of Lisp vs Python

2006-12-16 Thread Hendrik van Rooyen
greg [EMAIL PROTECTED] I once heard mention of a system of units in use at one time with the odd feature that capacitance came out in units of length. Picture the scene: Hobbyist walks into Dick Smith store and says I'd like a 5cm capacitor, please. This is correct - think of it as

Re: tuple.index()

2006-12-16 Thread James Stroud
Christoph Zwerschke wrote: Inhomogenous in some meaning of the word -- tuple I think that you have nailed it here. I don't think anyone on this list is capable of giving a concrete (as you have put it) operational definition of inhomogenous. They will resort to use cases and thus cloud the

Re: merits of Lisp vs Python

2006-12-16 Thread André Thieme
greg schrieb: André Thieme wrote: (aif (timeConsumingCalculation) (use it)) I think the answer is that you just wouldn't do that in Python at all. Having magic variables spring into existence in your local namespace as a side effect of calling something is just not Pythonic. (It is

Re: merits of Lisp vs Python

2006-12-16 Thread Paul Rubin
André Thieme [EMAIL PROTECTED] writes: Sounds like Blub to me: http://www.paulgraham.com/avg.html It never occurs to Lisp programmers that Lisp, too, might be a Blub. -- http://mail.python.org/mailman/listinfo/python-list

Re: tuple.index()

2006-12-16 Thread Nick Maclaren
In article [EMAIL PROTECTED], James Stroud [EMAIL PROTECTED] writes: | Christoph Zwerschke wrote: | | Inhomogenous in some meaning of the word -- tuple | | I think that you have nailed it here. I don't think anyone on this list | is capable of giving a concrete (as you have put it)

Re: catching exceptions

2006-12-16 Thread [EMAIL PROTECTED]
Steven D'Aprano wrote: On Sat, 16 Dec 2006 03:54:52 -0800, [EMAIL PROTECTED] wrote: Hi, In the following program, I have a class Test which has a property x. Its setx function gets a string value and converts it into a float and stores into it. [snip code] Python isn't Java. Are you

Re: Routine for prefixing '' before every line of a string

2006-12-16 Thread Sanjay
Thanks a lot, guys! sanjay -- http://mail.python.org/mailman/listinfo/python-list

Re: merits of Lisp vs Python

2006-12-16 Thread André Thieme
Paul Rubin schrieb: Kirk Sluder [EMAIL PROTECTED] writes: Personally, I've always preferred use the imperative to describe basic math rather than the passive. This would seem to map better to RPN than infix. For writing down complicated, nested expressions too? That's very unusual.

Re: merits of Lisp vs Python

2006-12-16 Thread Slawomir Nowaczyk
On Sat, 16 Dec 2006 14:09:11 +0100 André Thieme [EMAIL PROTECTED] wrote: # Sounds like Blub to me: # http://www.paulgraham.com/avg.html Well, too bad for you... # I will quote some parts of it: # snip # By induction, the only programmers in a position to see all the # differences in power

A new text templating system for python!

2006-12-16 Thread Chris Withers
Hi All, I'm proud to announce that after almost a year's development, the first public release of Twiddler is available! Twiddler is a simple but flexible templating system for dynamically generating textual output. The key features are: - No need to learn a templating language. - As simple

win32 service

2006-12-16 Thread g.franzkowiak
Hi everybody, have a little problem with a service on Win32. I use a TCP server as service, but can't access from an other machine. Only local access is possible. The service starts like this: - myService.py --username user --password password install - followed by start The user is member

Re: how can i write a hello world in chinese with python

2006-12-16 Thread kernel1983
thanks everyone maybe this simple API doesn't fit the Chinese display but thanks everybody! At least I've got that what bundles is and maybe I can use Python to write program On 12月14日, 上午6时31分, MRAB [EMAIL PROTECTED] wrote: Dennis Lee Bieber wrote: On 12 Dec 2006 23:40:41 -0800, kernel1983

Re: win32 service

2006-12-16 Thread Tim Williams
On 16/12/06, g.franzkowiak [EMAIL PROTECTED] wrote: Hi everybody, have a little problem with a service on Win32. I use a TCP server as service, but can't access from an other machine. Only local access is possible. The service starts like this: - myService.py --username user --password

Package vs. module

2006-12-16 Thread Stuart D. Gathman
On Mon, 11 Dec 2006 20:59:27 -0300, Gabriel Genellina wrote: The above code *almost* works, but DNSLookup is a local name inside the function. Use the global statement. As an example, see how getpass.py (in the standard library) manages the various getpass implementations. Ok, I have a

Re: Has comparison of instancemethods changed between python 2.5 and 2.4?

2006-12-16 Thread Ziga Seilnacht
Frank Niessink wrote: I tried to lookup the python source code where the actual comparison happens. I think it is in methodobject.c (I'm not familiar with the python source so please correct me if I'm wrong), meth_compare. That function did not change between python 2.4.4 and 2.5. Moreover,

Re: merits of Lisp vs Python

2006-12-16 Thread Ken Tilton
Kay Schluehr wrote: Ken Tilton schrieb: Looks promising. How does a generic engine that sees only a solution (a list of mathematical expressions and for each the transformations, results, and opnds logged by individual TF functions) build up this environment such that it has named

Re: Conditional iteration

2006-12-16 Thread Colin J. Williams
at wrote: Dear Carl, Well, all I can say that for me as a user it would make sense... Curiosity: in what sense is it redundant? All solution/workarounds I have seen so far involve creation of new lists (subsets) adding to more processing/computation/memory usage. Redundant suggests that

Re: win32 service

2006-12-16 Thread g.franzkowiak
Tim Williams schrieb: On 16/12/06, g.franzkowiak [EMAIL PROTECTED] wrote: Hi everybody, have a little problem with a service on Win32. I use a TCP server as service, but can't access from an other machine. Only local access is possible. The service starts like this: - myService.py

Re: merits of Lisp vs Python

2006-12-16 Thread Raffael Cavallaro
On 2006-12-16 08:21:59 -0500, Paul Rubin http://[EMAIL PROTECTED] said: It never occurs to Lisp programmers that Lisp, too, might be a Blub. Of course it does - Thats why we try ocaml and haskell etc. It's just that we don't see the useful features of these languages as being sufficiently

Re: Roundtrip SQL data especially datetime

2006-12-16 Thread fumanchu
dyork wrote: Thanks Gabriel, but when I said round trip I really did mean: convert all the way to string and all the way back again, so your kind advice is not all that helpful. I need string to get to a non-Python object or a Web page. Then you need two adaptation layers: one between your app

Re: win32 service

2006-12-16 Thread g.franzkowiak
Tim Williams schrieb: On 16/12/06, g.franzkowiak [EMAIL PROTECTED] wrote: Hi everybody, have a little problem with a service on Win32. I use a TCP server as service, but can't access from an other machine. Only local access is possible. The service starts like this: - myService.py

module wide metaclass for new style classes

2006-12-16 Thread Daniel Nogradi
I used to have the following code to collect all (old style) class names defined in the current module to a list called reg: def meta( reg ): def _meta( name, bases, dictionary ): reg.append( name ) return _meta reg = [ ] __metaclass__ = meta( reg ) class c1: pass class

Re: merits of Lisp vs Python

2006-12-16 Thread Juan R.
Raffael Cavallaro ha escrito: This lock-in to a particular paradigm, however powerful, is what makes any such language strictly less expressive than one with syntactic abstraction over a uniform syntax. Right, but it would be also remarked that there is not reason to ignoring the development

Re: merits of Lisp vs Python

2006-12-16 Thread Juan R.
Using LISP-like syntax for everything would be so stupid as using quantum mechanics for billiards. Claiming that LISP parens are Stupid, Superfluous, or Silly just because you do not need them in your limited field of discourse, would be so stupid as those people thinking that just because they

Re: I'm looking for a pythonic red-black tree...

2006-12-16 Thread Stuart D. Gathman
On Fri, 15 Dec 2006 01:20:34 +, Just Another Victim of the Ambient Morality wrote: I need a red-black tree in Python and I was wondering if there was one built in or if there's a good implementation out there. Something that, lets face it, does whatever the C++ std::map allows you

Re: merits of Lisp vs Python

2006-12-16 Thread Kirk Sluder
In article [EMAIL PROTECTED], Paul Rubin http://[EMAIL PROTECTED] wrote: Kirk Sluder [EMAIL PROTECTED] writes: Personally, I've always preferred use the imperative to describe _basic_ math rather than the passive. This would seem to map better to RPN than infix. (emphasis added)

Re: Roundtrip SQL data especially datetime

2006-12-16 Thread John Nagle
John Machin wrote: John Nagle wrote: dyork wrote: John Machin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] If you have, as you should, Python 2.5, you can use this: Actually, MySQLdb isn't released for Python 2.5 yet Actually, that's interesting information [why should

Re: merits of Lisp vs Python

2006-12-16 Thread Jon Harrop
Raffael Cavallaro wrote: Of course it does - Thats why we try ocaml and haskell etc. It's just that we don't see the useful features of these languages as being sufficiently useful to compensate for their lack of the ability to easily do syntactic abstractions over a uniform syntax. That

Re: merits of Lisp vs Python

2006-12-16 Thread Kirk Sluder
In article [EMAIL PROTECTED], Kirk Sluder [EMAIL PROTECTED] wrote: In article [EMAIL PROTECTED], Paul Rubin http://[EMAIL PROTECTED] wrote: n! = (n/e)**n * sqrt(2*pi*n) * (1 + (1/12n)) * ... If computer languages were to mimic natural languages on this point, they would support

sha, PyCrypto, SHA-256

2006-12-16 Thread mirandacascade
Operating system: Win XP Vsn of Python: 2.4 Situation is this: Required to calcluate a message digest. The process for calcluating the digest must use an SHA-256 algorithm. Questions: 1) Is it correct that the sha module comes with python 2.4? 2) Is it correct that the sha module that ships

Re: merits of Lisp vs Python

2006-12-16 Thread xscottg
Ken Tilton wrote: [EMAIL PROTECTED] wrote: Code is data is code I was hoping no one would make that mistake. :) macros are all about code is data, but code is not data in Python* so the two words code and data serve to differentiate them for Pythonistas. I disagree. I frequently write

Re: merits of Lisp vs Python

2006-12-16 Thread Raffael Cavallaro
On 2006-12-16 13:58:37 -0500, Jon Harrop [EMAIL PROTECTED] said: Why do you think that uniform syntax is necessary to provide new paradigms when it is equivalent to infix syntax? Because it doesn't require one to write a parser for each new syntax for each new paradigm. In what way is

Re: sha, PyCrypto, SHA-256

2006-12-16 Thread Dennis Benzinger
Am 16 Dec 2006 11:17:19 -0800 schrieb [EMAIL PROTECTED]: Operating system: Win XP Vsn of Python: 2.4 Situation is this: Required to calcluate a message digest. The process for calcluating the digest must use an SHA-256 algorithm. Questions: 1) Is it correct that the sha module comes

Good Looking UI for a stand alone application

2006-12-16 Thread The Night Blogger
Can someone recommend me a good API for writing a sexy looking (Rich UI like WinForms) shrink wrap application My requirement is that the application needs to look as good on Windows as on the Apple Mac -- http://mail.python.org/mailman/listinfo/python-list

Is there a way to push data into Microsoft Excel Word from Python ?

2006-12-16 Thread The Night Blogger
Is there a way to push data to Microsoft Excel Word from a Python Application Is this a cross platform feature ? I'll need to push data on MS Windows Mac OS X -- http://mail.python.org/mailman/listinfo/python-list

textwrap.dedent replaces tabs?

2006-12-16 Thread Tom Plunket
The documentation for dedent says, Remove any whitespace than can be uniformly removed from the left of every line in `text`, yet I'm finding that it's also modifying the '\t' characters, which is highly undesirable in my application. Is there any way to stop it from doing this, or alternatively,

Re: Is anyone using Python for embedded applications?

2006-12-16 Thread dwhall
Carl, I'm the lead developer for PyMite (http://pymite.python-hosting.com). I do quite a bit of embedded development with PyMite. PyMite is for much smaller target devices (8-bit and 32-bit microcontrollers) than you plan to use. I am currently writing a series of papers that will attempt to

Re: Roundtrip SQL data especially datetime

2006-12-16 Thread Marc 'BlackJack' Rintsch
In [EMAIL PROTECTED], John Nagle wrote: John Machin wrote: John Nagle wrote: dyork wrote: John Machin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] If you have, as you should, Python 2.5, you can use this: Actually, MySQLdb isn't released for Python 2.5 yet Actually,

Is there a way to push data into Microsoft Oulook from Python ?

2006-12-16 Thread The Night Blogger
Is there a way to pull push data (Tasks, Notes, Calendar Items ...) into Microsoft Oulook from Python ? -- http://mail.python.org/mailman/listinfo/python-list

Re: converting mysql db into sqlite3.

2006-12-16 Thread gordyt
You could probably use the mysqldump command with the proper options to export the contents of your mysql database to an ASCII text file that contains the SQL insert statements. Then you could import that information to a sqlite database file. You may have to massage the export file if it

Is there a way to push data into Ical from Python ?

2006-12-16 Thread The Night Blogger
Is there a way to pull push data into (Apple Mac OS X Calendar) Ical from Python ? -- http://mail.python.org/mailman/listinfo/python-list

Re: merits of Lisp vs Python

2006-12-16 Thread Ken Tilton
[EMAIL PROTECTED] wrote: Ken Tilton wrote: [EMAIL PROTECTED] wrote: Code is data is code I was hoping no one would make that mistake. :) macros are all about code is data, but code is not data in Python* so the two words code and data serve to differentiate them for Pythonistas. I

Re: Roundtrip SQL data especially datetime

2006-12-16 Thread John Nagle
Marc 'BlackJack' Rintsch wrote: In [EMAIL PROTECTED], John Nagle wrote: John Machin wrote: John Nagle wrote: dyork wrote: John Machin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] If you have, as you should, Python 2.5, you can use this: Actually, MySQLdb isn't released

Re: Good Looking UI for a stand alone application

2006-12-16 Thread Peter Decker
On 12/16/06, The Night Blogger [EMAIL PROTECTED] wrote: Can someone recommend me a good API for writing a sexy looking (Rich UI like WinForms) shrink wrap application My requirement is that the application needs to look as good on Windows as on the Apple Mac For my money (even though it's

Re: Over my head with descriptors

2006-12-16 Thread Christian Kastner
Sarcastic Zombie wrote: Code included below. Basically, I've created a series of question descriptors, which each hold a managed value. This is so I can implement validation, and render each field into html automatically for forms. My problem is this: every instance of my wizard class has

Dictionary, iterate update objects

2006-12-16 Thread jansenh
hi comp.lang.python. I need some newbe advice on idiomatic use of Python dictionaries. I have service with a dictionary which holds a bunch of objects as values, and an ID as key to each object. Then I want to change an objects state based on its key. The way I am doing this now is by using

Re: Over my head with descriptors

2006-12-16 Thread Christian Kastner
Tim Roberts wrote: Sarcastic Zombie [EMAIL PROTECTED] wrote: Code included below. Basically, I've created a series of question descriptors, which each hold a managed value. This is so I can implement validation, and render each field into html automatically for forms. My problem is this:

Re: How Micro-pump will change the future of computer/ mobile chips.

2006-12-16 Thread Jim Granville
[EMAIL PROTECTED] wrote: How Micro-pump will change the future of computer/ mobile chips. FAR more hype than practical solution Sorry guys, this will not change the future of computer/ mobile chips. Engineers at Purdue University have developed a tiny micro-pump cooling device small

Re: Is there a way to push data into Microsoft Excel Word from Python ?

2006-12-16 Thread Caleb Hattingh
The Night Blogger wrote: Is there a way to push data to Microsoft Excel Word from a Python Application On Windows, it's easy after you install the win32 extensions. For example, for python: import win32com.client xl = win32com.client.Dispatch('Excel.Application') after which you can

Re: How Micro-pump will change the future of computer/ mobile chips.

2006-12-16 Thread Donald
Jim Granville wrote: [EMAIL PROTECTED] wrote: How Micro-pump will change the future of computer/ mobile chips. FAR more hype than practical solution Sorry guys, this will not change the future of computer/ mobile chips. Engineers at Purdue University have developed a tiny

Re: Roundtrip SQL data especially datetime

2006-12-16 Thread Carsten Haese
On Sat, 2006-12-16 at 20:48 +, John Nagle wrote: The SourceForge page http://sourceforge.net/project/showfiles.php?group_id=22307 says MySQL versions 3.23-5.0; and Python versions 2.3-2.4 are supported. Last release was April, 2006. There's no binary for Python 2.5

Re: Has comparison of instancemethods changed between python 2.5 and 2.4?

2006-12-16 Thread Frank Niessink
Ziga Seilnacht: This method was changed in Python 2.5. Previously, two instancemethods compared equal if their im_self attributes were *identical* and their im_func attributes were equal. Now, they compare equal if their im_self attributes are *equal* and their im_func attributes are equal.

Re: Dictionary, iterate update objects

2006-12-16 Thread Caleb Hattingh
jansenh wrote: hi comp.lang.python. I need some newbe advice on idiomatic use of Python dictionaries. I have service with a dictionary which holds a bunch of objects as values, and an ID as key to each object. Then I want to change an objects state based on its key. The way I am doing this

inquiry about installing Python 2.5

2006-12-16 Thread mirandacascade
Apologies in advance for what I'm sure seems like a trivial question. Operating system: Win XP Current version of Python: 2.4 If possible, I would like to have both Python 2.4 and Python 2.5 installed on my workstaiton. I downloaded the .msi for Python 2.5 from the python.org site. If I run the

Re: Dictionary, iterate update objects

2006-12-16 Thread jansenh
Hi and thanx! Caleb Hattingh wrote: temp=d[12345] temp.x = 5 After I assign the object to the dict with ID=12345, I can easily get the object by its key and manipulate its state. The last 4 lines show that the state changed for all the active references to the created object. Is this

Re: inquiry about installing Python 2.5

2006-12-16 Thread Martin v. Löwis
[EMAIL PROTECTED] schrieb: If possible, I would like to have both Python 2.4 and Python 2.5 installed on my workstaiton. I downloaded the .msi for Python 2.5 from the python.org site. If I run the 2.5 installer, will it give me the option of keeping Python 2.4 installed on my workstation?

Re: inquiry about installing Python 2.5

2006-12-16 Thread Michel Claveau
Hi! For Python only, it's possible. But, if you add Pywin32... problem! -- @-salutations Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: textwrap.dedent replaces tabs?

2006-12-16 Thread CakeProphet
Hmmm... a quick fix might be to temporarily replace all tab characters with another, relatively unused control character. MyString = MyString.replace(\t, chr(1)) MyString = textwrap.dedent(MyString) MyString = MyString.replace(chr(1), \t) Of course... this isn't exactly safe, but it's not going

Re: Need Simple Way To Determine If File Is Executable

2006-12-16 Thread Gabriel Genellina
On 16 dic, 04:47, Tim Roberts [EMAIL PROTECTED] wrote: os.stat(selected)[ST_MODE] (S_IXUSR|S_IXGRP|S_IXOTH This will tell you that x.exe is executable, even if x.exe contains nothing but zeros. Isn't the same with any other recipe, portable or not? Unless the OS actually tries to load and

Re: merits of Lisp vs Python

2006-12-16 Thread Paul Rubin
Raffael Cavallaro [EMAIL PROTECTED]'espam-s'il-vous-plait-mac.com writes: It never occurs to Lisp programmers that Lisp, too, might be a Blub. Of course it does - Thats why we try ocaml and haskell etc. It's just that we don't see the useful features of these languages as being sufficiently

Re: Roundtrip SQL data especially datetime

2006-12-16 Thread John Machin
Carsten Haese wrote: On Sat, 2006-12-16 at 20:48 +, John Nagle wrote: The SourceForge page http://sourceforge.net/project/showfiles.php?group_id=22307 says MySQL versions 3.23-5.0; and Python versions 2.3-2.4 are supported. Last release was April, 2006. There's

Re: Is there a way to push data into Microsoft Excel Word from Python ?

2006-12-16 Thread John Machin
The Night Blogger wrote: Is there a way to push data to Microsoft Excel Word from a Python Application Is this a cross platform feature ? I'll need to push data on MS Windows Mac OS X Depends on what you mean by push. If you wish to create Excel files but not update existing ones,

Re: Is there a way to push data into Microsoft Excel Word from Python ?

2006-12-16 Thread Paul Boddie
Caleb Hattingh wrote: Paul Boddie has written a great tutorial---which includes some Outlook examples, btw---over here: http://thor.prohosting.com/~pboddie/Python/COM.html Thanks for the kind words! The most current location of this tutorial is here: http://www.boddie.org.uk/python/COM.html

wxPython help please

2006-12-16 Thread Jive Dadson
I hope someone can help me with a couple of wxPython questions, or point me to the right newsgroup for the questions. I am trying to modify the floatcanvas demo program. I want to load an image from a file (jpg or whatever), then do a kind of color-picker action on it. I haven't tried yet to

Re: catching exceptions

2006-12-16 Thread Steven D'Aprano
On Sat, 16 Dec 2006 05:24:28 -0800, [EMAIL PROTECTED] wrote: Hi, In the following program, I have a class Test which has a property x. Its setx function gets a string value and converts it into a float and stores into it. [snip code] Python isn't Java. Are you sure you need properties?

Re: Package vs. module

2006-12-16 Thread Gabriel Genellina
On 16 dic, 12:28, Stuart D. Gathman [EMAIL PROTECTED] wrote: NOW, this is all very nice and modular. BUT, the original module was a single file, which could be run as a script as well as imported as a module. The script features provided useful command line functionality. (Using if __name__

Re: catching exceptions

2006-12-16 Thread Gabriel Genellina
On 16 dic, 10:24, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Python isn't Java. Are you sure you need properties? I do not know Java. But, object.x = value looks much better than object.set_x(value) . Is there any harm in doing it, provided I have to do more than just storing the value.

Re: merits of Lisp vs Python

2006-12-16 Thread greg
Ken Tilton wrote: How does a generic engine that sees only a solution (a list of mathematical expressions and for each the transformations, results, and opnds logged by individual TF functions) build up this environment such that it has named attributes such as signed-value? How did your

Re: wxPython help please

2006-12-16 Thread Sandra-24
Try the wxPython mailing list, which you can find on their site. And the best wxPython reference is the book (also available as an e-book) by Robin Dunn, who created wxPython. Seeing wxPython from his perspective is well worth the money. If I recall correctly he devoted an entire chapter to

How to test if two strings point to the same file or directory?

2006-12-16 Thread Sandra-24
Comparing file system paths as strings is very brittle. Is there a better way to test if two paths point to the same file or directory (and that will work across platforms?) Thanks, -Sandra -- http://mail.python.org/mailman/listinfo/python-list

Re: wxPython help please

2006-12-16 Thread Jive Dadson
Sandra-24 wrote: Try the wxPython mailing list, which you can find on their site. And the best wxPython reference is the book (also available as an e-book) by Robin Dunn, who created wxPython. Seeing wxPython from his perspective is well worth the money. If I recall correctly he devoted an

Re: How to test if two strings point to the same file or directory?

2006-12-16 Thread Tim Chase
Comparing file system paths as strings is very brittle. Is there a better way to test if two paths point to the same file or directory (and that will work across platforms?) os.path.samefile(filename1, filename2) os.path.sameopenfile(fileobject1, fileobject2) -tkc --

Re: How to test if two strings point to the same file or directory?

2006-12-16 Thread Steven D'Aprano
On Sat, 16 Dec 2006 17:02:04 -0800, Sandra-24 wrote: Comparing file system paths as strings is very brittle. Why do you say that? Are you thinking of something like this? /home//user/somedirectory/../file /home/user/file Both point to the same file. Is there a better way to test if two

Re: How to test if two strings point to the same file or directory?

2006-12-16 Thread John Machin
Tim Chase wrote: Comparing file system paths as strings is very brittle. Is there a better way to test if two paths point to the same file or directory (and that will work across platforms?) os.path.samefile(filename1, filename2) os.path.sameopenfile(fileobject1, fileobject2)

Re: wxPython help please

2006-12-16 Thread Jive Dadson
Sandra-24 wrote: Try the wxPython mailing list, which you can find on their site. And the best wxPython reference is the book (also available as an e-book) by Robin Dunn, who created wxPython. Seeing wxPython from his perspective is well worth the money. If I recall correctly he devoted an

Re: How to test if two strings point to the same file or directory?

2006-12-16 Thread Tim Chase
Comparing file system paths as strings is very brittle. Why do you say that? Are you thinking of something like this? /home//user/somedirectory/../file /home/user/file Or even ~/file How complicated do you want to get? If you are thinking about aliases, hard links, shortcuts,

Re: How to test if two strings point to the same file or directory?

2006-12-16 Thread Steven D'Aprano
On Sun, 17 Dec 2006 12:30:15 +1100, Steven D'Aprano wrote: Is there a better way to test if two paths point to the same file or directory (and that will work across platforms?) How complicated do you want to get? If you are thinking about aliases, hard links, shortcuts, SMB shares and

Re: How to test if two strings point to the same file or directory?

2006-12-16 Thread Tim Chase
Comparing file system paths as strings is very brittle. Is there a better way to test if two paths point to the same file or directory (and that will work across platforms?) os.path.samefile(filename1, filename2) os.path.sameopenfile(fileobject1, fileobject2) Nice try, but they

  1   2   >