Re: confused about resizing array in Python

2007-02-03 Thread Ruan
Then how about Python's list? What is done exactly when list.append is executed? For list, is there another larger list initialized and the contents from the old list is copied to it together with the new appended list? "Roel Schroeven" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTE

Re: Where Does One Begin?

2007-02-03 Thread [EMAIL PROTECTED]
On Feb 3, 2:16 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > In <[EMAIL PROTECTED]>, > > [EMAIL PROTECTED] wrote: > > pygame is probily a good program to start with as long as you keep in > > mind that it is possible that up to 50% of the p.c. laptops may not be > > able to run it. > >

raise or not to raise [Newbie]

2007-02-03 Thread Jacol
Hello everybody! I found this: http://mail.python.org/pipermail/python-list/1999-July/006344.html My question concernings "callerFunc" and is more general what is difference between: try: raise "xyz" except "xyz": print "This is smthing" and simpl

Re: Determining encoding of a file

2007-02-03 Thread Ben Finney
Tony Houghton <[EMAIL PROTECTED]> writes: > In Linux it's possible for filesystems to have a different encoding > from the system's setting. Given a filename, is there a (preferably) > portable way to determine its encoding? If there were, PEP 263 would not be necessary. http://www.python.or

Re: raise or not to raise [Newbie]

2007-02-03 Thread Jacol
I understand that author generated exception and than extracted the name of function from the exeption. But is any sens in using exeptions service if we have smthing simpler: just print for example? In my opinion no, it doesn't make sens. Jacek -- http://mail.python.org/mailman/listinfo/python-li

Re: Python does not play well with others

2007-02-03 Thread skip
Szabolcs> seriously, python is a programming language and not a flee Szabolcs> market (so don't compare it to java or php) If it grew to be as bloated as Java it might well become a "flee" market. ;-) Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: raise or not to raise [Newbie]

2007-02-03 Thread Paddy
On Feb 3, 9:07 pm, Jacol <[EMAIL PROTECTED]> wrote: > I understand that author generated exception and than extracted the name of > function from the exeption. But is any sens in using exeptions service if > we have smthing simpler: just print for example? In my opinion no, it > doesn't make sens.

Re: Python does not play well with others

2007-02-03 Thread skip
Paul> Why would I expect your employer to solve my problems anyway, even Paul> if they relate to some module that you actually use? Your reasoning seems to be that Python should contain the functional union of everything at least in Java and PHP if not Perl, Ruby and Tcl as well. Free soft

Re: raise or not to raise [Newbie]

2007-02-03 Thread Robert Kern
Jacol wrote: > I understand that author generated exception and than extracted the name of > function from the exeption. But is any sens in using exeptions service if > we have smthing simpler: just print for example? In my opinion no, it > doesn't make sens. You are correct. The author of that co

Re: Python does not play well with others

2007-02-03 Thread skip
Paul> Yeah well, the Wxpython, PyQt, PyGTK etc. people may feel slighted Paul> that Tkinter got included and their stuff didn't, and the Eric, Paul> Eclipse, Komodo etc. people may feel slighted that IDLE got Paul> included, but that doesn't stop Tkinter and IDLE from being useful

Re: Python does not play well with others

2007-02-03 Thread skip
Jorge> So we should get a better egg support. Then it would all be just Jorge> a matter of easy_install . I'm all in favor of that... Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Decimating Excel files

2007-02-03 Thread [EMAIL PROTECTED]
On Feb 3, 1:43?pm, gonzlobo <[EMAIL PROTECTED]> wrote: > No, I don't want to destroy them (funny how the word 'decimate' has > changed definition over the years) :). > > We have a data acquisition program that saves its output to Excel's > .xls format. Unfortunately, the programmer was too stupid t

Re: Python does not play well with others

2007-02-03 Thread Neil Hodgson
Paul Rubin: > I thought J2SE comes with JSP. Maybe that's not a "framework" in the > fancy sense though. J2SE does not include JSP. Neil -- http://mail.python.org/mailman/listinfo/python-list

Re: confused about resizing array in Python

2007-02-03 Thread John Machin
On Feb 4, 7:41 am, "Ruan" <[EMAIL PROTECTED]> wrote: > Then how about Python's list? > > What is done exactly when list.append is executed? > > For list, is there another larger list initialized and the contents from the > old list is copied to it together with the new appended list? > Qi ren you

Re: confused about resizing array in Python

2007-02-03 Thread Roel Schroeven
Ruan schreef: > "Roel Schroeven" <[EMAIL PROTECTED]> wrote: >> Ruan schreef: >>> My confusion comes from the following piece of code: >>> >>> memo = {1:1, 2:1} >>> def fib_memo(n): >>> global memo >>> if not n in memo: >>> memo[n] = fib_memo(n-1) + fib_memo(n-2) >>> return memo[n] >>> >>> I used t

Definitions of editor and IDE?

2007-02-03 Thread Dick Moores
Are there generally accepted definitions of "editor" and "IDE". Is there a clear-cut distinction between them? I've been looking at the lists of each at python.org, < http://wiki.python.org/moin/PythonEditors>  and < http://wiki.python.org/moin/IntegratedDevelopmentEnvironments>. Many programs ar

Re: Debugging SocketServer.ThreadingTCPServer

2007-02-03 Thread Stuart D. Gathman
On Tue, 16 Jan 2007 09:11:38 -0500, Jean-Paul Calderone wrote: > On Tue, 16 Jan 2007 00:23:35 -0500, "Stuart D. Gathman" > <[EMAIL PROTECTED]> wrote: >>I have a ThreadingTCPServer application (pygossip, part of >>http://sourceforge.net/projects/pymilter). It mostly runs well, but >>occasionally g

.pth configuration method not working

2007-02-03 Thread Mark
Sys.path doesn't recognize any directories that I add using the .pth method. I'm running Windows XP if that helps diagnose the problem. Here is what I've done: The original output of sys.path: ['C:\\Python25\\Lib\\idlelib', 'C:\\WINDOWS\\system32\\python25.zip', 'C:\\Python25\\DLLs', 'C:\\Pytho

Re: Vim scripting with python

2007-02-03 Thread Stuart D. Gathman
On Sat, 03 Feb 2007 05:02:54 -0800, Tool69 wrote: > Does anyone have any advice, and more genraly how to script Vim with > Python ? :py import sys :py print sys.version :help :py > I know I can put some python functions inside my vimrc file like > this : > > function! My_function() > python <<

Re: CTypes

2007-02-03 Thread [EMAIL PROTECTED]
I forgot to mention I am running Windows 98SE. -- http://mail.python.org/mailman/listinfo/python-list

PyGUI show_text()

2007-02-03 Thread Arnd
Heya, any PyGUI users out there? I needed some finer text-positioning on a canvas (ie wanted to center a string wrt a point, something show_text() doesn't provide) So I looked into the sources and found all information, eg the dimensions of the surrounding rectangle are given by mycanvas._font._g

Re: Is Python Right for Me?

2007-02-03 Thread Stuart D. Gathman
On Fri, 02 Feb 2007 15:09:20 -0500, Mister Newbie wrote: > I want to make small, 2D games. I have no programming experience. Is > Python a good choice? Definitely. I teach a class for 7th to 12th grade where I use this tutorial to introduce programming: http://www.livewires.org.uk/python/ http:

Re: .pth configuration method not working

2007-02-03 Thread John Machin
On Feb 4, 10:03 am, "Mark" <[EMAIL PROTECTED]> wrote: > Sys.path doesn't recognize any directories that I add using the .pth > method. I'm running Windows XP if that helps diagnose the problem. > > Here is what I've done: > > The original output of sys.path: > ['C:\\Python25\\Lib\\idlelib', 'C:\\

Re: Python does not play well with others

2007-02-03 Thread Paul Boddie
Chris Mellon wrote: > On 02 Feb 2007 11:10:04 -0800, Paul Rubin > <"http://phr.cx"@nospam.invalid> wrote: > > "Paul Boddie" <[EMAIL PROTECTED]> writes: > > > If the hosting provider doesn't want to install MySQLdb then it may > > > not be a technical issue - perhaps they just can't be bothered to >

Re: confused about resizing array in Python

2007-02-03 Thread Dongsheng Ruan
You mentioned "it doubles in size". Are you saying that a new double sized array is allocated and the contents of the old list is copied there? Then the old list is freed from memory? It seems to be what is called amortized constant. Say the list size is 100, before it is fully used, the append

Re: asyncore DoS vulnerability

2007-02-03 Thread aspineux
On 2 fév, 16:32, "billie" <[EMAIL PROTECTED]> wrote: > >> Why does this exception isn't handled inside asyncore.py? > > To do what ? To raise a custom asyncore error ? > > asyncore aims to be a framework, right? > I think that when select() limit is reached asyncore should just drop > other connect

Re: Decimating Excel files

2007-02-03 Thread gonzlobo
Thanks, but I was looking for a python solution. > Excel has VBA and can do this easily. One thing about > Excel's VBA is that it already understands Excel. -- http://mail.python.org/mailman/listinfo/python-list

Re: result of os.times() is different with 'time' command

2007-02-03 Thread aspineux
Your analysis looks great, maybe the good arguments to report a bug ? On 3 fév, 04:27, [EMAIL PROTECTED] (Douglas Wells) wrote: > [various posting problems corrected and response interspersed in > previous post for purposes of coherent response] > > In article <[EMAIL PROTECTED]>, > > > > "aspin

Re: confused about resizing array in Python

2007-02-03 Thread Roel Schroeven
Dongsheng Ruan schreef: > "Roel Schroeven" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> Ruan schreef: >>> Then how about Python's list? >>> >>> What is done exactly when list.append is executed? >>> >>> For list, is there another larger list initialized and the contents from >

Re: Decimating Excel files

2007-02-03 Thread greg
gonzlobo wrote: > 2. Decimate an Excel file & write... say every other line (user > selectable)... to a new file. Every other line would be bicimating or something, wouldn't it? -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: Python does not play well with others

2007-02-03 Thread Paul Boddie
Paul Rubin wrote: > Ben Finney <[EMAIL PROTECTED]> writes: > > > Since Python is being touted as good for web apps as a competitor to > > > PHP > > > > Python is being touted as a good language for *many* purposes, not > > just web applications. Python is also a "competitor" to Java, to Ruby, > > t

Re: Is Python Right for Me?

2007-02-03 Thread Tony Houghton
In <[EMAIL PROTECTED]>, Stuart D. Gathman <[EMAIL PROTECTED]> wrote: > On Fri, 02 Feb 2007 15:09:20 -0500, Mister Newbie wrote: > >> I want to make small, 2D games. I have no programming experience. Is >> Python a good choice? > > Definitely. I teach a class for 7th to 12th grade where I use this

Re: Determining encoding of a file

2007-02-03 Thread Tony Houghton
In <[EMAIL PROTECTED]>, Ben Finney <[EMAIL PROTECTED]> wrote: > Tony Houghton <[EMAIL PROTECTED]> writes: > >> In Linux it's possible for filesystems to have a different encoding >> from the system's setting. Given a filename, is there a (preferably) >> portable way to determine its encoding? > >

Re: confused about resizing array in Python

2007-02-03 Thread Dongsheng Ruan
This seems to be clever to use reference for list. Is it unique to Python? How about the traditional programming languages like C, Pascal or C++? "Roel Schroeven" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Dongsheng Ruan schreef: >> "Roel Schroeven" <[EMAIL PROTECTED]> wrote

Re: PyGUI show_text()

2007-02-03 Thread greg
Arnd wrote: > I needed some finer text-positioning on a canvas (ie wanted to center > a string wrt a point, something show_text() doesn't provide) Fonts have ascent, descent, height and line_height attributes, and a width() method for measuring the width of a string. You should be able to find out

[OT] main

2007-02-03 Thread Steven Bethard
[EMAIL PROTECTED] wrote: > def main(argv): > try: > optlist, args = getopt.getopt(argv[1:], 'hvo:D:', ['help', > 'verbose']) > except getopt.GetoptError, msg: > sys.stderr.write("preprocess: error: %s" % msg) > sys.stderr.write("See 'preprocess --help'.\n") >

Modified BitTorrent site

2007-02-03 Thread Gerard White
London based start up web services company. Looking for programmer(s) to build a modified BitTorrent e-commerce site. Knowledge of Python, PHP5, JavaScript, AJAX, DHTML Java Applets and MySQL. P2P framework with modified version of BitTorrent client, modern website "sales platform" interface, m

Parser module

2007-02-03 Thread Sulsa
Is there some way to tell parser module (parser.suite function) not to stop parsing after it have found some syntax error but to proceed with parsing and construct the abstract syntax tree for rest of the code. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python does not play well with others

2007-02-03 Thread Paul Rubin
[EMAIL PROTECTED] writes: > Paul> Yeah well, the Wxpython, PyQt, PyGTK etc. people may feel slighted > Paul> that Tkinter got included and their stuff didn't, and the Eric, > Paul> Eclipse, Komodo etc. people may feel slighted that IDLE got > Paul> included, but that doesn't stop Tk

Re: Python does not play well with others

2007-02-03 Thread Paul Rubin
Dennis Lee Bieber <[EMAIL PROTECTED]> writes: > > languages do. PHP hosting providers don't have to install a separate > > PHP to MySQL interface gizmo as far as I know. > > Really? Then why does the MySQL AB download site at > http://dev.mysql.com/downloads/connector/php/ list both a > "Co

Re: Python does not play well with others

2007-02-03 Thread Paul Rubin
"Paul Boddie" <[EMAIL PROTECTED]> writes: > Python should only incorporate functionality in order to offer a > coherent experience (where the omission of functionality would > otherwise lead to a flawed experience). For example, having support > for SSL in the socket module offers a coherent experi

Re: Debugging SocketServer.ThreadingTCPServer

2007-02-03 Thread R. Bernstein
"Stuart D. Gathman" <[EMAIL PROTECTED]> writes: > On Tue, 16 Jan 2007 09:11:38 -0500, Jean-Paul Calderone wrote: > > > On Tue, 16 Jan 2007 00:23:35 -0500, "Stuart D. Gathman" > > <[EMAIL PROTECTED]> wrote: > >>I have a ThreadingTCPServer application (pygossip, part of > >>http://sourceforge.net/p

Re: Python does not play well with others

2007-02-03 Thread Paul Rubin
[EMAIL PROTECTED] writes: > Paul> Why would I expect your employer to solve my problems anyway, even > Paul> if they relate to some module that you actually use? > > Your reasoning seems to be that Python should contain the functional union > of everything at least in Java and PHP if not P

Re: Decimating Excel files

2007-02-03 Thread Phil Schmidt
gonzlobo wrote: > We have a data acquisition program that saves its output to Excel's > .xls format. Unfortunately, the programmer was too stupid to write > files the average user can read. > > I'd like some advice on how to go about: > 1. Reading a large Excel file and chop it into many Excel fil

Re: Decimating Excel files

2007-02-03 Thread gonzlobo
Yeah, it definitely an Excel file (so says Kate). > Is the file format really native Excel, or is a CSV or TSV file? I've > seen apps (one is a data acquisition program, as a matter of fact) > that create "Excel" files that are just CSV or TSV files. Try opening > the file with a text editor to se

Re: Python does not play well with others

2007-02-03 Thread Diez B. Roggisch
Paul Rubin schrieb: > "Diez B. Roggisch" <[EMAIL PROTECTED]> writes: >> And they certainly require special treatment like putting them in the >> classpath, setting up the project directory and the like - no simple >> import will work out of the box, as it would witch python standard lib >> drivers.

MozillaCookieJar doesn't work as expect

2007-02-03 Thread davihigh
OS: WinXP, Python 2.4 latest version I found it doesn't actually load cookies from the exist cookies.txt. Instead, it generate a new one when visit that url. Who can help me check what's problem in following code? Many thanks in advance! cj = cookielib.MozillaCookieJar() cj.load("d:\\temp\\cooki

Re: Python does not play well with others

2007-02-03 Thread Kirk Sluder
In article <[EMAIL PROTECTED]>, "Paul Boddie" <[EMAIL PROTECTED]> wrote: > Quite. I imagine that most GNU/Linux distributions (and various BSDs) > provide at least some version of MySQLdb as a package. Bingo, I've rarely installed python from python.org, or other libraries from sourceforge, etc.

"President Bush ... you are under arrest" - 911 truth video by Dr Morgan Reynolds, Former Chief Economist under Bush

2007-02-03 Thread stj911
You can also save them by right clicking the links and saving them as flv files and download a free flv player. google is your best friend. "Bush Administration Insider Says U.S. Government Behind 911.flv" "http://ash-v31.ash.youtube.com/get_video?video_id=HkpOsUmp-9w"; <--- key video "911 Truth

Re: Decimating Excel files

2007-02-03 Thread Paddy
On Feb 3, 7:43 pm, gonzlobo <[EMAIL PROTECTED]> wrote: > No, I don't want to destroy them (funny how the word 'decimate' has > changed definition over the years) :). > > We have a data acquisition program that saves its output to Excel's > .xls format. Unfortunately, the programmer was too stupid t

Re: main

2007-02-03 Thread Paddy
On Feb 3, 10:53 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Sat, 03 Feb 2007 05:51:56 -0300, "Gabriel Genellina" > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > > > menction that at all. And no one should expect that a beginner would have > > to read section 26.3 on t

Re: Decimating Excel files

2007-02-03 Thread Robert Kern
gonzlobo wrote: > No, I don't want to destroy them (funny how the word 'decimate' has > changed definition over the years) :). > > We have a data acquisition program that saves its output to Excel's > .xls format. Unfortunately, the programmer was too stupid to write > files the average user can r

Re: "President Bush ... you are under arrest" - 911 truth video by Dr Morgan Reynolds, Former Chief Economist under Bush

2007-02-03 Thread Jonathan Curran
dude, please go spam elsewhere. don't post unrelated material here. -- http://mail.python.org/mailman/listinfo/python-list

Re: log parser design question

2007-02-03 Thread avidfan
On Mon, 29 Jan 2007 23:11:32 -0600, avidfan <[EMAIL PROTECTED]> wrote: >On 28 Jan 2007 21:20:47 -0800, "Paul McGuire" <[EMAIL PROTECTED]> >wrote: > >>On Jan 27, 10:43 pm, avidfan <[EMAIL PROTECTED]> wrote: >>> I need to parse a log file using python and I need some advice/wisdom >>> on the best wa

Re: nokia pys60 contacts + calendar

2007-02-03 Thread Torsten
Hi, "Programming with Python for Series 60 Platform" http://eugen.leitl.org/Programming_with_Python.pdf "Python for Series 60 Platform - API Reference" PythonForS60_doc_1_3_17.pdf should answer your questions Torsten -- http://mail.python.org/mailman/listinfo/python-list

<    1   2