Re: The Python Papers Edition One

2006-11-24 Thread Robert Kern
Maurice LING wrote: > As Steven mentioned -- anything you can read is copyrighted. The > difference is whether is the copyright effective or enforceable. What do > I mean by this? Without copyright, there will not be plagarism. Ask > yourself this question, can you copy William Shakespeare's Mac

Re: How to pass a boolean to a stored proc using Cx_Oracle?

2006-11-24 Thread Gabriel Genellina
At Wednesday 22/11/2006 15:37, JG wrote: I am using Python 2.4 and cx_Oracle. I have a stored proc that takes two arguments. First is an NUMBER, second is a BOOLEAN. How do you call that stored procedure? After properly extablishing a connection, I have something like this: cursor = con.cur

Re: The Python Papers Edition One

2006-11-24 Thread Maurice LING
Jerry Hill wrote: > On 11/25/06, Jerry Hill <[EMAIL PROTECTED]> wrote: > >> On 23 Nov 2006 15:09:11 -0800, [EMAIL PROTECTED] >> <[EMAIL PROTECTED]> wrote: >> > 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 prop

Re: combining the path and fileinput modules

2006-11-24 Thread Gabriel Genellina
At Saturday 25/11/2006 00:14, wo_shi_big_stomach wrote: > The filter should be applied to walkfiles. Something like this: > > dir = path(/home/wsbs/Maildir) > for f in filter(os.path.isfile, dir.walkfiles('*')): > # > # test: > # print f Thanks, this way f will print the

Re: Does only emacs and idle support symbolic debugging?

2006-11-24 Thread Gabriel Genellina
At Thursday 23/11/2006 14:47, Bytter wrote: PyScripter (windows only) here: http://mmm-experts.com/Products.aspx?ProductId=4 On Nov 23, 4:00 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Victor Ng wrote: > > Subject line pretty much says it all - are those the only two editors > > that su

Re: Simple threading

2006-11-24 Thread Gabriel Genellina
At Thursday 23/11/2006 12:28, jrpfinch wrote: I'm just getting started on threading and was wondering why the following code does not work (i know globals is bad style - I'll eliminate them eventually). All I get is a blank cursor flashing. You've got your example already working. Globals are

Re: The Python Papers Edition One

2006-11-24 Thread Steven D'Aprano
On Sat, 25 Nov 2006 00:27:24 -0500, Jerry Hill wrote: > On 11/25/06, Jerry Hill <[EMAIL PROTECTED]> wrote: >> On 23 Nov 2006 15:09:11 -0800, [EMAIL PROTECTED] >> <[EMAIL PROTECTED]> wrote: >> > Yes, it's true that you can't resell copies of The Python Papers for >> > personal profits, but you may

Re: The Python Papers Edition One

2006-11-24 Thread Jerry Hill
On 11/25/06, Jerry Hill <[EMAIL PROTECTED]> wrote: > On 23 Nov 2006 15:09:11 -0800, [EMAIL PROTECTED] > <[EMAIL PROTECTED]> wrote: > > 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

Re: [IronPython] [ANN] IronPython Community Edition r4

2006-11-24 Thread Bill64bits
How do you install this? Just copy on top of the current IP directory? What is DefRoot.sp1 for? - Original Message - From: Sanghyeon Seo To: Discussion of IronPython ; python-list@python.org Sent: Monday, November 20, 2006 5:26 AM Subject: [IronPython] [ANN] IronPython Communit

Re: Using SimpleXMLRPCServer in a Windows Service

2006-11-24 Thread Gabriel Genellina
At Thursday 23/11/2006 06:52, Rudy Schockaert wrote: After some Googling I found a post of someone who wanted to do exactly as what I want to do now. There is however a problem in his code that makes the service fails after the first connection. I slightly modified his code and now I can run the

Re: combining the path and fileinput modules

2006-11-24 Thread wo_shi_big_stomach
Gabriel Genellina wrote: > The filter should be applied to walkfiles. Something like this: > > dir = path(/home/wsbs/Maildir) > for f in filter(os.path.isfile, dir.walkfiles('*')): > # > # test: > # print f Thanks, this way f will print the full pathname/filename. But f a

Re: Ruby/Python/REXX as a MUCK scripting language

2006-11-24 Thread Timothy Goddard
Tony Belding wrote: > I'm interested in using an off-the-shelf interpreted language as a > user-accessible scripting language for a MUCK. I'm just not sure if I > can find one that does everything I need. The MUCK must be able to > call the interpreter and execute scripts with it, but the interp

Re: synching with os.walk()

2006-11-24 Thread BartlebyScrivener
Antoine De Groote wrote: > > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/191017 > might be what you are looking for, or at least a starting point... > There's an updated version of this script at pages 403-04 of the Python Cookbook 2nd Edition. rd -- http://mail.python.org/mailman/l

Re: namespace curiosity

2006-11-24 Thread J. Michael Caine
On Friday 24 November 2006 17:45, Dennis Lee Bieber wrote: > About once a week... It's a FAQ entry! Wonderful! Missed that. Thanks for humoring me. Very satisfying explanation, too... but what else is one to expect from Python? :) -- http://mail.python.org/mailman/listinfo/python-list

Re: combining the path and fileinput modules

2006-11-24 Thread Gabriel Genellina
At Thursday 23/11/2006 12:21, wo_shi_big_stomach wrote: >> dir = path(/home/wsbs/Maildir) >> for f in dir.walkfiles('*'): >> # >> # test: >> # print f > > Are you absolutely sure that f list doesn't contain > any path to directory, not file? > Add this: > > f = filter(os.p

Re: windows background process

2006-11-24 Thread Gabriel Genellina
At Wednesday 22/11/2006 22:05, Podi wrote: Some update... I just found out that the following seems to work, import subprocess subprocess.Popen(' myargs', executable='mycmd.exe') However, it does not work with "my path\\mycmd.exe" subprocess.Popen(' myargs', executable='"my path\\mycmd.exe"'

Re: windows background process

2006-11-24 Thread Gabriel Genellina
At Wednesday 22/11/2006 21:27, Podi wrote: 3. os.spawnl(os.P_NOWAIT, 'mycmd.exe', 'myargs') # mycmd.exe not started os.spawnv(os.P_NOWAIT, 'mycmd.exe', tuple('myargs')) # mycmd.exe not started os.spawnl(os.P_NOWAIT, 'mycmd.exe', 'mycmd.exe', 'first_arg', 'second_arg') That is, you must provide

mouse clicks in console window delayed

2006-11-24 Thread ludwig . frank
Hi, I am attempting to detect mouse clicks from within curses, using "select" on sys.stdin. It is working great within an xterm under X, but not very well in a "real" linux console. When I click my mouse while on the "real" console, nothing happens at first, even on repeated clicks. Once I press a

Re: Getting exceptions back from calls to embedded python

2006-11-24 Thread Gabriel Genellina
At Wednesday 22/11/2006 10:00, [EMAIL PROTECTED] wrote: I have an application that is using embedded python to offer some scripting ability. An API is exposed via SWIG, and I am accessing that API from my embedded python interpreter. Scripts are present as separate files, and I'm invoking them

Re: SQLite3__Python2.3-SQLite__Problem

2006-11-24 Thread Cousin Stanley
> if you look at > http://packages.debian.org/stable/python/python2.3-sqlite, > you will see that the python2.3-sqlite package is built against > SQLite 2. This is why you have a "file is encrypted or is not a > database" message, since databases created with SQLite 2.x are not > file-compatible w

Re: SQLite3__Python2.3-SQLite__Problem

2006-11-24 Thread Cousin Stanley
>> >> I thought I remembered that the data bases created either way >> were always 100% transparent with each other and that I could >> use an SQLite3 data base either from the command line or from >> within Python without any problems at all > > My guess is that 2 years ago you

namespace curiosity

2006-11-24 Thread J. Michael Caine
I just noticed something that may well have an obvious explanation (apologies in advance if so). Little demo illustrates: >>> def x(y = {1:1}): ... y[1] = y[1] + 1 ... print y[1] ... >>> x() 2 >>> x() 3 and so on; y continues to be updated rather than reset each call to x(). dir() sug

Re: Capture file descriptors while running an external program

2006-11-24 Thread Gabriel Genellina
At Wednesday 22/11/2006 09:40, [EMAIL PROTECTED] wrote: I have a problem with the module subprocess! The problem is that the external software that I am running under subprocess.Popen opens stdin, stdout, stderr, and other file descriptors to write and read in the hard drive. As many other pro

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

2006-11-24 Thread Jim
Steve wrote: > 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 > > #-

Ruby/Python/REXX as a MUCK scripting language

2006-11-24 Thread Tony Belding
I'm interested in using an off-the-shelf interpreted language as a user-accessible scripting language for a MUCK. I'm just not sure if I can find one that does everything I need. The MUCK must be able to call the interpreter and execute scripts with it, but the interpreter must also be able t

Re: File upload from client application (non-form based upload)

2006-11-24 Thread Gabriel Genellina
At Wednesday 22/11/2006 09:08, [EMAIL PROTECTED] wrote: I'm trying to write a Python script to receive and save a file on a web server that has been POST'ed from a client application. In essence, this is similar to handling a file upload from an HTML form. However, I can't use: form = cgi.Fiel

Re: Access to variable from external imported module

2006-11-24 Thread jim-on-linux
The TRS-80 I bought came with both Basic and Assembly Language teaching guides, and that was it. To make the machine work one had to program. I didn't mean to imply that Bill Gates developed it. It's well known that MS borrowed stuff when they needed to from where ever the could get it. That's

Re: Access to variable from external imported module

2006-11-24 Thread Steven D'Aprano
On Fri, 24 Nov 2006 16:56:58 -0500, jim-on-linux wrote: > Correct but when writing one must be clear. [jaw drops] Given the number of typos your posts include, the mock accent, the nonsensical sentences, the annoying hard-to-read coding conventions, and the sheer number of grammatical errors in

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

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

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

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

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 learn

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

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

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 wit

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

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

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

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 i

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

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 m

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

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

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

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

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

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

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

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

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: http://wiki.python.org

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 on

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

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

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 o

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

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 30

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

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

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

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

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 ho

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 th

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')], > include_dirs=['/usr/inclu

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

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

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

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

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

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.

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

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 eric

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 occasiona

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

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 varia

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 st

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

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(): > pri

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

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

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

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

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

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

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

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

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

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 sen

  1   2   >