multi regexp analyzer ? or how to do...

2005-06-30 Thread joh12005
Hello, here is a trouble that i had, i would like to resolve it with python, even if i still have no clue on how to do it. i had many small text files, so to speed up processes on them, i used to copy them inside a huge one adding some king of xml separator : file name=... [content] /file

Re: need help with MySQLdb

2005-06-30 Thread Wolfram Kraus
[EMAIL PROTECTED] wrote: Hey there all, i have a question about how to point my python install to my sql database. when i enter this: db = MySQLdb.connect(user=user, passwd=pass, db=myDB) i get this: Traceback (most recent call last): File pyshell#1, line 1, in -toplevel- db =

Re: Favorite non-python language trick?

2005-06-30 Thread Paddy
Sadly, its not a solution that I'm after, but a particular toolkit that can be used for solving that type of problem. - Pad. -- http://mail.python.org/mailman/listinfo/python-list

Re: some trouble with MySQLdb

2005-06-30 Thread dimitri pater
try: db = MySQLdb.connect(host=localhost, user=user, passwd=pass, db=myDB) localhost can be a URL also (if MySQL is set up properly in the first place) regards, DimtiriOn 6/30/05, nephish [EMAIL PROTECTED] wrote: Hey there all,i have a question about how to point my python install to my sql

python install settings...

2005-06-30 Thread jtan325
hi, i am running Linux Ubuntu Hoary and am trying to build the Python numarray package, v. 1.3.2 by hand since ubuntu's repos won't be updated until breezy. i have python 2.4, and gcc 3.3.5 after unpacking the tar, i run python setup.py install, as it says in the installation instructions. i

Re: aligning text with space-normalized text

2005-06-30 Thread Peter Otten
Steven Bethard wrote: I have a string with a bunch of whitespace in it, and a series of chunks of that string whose indices I need to find.  However, the chunks have been whitespace-normalized, so that multiple spaces and newlines have been converted to single spaces as if by '

Re: Inheriting from object

2005-06-30 Thread Fuzzyman
The reason I ask is that I often (well... a couple of times anyway) see cryptic omments like : and if you inherit from object you get all the benefits of new style classes Now I know about the advantages of inheriting from the built in types (if that's what you want to do) -but am a bit

twisted: not doing DNS resolutions?

2005-06-30 Thread Christopher Subich
I'm building an application that makes several user-specified internet connections; twisted meets my needs more or less perfectly. I'm running into a problem, however, in that twisted is not allowing connections (reactor.connectTCP) by hostname, only IP address. [read: connections to IP

re:Open running processes

2005-06-30 Thread DeRRudi
Well i want a external app to maximize and minimize my app. And later on i want the external one to send some data. Thought this would be the most easy (and fast) way! Greetz -- http://mail.python.org/mailman/listinfo/python-list

Re: Reading output from a child process non-blockingly

2005-06-30 Thread Adriaan Renting
I use the pty module, in combination with select.select. Search for Pexpect for an elaborate example. It basically goes something like this: - import os, select, pty pid, fd = pty.fork() fd_eof = 0 if pid == 0: os.execvp('ls',['ls']) # child

Re: MS Compiler to build Python 2.3 extension

2005-06-30 Thread woodsplitter
MS Visual C++ 6 is indeed the compiler that the python.org distributions are built with, but MinGW works fine too. In fact, the code generated by MinGW-GCC 3.4.4 outpaces that generated by MSVC++ 6.0 by a considerable margin in some of my performance-critical extensions, and the size of the

Re: Favorite non-python language trick?

2005-06-30 Thread Brian Elmegaard
Joseph Garvin [EMAIL PROTECTED] writes: I'm curious -- what is everyone's favorite trick from a non-python language? Metapost solution of linear equations: x1+9=x2-8=2; And -- why isn't it in Python? I'd like to know too. -- Brian (remove the sport for mail)

RE: Open running processes

2005-06-30 Thread Tim Golden
[DeRRudi] | Well i want a external app to maximize and minimize my app. | And later on i want the external one to send some data. Thought this | would be the most easy (and fast) way! | | Greetz | Rudi. I, at least, am reading this via the mailing list, not via Usenet nor via Google. This

Re: twisted: not doing DNS resolutions?

2005-06-30 Thread Christopher Subich
Christopher Subich wrote: From what I can tell, the problem lies in that Twisted simply isn't performing the DNS resolutions. From the connection factory's startedConnecting method, print connector.getDestination() results in: IPv4Address(TCP, 'hostname', port) Update: after doing some

Re: Acceptance test spike example

2005-06-30 Thread Steve Jorgensen
On Sun, 26 Jun 2005 16:10:05 -0700, Steve Jorgensen [EMAIL PROTECTED] wrote: I'm posting this message for 2 reasons. First, I'm still pretty new and shakey to the whole Acceptance Testing thing, and I'm hoping for some feedback on whether I'm on the right track. Second, although all the Agile

Re: When someone from Britain speaks, Americans hear a British accent...

2005-06-30 Thread Simon Brunning
On 29 Jun 2005 15:34:11 -0700, Luis M. Gonzalez [EMAIL PROTECTED] wrote: What's exactly the cockney accent? Is it related to some place or it's just a kind of slang? A cockney is a *real* Londoner, that is, someone born within the City of London, a.k.a The Square Mile. More specifically, it's

Re: Thoughts on Guido's ITC audio interview

2005-06-30 Thread Stephen Kellett
In message [EMAIL PROTECTED], Markus Wankus [EMAIL PROTECTED] writes just think it is silly not to benefit from them. In which case you misunderstood me - I never said people should not use them, just that they should not be relied on for productivity improvements. They must factor in at a

Re: RE: Open running processes

2005-06-30 Thread DeRRudi
Tim Goldenwrote: Rudi. I, at least, am reading this via the mailing list, not via Usenet nor via Google. This means that if you don't put any kind of context in what you post, I have to guess at what you're responding to. (All I see is the exact text you typed, nothing else). Assuming

RE: RE: Open running processes

2005-06-30 Thread Tim Golden
[DeRRudi] | Tim Goldenwrote: | | Assuming that you're answering my question: why use mmap and | not just two events? I understand what your overall plan is, | and it looks like you have a way to solve it. It just seemed | that you might be able to achieve the same thing with two | events:

Re: Is there something similar to ?: operator (C/C++) in Python?

2005-06-30 Thread Antoon Pardon
Op 2005-06-29, Scott David Daniels schreef [EMAIL PROTECTED]: Roy Smith wrote: Andrew Durdin [EMAIL PROTECTED] wrote: Corrected version: result = [(lambda: expr0), lambda: expr1][bool(cond)]() Sorry, I thought cond was a standard boolean. Better is: result = [(lambda: true_expr),

Re: Favorite non-python language trick?

2005-06-30 Thread Terry Hancock
On Wednesday 29 June 2005 10:51 pm, Paddy wrote: Joseph Garvin wrote: 'm curious -- what is everyone's favorite trick from a non-python language? And -- why isn't it in Python? I use constraints programming at work, Check out System Verilog or OZ/Mozart. It would be great if this

Re:

2005-06-30 Thread Adriaan Renting
I do fundamentally not agree with you that IDE's and GUI design tools are a waste of time. I think that with a good IDE (graphical or not) the synergy between editor, debugger, documentation, refactoring, translations/internationalization, version control, software modelling, profiling, metrics,

Re: Reading files in /var/spool/rwho/whod.*

2005-06-30 Thread Fredrik Normann
Dennis Lee Bieber wrote: On Mon, 27 Jun 2005 13:26:12 +0200, Fredrik Normann [EMAIL PROTECTED] declaimed the following in comp.lang.python: Hello, I'm trying to read the binary files under /var/spool/rwho/ so I'm wondering if anyone has done that before or could give me some clues on how

Re: Database recommendations for Windows app

2005-06-30 Thread Magnus Lycka
Thomas Bartkus wrote: I was thinking of Win32com which I expect lets you put a wrapper around ADO and work the ADO (or any other ActiveX) object model from within Python. Sure, but since others have made wrappers around ADO for Python before, you'd either reivent the wheel or or use e.g.

Re: Which kid's beginners programming - Python or Forth?

2005-06-30 Thread NickC
Gentle folk of comp.lang.python, I heartily thank you all for your input. I think I'm taking the boys through the door marked Logo. We may be back this way, though. We will likely need MORE in the nebulous future. I am impressed with the outpouring of support here! Before you commit

script fichiers binaires lecture écriture

2005-06-30 Thread Statesman
Je connais mal python et n'est pas trop le temps de m'y plonger bien que cela semble être assez puissant... import sys import ixio import os M = ixio.getMAC(eth0) S = %08X %08X % (M[0] | M[1]8 | M[2]16 | M[3]24, M[4] | M[5]8) K = Errorin: if len(sys.argv) 3: print Usage %s src-file dst-file

RE: Debugger Confusion

2005-06-30 Thread Adriaan Renting
I use the debugger that comes with Eric3, but it is only free for Linux/ OS X, as it needs PyQt. asside from setting (conditional) breakpoints, one of it's features is that it can show you a browsable tree of all your variables. something like this: class MyClass | L-- string 'username' -

JPype - suppressing JVM activity report

2005-06-30 Thread skn
Hello, Is there any option to suppress the JVM activity report that gets displayed, when you execute Java APIs from within Python using JPype. E.g., JVM activity report : classes loaded : 26 JVM has been shutdown I know I can do it by re-directing the std err to NUL. But is

Re: RE: RE: Open running processes

2005-06-30 Thread DeRRudi
Tim Goldenwrote: If you wanted to send over arbitrary data from another application, then this is certainly a way to do it. (Another way might be to use a Windows pipe, for example). My point was only that if you are signalling an event as a wake-up call plus an atom of extra information

Re: Favorite non-python language trick?

2005-06-30 Thread NickC
Steven D'Aprano wrote: with colour do begin red := 0; blue := 255; green := 0; end; instead of: colour.red := 0; colour.blue := 255; colour.green := 0; c = colour c.red = 0; c.blue = 255; c.green = 0 del c # Not strictly needed, but limits the scope of c When everything's a reference, the

Re: script fichiers binaires lecture écriture

2005-06-30 Thread Statesman
In English: I don't know much about python and I won't have much time to learn much about it even if it seems powerful... import sys import ixio import os M = ixio.getMAC(eth0) S = %08X %08X % (M[0] | M[1]8 | M[2]16 | M[3]24, M[4] | M[5]8) K = Errorin: if len(sys.argv) 3: print Usage %s

ANN: PyVISA 0.9 (first public release)

2005-06-30 Thread Torsten Bronger
Hallöchen! At http://pyvisa.sourceforge.net you can find information about the PyVISA package. It realises Python bindings for the VISA library functions, which enables you to control measurement devices via Python. Yesterday I released version 0.9. I tried to provide it with good

Re: Modules for inclusion in standard library?

2005-06-30 Thread Simon Brunning
On 6/29/05, Thomas Heller [EMAIL PROTECTED] wrote: To me, this sounds that *at least* a PEP would be needed to convince Guido. Or, to record the reasoning why it cannot be included. I have a feeling that Guido won't allow ctypes into the standard library since it can crash Python. I don't

Re: MS Compiler to build Python 2.3 extension

2005-06-30 Thread Richie Hindle
[woodsplitter] MS Visual C++ 6 is indeed the compiler that the python.org distributions are built with Just to add back some context for people not following the thread: this is Python 2.3 we're talking about. 2.4 is built with Visual Studio.NET. but MinGW works fine too. In fact, the

Add methods to string objects.

2005-06-30 Thread Negroup
Hi all. I'm writing a simple Python module containing functions to process strings in various ways. Actually it works importing the module that contains the function I'm interested in, and calling my_module.my_function('mystring'). I was just asking if it is possible to extend string objects'

Control Printer Queue On Windows 2000/XP

2005-06-30 Thread binarystar
Hi folks, I am writing a script to print a few thousand pdf documents and I need to have some control over the number of jobs that are sent to the printer queue at time ... something along the lines of if number_jobs MAX_JOBS: time.sleep(10) else: #Print More Files I have been

Re: script fichiers binaires lecture écriture

2005-06-30 Thread bruno modulix
Statesman wrote: In English: I don't know much about python and I won't have much time to learn much about it even if it seems powerful... (snip code) Here is an error I get trying to run this script: AttributeError: 'string' object has no attribute 'index' According to me, index()

Store multiple dictionaries in a file

2005-06-30 Thread Philipp H. Mohr
Hello, I would like to store multiple dictionaries in a file, if possible one per line. My code currently produces a new dictionary every iteration and passes it on to another peace of code. In order to be able to re-run some experiments at a later date I would like to store every dictionary in

Re: script fichiers binaires lecture écriture

2005-06-30 Thread bruno modulix
Statesman wrote in comp.lang.python: en Hi Statesman comp.lang.python is the english-speaking Python forum. You may want to try the french-speaking one at fr.comp.lang.python (xpost and fu2 set) /en Je connais mal python et n'est pas trop le temps de m'y plonger bien que cela semble être assez

RE: Control Printer Queue On Windows 2000/XP

2005-06-30 Thread Tim Golden
[binarystar] | Hi folks, | | I am writing a script to print a few thousand pdf documents and I need | to have some control over the number of jobs that are sent to the | printer queue at time ... something along the lines of | | if number_jobs MAX_JOBS: | time.sleep(10) | else: | #Print

Re: Boss wants me to program

2005-06-30 Thread Magnus Lycka
I think Python works on fairly antique hardware, whatever OS you use (as long as the OS works ok). You can get a DOS version of Python 2.2 at http://www.caddit.net/ , but I don't have any good suggestions for a UI then. This might work after some tweaking:

Re: multi regexp analyzer ? or how to do...

2005-06-30 Thread Paul McGuire
I'd propose a pyparsing implementation, but you don't give us many specifics. Is there any chance you could post some sample data, and one or two of the regexps you are using for matching? -- Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: Store multiple dictionaries in a file

2005-06-30 Thread Philipp H. Mohr
Thank you for you answer. I would like to store multiple dictionaries in a file, if possible one per line. Why one per line ? I agree with you that it sounds like nasty code :-) but there is a good reason for doing it this way - I think. My code collects data (attributes) of its current

Re: Which kid's beginners programming - Python or Forth?

2005-06-30 Thread Nick Craig-Wood
Rocco Moretti [EMAIL PROTECTED] wrote: So for Math you'd do something like: y = b + mx + cx^2 (Where ^2 is a superscript 2) For Python it would be: y = b + m*x + c*x**2 IIRC, for Forth it would be something like (please excuse the mistakes in operator notation): x 2 ^

sys.ps2

2005-06-30 Thread Xinyue Ye
when I type sys.ps2 after import sys, I got the message like: Traceback (most recent call last): File pyshell#10, line 1, in -toplevel- sys.ps2 AttributeError: 'module' object has no attribute 'ps2' why does it happen? -- http://mail.python.org/mailman/listinfo/python-list

POP3 and seen flag

2005-06-30 Thread Miki Tebeka
Hello All, Is there a way to know in a POP session of a message was seen (old) or not (new)? Thanks. -- Miki Tebeka [EMAIL PROTECTED] http://tebeka.bizhat.com The only difference between children and adults is the price of

Re: aligning text with space-normalized text

2005-06-30 Thread John Machin
Steven Bethard wrote: John Machin wrote: If work is meant to detect *all* possibilities of 'chunks' not having been derived from 'text' in the described manner, then it doesn't work -- all information about the positions of the whitespace is thrown away by your code. For example, text

Re: sys.ps2

2005-06-30 Thread [EMAIL PROTECTED]
You should be in interactive mode to see those, otherwise you get the error -- http://mail.python.org/mailman/listinfo/python-list

Re: Inheriting from object

2005-06-30 Thread Sion Arrowsmith
Bruno Desthuilliers [EMAIL PROTECTED] wrote: Fuzzyman a écrit : *Should* I in fact write : class foo(object): def __init__(self, *args, **kwargs): object.__init__(self) ? Nope. And if you were to do so, surely: class foo(object): def __init__(self, *args, **kwargs):

Re: Store multiple dictionaries in a file

2005-06-30 Thread Jeremy Sanders
Philipp H. Mohr wrote: I would like to store multiple dictionaries in a file, if possible one per line. My code currently produces a new dictionary every iteration and passes it on to another peace of code. In order to be able to re-run some experiments at a later date I would like to store

Re: How to compare two directories?

2005-06-30 Thread could ildg
I found dircmp compare only the direct dirs and files, and it will not do anything to the sub-directories. On 6/29/05, Michael Hoffman [EMAIL PROTECTED] wrote: could ildg wrote: I want to compare 2 directories, and find If all of theire sub-folders and files and sub-files are identical. If

Re: Add methods to string objects.

2005-06-30 Thread Roy Smith
[EMAIL PROTECTED] (Negroup) wrote: I was just asking if it is possible to extend string objects' behaviour so that it becomes possible to invoke something like 'anystring'.my_method(). You can't quite do that, but you can get close. You can define your own class which inherits from str, and

Re: POP3 and seen flag

2005-06-30 Thread Tim Williams (gmail)
Hello All, Is there a way to know in a POP session of a message was seen (old) or not (new)? You have to keep a persistant local list of viewed messages , UID into a text file is often the simplest method. HTH :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Favorite non-python language trick?

2005-06-30 Thread Benji York
Terry Hancock wrote: http://www.logilab.org/projects/python-logic/ This is something pretty new to me, so I can't comment on how well it would meet your expectations, but I see now that the site does mention OZ/Mozart as comparables. I've used both, the logilab stuff is cool, but no where

Re: Store multiple dictionaries in a file

2005-06-30 Thread John Machin
bruno modulix wrote: Philipp H. Mohr wrote: My code currently produces a new dictionary every iteration and passes it on to another peace of code. May this code rest in piece grin Perhaps it's the piece of code that passeth all understanding? --

Re: Add methods to string objects.

2005-06-30 Thread [EMAIL PROTECTED]
You can even get closer, but it is NOT recommended class foostr(str): def plural (self): if self.value[-1] in sz: return self.value + es else: return self.value + s #ugly hack setattr(__builtins__, str, foostr) print str(apple).plural() # this

Re: POP3 and seen flag

2005-06-30 Thread Peter Hansen
Miki Tebeka wrote: Is there a way to know in a POP session of a message was seen (old) or not (new)? Define seen. It could be interpreted as either TOP or RETR having been executing for a message, or something like this client has seen this message before ... not sure what you mean. In any

Re: Which kid's beginners programming - Python or Forth?

2005-06-30 Thread Roy Smith
Nick Craig-Wood [EMAIL PROTECTED] wrote: In FORTH you don't generally use variables unless you really have to - that is what the stack is for Exactly. Every language has its natural way of doing things. You can usually bludgeon a language into doing things some other way, and newcomers to a

RE: Store multiple dictionaries in a file

2005-06-30 Thread Tim Golden
[John Machin] | | bruno modulix wrote: | Philipp H. Mohr wrote: | | My code currently produces a new dictionary every iteration and | passes it on to another peace of code. | | | May this code rest in piece grin | | Perhaps it's the piece of code that passeth all understanding?

Re: map vs. list-comprehension

2005-06-30 Thread Mandus
Wed, 29 Jun 2005 08:33:58 -0700 skrev Scott David Daniels: Mandus wrote: 29 Jun 2005 10:04:40 GMT skrev F. Petitjean: Le Wed, 29 Jun 2005 09:46:15 + (UTC), Mandus a écrit : res = [ bb+ii*dd for bb,ii,dd in zip(b,i,d) ] seem to be a tad slower than the map, but nothing serious. Guess

Re: Add methods to string objects.

2005-06-30 Thread Roy Smith
In article [EMAIL PROTECTED], [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: You can even get closer, but it is NOT recommended class foostr(str): def plural (self): if self.value[-1] in sz: return self.value + es else: return self.value + s

Dr. Dobb's Python-URL! - weekly Python news and links (Jun 29)

2005-06-30 Thread Simon Brunning
QOTW: And what defines a 'python activist' anyway? Blowing up Perl installations worldwide? - Ivan Van Laningham Floating point is about nothing if not being usefully wrong. - Robert Kern Sibylle Koczian needs to sort part of a list. His first attempt made the natural mistake - sorting

Re: Store multiple dictionaries in a file

2005-06-30 Thread Larry Bates
You might want to take a look at the shelve module. -Larry Philipp H. Mohr wrote: Hello, I would like to store multiple dictionaries in a file, if possible one per line. My code currently produces a new dictionary every iteration and passes it on to another peace of code. In order to be

Re: Add methods to string objects.

2005-06-30 Thread Magnus Lycka
Negroup wrote: Hi all. I'm writing a simple Python module containing functions to process strings in various ways. Actually it works importing the module that contains the function I'm interested in, and calling my_module.my_function('mystring'). I was just asking if it is possible to

if you please i want a help in running a nltk modules

2005-06-30 Thread enas khalil
if you please i want a help im a beginner in using python i want to know how can i run a GUI module i installed python on windows platform thanks [EMAIL PROTECTED] wrote: Send Python-list mailing list submissions topython-list@python.orgTo subscribe or unsubscribe via the World Wide Web,

Re: need help with MySQLdb

2005-06-30 Thread Wolfram Kraus
nephish wrote: [...] Try the following from the shell (NOT the python shell): mysql -u user -p [Enter passwd] mysql show databases; If MyDB isn't in the list either something went wrong with the xampp installation or the database for xampp got a different name. (I am no xampp expert, so

RE: COM problem .py versus .exe

2005-06-30 Thread Tim Golden
[Greg Miller] | | Thanks for the information, I stumbled across that page yesterday. It | seems all the problems with this are solved. The executable | works just | like the Python version. Now I have to come up with an algorithm to | parse through the output data to come up with the version

Re: When someone from Britain speaks, Americans hear a British accent...

2005-06-30 Thread Luis M. Gonzalez
Well, yes, it is kinda off topic, but very interesting... Being myself an argentine with spanish as mother tongue and a very bad English, it's hard foro me to tell the difference between accents. I can hardly tell an Irish from an English... But what I did tell is the broad range of different

Re: Add methods to string objects.

2005-06-30 Thread Rocco Moretti
Roy Smith wrote: In article [EMAIL PROTECTED], [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: You can even get closer, but it is NOT recommended class foostr(str): def plural (self): if self.value[-1] in sz: return self.value + es else: return

[no subject]

2005-06-30 Thread python-list-bounces+archive=mail-archive . com
#! rnews 2572 Newsgroups: comp.lang.python Path: news.xs4all.nl!newsspool.news.xs4all.nl!transit.news.xs4all.nl!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.abs.net!attws2!ip.att.net!NetNews1!xyzzy!nntp From: Harry George [EMAIL PROTECTED] Subject: Re: Modules for inclusion in standard

Re: Modules for inclusion in standard library?

2005-06-30 Thread Christopher Arndt
Simon Brunning schrieb: On 6/29/05, Christopher Arndt [EMAIL PROTECTED] wrote: Adding sqllite to the standard library has been discussed before: http://groups-beta.google.com/group/comp.lang.python/browse_thread/thread/fd150297c201f814 Yeah, but they didn't seem to have come to a

[no subject]

2005-06-30 Thread python-list-bounces+archive=mail-archive . com
#! rnews 2218 Newsgroups: comp.lang.python Path: news.xs4all.nl!newsspool.news.xs4all.nl!transit.news.xs4all.nl!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.abs.net!attws2!ip.att.net!NetNews1!xyzzy!nntp From: Harry George [EMAIL PROTECTED] Subject: Re: Boss wants me to program

Open the command line within a script

2005-06-30 Thread Ivan Shevanski
Hey this is probally a noob question but here goes. . .How could I open the command line inside of a python script? Would I have to use COM? -Ivan _ Don’t just search. Find. Check out the new MSN Search!

Re: Store multiple dictionaries in a file

2005-06-30 Thread Philipp H. Mohr
Hello, this is the solution I went for, as I am indeed not concernt about security and the implementation is straight forward. Thank you, Phil If you're not worried about security, you could write the repr() of each dict to the file and get the values back by using the eval() function.

RE: Open the command line within a script

2005-06-30 Thread Tim Golden
[Ivan Shevanski] | Hey this is probally a noob question but here goes. . .How | could I open the | command line inside of a python script? Would I have to use COM? (Assuming you're on Windows from your reference to COM). Depending on exactly what you want to do with it, you could just do:

Re: When someone from Britain speaks, Americans hear a British accent...

2005-06-30 Thread Graham Fawcett
Steven D'Aprano wrote: Speaking as an Australia, ... [snip] But don't worry, there is one thing we all agree on throughout the English-speaking world: you Americans don't speak English. And lest you feel Steven's observation don't bear much weight, keep in mind that he is speaking as an

Re: When someone from Britain speaks, Americans hear a British accent...

2005-06-30 Thread Benji York
Graham Fawcett wrote: keep-your-stick-on-the-ice'ly yours, Is that a Red Green reference? Man, I didn't think this could get any more off-topic. :) python-needs-more-duct-tape'ly yours, Benji -- http://mail.python.org/mailman/listinfo/python-list

Re: map vs. list-comprehension

2005-06-30 Thread Mike P.
Björn Lindström [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] F. Petitjean [EMAIL PROTECTED] writes: res = [ bb+ii*dd for bb,ii,dd in zip(b,i,d) ] Hoping that zip will not be deprecated. Nobody has suggested that. The ones that are planned to be removed are lambda, reduce,

python commmand line params from c++

2005-06-30 Thread Wesley Henwood
What is the proper way to pass command line parameters to a python script called from C++? I'm tryng this: path = c:\\someDir\\someScript.py param1 param2 param3; PyRun_SimpleFile(PyFile_AsFile( PyFile_FromString( path, r)), someScript.py); I'm getting a format error someScript.py, line 1 when

Re: When someone from Britain speaks, Americans hear a British accent...

2005-06-30 Thread Grant Edwards
On 2005-06-30, Luis M. Gonzalez [EMAIL PROTECTED] wrote: Well, yes, it is kinda off topic, but very interesting... Being myself an argentine with spanish as mother tongue and a very bad English, it's hard foro me to tell the difference between accents. I can hardly tell an Irish from an

Re: Which kid's beginners programming - Python or Forth?

2005-06-30 Thread Roy Smith
There's a reprint this morning on slashdot of a 1984 review Byte did on the brand-new Macintosh (executive summary: cool machine, needs more memory). The first four software packages available for the new machine? MacWrite/MacPaint (they seem to count this as one package) Microsoft Multiplan

Re: python commmand line params from c++

2005-06-30 Thread Denis S. Otkidach
On 30 Jun 2005 07:52:04 -0700 Wesley Henwood [EMAIL PROTECTED] wrote: What is the proper way to pass command line parameters to a python script called from C++? I'm tryng this: Have you tried PySys_SetArgv? path = c:\\someDir\\someScript.py param1 param2 param3;

Re: Favorite non-python language trick?

2005-06-30 Thread [EMAIL PROTECTED]
If I had to choose one feature, I would like to see better support for nested lexical scopes. However, I imagine this is no easy trick to add to the language. I'm curious -- what is everyone's favorite trick from a non-python language? And -- why isn't it in Python? --

I have a question.

2005-06-30 Thread Nathan Pinno
Hi all, Does Python have a random function? If so, can you show me an example using it? Thanks, Nathan Pinno http://www.npinnowebsite.ca/ -- Posted via UsenetRevolution.com - Revolutionary Usenet ** HIGH

Re: I have a question.

2005-06-30 Thread Benji York
Nathan Pinno wrote: Does Python have a random function? If so, can you show me an example using it? http://docs.python.org/lib/module-random.html -- Benji York -- http://mail.python.org/mailman/listinfo/python-list

Re: How to compare two directories?

2005-06-30 Thread Michael Hoffman
could ildg wrote: I found dircmp compare only the direct dirs and files, and it will not do anything to the sub-directories. The documentation for dircmp.report_full_closure() disagrees with you. -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

Re: I have a question.

2005-06-30 Thread Brian van den Broek
Nathan Pinno said unto the world upon 30/06/2005 11:22: Hi all, Does Python have a random function? If so, can you show me an example using it? Thanks, Nathan Pinno http://www.npinnowebsite.ca/ import random print It took %s seconds to find the module named random by

Re: I have a question.

2005-06-30 Thread Jeremy Jones
Nathan Pinno wrote: Hi all, Does Python have a random function? If so, can you show me an example using it? Thanks, Nathan Pinno http://www.npinnowebsite.ca/ Take your pick: In [5]: import random In [6]: random.choice(range(10)) Out[6]: 2 In [7]: random.choice(range(10))

Multi Threading embedded python

2005-06-30 Thread amit
Hello, I am embedding a python script in a C++ application. The script can be called simultaneously from multiple threads. What is the correct way to implement this situation: 1) Have unique python interpreter instantiations ( Py_Initialize() ) for each thread. 2) Have one python

Re: Inheriting from object

2005-06-30 Thread Scott David Daniels
Sion Arrowsmith wrote: ... And if you were to do so, surely: class foo(object): def __init__(self, *args, **kwargs): super(foo, self).__init__(self) would be the preferred way to go? Or, perhaps: class foo(object): def __init__(self, *args, **kwargs):

Re: Multi Threading embedded python

2005-06-30 Thread Pierre Barbier de Reuille
Well, depends on what you want to achieve :) First, I don't think you can call Py_Initialize on many threads. You have special function to initialise different interpreters on per-thread basis. However, the main problem is: do you want to share data across your threads ? If the answer is 'no'

Re: python 2.4: tarfile tell() and seek() seem to be broeken

2005-06-30 Thread Lars Gustäbel
On Thu, 02 Jun 2005 19:52:24 +0200, N. Volbers wrote: Thanks for taking care of it ;-) I submitted patch #1230446 today which ought to fix the problem. -- Lars Gustäbel [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Programmers Contest: Fit pictures on a page

2005-06-30 Thread Don
[EMAIL PROTECTED] wrote: Chung Leong wrote: Isn't that an NP-complete problem or am I crazy? That makes it a more realistic challange, doesn't it? Suppose it was something simple, like calculating a minimal spanning tree. Every program would produce the same output. What kind of

Re: Modules for inclusion in standard library?

2005-06-30 Thread Tom Anderson
On Wed, 29 Jun 2005, it was written: Rocco Moretti [EMAIL PROTECTED] writes: Except that (please correct me if I'm wrong) there is somewhat of a policy for not including interface code for third party programs which are not part of the operating system. I've never heard of Python having

Re: Boss wants me to program

2005-06-30 Thread Tom Anderson
On Wed, 29 Jun 2005, phil wrote: Wow! How about a sextant? Simple device really. And a great practical demonstration of trigonometry. Excellent idea, even found a few how to sites. We'll do it. Any others? A ballista? For many years when i was a kid, my dad wanted to build a ballista; he

Re: Programmers Contest: Fit pictures on a page

2005-06-30 Thread Peter Hansen
Don wrote: I was thinking maybe you could use a genetic algorithm, where the fitness function would caluclate the amount of waste. I'm not very familar with how to implement this sort of thing, though. This problem is well suited to the abilities of genetic algorithms, and this would probably

Seeking IDE

2005-06-30 Thread Nick Mountford
Hi, Complete newb to Python and programming, looking for an open source IDE to download. Any suggestions? Thanks, Nick -- http://mail.python.org/mailman/listinfo/python-list

Re: map vs. list-comprehension

2005-06-30 Thread Tom Anderson
On Fri, 1 Jul 2005, Mike P. wrote: Björn Lindström [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] F. Petitjean [EMAIL PROTECTED] writes: res = [ bb+ii*dd for bb,ii,dd in zip(b,i,d) ] Hoping that zip will not be deprecated. Nobody has suggested that. The ones that are planned to

Re: Seeking IDE

2005-06-30 Thread Philippe C. Martin
Linux: Eric3 All: Eclipe: my choice (might be tough to get into) Nick Mountford wrote: Hi, Complete newb to Python and programming, looking for an open source IDE to download. Any suggestions? Thanks, Nick -- http://mail.python.org/mailman/listinfo/python-list

Re: Seeking IDE

2005-06-30 Thread Philippe C. Martin
oops: eclipse Philippe C. Martin wrote: Linux: Eric3 All: Eclipe: my choice (might be tough to get into) Nick Mountford wrote: Hi, Complete newb to Python and programming, looking for an open source IDE to download. Any suggestions? Thanks, Nick --

  1   2   3   >