[ANN] ConfigObj update - v3.2.5

2005-02-15 Thread fuzzyman
ConfigObj has had another update - now version 3.2.5 This update includes 3 bugfixes and several new features. Because of the bugfixes it's reccomended for all users. New features include - lines can now be broken over two or more lines, initial and final comments in a config file are preserved

Re: calculate with date

2005-02-15 Thread Fredrik Lundh
Detlef Jockheck wrote: I have a date-string given in format dd.mm.. Now I would like to add 100 days. How can this be solved in python? from datetime import date, timedelta d = date(2005, 2, 15) d datetime.date(2005, 2, 15) d + timedelta(days=100) datetime.date(2005, 5, 26) more

Re: calculate with date

2005-02-15 Thread Robert Kern
Detlef Jockheck wrote: Hi, I have a date-string given in format dd.mm.. Now I would like to add 100 days. How can this be solved in python? import datetime def add100days(datestring): day, month, year = [int(x) for x in datestring.split('.')] date0 = datetime.date(year, month, day)

Re: deepcopy chokes with TypeError on dynamically assigned instance method

2005-02-15 Thread Kanenas
On Sun, 13 Feb 2005 12:01:42 +1000, Nick Coghlan [EMAIL PROTECTED] wrote: True. It wouldn't cause a problem within my __init__, since the attribute is reassigned after the deepcopy, though should anyone else deepcopy an instance... Definitely better that the deepcopy throws the

Re: check if object is number

2005-02-15 Thread Antoon Pardon
Op 2005-02-11, Steven Bethard schreef [EMAIL PROTECTED]: George Sakkis wrote: Steven Bethard [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Is there a good way to determine if an object is a numeric type? In your example, what does your application consider to be numeric?

StringIO objects sharing a buffer

2005-02-15 Thread Thomas Lotze
Hi, I want to implement a tokenizer for some syntax. So I thought I'd subclass StringIO and make my new class return tokens on next(). However, if I want to read tokens from two places in the string in turns, I'd either need to do some housekeeping of file pointers outside the tokenizer class

MDaemon Warning - virus found: Mail System Error - Returned Mail

2005-02-15 Thread press . xpress
*** WARNING ** Este mensaje ha sido analizado por MDaemon AntiVirus y ha encontrado un fichero anexo(s) infectado(s). Por favor revise el reporte de abajo. AttachmentVirus name Action taken

[ANN] IPython 0.6.11 is out.

2005-02-15 Thread Fernando Perez
Hi all, I'm glad to announce the release of IPython 0.6.11. IPython's homepage is at: http://ipython.scipy.org and downloads are at: http://ipython.scipy.org/dist I've provided RPMs (for Python 2.3 and 2.4, built under Fedora Core 3), plus source downloads (.tar.gz). We now also have a

Copying data between file-like objects

2005-02-15 Thread Thomas Lotze
Hi, another question: What's the most efficient way of copying data between two file-like objects? f1.write(f2.read()) doesn't seem to me as efficient as it might be, as a string containing all the contents of f2 will be created and thrown away. In the case of two StringIO objects, this means

Re: - E02 - Support for MinGW Open Source Compiler

2005-02-15 Thread David Fraser
Pat wrote: Actually, no. We ran into some issues with Python 2.4 that caused us to return to Python 2.3.5. But I would really like to upgrade to Python 2.4. So I started researching the subject before I did anything. If you are telling me that minGW can compile extensions that are compatible

How to implement a file lock ??

2005-02-15 Thread ionel
is there a cross-platform library or module for file locking? or at least a win32 implementation. i'm trying to get a lock on some file in a cgi script. ( i got my data erased a few times :P ) -- ionel. -- http://mail.python.org/mailman/listinfo/python-list

Re: - E02 - Support for MinGW Open Source Compiler

2005-02-15 Thread Duncan Booth
Ilias Lazaridis wrote: In accordance with section 10 of the GPL, Red Hat, Inc. permits programs whose sources are distributed under a license that complies with the Open Source definition to be linked with libcygwin.a without libcygwin.a itself causing the resulting program to be covered by

Re: How to implement a file lock ??

2005-02-15 Thread Fredrik Lundh
ionel [EMAIL PROTECTED] wrote: is there a cross-platform library or module for file locking? or at least a win32 implementation. for windows, see the third example on this page: http://www.effbot.org/librarybook/msvcrt.htm for unix, see: http://www.effbot.org/librarybook/fcntl.htm

Re: os.rename() doesn't work w/unicode??

2005-02-15 Thread fanbanlo
Serge Orlov wrote: fanbanlo wrote: C:\MP3\001.txt - 0.txt C:\MP3\01. ??? - (???).mp3 - 1.mp3 Traceback (most recent call last): File C:\Python24\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py, line 310, in RunScript exec codeObject in __main__.__dict__ File

Re: [PATCH] allow partial replace in string.Template

2005-02-15 Thread Nick Coghlan
Stefan Behnel wrote: Nick Coghlan wrote a) Patches are more likely to be looked at if placed on the SF patch tracker. see your own b), I wanted to discuss them first. Fair enough. Still, when I first tried out the Template class, I immediately stumbled over the fact that the substitute methods

Re: os.rename() doesn't work w/unicode??

2005-02-15 Thread Neil Hodgson
fanbanlo: The filename is supposed to be in Chinese, on NTFS (WinXP). However, when i print it, they are all '???', and that caused os.rename() to break. How to force os.walk to return a list of unicode filename? The convention in the unicode file name support is that calls with unicode

Wow!, This chick is HOT! w?=ge/

2005-02-15 Thread Eve
. -- Want to get laid tonight?? Find local girls now http://www.youandmeswing.com/index.php?ref_id=130 -- aY]O%;h%k -- http://mail.python.org/mailman/listinfo/python-list

Re: [NewBie] Tut0r Thing

2005-02-15 Thread administrata
Daniel Yoo [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... : if you're talking about the tutor at python.org mailing list, it's a mailing list : that you send mail to and get mails from, as explained on the tutor mailing : list page: :

Re: How to implement a file lock ??

2005-02-15 Thread Alan Kennedy
[ionel] is there a cross-platform library or module for file locking? or at least a win32 implementation. i'm trying to get a lock on some file in a cgi script. ( i got my data erased a few times :P ) portalocker - Cross-platform (posix/nt) API for flock-style file locking.

Delivery Status Notification (Failure)

2005-02-15 Thread administrata
Hello. I was about to use tutor-mailing But, When i send to tutor@python.org reply is... This is an automatically generated Delivery Status Notification. Delivery to the following recipients failed. [EMAIL PROTECTED] and the header... From: Sm0kin'_Bull . [EMAIL PROTECTED] To:

Re: Delivery Status Notification (Failure)

2005-02-15 Thread Diez B. Roggisch
administrata wrote: Hello. I was about to use tutor-mailing But, When i send to tutor@python.org That just means that somebody subscribed to that list isn't reachable. Ignore it. Plz HELP me; Please start talking english. This is no l337-script-kiddie forum. -- Regards, Diez B. Roggisch

Re: How to implement a file lock ??

2005-02-15 Thread Miki Tebeka
Hello ionel, is there a cross-platform library or module for file locking? or at least a win32 implementation. i'm trying to get a lock on some file in a cgi script. ( i got my data erased a few times :P ) I'm using: - from os import open as _open, O_CREAT, O_EXCL, O_RDWR

Accessing Objects Based On Their ID

2005-02-15 Thread Tim Daneliuk
This is probably obvious to you Python Geniuses (tm) out there but, it is very late and I am experiencing Brain Fade: Given the ID of an object, is there a way to access it? For example, if we have the ID of a class instance, is there a way to invoke its methods and attributes knowning only that

Re: Accessing Objects Based On Their ID

2005-02-15 Thread Fredrik Lundh
Tim Daneliuk wrote: This is probably obvious to you Python Geniuses (tm) out there but, it is very late and I am experiencing Brain Fade: Given the ID of an object, is there a way to access it? short answer: no. longer answer: write a small C extension that casts an integer (or long

Re: Accessing Objects Based On Their ID

2005-02-15 Thread Fredrik Lundh
longer answer: write a small C extension that casts an integer (or long integer) argument to a PyObject, increments the refcount, and returns the object. here's a pointer to a pointer to such a function, btw: http://mail.python.org/pipermail/python-list/1999-October/013715.html (see

Re: Kill GIL

2005-02-15 Thread Adrian Casey
Aahz wrote: In article [EMAIL PROTECTED], Frans Englich [EMAIL PROTECTED] wrote: Personally I need a solution which touches this discussion. I need to run multiple processes, which I communicate with via stdin/out, simultaneously, and my plan was to do this with threads. Any favorite document

replacing ASP/VBScript with Python

2005-02-15 Thread Peter Maas
I have inherited an extremely messy ASP/VBScript application which is a pain for me to support. Now the customer is thinking about a redesign. I'd like to rewrite the whole thing in Python but the app has to meet some conditions like - IIS frontend - MSSQL db server - Win32 authentication - No

win32gui bug: where to report it?

2005-02-15 Thread George van den Driessche
It's taken me ages to find out why my window, built out of win32all, wasn't receiving any messages. Eventually I found the answer here: http://mail.python.org/pipermail/python-list/2001-October/069451.html The important point being: IIRC you have to pass the return value of the RegisterClass()

MDaemon Warning - virus found: Returned mail: Data format error

2005-02-15 Thread Post Office
*** WARNING ** Este mensaje ha sido analizado por MDaemon AntiVirus y ha encontrado un fichero anexo(s) infectado(s). Por favor revise el reporte de abajo. AttachmentVirus name Action taken

Variables.

2005-02-15 Thread administrata
I wrote this, It's a bit lame though I = Allen me = Allen my = Allen's print \ %s woke up early in the morning. But, it was unusal by %s. %s pillow was with %s. %s didn't want to wake up But, %s tried my best and woke up. it was so amazing! % (I,me,my,me,I,I) raw_input(\n\\t\t\t- The End -)

Re: win32gui bug: where to report it?

2005-02-15 Thread Roger Upole
Win32all is called Pywin32 now, and resides on SourceForge: http://sourceforge.net/projects/pywin32/ Roger George van den Driessche [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] It's taken me ages to find out why my window, built out of win32all, wasn't receiving any

Re: Variables.

2005-02-15 Thread Simon Brunning
On Tue, 15 Feb 2005 04:30:30 -0800 (PST), administrata [EMAIL PROTECTED] wrote: I wrote this, It's a bit lame though I = Allen me = Allen my = Allen's print \ %s woke up early in the morning. But, it was unusal by %s. %s pillow was with %s. %s didn't want to wake up But, %s tried my

Re: win32gui bug: where to report it?

2005-02-15 Thread Peter Hansen
George van den Driessche wrote: This is a bug for which it is pretty much impossible to work out the workaround without being told it, so I'd like to put the workaround in a more easily-found place. But where? win32all doesn't seem to have much documentation, much less a bug database.

Re: replacing ASP/VBScript with Python

2005-02-15 Thread Peter Maas
Peter Maas schrieb: I have inherited an extremely messy ASP/VBScript application which is a pain for me to support. Now the customer is thinking about a redesign. I'd like to rewrite the whole thing in Python but the app has to meet some conditions like [...] Just noticed that this posting doesn't

Re: replacing ASP/VBScript with Python

2005-02-15 Thread Diez B. Roggisch
Just noticed that this posting doesn't contain any questions. Here they are: Any comments? Has anybody done something comparable successfully and give some advice? Thanks in advance. You did not really give much information of what your application does - e.g. for a CMS, I'd strongly

Re: [perl-python] problem: reducing comparison

2005-02-15 Thread Xah Lee
here are the answers: Perl code: sub reduce ($$) { my %hh= %{$_[0]}; # e.g. {'1,2'=[1,2],'5,6'=[5,6],...} my ($j1,$j2)=($_[1]-[0],$_[1]-[1]); # e.g. [3,4] delete $hh{$j1,$j2}; foreach my $k (keys %hh) { $k=~m/^(\d+),(\d+)$/; my ($k1,$k2)=($1,$2); if ($k1==$j1) {

Re: replacing ASP/VBScript with Python

2005-02-15 Thread Peter Maas
Diez B. Roggisch schrieb: You did not really give much information of what your application does - e.g. for a CMS, I'd strongly recommend a zope based solution. Other apps might be better written in other frameworks. It's a procurement app. Users (employees) can search in a product list and

Re: problem: reducing comparison

2005-02-15 Thread Xah Lee
my Python coding is not experienced. In this case, is ps.pop(%d,%d%(j[1],k[1]),0) out of ordinary? if i have long paragraphs of documentation for a function, do i still just attach it below the fun def? Xah Xah Lee wrote: here are the answers: ©Python code. © ©def reduce(pairings, pair):

Re: parsing IMAP responses?

2005-02-15 Thread Alan Kennedy
[Grant Edwards] Is there a library somewhere that impliments the IMAP protocol syntax? [Paul Rubin] It's very messy. [Grant Edwards] It sure is. You'd think something intended to be machine-readable would be easier to parse. IMHO, email is the most disgracefully badly spec'ced application in

Re: Variables.

2005-02-15 Thread bruno modulix
administrata wrote: I wrote this, It's a bit lame though (snip code - see other answers in this thread) raw_input(\n\\t\t\t- The End -) Why on earth are you using raw_input() here ? HELP plz No one can help you if you don't explain your problem. We are not psychic enough to read your mind !-)

Problems in making calulating program.

2005-02-15 Thread administrata
I wrote this to add 2 numbers... print Please input data number1 = int(raw_input( )) number2 = int(raw_input(+ )) total = number1 + number2 print total raw_input() I want to make output like this... 1 + 1 = 2 But, actually... it looks like this... 1 + 1 2 HELP; --

Returned mail: see transcript for details

2005-02-15 Thread krivilli
*** ** A csatolmány ldg.zip I-Worm.Mydoom.R virussal fertõzött, ** a csatolmány törölve lett. *** -- http://mail.python.org/mailman/listinfo/python-list

Re: Problems in making calulating program.

2005-02-15 Thread Michele Simionato
You were on the right track before: look at the tutor mailing list ;) no offence intended, but there is an entire list devoted to this kind of questions Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: replacing ASP/VBScript with Python

2005-02-15 Thread Peter Maas
Peter Maas schrieb: I have inherited an extremely messy ASP/VBScript application which is a pain for me to support. Now the customer is thinking about a redesign. I'd like to rewrite the whole thing in Python but the app has to meet some conditions like - IIS frontend - MSSQL db server - Win32

PythonCard and Py2Exe

2005-02-15 Thread PipedreamerGrey
I've been banging my head against this problem for a week. It's time to ask for help, because I'm obviously not going to solve this by trial and error. I'm trying to create a standalone version (.exe) of PythonCard's Custdb sample using Py2Exe version 0.5.0. Everytime I attempt to compile the

Re: PythonCard and Py2Exe

2005-02-15 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: I've been banging my head against this problem for a week. It's time to ask for help, because I'm obviously not going to solve this by trial and error. I'm trying to create a standalone version (.exe) of PythonCard's Custdb sample using Py2Exe version 0.5.0.

Re: Python UPS / FedEx Shipping Module

2005-02-15 Thread Gabriel Cooper
Tom Willis wrote: On one hand you are helping them indirectly sell their services, On the other, you are sort of competing with them, so, those companies have plenty of reason to screw with you by changing the specs, lot's of hoops to jump through to contiuously be certified. Well before we make

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-15 Thread Ilias Lazaridis
Tim Peters wrote: [Ilias Lazaridis] ... Let's see: The process would be: a) A Python Foundation official states: of course we accept diversity and of course we are intrested that our source-code-base compiles directly with MinGW (and other compilers). Well, I'm a Director of the Python Software

Mail System Error - Returned Mail

2005-02-15 Thread Bounced mail
The original message was received at Tue, 15 Feb 2005 16:03:16 +0100 from 193.83.236.20 - The following addresses had permanent fatal errors - python-list@python.org *** ** A csatolmány message.zip I-Worm.Mydoom.R virussal

RE: replacing ASP/VBScript with Python

2005-02-15 Thread Tim Golden
[Peter Maas] | | Peter Maas schrieb: | I have inherited an extremely messy ASP/VBScript application which | is a pain for me to support. Now the customer is thinking about a | redesign. I'd like to rewrite the whole thing in Python but the app | has to meet some conditions like | | - IIS

Re: multi threading in multi processor (computer)

2005-02-15 Thread Martin Christensen
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Irmen == Irmen de Jong [EMAIL PROTECTED] writes: Irmen Naah. What about: http://www.razorvine.net/img/killGIL.jpg Some people have too much spare time and too weird senses of humour... Fortunately for the rest of us. :-) This one actually made me

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-15 Thread Ilias Lazaridis
Mike Meyer wrote: Ilias Lazaridis [EMAIL PROTECTED] writes: If it is a programming language, the requirement using an open-source toolchain is a rational and valid one. It is. However, mingW has nothing to do with using an open-sourcer toolchain. Python runs in an environment with a full,

Re: - E02 - Support for MinGW Open Source Compiler

2005-02-15 Thread Ilias Lazaridis
Duncan Booth wrote: Ilias Lazaridis wrote: In accordance with section 10 of the GPL, Red Hat, Inc. permits programs whose sources are distributed under a license that complies with the Open Source definition to be linked with libcygwin.a without libcygwin.a itself causing the resulting program to

Re: - E02 - Support for MinGW Open Source Compiler

2005-02-15 Thread Ilias Lazaridis
Robert Kern wrote: Ilias Lazaridis wrote: Duncan Booth wrote: Ilias Lazaridis wrote: There is a OS-tool-chain supported on windows, cygwin. this depends on cygwin.dll, which is GPL licensed [or am I wrong?] It is GPL licensed with an amendment which prevents the GPL spreading [...] If I understand

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-15 Thread Ilias Lazaridis
Robert Kern wrote: Ilias Lazaridis wrote: [...] Questions and suggestions are don't count for much in this community. Code and well-written patches do. Stop wasting time on c.l.py and get to work! If you can't do that, then this is not the community you are looking for. Please speak for yourself.

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-15 Thread Ilias Lazaridis
Delaney, Timothy C (Timothy) wrote: Stephen Kellett wrote: In message [EMAIL PROTECTED], Ilias Lazaridis [EMAIL PROTECTED] writes And yet there is not one company that has someone devoted full-time to developing Python. Not even Guido. Who's Guido? LOL Falling off my chair!! See, the problem

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-15 Thread Fredrik Lundh
Ilias Lazaridis wrote: http://www.catb.org/~esr/faqs/smart-questions.html I know this document. It has no relevance to me. QOTW! -- http://mail.python.org/mailman/listinfo/python-list

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-15 Thread Ilias Lazaridis
Stephen Kellett wrote: In message [EMAIL PROTECTED], Steve Horsley [EMAIL PROTECTED] writes Stephen Kellett wrote: Who's Guido? LOL Falling off my chair!! I think the expression you are looking for is ROFL! :-) Yes, but with that I could've been standing up before ending up on the floor.

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-15 Thread Ilias Lazaridis
Simon Brunning wrote: On Mon, 14 Feb 2005 14:23:08 +0200, Ilias Lazaridis [EMAIL PROTECTED] wrote: (snip) But if those answers above were of official nature, I must seriously rethink if I can rely on _any_ system which is based on python, as the foundation and the community do not care about

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-15 Thread Ilias Lazaridis
Stephen Kellett wrote: In message [EMAIL PROTECTED], Ilias Lazaridis [EMAIL PROTECTED] writes the community do not care about essential needs and requirements. Wrong. They do. They just don't care about *your* essential needs and requirements which *you* want *others* to fulfill at *their*

Re: newbie question convert C to python

2005-02-15 Thread Steven Bethard
Paul Rubin wrote: [EMAIL PROTECTED] writes: How do i handle this piece of code in python: # define vZero 15 # define vOne 20 unsigned int vTable[Zero][One] if(vGroup[vZero][vOne] == 0) { vGroup[vZero][vOne]-- . . } Simplest might be with a dictionary: vGroup

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-15 Thread Ilias Lazaridis
Diez B. Roggisch wrote: One of the most funny things within open-source is that switching: first: we have powerfull solutions which beat this and that then: hey, this is just volunteer work I don't see the contradiction here. It beats a great deal of commercial solutions in a lot of ways. But not

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-15 Thread Ilias Lazaridis
Stephen Kellett wrote: In message [EMAIL PROTECTED], Ilias Lazaridis [EMAIL PROTECTED] writes The answer to most of your questions is, Because no one has yet volunteered their time and effort to get the job done. this answer do not fit in most questions. please review them again. There you go.

Dr. Dobb's Python-URL! - weekly Python news and links (Feb 15)

2005-02-15 Thread Cameron Laird
QOTW: I've forgotten what we are arguing about, but I'm sure I'm right. -- Jive Dadson I believe the best strategy against Identity theft is bad credit. -- Tom Willis You can't live without unit tests. And once you have unit tests, the added value of declarations is tiny, and their cost

[ANN] ConfigObj update - v3.2.5

2005-02-15 Thread fuzzyman
ConfigObj has had another update - now version 3.2.5 This update includes 3 bugfixes and several new features. Because of the bugfixes it's reccomended for all users. New features include - lines can now be broken over two or more lines, initial and final comments in a config file are preserved

Re: check if object is number

2005-02-15 Thread Steven Bethard
Antoon Pardon wrote: Op 2005-02-11, Steven Bethard schreef [EMAIL PROTECTED]: George Sakkis wrote: Steven Bethard [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Is there a good way to determine if an object is a numeric type? In your example, what does your application consider to be

Re: PythonCard and Py2Exe

2005-02-15 Thread PipedreamerGrey
For this setup file, the executable packs, but when I attempt to run the program, the screen flashes, cannot import name radiogroup . I've attempted adding import radiogroup, from Pythoncard import radiogroup and from Pythoncard.compnents import radiogroup to the setup file, and that doesn't

Re: Copying data between file-like objects

2005-02-15 Thread Steven Bethard
Thomas Lotze wrote: another question: What's the most efficient way of copying data between two file-like objects? f1.write(f2.read()) doesn't seem to me as efficient as it might be, as a string containing all the contents of f2 will be created and thrown away. You could try f1.writelines(f2).

Re: PythonCard and Py2Exe

2005-02-15 Thread Thomas Heller
[EMAIL PROTECTED] writes: For this setup file, the executable packs, but when I attempt to run the program, the screen flashes, cannot import name radiogroup . I've attempted adding import radiogroup, from Pythoncard import radiogroup and from Pythoncard.compnents import radiogroup to the

Re: Zope: Adding a layer causes valid output to become an object reference?

2005-02-15 Thread Junkmail
Dieter, Thanks for the reply. I ran across an article in the Zope FAQ that nailed the problem on the head. Basically it said the same thing you are saying. For those that follow in my footsteps one day... ZPublisher Implicitly calls the method of a url which in the case of a zclass is a call

Re: Kill GIL

2005-02-15 Thread Aahz
In article [EMAIL PROTECTED], Adrian Casey [EMAIL PROTECTED] wrote: Aahz wrote: In article [EMAIL PROTECTED], Frans Englich [EMAIL PROTECTED] wrote: Personally I need a solution which touches this discussion. I need to run multiple processes, which I communicate with via stdin/out,

Re: keeping a COM server alive

2005-02-15 Thread Steve Holden
Do Re Mi chel La Si Do wrote: Hi ! I had also make a Python-COM-server. But, when I launch several clients, I obtain several instances of my COM-server. Finally, there are advantages and disadvantages in this established fact. But I can't use this way for to exchange data between several clients.

os.walk() usage

2005-02-15 Thread rbt
I'm trying to write very small, modular code as functions to break up a big monolithic script that does a file system search for particular strings. The script works well, but it's not easy to maintain or add features to. I'd like to have a function that builds a list of files with os.walk()

Re: replacing ASP/VBScript with Python

2005-02-15 Thread D H
Peter Maas wrote: Peter Maas schrieb: I have inherited an extremely messy ASP/VBScript application which is a pain for me to support. Now the customer is thinking about a redesign. I'd like to rewrite the whole thing in Python but the app has to meet some conditions like - IIS frontend - MSSQL db

Re: Copying data between file-like objects

2005-02-15 Thread Fredrik Lundh
Thomas Lotze wrote: f1.write(f2.read()) doesn't seem to me as efficient as it might be, as a string containing all the contents of f2 will be created and thrown away. if f2 isn't too large, reading lots of data in one operation is often the most efficient way (trust me, the memory system is a

Re: - E02 - Support for MinGW Open Source Compiler

2005-02-15 Thread Pat
Fredrik Lundh wrote: Pat wrote: A few things. Primarily the fact that I'm not very experienced in C (the extensions that I need to have compiled are not written by me). Secondarily, the fact that the discussion threads I read made it seem much more complicated than what you just

Re: 64 bit Python

2005-02-15 Thread Mathias Waack
Mike C. Fletcher wrote: Mathias Waack wrote: ... My python script allocates a bunch of strings each of 1024 characters and writes it in a cStringIO. And it fails after writing 512K of strings. Don't know how python restricts the heap size - but I'm fairly sure its not a restriction of the OS.

Re: [perl-python] problem: reducing comparison

2005-02-15 Thread Joe Francia
Xah Lee wrote: here's a interesting real-world algoritm to have fun with. From you? Doubtful. Sorry, dude, but you've been replaced by über-troll Ilias Lazaridis. Security will escort you to the door. -- Soraia: http://www.soraia.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Copying data between file-like objects

2005-02-15 Thread Thomas Lotze
Fredrik Lundh wrote: if f2 isn't too large, reading lots of data in one operation is often the most efficient way (trust me, the memory system is a lot faster than your disk) Sure. if you don't know how large f2 can be, use shutil.copyfileobj: help(shutil.copyfileobj) Help on

customizing metaclass constructed classes

2005-02-15 Thread Robin Becker
I have a set of classes for database access which are constructed using a special metaclass and base class. so in the base module #base.py class M(type): def __init__(cls, name, bases, dict): super(M, cls).__init__(name, bases, dict) for f in dict['_fieldDefs']: #create

Newbie question about class operator overloading

2005-02-15 Thread Rory Campbell-Lange
Hi. I'm just starting to use python. I am anxious about how best to set and access items one level down in a data structure if I am using __setitem__ and __getitem__. At the moment I can do for a data structure Data: object.Data = { 'one' : [1, 2, {}, 4], 'two' : [5, 6,

RE: customizing metaclass constructed classes

2005-02-15 Thread Robert Brewer
Robin Becker wrote: I have a set of classes for database access which are constructed using a special metaclass and base class. so in the base module #base.py class M(type): def __init__(cls, name, bases, dict): super(M, cls).__init__(name, bases, dict) for f in

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-15 Thread Mike Meyer
Ilias Lazaridis [EMAIL PROTECTED] writes: MinGW compatibility is not my need. Then why do you waste so much effort whining about it not being given to you? It is an community need. Based on the evidence at hand, this is a false statement. mike -- Mike Meyer [EMAIL PROTECTED]

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-15 Thread bruno modulix
Ilias Lazaridis wrote: there are other reasons behind the decision to not support the MinGW open-source-complier directly out of the main source-code base. Yes, of course. The reason is they are lying about their commitment to open source. They are currently trying to port Python to .NET, and

Postgres COPY Command with python 2.3 pg

2005-02-15 Thread Michael Lang
Hi to all, can some one point me to the correct way, how to use PostgreSQLs COPY feature from within python ? What i want to do is: connect start transaction drop current tablecontens copy new content from STDIN # file need more privileged user rights

RE: replacing ASP/VBScript with Python

2005-02-15 Thread Robert Brewer
Peter Maas wrote: I have inherited an extremely messy ASP/VBScript application which is a pain for me to support. Now the customer is thinking about a redesign. I'd like to rewrite the whole thing in Python but the app has to meet some conditions like - IIS frontend - MSSQL db server -

Re: os.walk() usage

2005-02-15 Thread [EMAIL PROTECTED]
every object in os.walk() returns a 3-tuple, like below, it seems your code assumes it returns only a list of files. for d in os.walk('c:\\temp'): (dirpath, dirnames, filenames) = d print dirpath print dirnames print filenames --

some qustions on python

2005-02-15 Thread samar bazied
Hi.. plz can u help me?? I am very new in python and I have some qustions about it. can u give me design process of python and their related langauges? and I will be very habby if u give me small evaluation of python plz.. plz... plz help me.. --

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-15 Thread Ilias Lazaridis
bruno modulix wrote: Ilias Lazaridis wrote: there are other reasons behind the decision to not support the MinGW open-source-complier directly out of the main source-code base. Yes, of course. The reason is they are lying about their commitment to open source. They are currently trying to port

Re: test_socket.py failure

2005-02-15 Thread x2164
[EMAIL PROTECTED] wrote: hi all, Linux 2.4.28 Glibc 2.2.5 gcc 2.95.3 I'm new to Python. I've compiled Python 2.4 from tar file. When running 'make test' i'm getting a failure in test_socket. Running './python Lib/test/test_socket.py'

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-15 Thread Ilias Lazaridis
Mike Meyer wrote: Ilias Lazaridis [EMAIL PROTECTED] writes: MinGW compatibility is not my need. Then why do you waste so much effort whining about it not being given to you? It is an community need. Based on the evidence at hand, this is a false statement. mike MinGW compatibility is not

Re: some qustions on python

2005-02-15 Thread Caleb Hattingh
http://www.python.org On Tue, 15 Feb 2005 13:16:53 -0500, samar bazied [EMAIL PROTECTED] wrote: Hi.. plz can u help me?? I am very new in python and I have some qustions about it. can u give me design process of python and their related langauges? and I will be very habby if u give me small

Re: os.walk() usage

2005-02-15 Thread bruno modulix
rbt wrote: I'm trying to write very small, modular code as functions to break up a big monolithic script that does a file system search for particular strings. The script works well, but it's not easy to maintain or add features to. I'd like to have a function that builds a list of files with

Re: customizing metaclass constructed classes

2005-02-15 Thread Robin Becker
Robert Brewer wrote: ... .. You *are* using a language with callable functions, right? ;) #base.py def create_special_property(cls, f): # create special property based on f class M(type): def __init__(cls, name, bases, dict): super(M, cls).__init__(name, bases, dict)

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-15 Thread bruno modulix
Ilias Lazaridis wrote: bruno modulix wrote: Ilias Lazaridis wrote: there are other reasons behind the decision to not support the MinGW open-source-complier directly out of the main source-code base. Yes, of course. The reason is they are lying about their commitment to open source. They are

Re: Iterator / Iteratable confusion

2005-02-15 Thread Michael Spencer
Michael Spencer wrote: But, notwithstanding the docs, it is not essential that iter(iterator) is iterator Terry Reedy wrote: iter(iterator) is iterator is part of the iterater protocol [...]I interpret [your post] as saying three things: 1. There is more than one possible definition of

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-15 Thread Adam DePrince
On Tue, 2005-02-15 at 13:29, Ilias Lazaridis wrote: Mike Meyer wrote: Ilias Lazaridis [EMAIL PROTECTED] writes: MinGW compatibility is not my need. Then why do you waste so much effort whining about it not being given to you? It is an community need. Based on the evidence at

Re: replacing ASP/VBScript with Python

2005-02-15 Thread Peter Maas
Robert Brewer schrieb: I'm now confident that it is doable and keen on finding out. The usual question: what is the one and best way to do it? ;) Python ASP (pywin32), but put as little code as possible into the ASP--make it just a stub to call the real Python app. That app will be running

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-15 Thread Ilias Lazaridis
Adam DePrince wrote: On Tue, 2005-02-15 at 13:29, Ilias Lazaridis wrote: Mike Meyer wrote: Ilias Lazaridis [EMAIL PROTECTED] writes: [...] MinGW compatibility is not [only] my need. It is an community need [at least partially] And herein lies the beauty of the noble meritocratic free software

Re: Accessing Objects Based On Their ID

2005-02-15 Thread Tim Daneliuk
Diez B. Roggisch wrote: Given the ID of an object, is there a way to access it? For example, if we have the ID of a class instance, is there a way to invoke its methods and attributes knowning only that ID? Similarly, if we have the ID of a function, is there a way to call it? No. This comes

  1   2   3   >