[ANN] pylint 0.12.2 / astng 0.16.3

2006-11-24 Thread Sylvain Thénault
Hi there ! I'm pleased to announce new bugs fix releases of pylint and astng. Most bug discussed more or less recently on the python-projects mailing list should be fixed by those releases, and astng inference capability has been enhanced for some construction, so upgrade is recommended. Visit

Re: reading id3 tags with python

2006-11-24 Thread LaundroMat
Heh, a description of the error would be nice indeed. Just a preliminary warning: with this code you will also be parsing directories. id3reader can't handle those ofcourse. Better add a check such as eg: if os.path.isfile(os.path.join(directory, file)): # do your thing laundro --

Newbie Developing a Python Extension

2006-11-24 Thread Jeremy
Hi, I have been working on Linux 2.6.9 to adapt a C++ module to work as a Python extension with the following setup.py file: from distutils.core import setup, Extension sm=Extension( 'tdma', define_macros=[('__USE_POSIX199309','1')], include_dirs=['/usr/include','/usr/include/python2.3'],

Re: Is time.time() time.time() always true?

2006-11-24 Thread Hendrik van Rooyen
Tim Roberts [EMAIL PROTECTED] wrote: Hendrik van Rooyen [EMAIL PROTECTED] wrote: flamesrock [EMAIL PROTECTED] wrote: 8-- since the statement itself occurs at one time instant.. nothing, but nothing, can occur at one time instant Well,

Local variables persist in functions?

2006-11-24 Thread 120psi
I'm a bit baffled. Here is a bit of fairly straightforward code: def _chunkify( l, chunkSize, _curList = list() ): print _curList # yay for printf debugging if len( l ) = chunkSize: _curList.append( l ) else: newChunk = l[:chunkSize] _curList.append(

Re: Abelson and Python

2006-11-24 Thread cfbolz
Fredrik Lundh schrieb: markscottwright wrote: If it were that easy, the PyPy guys would be done by now. if the PyPy guys had focused on writing a Python interpreter in Python, they'd been done by now. /F The Python interpreter in Python part of PyPy _is_ done. Since quite a while even

Re: Local variables persist in functions?

2006-11-24 Thread Duncan Booth
[EMAIL PROTECTED] wrote: Considering the default value of _curList, these statements should be identical. Any pointers? Did I miss something in the python reference manual? (running 2.4.3, fyi) See the FAQ:

Re: Access to variable from external imported module

2006-11-24 Thread John Machin
jim-on-linux wrote: GinTon, I think this is what you want. class Kdoi: Is that a typo? def __init__(self) : self.Fdo() What is all this K and F stuff? def Fdo(self): searchterm = 'help' print searchterm #local self.searchterm = searchterm

Re: Local variables persist in functions?

2006-11-24 Thread John Machin
[EMAIL PROTECTED] wrote: I'm a bit baffled. Here is a bit of fairly straightforward code: def _chunkify( l, chunkSize, _curList = list() ): Quite apart from the default argument problem, which Duncan has addressed, you have some problems with style and variable names. In particular: give

Re: The Python Papers Edition One

2006-11-24 Thread Shane Hathaway
[EMAIL PROTECTED] wrote: Ben Finney wrote: [EMAIL PROTECTED] [EMAIL PROTECTED] writes: Yes, it's true that you can't resell copies of The Python Papers for personal profits, but you may derive from it, reproduce and propagate it. You're quite right to point it out. Then please revise the

Re: Access to variable from external imported module

2006-11-24 Thread robert
GinTon wrote: Thanks Robert, the best solution is get all local variables, else is impossible access to them. For test purposes/ex post inspection you could also uncomment the line in: def f(a=1): b=2 c=3 #globals().update(locals()) return a+b -- then it is more easy and you

Re: Local variables persist in functions?

2006-11-24 Thread robert
[EMAIL PROTECTED] wrote: I'm a bit baffled. Here is a bit of fairly straightforward code: def _chunkify( l, chunkSize, _curList = list() ): print _curList # yay for printf debugging if len( l ) = chunkSize: _curList.append( l ) else: newChunk = l[:chunkSize]

Re: socket.error connection refused

2006-11-24 Thread Vania
For anyone interested restarting windows fixed the connection problem. -- http://mail.python.org/mailman/listinfo/python-list

Modules - Jython Vs Python?

2006-11-24 Thread Patrick Finnegan
How many of the Python modules written in C have been rewritten and and ported to Java to run under Jython? I am talking about SMTP, LDAP, WIN2K,XML etc. Is there a list anywhere ? Thanks Patrick. -- http://mail.python.org/mailman/listinfo/python-list

Re: socket.error connection refused

2006-11-24 Thread robert
Vania wrote: Hi, I'm not sure this is the proper forum but I try nevertheless. The problem I'am facing is that the socket library always fail to connect to an URL. The net effect is that I can not use setuptools. I'm using Python2.4 on a windows XPPRO Sp2 machine. The firewall is disabled.

Re: Python work in UK

2006-11-24 Thread vasudevram
Hi, A few suggestions, you may have tried them already: Search for UK Python jobs on major job sites like Monster, Dice, etc. Some (like Monster) have country-specific sites, I think. I know Monster has an India-specific site, it probably also has one for the UK. Have you considered the option

locking bsddb objects

2006-11-24 Thread Antoon Pardon
This is a little project using python 2.3.5, I want to use one of the bsddb objects, but I also need to protect against concurrent access and modification. IMO this would be something for fcntl.flock or fcntl.lockf. However the bsddb objects don't provide a fileno method. So how do I protect

Pimping the 'cgi' module (was: Re: python gaining popularity according to a study)

2006-11-24 Thread Christoph Haas
On Thursday 23 November 2006 21:29, robert wrote: When a LAMP programmer comes to Python, there are so many different confusing things. It starts with a 'non-documented' cgi module - a 'High-Level-Interface', that cannot even iterate over the form items. A name ZOPE in focus which reveals to

bz2.readline() slow ?

2006-11-24 Thread Soeren Sonnenburg
Dear all, I am a bit puzzled, as -snip- import bz2 f=bz2.BZ2File('data/data.bz2'); while f.readline(): pass -snip- takes twice the time (10 seconds) to read/decode a bz2 file compared to -snip- import bz2 f=bz2.BZ2File('data/data.bz2'); x=f.readlines()

Re: The Python Papers Edition One

2006-11-24 Thread Paul Boddie
Shane Hathaway wrote: IMHO your licensing terms are fine; you don't need to switch from the CC license. Just avoid the term free as in freedom, since the Free Software Foundation has assigned that phrase a very specific meaning. Agreed. It should also be noted that Debian - amongst the

Re: Local variables persist in functions?

2006-11-24 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: chunks = _chunkify( list, size ) # _curList keeps its previous value! chunks = _chunkify( list, size, list() )# this works as expected Considering the default value of _curList, these statements should be identical. Any pointers?

Re: Simple threading

2006-11-24 Thread jrpfinch
Thank you for your help - the application is proceeding well. -- http://mail.python.org/mailman/listinfo/python-list

Re: Pimping the 'cgi' module (was: Re: python gaining popularity according to a study)

2006-11-24 Thread Paul Boddie
Christoph Haas wrote: On Thursday 23 November 2006 21:29, robert wrote: When a LAMP programmer comes to Python, there are so many different confusing things. It starts with a 'non-documented' cgi module - a 'High-Level-Interface', that cannot even iterate over the form items. A name ZOPE

Active State and Komodo...

2006-11-24 Thread Steve Thompson
Hello all, I was wondering the differnced there were betwee Active State's python and the open source version of python. Would I have to unistall my opend souce python? Additonally, how does Active State's Komodo IDE vs. the eric3 IDE unler SuSE Linux v. 10.i? Addionally, is the eric IDE

Re: Email headers and non-ASCII characters

2006-11-24 Thread Christoph Haas
On Thursday 23 November 2006 16:31, Max M wrote: Christoph Haas skrev: Hello, everyone... I'm trying to send an email to people with non-ASCII characters in their names. A recpient's address may look like: Jörg Nørgens [EMAIL PROTECTED] My example code:

Re: Python work in UK

2006-11-24 Thread Gerard Flanagan
Will McGugan wrote: Hi, I'd love to work in Python, for the sake of my blood pressure, but there doesnt seem to be that many jobs that look for Python as the main skill. I use Python at work from time to time, and occasionaly get to spend several days on a Python project but the majority

Re: Pimping the 'cgi' module

2006-11-24 Thread robert
Christoph Haas wrote: On Thursday 23 November 2006 21:29, robert wrote: When a LAMP programmer comes to Python, there are so many different confusing things. It starts with a 'non-documented' cgi module - a 'High-Level-Interface', that cannot even iterate over the form items. A name ZOPE in

Re: socket.error connection refused

2006-11-24 Thread Vania
Thanks for the explanation. Probably the fact that I was working inside a virtual machine didn't help. Vania robert ha scritto: Vania wrote: Hi, I'm not sure this is the proper forum but I try nevertheless. The problem I'am facing is that the socket library always fail to connect to an

Re: The Python Papers Edition One

2006-11-24 Thread Carl Banks
Shane Hathaway wrote: Just avoid the term free as in freedom, since the Free Software Foundation has assigned that phrase a very specific meaning. Bah. FSF is not an arbiter of the language. People whose idea of free differs from FSF's still need to differentiate it from the monetary sense of

Re: Pimping the 'cgi' module

2006-11-24 Thread Christoph Haas
On Friday 24 November 2006 13:08, robert wrote: well, note, for that they have named it Ruby-On-Rails, so its still the language - leveraged. While it is Zope/Django/Ego-on-Python ... ? If by that you mean that neither Zope nor Django are exactly pythonic I think I concur. Unless a Guido'ed

Re: Email headers and non-ASCII characters

2006-11-24 Thread Leo Kislov
Christoph Haas wrote: Hello, everyone... I'm trying to send an email to people with non-ASCII characters in their names. A recpient's address may look like: Jörg Nørgens [EMAIL PROTECTED] My example code: = def sendmail(sender, recipient, body, subject):

NFS server

2006-11-24 Thread srj
i wish to develop an NFS server usin python from scratch( some wise guy told me i'ts easy!). can i get any kinda tutorial for this?? any suggestions on how 2 begin? -- http://mail.python.org/mailman/listinfo/python-list

Re: Email headers and non-ASCII characters

2006-11-24 Thread Max M
Christoph Haas skrev: On Thursday 23 November 2006 16:31, Max M wrote: Christoph Haas skrev: Hello, everyone... I'm trying to send an email to people with non-ASCII characters in their names. A recpient's address may look like: Jörg Nørgens [EMAIL PROTECTED] My example code:

Re: socket.error connection refused

2006-11-24 Thread Bjoern Schliessmann
Vania wrote: For anyone interested restarting windows fixed the connection problem. Some nifty firewall software? 8) Regards, Björn -- BOFH excuse #78: Yes, yes, its called a design limitation -- http://mail.python.org/mailman/listinfo/python-list

Re: Abelson and Python

2006-11-24 Thread Chris Mellon
On 11/23/06, Scott David Daniels [EMAIL PROTECTED] wrote: markscottwright wrote: Fredrik Lundh wrote: markscottwright wrote: If it were that easy, the PyPy guys would be done by now. if the PyPy guys had focused on writing a Python interpreter in Python, they'd been done by now.

Re: NFS server

2006-11-24 Thread Diez B. Roggisch
srj wrote: i wish to develop an NFS server usin python from scratch( some wise guy told me i'ts easy!). can i get any kinda tutorial for this?? any suggestions on how 2 begin? Ask the wise guy. All others install an NFS server. Diez -- http://mail.python.org/mailman/listinfo/python-list

How do I access a main frunction from an import module?

2006-11-24 Thread Jim
Hi, I have created an import module. And would like to access a function from the main script, e.g., file abc.py: ### def a(): m() return None file main.py: # from abc import * def m(): print 'something' return None a()

Re: How do I access a main frunction from an import module?

2006-11-24 Thread robert
Jim wrote: Hi, I have created an import module. And would like to access a function from the main script, e.g., file abc.py: ### def a(): m() return None file main.py: # from abc import * def m(): print

Re: Pimping the 'cgi' module

2006-11-24 Thread Fredrik Lundh
Christoph Haas wrote: well, note, for that they have named it Ruby-On-Rails, so its still the language - leveraged. While it is Zope/Django/Ego-on-Python ... ? If by that you mean that neither Zope nor Django are exactly pythonic I think I concur. Django is highly Pythonic (it's pure Python

Re: Abelson and Python

2006-11-24 Thread Fredrik Lundh
Chris Mellon wrote; Now, writing a compiler/interpreter from the ground up is a more valuable experience, but does it really matter if the language is the same one you wrote the compiler in? It gets harder the more complicated the syntax and semantics of the language are, but, say, python

Re: How do I access a main frunction from an import module?

2006-11-24 Thread Carl Banks
Jim wrote: I have created an import module. And would like to access a function from the main script, e.g., file abc.py: ### def a(): m() return None file main.py: # from abc import * def m(): print 'something'

Re: How do I access a main frunction from an import module?

2006-11-24 Thread Anton Vredegoor
Jim wrote: I have created an import module. And would like to access a function from the main script, e.g., file abc.py: ### def a(): m() return None file main.py: # from abc import * def m(): print 'something'

Re: Active State and Komodo...

2006-11-24 Thread BartlebyScrivener
Steve Thompson wrote: I was wondering the differnced there were betwee Active State's python and the open source version of python. The biggest difference at the moment is that ActiveState is still using Python 2.4.3 in their distribution. They should be coming out with 2.5 soon. Sounds like

Re: Local variables persist in functions?

2006-11-24 Thread 120psi
http://www.python.org/doc/faq/general.html#why-are-default-values-shared-between-objects Thanks for the link. I think I'll stick to None as the default value, as that's a good way to keep the usability and make my code work ;) -- http://mail.python.org/mailman/listinfo/python-list

Re: Pimping the 'cgi' module

2006-11-24 Thread Thomas Guettler
Christoph Haas wrote: ... Oh, yeah. I just joined the Web SIG and found out that WSGI seems the way to go. ... I don't want a standard, i want *one* implementation. In the Java world, there are a lot of standards and N*standards implementations. In the end you have the opposite of what a

Re: Local variables persist in functions?

2006-11-24 Thread 120psi
John Machin wrote: [EMAIL PROTECTED] wrote: I'm a bit baffled. Here is a bit of fairly straightforward code: def _chunkify( l, chunkSize, _curList = list() ): Quite apart from the default argument problem, which Duncan has addressed, you have some problems with style and variable

Re: fast listdir stat

2006-11-24 Thread [EMAIL PROTECTED]
robert wrote: I want to get the files and sizes and times etc. stats of a dir fast. os.listdir iterating with os.stat seems not to run at optimal speed for network folders. Is there a faster possibility? (both for Win *nix ; best platform independent) Robert An alternative is to work

Re: Python work in UK

2006-11-24 Thread Steven Wayne
On Thu, 23 Nov 2006 19:28:26 +, Will McGugan [EMAIL PROTECTED] wrote: Hi, I'd love to work in Python, for the sake of my blood pressure, but there doesnt seem to be that many jobs that look for Python as the main skill. I use Python at work from time to time, and occasionaly get

Re: Active State and Komodo...

2006-11-24 Thread Steve Thompson
On Fri, 24 Nov 2006 06:35:21 -0500, Steve Thompson wrote: Hello all, I was wondering the differnced there were betwee Active State's python and the open source version of python. Would I have to unistall my opend souce python? Additonally, how does Active State's Komodo IDE vs. the eric3

Re: fast listdir stat

2006-11-24 Thread robert
[EMAIL PROTECTED] wrote: robert wrote: I want to get the files and sizes and times etc. stats of a dir fast. os.listdir iterating with os.stat seems not to run at optimal speed for network folders. Is there a faster possibility? (both for Win *nix ; best platform independent) An

synching with os.walk()

2006-11-24 Thread Andre Meyer
Hi all os.walk() is a nice generator for performing actions on all files in a directory and subdirectories. However, how can one use os.walk() for walking through two hierarchies at once? I want to synchronise two directories (just backup for now), but cannot see how I can traverse a second one.

ANNOUNCE: WSGI XSS Prevention Middleware

2006-11-24 Thread [EMAIL PROTECTED]
Hi, I've just written a python WSGI middleware class to mitigate XSS flaws, it's released under the python license. I've attached the docs below. Cheers Rich. WSGI Middleware class that prevents cross-site scripting flaws in WSGI applications being exploited. Potentially malicious GET and POST

Re: Active State and Komodo...

2006-11-24 Thread Steve Thompson
On Fri, 24 Nov 2006 07:09:36 -0800, BartlebyScrivener wrote: Steve Thompson wrote: I was wondering the differnced there were betwee Active State's python and the open source version of python. The biggest difference at the moment is that ActiveState is still using Python 2.4.3 in their

pexpect problems

2006-11-24 Thread flynnguy
I am trying to essentially fork a rsync process from my python script and I am having some issues with the forking part. My program basically checks to see if I need to transfer a file and if it does, it calls the transferItem() function below: def transferItem(filelist): hostname, passwd,

Re: Pimping the 'cgi' module

2006-11-24 Thread robert
Christoph Haas wrote: On Friday 24 November 2006 13:08, robert wrote: well, note, for that they have named it Ruby-On-Rails, so its still the language - leveraged. While it is Zope/Django/Ego-on-Python ... ? If by that you mean that neither Zope nor Django are exactly pythonic I think I

Re: synching with os.walk()

2006-11-24 Thread 120psi
os.walk() is a nice generator for performing actions on all files in a directory and subdirectories. However, how can one use os.walk() for walking through two hierarchies at once? I want to synchronise two directories (just backup for now), but cannot see how I can traverse a second one. I do

Re: Newbie Developing a Python Extension

2006-11-24 Thread Carl Banks
Jeremy wrote: Hi, I have been working on Linux 2.6.9 to adapt a C++ module to work as a Python extension with the following setup.py file: from distutils.core import setup, Extension sm=Extension( 'tdma', define_macros=[('__USE_POSIX199309','1')],

Re: Pimping the 'cgi' module

2006-11-24 Thread robert
Thomas Guettler wrote: Christoph Haas wrote: ... Oh, yeah. I just joined the Web SIG and found out that WSGI seems the way to go. ... I don't want a standard, i want *one* implementation. In the Java world, there are a lot of standards and N*standards implementations. In the end you

Re: synching with os.walk()

2006-11-24 Thread Paddy
Andre Meyer wrote: Hi all os.walk() is a nice generator for performing actions on all files in a directory and subdirectories. However, how can one use os.walk() for walking through two hierarchies at once? I want to synchronise two directories (just backup for now), but cannot see how I

Invoking Python from Cygwin problem.

2006-11-24 Thread Ant
Hi all, Using cygwin and Python 2.5, I have the following scripts, one bash script and the other a python script: --- #!/bin/bash TEST_VAR=`./test.py` TEST_VAR2=Test2 echo Test var: $TEST_VAR OK echo Test var2:

Re: How do I access a main frunction from an import module?

2006-11-24 Thread Bjoern Schliessmann
Jim wrote: I have created an import module. And would like to access a function from the main script, e.g., May I ask why? This style violates normal module philosophy. Regards, Björn -- BOFH excuse #307: emissions from GSM-phones -- http://mail.python.org/mailman/listinfo/python-list

Re: NFS server

2006-11-24 Thread Bjoern Schliessmann
srj wrote: i wish to develop an NFS server usin python from scratch( some wise guy told me i'ts easy!). That wise guy must be very wise, or stupid 8) can i get any kinda tutorial for this?? any suggestions on how 2 begin? - Read RFCs about NFS - Read the Python tutorial - If you want it

Re: synching with os.walk()

2006-11-24 Thread Paddy
Paddy wrote: Andre Meyer wrote: Hi all os.walk() is a nice generator for performing actions on all files in a directory and subdirectories. However, how can one use os.walk() for walking through two hierarchies at once? I want to synchronise two directories (just backup for now),

Re: reading id3 tags with python

2006-11-24 Thread jeff
well, heres the error:: ## Traceback (most recent call last): File ./main.py, line 28, in ? info = id3.Reader(file) File /home/jeffrey/Documents/Music/.rename/id3reader.py, line 187, in __init__ self._readId3() File /home/jeffrey/Documents/Music/.rename/id3reader.py, line 306, in

Re: Pimping the 'cgi' module

2006-11-24 Thread robert
Fredrik Lundh wrote: Christoph Haas wrote: well, note, for that they have named it Ruby-On-Rails, so its still the language - leveraged. While it is Zope/Django/Ego-on-Python ... ? If by that you mean that neither Zope nor Django are exactly pythonic I think I concur. Django is highly

Re: synching with os.walk()

2006-11-24 Thread Thomas Ploch
os.walk() is a nice generator for performing actions on all files in a directory and subdirectories. However, how can one use os.walk() for walking through two hierarchies at once? I want to synchronise two directories (just backup for now), but cannot see how I can traverse a second one. I

Re: Active State and Komodo...

2006-11-24 Thread BartlebyScrivener
Steve Thompson wrote: On Fri, 24 Nov 2006 06:35:21 -0500, Steve Thompson wrote: Addionally, is the eric IDE (version 3) an acceptible IDE or are there more easy and more productive IDE's for perl? Perl? You're on a Python list? Anyway, the subject of IDEs comes up every other day. If you

Re: Local variables persist in functions?

2006-11-24 Thread Paul McGuire
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I'm a bit baffled. Here is a bit of fairly straightforward code: def _chunkify( l, chunkSize, _curList = list() ): print _curList # yay for printf debugging Check out Winpdb at http://www.digitalpeers.com/pythondebugger/. --

Re: synching with os.walk()

2006-11-24 Thread Andre Meyer
That sounds like a good approach. On 24 Nov 2006 08:27:09 -0800, Paddy [EMAIL PROTECTED] wrote: Andre Meyer wrote: Hi all os.walk() is a nice generator for performing actions on all files in a directory and subdirectories. However, how can one use os.walk() for walking through two

Re: Python popenX() slowness on AIX?

2006-11-24 Thread allenjo5
Stefaan A Eeckels wrote: On 21 Nov 2006 13:02:14 -0800 [EMAIL PROTECTED] wrote: The fact that it does this in Python code instead of C is the main cause of the slowness. So, unless Python is changed to do this in C, it's always going to be slow on AIX :-( I guess that the reason it's

Re: synching with os.walk()

2006-11-24 Thread Andre Meyer
What I forgot to mention is that I want this to run unmodified from both Windows and Linux (and Mac). Otherwise, there are enough options to choose from, besides developing it myself, I guess. On 24 Nov 2006 08:37:13 -0800, Paddy [EMAIL PROTECTED] wrote: Paddy wrote: Andre Meyer wrote:

Re: synching with os.walk()

2006-11-24 Thread Paddy
Paddy wrote: P.S. If you are on a Unix type system you can use tar to do the copying as you can easily compress the data if it needs to go over a sow link, Sow links, transfers your data and then may form a tasty sandwich when cooked. (The original should, of course, read ...slow...) - Pad.

Re: synching with os.walk()

2006-11-24 Thread Andre Meyer
Cool, this seems to work. thanks! On 24 Nov 2006 08:12:08 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: os.walk() is a nice generator for performing actions on all files in a directory and subdirectories. However, how can one use os.walk() for walking through two hierarchies at once?

Re: Modules - Jython Vs Python?

2006-11-24 Thread Khalid Zuberi
Patrick Finnegan writes: How many of the Python modules written in C have been rewritten and and ported to Java to run under Jython? I am talking about SMTP, LDAP, WIN2K,XML etc. Is there a list anywhere ? There's a list on the jython wiki of absent modules:

Re: How do I access a main frunction from an import module?

2006-11-24 Thread Jim
Bjoern Schliessmann wrote: Jim wrote: I have created an import module. And would like to access a function from the main script, e.g., May I ask why? This style violates normal module philosophy. Regards, Björn -- BOFH excuse #307: emissions from GSM-phones Application abc is

Re: Active State and Komodo...

2006-11-24 Thread hg
Steve Thompson wrote: On Fri, 24 Nov 2006 07:09:36 -0800, BartlebyScrivener wrote: Steve Thompson wrote: I was wondering the differnced there were betwee Active State's python and the open source version of python. The biggest difference at the moment is that ActiveState is still using

Pydev configuration

2006-11-24 Thread Sébastien Boisgérault
Hi, Did anyone managed to change the code font family/size in Pydev (Python Editor Plugin for Eclipse) ? I found how to change the color mapping (Windows/Preference/Pydev) but did not found the font setting. Cheers, SB -- http://mail.python.org/mailman/listinfo/python-list

Re: Access to variable from external imported module

2006-11-24 Thread jim-on-linux
On Friday 24 November 2006 03:30, John Machin wrote: jim-on-linux wrote: GinTon, I think this is what you want. class Kdoi: Is that a typo? No, it's a style. life seems to be easier to me if one is consistent, all my classes begin with K. def __init__(self) :

Re: How do I access a main frunction from an import module?

2006-11-24 Thread John Machin
Jim wrote: Hi, I have created an import module. And would like to access a function from the main script, e.g., file abc.py: ### def a(): m() return None file main.py: # from abc import * def m(): print

Re: Access to variable from external imported module

2006-11-24 Thread jim-on-linux
On Friday 24 November 2006 13:01, jim-on-linux wrote: On Friday 24 November 2006 03:30, John Machin wrote: jim-on-linux wrote: GinTon, I think this is what you want. class Kdoi: Is that a typo? No, it's a style. life seems to be easier to me if one is

Re: How do I access a main frunction from an import module?

2006-11-24 Thread Fredrik Lundh
Jim wrote: Application abc is designed as a complete module. The user is to script their own functions to work with application abc. so use execfile() with a prepared namespace: namespace = { ...stuff to export to the module ... } execfile(directory/module.py, namespace) /F --

Re: How do I access a main frunction from an import module?

2006-11-24 Thread Jim
John Machin wrote: Jim wrote: Hi, I have created an import module. And would like to access a function from the main script, e.g., file abc.py: ### def a(): m() return None file main.py: # from abc

Re: Access to variable from external imported module

2006-11-24 Thread jim-on-linux
On Friday 24 November 2006 13:20, jim-on-linux wrote: On Friday 24 November 2006 13:01, jim-on-linux wrote: On Friday 24 November 2006 03:30, John Machin wrote: jim-on-linux wrote: GinTon, I think this is what you want. class Kdoi: Is that a typo?

Re: How do I access a main frunction from an import module?

2006-11-24 Thread Steve
This is an interesting question. It almost looks like a case of event-driven programming, where main is the plug-in and abc is the framework. http://eventdrivenpgm.sourceforge.net/ So how about something like this: ## abc.py

Re: Access to variable from external imported module

2006-11-24 Thread John Machin
jim-on-linux wrote: On Friday 24 November 2006 03:30, John Machin wrote: jim-on-linux wrote: GinTon, I think this is what you want. class Kdoi: Is that a typo? No, it's a style. life seems to be easier to me if one is consistent, all my classes begin with K.

cron job times out

2006-11-24 Thread Nikola Skoric
Hello, I have a few lines of code retrieving a web page and saving some variables from it to a log. And everything works nice from command line. but, when I make a cron job, I get an error: Your cron job on fly cd $HOME/bin/ ; python newartlog.py ; cd produced the following output: Traceback

Re: Trying to understand Python objects

2006-11-24 Thread Aahz
In article [EMAIL PROTECTED], Bruno Desthuilliers [EMAIL PROTECTED] wrote: Aahz a écrit : In article [EMAIL PROTECTED], Ben Finney [EMAIL PROTECTED] wrote: Typically, classes are created as a subclass of another class. The top-level basic type in Python is 'object', so if your class doesn't

Re: How do I access a main frunction from an import module?

2006-11-24 Thread John Machin
Jim wrote: John Machin wrote: Jim wrote: Hi, I have created an import module. And would like to access a function from the main script, e.g., file abc.py: ### def a(): m() return None file main.py:

Re: SQLite3__Python2.3-SQLite__Problem

2006-11-24 Thread Cousin Stanley
SQLite3 data bases created via the command line and those created using the python2.3-sqlite package version 1.0.1-2 from within a Python program are not compatible with each other If I create an SQLite3 data base from the command line and populate it with data,

Re: Pydev configuration

2006-11-24 Thread tool69
Sébastien Boisgérault a écrit : Hi, Did anyone managed to change the code font family/size in Pydev (Python Editor Plugin for Eclipse) ? I found how to change the color mapping (Windows/Preference/Pydev) but did not found the font setting. Cheers, SB Salut Sébastien,

Re: SQLite3__Python2.3-SQLite__Problem

2006-11-24 Thread John Machin
Cousin Stanley wrote: It's been almost 2 years since I've done anything with Python and SQLite and I'm having some problems that I don't recall from my last usage It seems that SQLite3 data bases created at the command line and those created using the sqlite module from within

Re: SQLite3__Python2.3-SQLite__Problem

2006-11-24 Thread Jonathan Ballet
Le Fri, 24 Nov 2006 13:18:14 -0600, Cousin Stanley [EMAIL PROTECTED] a écrit : This problem is occuring under Debian GNU/Linux Sarge using Python 2.3 Hi, if you look at http://packages.debian.org/stable/python/python2.3-sqlite, you will see that the python2.3-sqlite package is

Re: Active State and Komodo...

2006-11-24 Thread John Machin
Steve Thompson wrote: Hello all, I was wondering the differnced there were betwee Active State's python and the open source version of python. Would I have to unistall my opend souce python? Additonally, how does Active State's Komodo IDE vs. the eric3 IDE unler SuSE Linux v. 10.i?

Re: Pydev configuration

2006-11-24 Thread Sébastien Boisgérault
On Nov 24, 9:42 pm, tool69 [EMAIL PROTECTED] wrote: Sébastien Boisgérault a écrit : Hi, Did anyone managed to change the code font family/size in Pydev (Python Editor Plugin for Eclipse) ? I found how to change the color mapping (Windows/Preference/Pydev) but did not found the font

Re: How good is CORBA?

2006-11-24 Thread Piet van Oostrum
Chris Mellon [EMAIL PROTECTED] (CM) wrote: CM FYI: Ice is available under the GPL, so if by pay you mean pay CM money that's not your only option. You can also get a commercial CM license, similiar to Qt. CM I like Ice a lot, it's got hardly any of the ramp up time and learning CM curve that

Re: Active State and Komodo...

2006-11-24 Thread hg
John Machin wrote: Steve Thompson wrote: Hello all, I was wondering the differnced there were betwee Active State's python and the open source version of python. Would I have to unistall my opend souce python? Additonally, how does Active State's Komodo IDE vs. the eric3 IDE unler SuSE

Re: Access to variable from external imported module

2006-11-24 Thread jim-on-linux
On Friday 24 November 2006 13:41, John Machin wrote: jim-on-linux wrote: On Friday 24 November 2006 03:30, John Machin wrote: jim-on-linux wrote: GinTon, I think this is what you want. class Kdoi: Is that a typo? No, it's a style. life seems to

Re: synching with os.walk()

2006-11-24 Thread Antoine De Groote
Andre Meyer wrote: Hi all os.walk() is a nice generator for performing actions on all files in a directory and subdirectories. However, how can one use os.walk() for walking through two hierarchies at once? I want to synchronise two directories (just backup for now), but cannot see how I

Installing CVXOPT

2006-11-24 Thread [EMAIL PROTECTED]
hi, how can I install and start using CVXOPT. I have python 2.5 version installed. what else do i need to download and install for CVXOPT. thanks amit -- http://mail.python.org/mailman/listinfo/python-list

Re: Python popenX() slowness on AIX?

2006-11-24 Thread Stefaan A Eeckels
On 24 Nov 2006 09:03:41 -0800 [EMAIL PROTECTED] wrote: Stefaan A Eeckels wrote: On 21 Nov 2006 13:02:14 -0800 [EMAIL PROTECTED] wrote: The fact that it does this in Python code instead of C is the main cause of the slowness. So, unless Python is changed to do this in C, it's

  1   2   >