ANN: Leo 4.4.6 beta 1 released

2007-12-17 Thread Edward K Ream
Leo 4.4.6 beta 1 is available at: http://sourceforge.net/project/showfiles.php?group_id=3458package_id=29106 Leo 4.4.6 fixes several recently reported bugs, all minor. Leo is a text editor, data organizer, project manager and much more. See: http://webpages.charter.net/edreamleo/intro.html The

[CfP] Workshop on Self-sustaining Systems (S3) 2008

2007-12-17 Thread Martin v. Löwis
*** Workshop on Self-sustaining Systems (S3) 2008 *** May 15-16, 2008 Potsdam, Germany http://www.swa.hpi.uni-potsdam.de/s3/ -- Call for papers: The Workshop on Self-sustaining Systems (S3) is a forum for discussion of topics relating to computer systems and languages that are able to

Cookie expiration time

2007-12-17 Thread dmitry . ema
Hi All ! I'm using httplib2 library in my python script for interactions with remote web-server. Remote server responses me cookies with the set expiration time. I'd like to extend this time. Does anybody know how can I do it using this library ? --

Re: looping list?

2007-12-17 Thread Gabriel Genellina
En Thu, 13 Dec 2007 06:07:46 -0300, datulaida ali [EMAIL PROTECTED] escribi�: i'm trying to insert value into list according to the key (ASCII) that i generate.. example : win = 95, so must insert into list[95] and = 70, so must insert into list[70] this is my coding.. The indentation

Re: programming container object

2007-12-17 Thread Paul McGuire
On Dec 17, 1:18 am, bambam [EMAIL PROTECTED] wrote: I wish to create a generic container object, devlist, such that devlist.method(arguments) runs as for each dev in devlist.pool: dev.method(arguments) and s = devlist.method(arguments) runs as for each dev in

Re: How to generate pdf file from an html page??

2007-12-17 Thread abhishek
On Dec 16, 10:21 pm, Zentrader [EMAIL PROTECTED] wrote: I'm sure it can be done but there is no reason to reinvent the wheel unless it's for a programming exercise. You can use pdftohtml and run it from a Python program if you want.http://pdftohtml.sourceforge.net/ Hi Zentrader, thanks for

free video lessons on 12 computer Science Courses

2007-12-17 Thread AK444
Hi Guys, Good news is that as many as 12 courses from top universities are providing free video lessons http://freevideolectures.com/ComputerScience/ on all the basic courses. All you need to have is Real Player installed on your PC. I think it is useful to you --

Re: programming container object

2007-12-17 Thread Steven D'Aprano
On Mon, 17 Dec 2007 18:18:11 +1100, bambam wrote: I wish to create a generic container object, devlist, such that devlist.method(arguments) runs as for each dev in devlist.pool: dev.method(arguments) and s = devlist.method(arguments) runs as for each

Announcement: pacparser - a c library to parse proxy auto-config (pac) files

2007-12-17 Thread Manu Garg
Hi Folks, I am very pleased to announce the release of pacparser - a C library to parse proxy auto-config (PAC) scripts. Needless to say, PAC files are now a widely accepted method for proxy configuration management and almost all popular browsers support them. The idea behind pacparser is to

Re: Finite State Machine GUI editor in python?

2007-12-17 Thread Alexander Schliep
Hendrik van Rooyen [EMAIL PROTECTED] writes: I am looking for a similar front end, going from pretty pictures of state diagrams to some sort of state machine descriptor language or specification file, and I am not very fussy about the format of the output at this stage. In case nothing

Re: programming container object

2007-12-17 Thread Diez B. Roggisch
Steven D'Aprano wrote: On Mon, 17 Dec 2007 18:18:11 +1100, bambam wrote: I wish to create a generic container object, devlist, such that devlist.method(arguments) runs as for each dev in devlist.pool: dev.method(arguments) and s = devlist.method(arguments)

Imports in Packages

2007-12-17 Thread tjhnson
While working within a package...what is the 'best practice' way to do your imports. a/__init__.py a/one.py a/two.py a/b/__init__.py a/b/cat.py a/b/dog.py a/c/cow.py Suppose I am working in a/c/cow.py and I need something from a/b/ dog.py. If a/b/__init__.py contains what I need from dog.py,

Re: programming container object

2007-12-17 Thread Hrvoje Niksic
Diez B. Roggisch [EMAIL PROTECTED] writes: In any case, it is not possible, because the instance method cannot know whether its result is being assigned to a name or just thrown away. This isn't entirely correct - there _are_ ways to know.

Re: OpenOpt install

2007-12-17 Thread dmitrey
Use python setup.py install Regards, D On Dec 16, 2:27 pm, Neal Becker [EMAIL PROTECTED] wrote: What do I need to do? I have numpy, scipy (Fedora F8) cdopenopt/ [EMAIL PROTECTED] python setup.py build running build running config_cc unifing config_cc, config, build_clib, build_ext,

Re: why this error?

2007-12-17 Thread Gabriel Genellina
En Mon, 17 Dec 2007 02:45:34 -0300, python.jiang [EMAIL PROTECTED] escribi�: thanks all first. but i had one class bellow to get object info what user had inputed when run application. because the problem that i had showed yestoday, i must write the code so hard to understand. can any

Re: in-client web server

2007-12-17 Thread [EMAIL PROTECTED]
I've done something reasonably similar using CherryPy as the webserver. The main application I wrote stored data in a sqlite3 database. A separate thread then ran the CherryPy server process. Each web browser call is mapped (by CherryPy) to a class method which dealt with connecting to the

Re: free video lessons on 12 computer Science Courses

2007-12-17 Thread MonkeeSage
On Dec 17, 3:13 am, AK444 [EMAIL PROTECTED] wrote: Hi Guys, Good news is that as many as 12 courses from top universities are providing free video lessons http://freevideolectures.com/ComputerScience/ on all the basic courses. All you need to have is Real Player installed on your PC. I

Deleting lines from a file

2007-12-17 Thread Horacius ReX
Hi, I need to write a program which reads an external text file. Each time it reads, then it needs to delete some lines, for instance from second line to 55th line. The file is really big, so what do you think is the fastest method to delete specific lines in a text file ? Thanks --

Re: Deleting lines from a file

2007-12-17 Thread Diez B. Roggisch
Horacius ReX wrote: Hi, I need to write a program which reads an external text file. Each time it reads, then it needs to delete some lines, for instance from second line to 55th line. The file is really big, so what do you think is the fastest method to delete specific lines in a text

arrays in lists

2007-12-17 Thread Peter Stahlir
Hi! I have a list of arrays and want to find an array with list.index(x). Is that possible. I get an ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() For example: from numpy import array a = array([1]) b = array([2]) c = [a,b] d =

Re: Deleting lines from a file

2007-12-17 Thread Larry Bates
Horacius ReX wrote: Hi, I need to write a program which reads an external text file. Each time it reads, then it needs to delete some lines, for instance from second line to 55th line. The file is really big, so what do you think is the fastest method to delete specific lines in a text file

Re: Deleting lines from a file

2007-12-17 Thread Michael Bentley
On Dec 17, 2007, at 5:34 AM, Horacius ReX wrote: I need to write a program which reads an external text file. Each time it reads, then it needs to delete some lines, for instance from second line to 55th line. The file is really big, so what do you think is the fastest method to delete

Re: Deleting lines from a file

2007-12-17 Thread Horacius ReX
and regardless of the speed, what do you think would be the best method to do this ? Michael Bentley wrote: On Dec 17, 2007, at 5:34 AM, Horacius ReX wrote: I need to write a program which reads an external text file. Each time it reads, then it needs to delete some lines, for instance

Re: arrays in lists

2007-12-17 Thread bcroq
On 17 déc, 14:05, Peter Stahlir [EMAIL PROTECTED] wrote: For example: from numpy import array a = array([1]) b = array([2]) c = [a,b] d = c.index(a) No problem here, Python 2.4.4 -- http://mail.python.org/mailman/listinfo/python-list

Re: int vs long

2007-12-17 Thread Nick Craig-Wood
Gabriel Genellina [EMAIL PROTECTED] wrote: En Sun, 16 Dec 2007 20:28:02 -0300, Troels Thomsen nej tak...@bag.python.org escribi?: The readFile function from the win32 package aparently really expect an integer : def inWaiting(self): Returns the number of bytes

Re: Deleting lines from a file

2007-12-17 Thread Tim Chase
I need to write a program which reads an external text file. Each time it reads, then it needs to delete some lines, for instance from second line to 55th line. The file is really big, so what do you think is the fastest method to delete specific lines in a text file ? Generally, with files

Re: [OT] Fractions on musical notation

2007-12-17 Thread Neil Cerutti
On 2007-12-17, Gabriel Genellina [EMAIL PROTECTED] wrote: On 16 dic, 06:40, Lie [EMAIL PROTECTED] wrote: [btw, off topic, in music, isn't 1/4 and 2/8 different? I'm not very keen of music though, so correct me if I'm wrong.] As a time signature 1/4 has no sense, but 3/4 and 6/8 are different

Re: Deleting lines from a file

2007-12-17 Thread Diez B. Roggisch
Horacius ReX wrote: and regardless of the speed, what do you think would be the best method to do this ? Without more information about the contents of the file and who's reading them, we can't say more. if the reader is not under your control doesn't deal with deletion-marks or anything

Re: Finite State Machine GUI editor in python?

2007-12-17 Thread MonkeeSage
On Dec 16, 1:55 am, Hendrik van Rooyen [EMAIL PROTECTED] wrote: I have spent some time googling and on wiki and came up with pyFSA in python. It may end up being useful, but it is not directly what I am looking for, as there is no GUI that I can see. I know about SMC, but it is not Python,

Re: Deleting lines from a file

2007-12-17 Thread Vladimir Rusinov
On 12/17/07, Horacius ReX [EMAIL PROTECTED] wrote: and regardless of the speed, what do you think would be the best method to do this ? use sqlite -- Vladimir Rusinov GreenMice Solutions: IT-решения на базе Linux http://greenmice.info/ -- http://mail.python.org/mailman/listinfo/python-list

Static linking of python and pyqt

2007-12-17 Thread Markus Dahlbokum
Hello, I'm trying to link python statically with qt and pyqt. I've tried this in several ways but never succeeded. At the moment the final make runs without errors but I get import errors when accessing pyqt. How can I solve this problem? Markus # installing zipimport hook import zipimport #

checking for negative values in a list

2007-12-17 Thread vimal
hi all, -- http://mail.python.org/mailman/listinfo/python-list

checking for negative values in a list

2007-12-17 Thread vimal
hi all, i am new to python guys. hope u will help me with this i have a list of numbers say a = [1,-1,3,-2,4,-6] how should i check for negative values in the list -- http://mail.python.org/mailman/listinfo/python-list

Re: programming container object

2007-12-17 Thread Paul McGuire
On Dec 17, 2:31 am, Paul McGuire [EMAIL PROTECTED] wrote: On Dec 17, 1:18 am, bambam [EMAIL PROTECTED] wrote: I wish to create a generic container object, devlist, such that devlist.method(arguments) runs as for each dev in devlist.pool: dev.method(arguments)

Re: checking for negative values in a list

2007-12-17 Thread Marc 'BlackJack' Rintsch
On Mon, 17 Dec 2007 06:20:23 -0800, vimal wrote: i have a list of numbers say a = [1,-1,3,-2,4,-6] how should i check for negative values in the list In [6]: a = [1, -1, 3, -2, 4, -6] In [7]: any(n 0 for n in a) Out[7]: True Ciao, Marc 'BlackJack' Rintsch --

Re: checking for negative values in a list

2007-12-17 Thread Tim Chase
i am new to python guys. i have a list of numbers say a = [1,-1,3,-2,4,-6] how should i check for negative values in the list I'm not sure if this is a homework problem, as it seems to be a fairly simple programming problem whether you know Python or not. If you're using 2.5

Re: checking for negative values in a list

2007-12-17 Thread vimal
thanks for your help Tim and Marc. :) -- http://mail.python.org/mailman/listinfo/python-list

Re: free video lessons on 12 computer Science Courses

2007-12-17 Thread MonkeeSage
On Dec 17, 6:12 am, MonkeeSage [EMAIL PROTECTED] wrote: On Dec 17, 3:13 am, AK444 [EMAIL PROTECTED] wrote: Hi Guys, Good news is that as many as 12 courses from top universities are providing free video lessons http://freevideolectures.com/ComputerScience/ on all the basic courses.

Re: Deleting lines from a file

2007-12-17 Thread Michael Bentley
On Dec 17, 2007, at 6:25 AM, Horacius ReX wrote: and regardless of the speed, what do you think would be the best method to do this ? The first thing I'd look into is reading the whole file into memory, making all the deletions, and finally writing it out. But you said the file is big,

Debugging pipe IPC

2007-12-17 Thread Jim B. Wilson
I have the mother (of all) application(s, written in C++) that occasionally outsources certain tasks to a child Python script. The mother fork/execs (or equivalent) the child and then begins serving the child's requests. The child/client sends requests on its stdout and receives responses on

Free LINUX Tips and Triks - Building Interactive Movie With Ming

2007-12-17 Thread rada . lambretha
Free LINUX Tips and Triks - Building Interactive Movie With Ming 001. Linux What are the benefits of Linux 002. Which Linux distribution should I use 003. Linux redhat network programming 004. LINUX Using Open Source APIs to Save Time 005. LINUX TIPS - Uploading a File with a Simple Program Using

Re: How to generate pdf file from an html page??

2007-12-17 Thread Grant Edwards
On 2007-12-16, abhishek [EMAIL PROTECTED] wrote: Hi everyone, I am trying to generate a PDF printable format file from an html page. Is there a way to do this using python. If yes then which library and functions are required and if no then reasons why it cant be done. Here's one way:

Re: [OT] Fractions on musical notation

2007-12-17 Thread Greg Lindstrom
As a time signature 1/4 has no sense, You've never played and Grainger, have you? :-) --greg -- http://mail.python.org/mailman/listinfo/python-list

is it possible to install 2 Python versions on windows XP ?

2007-12-17 Thread Stef Mientki
hello, I'm currently using Python 2.4, and I don't dare to switch to 2.5, because I depend heavily on Scipy, which is based on 2.4 To test some other Python programs I need Python version 2.5. I've tried to install 2.5 in the past, but got a lot of trouble trying to uninstall it to go back to

Re: is it possible to install 2 Python versions on windows XP ?

2007-12-17 Thread Dan
On Dec 17, 11:07 am, Stef Mientki [EMAIL PROTECTED] wrote: hello, I'm currently using Python 2.4, and I don't dare to switch to 2.5, because I depend heavily on Scipy, which is based on 2.4 To test some other Python programs I need Python version 2.5. I've tried to install 2.5 in the past,

Re: opposite of zip()?

2007-12-17 Thread Rich Harkins
[EMAIL PROTECTED] wrote: Given a bunch of arrays, if I want to create tuples, there is zip(arrays). What if I want to do the opposite: break a tuple up and append the values to given arrays: map(append, arrays, tupl) except there is no unbound append() (List.append() does not exist,

Re: is it possible to install 2 Python versions on windows XP ?

2007-12-17 Thread Tim Golden
Dan wrote: On Dec 17, 11:07 am, Stef Mientki [EMAIL PROTECTED] wrote: hello, I'm currently using Python 2.4, and I don't dare to switch to 2.5, because I depend heavily on Scipy, which is based on 2.4 To test some other Python programs I need Python version 2.5. I've tried to install 2.5

Suite of the imaginary beings now complete for free download!

2007-12-17 Thread ubumusic
You can dowload the complete Suite from Ubú's new blog: http://ubumusic.blogspot.com/ Thanks, greetings -- http://mail.python.org/mailman/listinfo/python-list

ANN: Leo 4.4.6 beta 1 released

2007-12-17 Thread Edward K Ream
Leo 4.4.6 beta 1 is available at: http://sourceforge.net/project/showfiles.php?group_id=3458package_id=29106 Leo 4.4.6 fixes several recently reported bugs, all minor. Leo is a text editor, data organizer, project manager and much more. See: http://webpages.charter.net/edreamleo/intro.html The

Re: opposite of zip()?

2007-12-17 Thread Matt Nordhoff
Rich Harkins wrote: [EMAIL PROTECTED] wrote: Given a bunch of arrays, if I want to create tuples, there is zip(arrays). What if I want to do the opposite: break a tuple up and append the values to given arrays: map(append, arrays, tupl) except there is no unbound append() (List.append()

Re: Debugging pipe IPC

2007-12-17 Thread Ian Clark
Jim B. Wilson wrote: I have the mother (of all) application(s, written in C++) that occasionally outsources certain tasks to a child Python script. The mother fork/execs (or equivalent) the child and then begins serving the child's requests. The child/client sends requests on its stdout

Getting al classes inside a package

2007-12-17 Thread Matias Surdi
How can I get all the clasess inside a package (including it subpackages) ? for example, I have a package with classes A and B and with a subpackage wichs has class C. How can I get a list (and a path) of the classes that exists under the root package ? Thanks a lot! --

Using 'property' in evolving code

2007-12-17 Thread Steven Clark
Hi all- I was reading http://dirtsimple.org/2004/12/python-is-not-java.html, in particular the part about getters and setters are evil: In Java, you have to use getters and setters because using public fields gives you no opportunity to go back and change your mind later to using getters and

Re: Using 'property' in evolving code

2007-12-17 Thread Chris Mellon
On Dec 17, 2007 11:48 AM, Steven Clark [EMAIL PROTECTED] wrote: Hi all- I was reading http://dirtsimple.org/2004/12/python-is-not-java.html, in particular the part about getters and setters are evil: In Java, you have to use getters and setters because using public fields gives you no

Re: Python Exponent Question

2007-12-17 Thread Michael J. Fromberger
In article [EMAIL PROTECTED], databyss [EMAIL PROTECTED] wrote: I have a simple program and the output isn't what I expect. Could somebody please explain why? Here's the code: #simple program print v = 2 v = 2 print v**v = 2**2 =, v**v print v**v**v = 2**2**2 =, v**v**v print

Re: Newbie design problem

2007-12-17 Thread Jonathan Gardner
On Dec 14, 8:02 am, [EMAIL PROTECTED] wrote: Lex is very crude. I've found that it takes about half a day to organize your token definitions and another half day to write a tokenizer by hand. What's the point of the second half-day's work? As someone who has earned a BS in Physics, I have

Re: MySQLdb syntax issues - HELP

2007-12-17 Thread John Nagle
Luke wrote: Bruno Desthuilliers wrote: Luke a écrit : (snip) cursor.execute( CREATE TABLE %s ( name CHAR(40), gender CHAR(40), job CHAR(40), levelTEXT, str TEXT, dex TEXT,

SWIG C Extensions, win32 MinGW: undefined reference

2007-12-17 Thread newbie73
Going through the tutorial on http://swig.org, I created the example files (pasted below). After generating the _wrap file, I tried compiling (using mingw32) and received a lot of undefined reference compiler errors: ..\build\temp.win32-2.5\Release\example_wrap.o:example_wrap.c:(.text+0x670f):

Re: urlparse.urlparse bug - FIX/IN TRACKER

2007-12-17 Thread John Nagle
John Nagle wrote: Here's a hostile URL that urlparse.urlparse seems to have mis-parsed. Added to tracker, with proposed fix: http://bugs.python.org/issue1637 John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: [OT] Fractions on musical notation

2007-12-17 Thread Terry Reedy
Dan Upton [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] | Since the US, at least, uses whole/half/quarter/eighth/sixteenth... | notes, three-quarter and six-eight time falls out... | | I don't think this is technically true, but I've never been able to | tell the

Re: [OT] Fractions on musical notation

2007-12-17 Thread Dan Upton
On Dec 16, 2007 10:32 PM, Terry Reedy [EMAIL PROTECTED] wrote: Dan Upton [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] | Since the US, at least, uses whole/half/quarter/eighth/sixteenth... | notes, three-quarter and six-eight time falls out... | | I don't think this

Re: [OT] Fractions on musical notation

2007-12-17 Thread Terry Reedy
Dan Upton [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] | | notes, three-quarter and six-eight time falls out... | | | | I don't think this is technically true, but I've never been able to | | tell the difference. | | I learned three-four, four-four, six-eight, etc. as time

Re: Debugging pipe IPC

2007-12-17 Thread Jim B. Wilson
Ian Clark pointed me to: ... the cmd module. http://docs.python.org/lib/module-cmd.html Yes, I found that, but I could only get it to print a nice interactive prompt, (Cmd), read a line of input and discard it. Apparently, I'm too stupid to figure out how to hook it into python. Jim --

New to Python Would like debug advice

2007-12-17 Thread PatrickMinnesota
Yep, I'm new to the language, it's been a couple of months. I opted for gvim and console window for developing on a Windows XP box. I'm not a huge fan of IDEs except for when I need some debugging. I've done my googling and see a bunch of options out there for a debugging solution for Python on

Re: opposite of zip()?

2007-12-17 Thread Rich Harkins
Matt Nordhoff wrote: [snip] As Paddy wrote, zip is its own unzip: zipped = zip((1, 2, 3), (4, 5, 6)) zipped [(1, 4), (2, 5), (3, 6)] unzipped = zip(*zipped) unzipped [(1, 2, 3), (4, 5, 6)] Neat and completely confusing, huh? :-)

Re: MySQLdb syntax issues - HELP

2007-12-17 Thread Bruno Desthuilliers
Luke a écrit : Bruno Desthuilliers wrote: Luke a écrit : (snip) cursor.execute( CREATE TABLE %s ( name CHAR(40), gender CHAR(40), job CHAR(40), levelTEXT, str TEXT, dex TEXT,

Another newbie design question

2007-12-17 Thread MartinRinehart
I've designed a language, Decaf, for beginners. I've got block comments but not multi-line strings. If you can only have one or the other, which is more helpful? Should I have both? (Make a strong argument here: my design principal is, Designed by a backpacker: when in doubt, leave it out.) --

python webserver question

2007-12-17 Thread dale bryan
I am working on a task to display a wireless network nodes using Google Earth (GE) with KML network links. I am using a simple python webserver (see code below) to serve up the python scripts as KML output to GE for this. import BaseHTTPServer import CGIHTTPServer class

Re: Another newbie design question

2007-12-17 Thread Jim B. Wilson
[EMAIL PROTECTED] wrote: If you can only [block comments] or [multi-line strings] the other, which is more helpful? I'm afraid no one would use a language that didn't feature block comments. However, inspection of a vast corpus of code might lead one to believe that any commenting

Re: Debugging pipe IPC

2007-12-17 Thread Ian Clark
Jim B. Wilson wrote: ... The child/client sends requests on its stdout and receives responses on stdin. So, why can't you just run this client on the command line and let the shell handle stdin/stdout for you? Ian Clark -- http://mail.python.org/mailman/listinfo/python-list

Re: Debugging pipe IPC

2007-12-17 Thread Jim B. Wilson
Ian Clark wrote: Jim B. Wilson wrote: ... The child/client sends requests on its stdout and receives responses on stdin. So, why can't you just run this client on the command line and let the shell handle stdin/stdout for you? I'm not sure I understand the topology of your proposal?

Re: Gnu/Linux dialogue boxes in python

2007-12-17 Thread Paul Boddie
On 2 Des, 07:02, Donn Ingle [EMAIL PROTECTED] wrote: Paul Boddie wrote: but I'll either upload a new release, or I'll make the code available separately. Thanks, give me a shout when you do -- if you remember! I've now uploaded a new release of the desktop module which is now, in fact, a

Re: OpenOpt install

2007-12-17 Thread Robert Kern
dmitrey wrote: Use python setup.py install People should be able to run the distutils commands independently. What are you trying to achieve with this block of code that follows the setup() call? new_name = 'tmp55' os.rename('scikits', new_name) newPath = [] for directory in

Re: arrays in lists

2007-12-17 Thread Robert Kern
Peter Stahlir wrote: Hi! I have a list of arrays and want to find an array with list.index(x). Is that possible. I get an ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() For example: from numpy import array a = array([1]) b =

Re: Another newbie design question

2007-12-17 Thread Bruno Desthuilliers
Jim B. Wilson a écrit : [EMAIL PROTECTED] wrote: If you can only [block comments] or [multi-line strings] the other, which is more helpful? I'm afraid no one would use a language that didn't feature block comments. Hem... May I remind you that Python doesn't have block comments ?-)

Re: New to Python Would like debug advice

2007-12-17 Thread Bruno Desthuilliers
PatrickMinnesota a écrit : Yep, I'm new to the language, it's been a couple of months. I opted for gvim and console window for developing on a Windows XP box. I'm not a huge fan of IDEs except for when I need some debugging. I've done my googling and see a bunch of options out there for a

Re: Imports in Packages

2007-12-17 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : While working within a package...what is the 'best practice' way to do your imports. a/__init__.py a/one.py a/two.py a/b/__init__.py a/b/cat.py a/b/dog.py a/c/cow.py Suppose I am working in a/c/cow.py and I need something from a/b/ dog.py. If

Re: Newbie edit/compile/run cycle question

2007-12-17 Thread Jan Claeys
Op Mon, 10 Dec 2007 16:00:04 -0800, schreef Matimus: better written: python -mpy_compile FILENAME The -m option doesn't work in all versions of cpython (I think since v2.4, or maybe 2.3?). -- JanC -- http://mail.python.org/mailman/listinfo/python-list

Re: MySQL_python install failed on Ubuntu 7.1

2007-12-17 Thread Bruno Desthuilliers
Bruza a écrit : I installed MySQL 5.0.45 on Ubuntu 7.1 and download MySQL_python from Sourceforge (http://sourceforge.net/project/showfiles.php? group_id=22307). Then I untar the package and executed python setup.py install. But I got compilation errors (see part of the failed messages

python web server questions

2007-12-17 Thread dalebryan1
I am working on a task to display a wireless network nodes using Google Earth (GE) with KML network links. I am using a simple python webserver (see code below) to serve up the python scripts as KML output to GE for this. import BaseHTTPServer import CGIHTTPServer class

Re: Another newbie design question

2007-12-17 Thread Patrick Mullen
On Dec 17, 2007 1:10 PM, Bruno Desthuilliers [EMAIL PROTECTED] wrote: Hem... May I remind you that Python doesn't have block comments ?-) I suppose we could argue semantics, since strings are actually processed, but they are basically block comments. So, there we are, multiline strings AND

Re: Another newbie design question

2007-12-17 Thread Bruno Desthuilliers
Patrick Mullen a écrit : On Dec 17, 2007 1:10 PM, Bruno Desthuilliers [EMAIL PROTECTED] wrote: Hem... May I remind you that Python doesn't have block comments ?-) I suppose we could argue semantics, since strings are actually processed, You guessed !-) but they are basically block

Re: DNS servers in Python - which ones are a good base for work?

2007-12-17 Thread Jan Claeys
Op Tue, 11 Dec 2007 11:10:52 -0800, schreef John Nagle: I need to do a non-standard DNS server in Python. This is for a spam blacklist type DNS server, not for IP lookup. dnspython seems to be client side only. Oak DNS is deprecated. Suggestions? $ wajig search python-twisted-names

error during call to cPickle

2007-12-17 Thread Chris Diehl
hello, when pickling a very large object (~200 MB) in python 2.4.4 with cPickle to a file, I get the following errors: python(14896) malloc: *** vm_allocate(size=8421376) failed (error code=3) python(14896) malloc: *** error: can't allocate region python(14896) malloc: *** set a breakpoint in

Re: arrays in lists

2007-12-17 Thread Rafael Sachetto
No problem here too. Using python 2.5 on Ubuntu Gutsy and the newest NumPy 2007/12/17, Robert Kern [EMAIL PROTECTED]: Peter Stahlir wrote: Hi! I have a list of arrays and want to find an array with list.index(x). Is that possible. I get an ValueError: The truth value of an array with

Re: arrays in lists

2007-12-17 Thread Robert Kern
Rafael Sachetto wrote: No problem here too. Using python 2.5 on Ubuntu Gutsy and the newest NumPy That's a bug, then. It should fail. It looks like we're not raising the exception when there is only one element. -- Robert Kern I have come to believe that the whole world is an enigma, a

Re: arrays in lists

2007-12-17 Thread Robert Kern
Rafael Sachetto wrote: No problem here too. Using python 2.5 on Ubuntu Gutsy and the newest NumPy Okay, I just checked with Travis and we do allow 1-element arrays to have a truth value because it is unambiguous whereas n-element arrays are ambiguous. Regardless, *in general* one cannot use

Deploying embedded Python

2007-12-17 Thread Andreas Raab
Hi - I'm currently looking into a few deployment issues with our embedded Python interpreter and I'm looking for any information about deploying embedded Python that people may have. Specifically, I'm looking for the following information: 1) How to define a useful subset of the stdlib that

Keyword args to SimpleXMLRPCServer

2007-12-17 Thread Sean DiZazzo
Why is the following not working? Is there any way to get keyword arguments working with exposed XMLRPC functions? server.py import SocketServer from SimpleXMLRPCServer import SimpleXMLRPCServer,SimpleXMLRPCRequestHandler # Threaded mix-in class

Re: Handling cookies without urllib2 and cookielib

2007-12-17 Thread Joshua Kugler
Gabriel Genellina wrote: On 14 dic, 23:44, Joshua Kugler [EMAIL PROTECTED] wrote: I'm using HTTPlib to construct some functional tests for a web app we're writing. We're not using urllib2 because we need support for PUT and DELETE methods, which urllib2 does not do. We also need

Re: Keyword args to SimpleXMLRPCServer

2007-12-17 Thread Sean DiZazzo
On Dec 17, 4:13 pm, Sean DiZazzo [EMAIL PROTECTED] wrote: Why is the following not working? Is there any way to get keyword arguments working with exposed XMLRPC functions? server.py import SocketServer from SimpleXMLRPCServer import

very puzzling doctest behaviour

2007-12-17 Thread André
Hi everyone, I've run into a very puzzling doctest behaviour - I'm trying to narrow down the case of it but I'm dealing with multiple files being imported for one of the case and I have not, so far, created a simple example. However, just in case someone had run into something similar, I thought

Re: very puzzling doctest behaviour

2007-12-17 Thread André
Oops, sorry, I made an error in the original description of the problem (test 4 5 below) On Dec 17, 8:25 pm, André [EMAIL PROTECTED] wrote: Hi everyone, I've run into a very puzzling doctest behaviour - I'm trying to narrow down the case of it but I'm dealing with multiple files being

Re: Keyword args to SimpleXMLRPCServer

2007-12-17 Thread Terry Reedy
Sean DiZazzo [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] | Why is the following not working? Is there any way to get keyword | arguments working with exposed XMLRPC functions? | | server.py | import SocketServer | from SimpleXMLRPCServer import |

Re: int vs long

2007-12-17 Thread Gabriel Genellina
En Mon, 17 Dec 2007 10:30:05 -0300, Nick Craig-Wood [EMAIL PROTECTED] escribió: Gabriel Genellina [EMAIL PROTECTED] wrote: En Sun, 16 Dec 2007 20:28:02 -0300, Troels Thomsen nej tak...@bag.python.org escribi?: The readFile function from the win32 package aparently really expect an

[TRAC] WikiInclude on 0.11 - Noah Kantrowitz blocks bug-fix

2007-12-17 Thread Ilias Lazaridis
Essence: * Deletion of valid defect reports on trac community resources The WikiInclude plugin is not recognised on trac 0.11, thus I took a look an made a small addition to the setup.py (the entry_point). Other users have the same problem, thus I filed a ticket in the trac- hacks community

Re: [OT] Fractions on musical notation

2007-12-17 Thread Gabriel Genellina
En Mon, 17 Dec 2007 10:35:39 -0300, Neil Cerutti [EMAIL PROTECTED] escribió: On 2007-12-17, Gabriel Genellina [EMAIL PROTECTED] wrote: On 16 dic, 06:40, Lie [EMAIL PROTECTED] wrote: [btw, off topic, in music, isn't 1/4 and 2/8 different? I'm not very keen of music though, so correct me if

Re: Getting al classes inside a package

2007-12-17 Thread Gabriel Genellina
En Mon, 17 Dec 2007 14:20:38 -0300, Matias Surdi [EMAIL PROTECTED] escribió: How can I get all the clasess inside a package (including it subpackages) ? for example, I have a package with classes A and B and with a subpackage wichs has class C. How can I get a list (and a path) of the

Re: Deploying embedded Python

2007-12-17 Thread Graham Dumpleton
On Dec 18, 11:07 am, Andreas Raab [EMAIL PROTECTED] wrote: Hi - I'm currently looking into a few deployment issues with our embedded Python interpreter and I'm looking for any information about deploying embedded Python that people may have. Specifically, I'm looking for the following

Re: Deploying embedded Python

2007-12-17 Thread Andreas Raab
Graham Dumpleton wrote: 2) How to isolate the embedded interpreter from environmental effects. I have found that on occasion, the interpreter would pick up stray installations which can cause weird problems. Which environmental settings affect the startup of an embedded Python interpreter?

  1   2   >