Python-URL! - weekly Python news and links (Sep 17)

2007-09-17 Thread Gabriel Genellina
QOTW: I learn something valuable from comp.lang.python every week, and most of it has nothing to do with Python. - Richie Hindle Ninety percent of all problems on top of the stove are caused because people don't preheat their pan properly. - Christopher Kimball, on the Zen that apparently

ANNOUNCE: PyQt3Support r1 - Python bindings for Qt3Support

2007-09-17 Thread Matteo Bertini
PyQt3Support - Python bindings for Qt3Support http://www.develer.com/oss/PyQt3Support What is this? PyQt3Support is an extension to PyQt4 that adds bindings to Qt's Qt3Support library for usage from the Python language. This is very helpful to migrate existing PyQt3 applications

August PSF Board meeting minutes available

2007-09-17 Thread David Goodger
Minutes of a Regular Meeting of the Board of Directors of the Python Software Foundation, August 13, 2007: http://www.python.org/psf/records/board/minutes/2007-08-13/ -- David Goodger http://python.net/~goodger -- http://mail.python.org/mailman/listinfo/python-announce-list Support the

ANN: Python FTP Server library (pyftpdlib) 0.2.0 released

2007-09-17 Thread Giampaolo Rodola'
Hi, I'm pleased to announce release 0.2.0 of Python FTP Server library (pyftpdlib). http://code.google.com/p/pyftpdlib/ === About === Python FTP server library provides an high-level portable interface to easily write asynchronous FTP servers with Python. Based on asyncore framework pyftpdlib

Re: Try this

2007-09-17 Thread [EMAIL PROTECTED]
On Sep 16, 9:27?pm, Gabriel Genellina [EMAIL PROTECTED] wrote: En Sun, 16 Sep 2007 21:58:09 -0300, [EMAIL PROTECTED] [EMAIL PROTECTED] escribi : I'm eagerly awaiting publication of your professional specification for correctly detecting the encoding of an arbitrary stream of bytes

Re: Coming from Perl

2007-09-17 Thread Bryan Olson
Amer Neely wrote: I don't have shell access but I can run 'which python' from a Perl script, and I will try the different shebang line you suggested. And after trying it, Amer Neely reported: I tried `which python` and `whereis python` and got 0 back as a result. So it seems Python is not

Re: Can't see the arguements when use Python in WSH.

2007-09-17 Thread GaryLee
On 9 16 , 9 09 , Duncan Booth [EMAIL PROTECTED] wrote: GaryLee [EMAIL PROTECTED] wrote: Does anyone have the same situation? Is it my pywin32 package corrupted? I've downloaded the last pywin32 package and executed the site-packages\win32comext\axscript\client\pyscript.py to register the

Re: Tkinter pack difficulty

2007-09-17 Thread Simon Forman
Thanks everyone for the incredibly helpful replies! I got the effect I wanted, no problem. I don't know why I didn't think to remove the expand option. I thought the sticky option would constrain the expansion. Thanks again, ~Simon -- http://mail.python.org/mailman/listinfo/python-list

Re: Try this

2007-09-17 Thread Neil Hodgson
GeorgeRXZ: Then Open the Notepad and type the following sentence, and save the file and close the notepad. Now reopen the file and you will find out that, Notepad is not able to save the following text line. This is a known issue with Notepad. See the Unicode detection section of

adodb with mysql - connection string syntax for filepath

2007-09-17 Thread Mridula Ramesh
Dear all, Hi. I am not very tech-savvy so please pardon me if this is a stupid question: so far I have been googling for about 4 days to find help for this, so now I am desperate! :) How do you use adodb with mysql to connect to a file that is on your machine? Also, could you please recommend

Re: Python 3K or Python 2.9?

2007-09-17 Thread TheFlyingDutchman
Ironic Hi, I'm new to Python, I don't even fully know the language, never done a full project in Python. What's more, probably I'll never will. But that's not the point, the point is I want YOU people to modify the language you know in and out, the program with which you've done many

Re: Python 3K or Python 2.9?

2007-09-17 Thread TheFlyingDutchman
The other half of the confusion is cleared up by considering that Python methods are ordinary functions that don't magically know in which class context they are executing: they must be told via the first parameter. They can be told all they want by the compiler/runtime - implicitly -

Re: A short question about non-ascii characters in list

2007-09-17 Thread js
Thank you for your quick reply. It's intentional. __str__ of a list uses the __repr__ of its elements. This helps reduce confusion (e.g., between ['a', 'b, c'] and ['a, b', 'c']). That's make sence, but it's also true that sometimes we want to see the contents of a list in pretty format. So

QPicture and Qpainter PyQt4

2007-09-17 Thread luca72
Hello at all I have made this small tests: this is the form implementation: # -*- coding: utf-8 -*- Module implementing Form. from PyQt4.QtGui import QWidget from PyQt4.QtCore import pyqtSignature from PyQt4 import * from disegni import PictureFrame from Ui_form import Ui_Form class

Re: Python 3K or Python 2.9?

2007-09-17 Thread Bruno Desthuilliers
TheFlyingDutchman a écrit : Ironic Hi, I'm new to Python, I don't even fully know the language, never done a full project in Python. What's more, probably I'll never will. But that's not the point, the point is I want YOU people to modify the language you know in and out, the program with

Re: where are the .pyc files?

2007-09-17 Thread Summercool
On Sep 16, 6:56 pm, Steve Holden [EMAIL PROTECTED] wrote: Summercool wrote: how come a program that runs directly doesn't need to be optimized into bytecode first? Or... is it that the interpreter will just run the program as it goes by, without ever generating a .pyc file? So what if

Re: Try this

2007-09-17 Thread BJörn Lindqvist
On 9/16/07, GeorgeRXZ [EMAIL PROTECTED] wrote: Well you are speed That's an awesome party trick! But before I mail this to everyone at the office, must have a better sentence. Well you are speed is to gibberish. Something microsoft+evil... hm.. -- mvh Björn --

Re: Help to start python

2007-09-17 Thread python_lover
HI, Please help how to execute a py file with xitami. I installed xitami , downloaded lrwp file. accessing the first web application program import urllib # Get a file-like object for the Python Web site's home page. f = urllib.urlopen(http://www.python.org;) # Read from the object, storing

Re: adding a static class to another class

2007-09-17 Thread James Stroud
James Stroud wrote: Nathan Harmston wrote: And also preventing more than one Manager instance instantiated at one time. Forgot to answer this. You want the singleton pattern: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52558 But not really a singleton now that I think about

Re: Python 3K or Python 2.9?

2007-09-17 Thread TheFlyingDutchman
VivaLaFrance If you wanna know why the Renault Dauphine requires the driver to pull down on the rearview mirror in order to shift into reverse you simply need to open the hood and remove the engine and disassemble the transmission and you will see that it has no way of distinguishing a shift into

Re: Try this

2007-09-17 Thread Roel Schroeven
BJörn Lindqvist schreef: On 9/16/07, GeorgeRXZ [EMAIL PROTECTED] wrote: Well you are speed That's an awesome party trick! But before I mail this to everyone at the office, must have a better sentence. Well you are speed is to gibberish. Something microsoft+evil... hm.. This app can break

Re: Try this

2007-09-17 Thread Gabriel Genellina
On 17 sep, 02:55, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Sep 16, 9:27?pm, Gabriel Genellina [EMAIL PROTECTED] wrote: En Sun, 16 Sep 2007 21:58:09 -0300, [EMAIL PROTECTED] [EMAIL PROTECTED] escribi : I'm eagerly awaiting publication of your professional specification for

Re: where are the .pyc files?

2007-09-17 Thread Marc 'BlackJack' Rintsch
On Mon, 17 Sep 2007 01:23:20 +, Summercool wrote: On Sep 16, 10:36 am, Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote: The `*.pyc` files are usually only created when you import a module, not when a module is run directly. how come a program that runs directly doesn't need to be

RE: Python 3K or Python 2.9?

2007-09-17 Thread Delaney, Timothy (Tim)
Ben Finney wrote: The latter two statements are equivalent. The 'instance.method(args)' syntax is just sugar for 'Class.method(instance, args)'. Only in the case that instance is an instance of Class, and not an instance of a subclass of Class. For example, the following are not equivalent:

Re: QPicture and Qpainter PyQt4

2007-09-17 Thread BlueBird
Hi, It looks like you have several things wrong: On Sep 17, 9:29 am, luca72 [EMAIL PROTECTED] wrote: class Form(QWidget, Ui_Form): [...] @pyqtSignature() def on_pushButton_clicked(self): Slot documentation goes here. # TODO: not implemented

Re: Python with

2007-09-17 Thread Laurent Pointal
Ivan Voras a écrit : zip I know it can be almost always done by using a temporary variable: tmp = some.big.structure.or.nested.objects.element tmp.member1 = something tmp.member2 = something but this looks ugly to me.) The ugly part is the 'tmp' name, try to choose a name with a proper

Re: SVG to raster conversion.

2007-09-17 Thread Laurent Pointal
J. Cliff Dyer a écrit : Does anybody know a good solution (preferably in python) for rasterizing SVG or other vector graphics. I'm thinking something like vector_image = SVGFile(path_to_image) raster_image = vector_image.rasterize(format, (width, height), dpi)

Re: Python 3K or Python 2.9?

2007-09-17 Thread Bruno Desthuilliers
TheFlyingDutchman a écrit : VivaLaFrance If you wanna know why the Renault Dauphine requires the driver to pull down on the rearview mirror in order to shift into reverse you simply need to open the hood and remove the engine and disassemble the transmission and you will see that it has no

Re: SVG to raster conversion.

2007-09-17 Thread BJörn Lindqvist
On 9/16/07, J. Cliff Dyer [EMAIL PROTECTED] wrote: Does anybody know a good solution (preferably in python) for rasterizing SVG or other vector graphics. I'm thinking something like vector_image = SVGFile(path_to_image) raster_image = vector_image.rasterize(format, (width, height), dpi)

Re: Try this

2007-09-17 Thread Carl Banks
On Sun, 16 Sep 2007 17:58:09 -0700, [EMAIL PROTECTED] wrote: The very presence of an algorithm to detect encoding is a bug. Files with they .txt extension should always be treated as ANSI even if they contain binary data. Notepad should never be allowed to try to decide what the encoding is if

Re: Python Unicode to String conversion

2007-09-17 Thread Gabriel Genellina
En Mon, 17 Sep 2007 01:33:14 -0300, Richard Levasseur [EMAIL PROTECTED] escribi�: When dealing with unicode, i've run into situations where I have multiple encodings in the same string, usually latin1 and utf8 (latin1 != ascii, and latin1 != utf8, and they don't play nice together). So, for

Re: Python with

2007-09-17 Thread Ivan Voras
Laurent Pointal wrote: The ugly part is the 'tmp' name, try to choose a name with a proper meaning about what it is really, and it become clean and readable: filerefs = some.big.structure.or.nested.object.with.file.references filerefs.encoding = utf-8 filerefs.name = MyFileName.txt

Re: SVG to raster conversion.

2007-09-17 Thread Paul Boddie
On 16 Sep, 19:50, J. Cliff Dyer [EMAIL PROTECTED] wrote: Thanks. I can't find a gimp-python package for gimp-2.x anywhere though. Does such a thing exist? I noticed that my copy of The GIMP has Python extensions, and looking at the package details...

python libs for MinGW

2007-09-17 Thread guruyaya
Hi. Strange. I have wrote this message before but somehow it just vanished. I'll try again. I want to install pyqt, on my windows XP using python 2.3. To do that I need to install qt, and to do that, I need to install sip 4.7. Now python configure give out (among lots of other errors), this line:

Re: python libs for MinGW

2007-09-17 Thread guruyaya
Arrr after a small change in my google search, I have found this tutorial: http://www.mingw.org/MinGWiki/index.php/Python%20extensions and it went ok (or at least seemed ok) until the last stage: when I got this error: C:\Documents and Settings\Yair Eshel\Desktopdlltool --dllname python23.dll

Re: Python with

2007-09-17 Thread J. Cliff Dyer
Ivan Voras wrote: Laurent Pointal wrote: The ugly part is the 'tmp' name, try to choose a name with a proper meaning about what it is really, and it become clean and readable: filerefs = some.big.structure.or.nested.object.with.file.references filerefs.encoding = utf-8 filerefs.name =

reading xls file using xlrd

2007-09-17 Thread hassen62
Hi, I have installed Xlrd 0.6.1 Win 32. I have a file xls say file.xls located as follows:c:/file.xls. This file is composed with two columns of 5 lines. These columns are headed with Col1 and Col2, also the 5 rows are named with Row1,...,Row2. I have a silly question: What I can do to read

UnicodeEncodeError in Windows

2007-09-17 Thread geoff_ness
Hello - and apologies in advance for the length of this post. I am having a hard time understanding the errors being generated by a program I've written. The code is intended to parse text files which are copied and pasted from web pages from an online game. The encoding of the pages is

Re: generating list of sub lists

2007-09-17 Thread Ross Wilson
cesco wrote: Hi, is there a one-liner to accomplish the following task? From the list l = ['string1', 'string2', 'string3'] generate the list of lists l = [['string1'], ['string1', 'string2'], ['string1', 'string2', 'string3']] Any help would be appreciated. Thanks Francesco l =

Re: Python 3K or Python 2.9?

2007-09-17 Thread Steve Holden
TheFlyingDutchman wrote: The other half of the confusion is cleared up by considering that Python methods are ordinary functions that don't magically know in which class context they are executing: they must be told via the first parameter. They can be told all they want by the

Reading text files where last line has no EOL

2007-09-17 Thread BlueBird
I tried and failed to read text files where the last line does not contain proper EOL. For my tests, I use a file that I create with the equivalent of : open('toto', 'w').write( '1234\n4567\n89AB' ) My reading code looks like this : l = f.readline() while len(l):

Re: Try this

2007-09-17 Thread Steve Holden
[EMAIL PROTECTED] wrote: On Sep 16, 9:27?pm, Gabriel Genellina [EMAIL PROTECTED] wrote: En Sun, 16 Sep 2007 21:58:09 -0300, [EMAIL PROTECTED] [...] What about the rest of the world that don't speak English or even worse, don't use the Latin alpabet? When the rest of the world creates the

Web Programming thru python

2007-09-17 Thread python_lover
HI, Please help how to execute a py file with xitami. I installed xitami , downloaded lrwp file. accessing the first web application program import urllib # Get a file-like object for the Python Web site's home page. f = urllib.urlopen(http://www.python.org;) # Read from the object, storing

Re: Reading text files where last line has no EOL

2007-09-17 Thread Steve Holden
BlueBird wrote: I tried and failed to read text files where the last line does not contain proper EOL. For my tests, I use a file that I create with the equivalent of : open('toto', 'w').write( '1234\n4567\n89AB' ) My reading code looks like this : l = f.readline()

return codes from os.spawn

2007-09-17 Thread Nirmal
Hi, When I try running java through os.spawnv with P_NOWAIT, it returns the process id os.spawnv(os.P_NOWAIT, '$JAVA_HOME/bin', ('java', '$JAVA_HOME/bin/java ex3178 true')) 19524 then I removed the command line parameter in the java command to fail ( it should throw an exception) the process

Re: Python with

2007-09-17 Thread Peter Otten
Ivan Voras wrote: Well, no, but this might be due to personal tastes. At least, I don't think it's better then some other alternatives. For example, in C99 you can do: static struct option_s foo_option = { .name = foo, .type = O_STRING, .def_value = default }; At least

Re: Python with

2007-09-17 Thread Laurent Pointal
Ivan Voras a écrit : Laurent Pointal wrote: The ugly part is the 'tmp' name, try to choose a name with a proper meaning about what it is really, and it become clean and readable: filerefs = some.big.structure.or.nested.object.with.file.references filerefs.encoding = utf-8 filerefs.name =

Re: Reading text files where last line has no EOL

2007-09-17 Thread BlueBird
On 17 sep, 13:24, Steve Holden [EMAIL PROTECTED] wrote: BlueBird wrote: I tried and failed to read text files where the last line does not contain proper EOL. For my tests, I use a file that I create with the equivalent of : open('toto', 'w').write( '1234\n4567\n89AB' ) My reading

Python-URL! - weekly Python news and links (Sep 17)

2007-09-17 Thread Gabriel Genellina
QOTW: I learn something valuable from comp.lang.python every week, and most of it has nothing to do with Python. - Richie Hindle Ninety percent of all problems on top of the stove are caused because people don't preheat their pan properly. - Christopher Kimball, on the Zen that apparently

Re: how to join array of integers?

2007-09-17 Thread timw.google
On Sep 15, 8:36 am, Summercool [EMAIL PROTECTED] wrote: i think in Ruby, if you have an array (or list) of integers foo = [1, 2, 3] you can use foo.join(,) to join them into a string 1,2,3 in Python... is the method to use ,.join() ? but then it must take a list of strings... not

Re: Python 3K or Python 2.9?

2007-09-17 Thread Daniel Larsson
On 9/13/07, Stefan Bellon [EMAIL PROTECTED] wrote: On Thu, 13 Sep, TheFlyingDutchman wrote: Bruce said that no other mainstream OO language is explicitly passing the object as a parameter to class methods. Ada 95 does. And Ada 95 was the first standardized OO language. Now that's

QPicture and Qpainter PyQt4

2007-09-17 Thread David Boddie
On Mon Sep 17 09:29:43 CEST 2007, luca72 wrote: class PictureFrame(QtGui.QFrame): def __init__(self, parent = None): QFrame.__init__(self, parent) picture = QtGui.QPicture() def paintEvent(self, event): picture.load('dis.pic') gr = QtGui.QPainter()

Re: Saving parameters between Python applications?

2007-09-17 Thread Stodge
Good idea, but I can't guarantee that the two scripts will be run from the same directory - so where to store the pickle? On Sep 16, 5:25 pm, Sebastian Bassi [EMAIL PROTECTED] wrote: On 9/16/07, Stodge [EMAIL PROTECTED] wrote: python app1.py --location=c:\test1 What I want to do is save the

Re: how to join array of integers?

2007-09-17 Thread John Machin
On Sep 17, 10:16 pm, timw.google [EMAIL PROTECTED] wrote: On Sep 15, 8:36 am, Summercool [EMAIL PROTECTED] wrote: i think in Ruby, if you have an array (or list) of integers foo = [1, 2, 3] you can use foo.join(,) to join them into a string 1,2,3 in Python... is the method to use

simple regular expression problem

2007-09-17 Thread duikboot
Hello, I am trying to extract a list of strings from a text. I am looking it for hours now, googling didn't help either. Could you please help me? s = \norganisatie\nProfiel_Id28996/Profiel_Id\n/organisatie\norganisatie\nProfiel_Id28997/Profiel_Id\n/organisatie regex =

Re: (wxPython) icon on panel

2007-09-17 Thread kyosohma
On Sep 16, 3:42 am, Jimmy [EMAIL PROTECTED] wrote: hi,all! have you used 'dictionary' of linux, the program that rests on the panel as an icon, and when you click on the icon, it will display a window and do something. So i'm wondering how to achieve this. I guess it's a dialog window, right?

Re: curses: x, y positioning

2007-09-17 Thread 7stud
Hi, Thanks for the response. On Sep 16, 8:41 pm, Tim Roberts [EMAIL PROTECTED] wrote: Don't you want mvaddstr? import curses def my_program(screen): while True: ch = screen.getch() if ch == ord(q): break if ch = 255: screen.mvaddstr(30,

Re: simple regular expression problem

2007-09-17 Thread Jason Drew
You just need a one-character addition to your regex: regex = re.compile(r'organisatie.*?/organisatie', re.S) Note, there is now a question mark (?) after the .* By default, regular expressions are greedy and will grab as much text as possible when making a match. So your original expression

Re: Saving parameters between Python applications?

2007-09-17 Thread Sebastian Bassi
On 9/17/07, Stodge [EMAIL PROTECTED] wrote: Good idea, but I can't guarantee that the two scripts will be run from the same directory - so where to store the pickle? It doesn't matter if is the same directory or not, as long as both programs has access to the pickle file (one program should

Re: simple regular expression problem

2007-09-17 Thread duikboot
Thank you very much, it works. I guess I didn't read it right. Arjen On Sep 17, 3:22 pm, Jason Drew [EMAIL PROTECTED] wrote: You just need a one-character addition to your regex: regex = re.compile(r'organisatie.*?/organisatie', re.S) Note, there is now a question mark (?) after the .* By

Re: generating list of sub lists

2007-09-17 Thread Steven D'Aprano
On Mon, 17 Sep 2007 20:52:14 +1000, Ross Wilson wrote: cesco wrote: Hi, is there a one-liner to accomplish the following task? From the list l = ['string1', 'string2', 'string3'] generate the list of lists l = [['string1'], ['string1', 'string2'], ['string1', 'string2', 'string3']] Any

Re: Saving parameters between Python applications?

2007-09-17 Thread Laurent Pointal
Stodge a écrit : I'm trying to do the following. I have a Python application that is run: python app1.py --location=c:\test1 What I want to do is save the location parameter, so I can then do (in the same window): python app2.py And have app2.py automatically have access to the

Re: simple regular expression problem

2007-09-17 Thread George Sakkis
On Sep 17, 9:00 am, duikboot [EMAIL PROTECTED] wrote: Hello, I am trying to extract a list of strings from a text. I am looking it for hours now, googling didn't help either. Could you please help me? s =

Re: Python 3K or Python 2.9?

2007-09-17 Thread Robin Becker
Graham Dumpleton wrote: ... In that blog, Guido says: Concurrency: It seems we're now happily out exploring here. I'm looking forward to benchmarks showing that PP or similar (or dissimilar!) solutions actually provide a performance gain. Another route I'd like to see explored is

Re: Web Programming thru python

2007-09-17 Thread danfolkes
I have been wondering the same thing. I know you have to load the mod_python into apache. But I failed on setting that up. I run an ubuntu server. But I would check out a site like this: http://webpython.codepoint.net/mod_python -Daniel On Sep 17, 7:14 am, python_lover [EMAIL PROTECTED]

Re: simple regular expression problem

2007-09-17 Thread Jason Drew
You're welcome! Also, of course, parsing XML is a very common task and you might be interested in using one of the standard modules for that, e.g. http://docs.python.org/lib/module-xml.parsers.expat.html Then all the tricky parsing work has been done for you. Jason On Sep 17, 9:31 am,

Re: simple regular expression problem

2007-09-17 Thread Bruno Desthuilliers
duikboot a écrit : Hello, I am trying to extract a list of strings from a text. I am looking it for hours now, googling didn't help either. Could you please help me? s = \norganisatie\nProfiel_Id28996/Profiel_Id\n/organisatie\norganisatie\nProfiel_Id28997/Profiel_Id\n/organisatie

Re: Web Programming thru python

2007-09-17 Thread Bruno Desthuilliers
danfolkes a écrit : (top post corrected - Daniel, please, avoid top-posting...) On Sep 17, 7:14 am, python_lover [EMAIL PROTECTED] wrote: HI, Please help how to execute a py file with xitami. I installed xitami , downloaded lrwp file. accessing the first web application program import

Re: A short question about non-ascii characters in list

2007-09-17 Thread Bjoern Schliessmann
js wrote: That's make sence, but it's also true that sometimes we want to see the contents of a list in pretty format. That may be true, but most of the time not (at least not me) -- lists are no pretty printing instrument, but a container. So for now I need to write and use crappy mylist

Re: Saving parameters between Python applications?

2007-09-17 Thread Bruno Desthuilliers
Stodge a écrit : I'm trying to do the following. I have a Python application that is run: python app1.py --location=c:\test1 What I want to do is save the location parameter, so I can then do (in the same window): python app2.py And have app2.py automatically have access to the

Re: Python with

2007-09-17 Thread Grant Edwards
On 2007-09-17, Laurent Pointal [EMAIL PROTECTED] wrote: Note3: Its funny to see how Python users tries to change the language, does this occure with C, C++, Java, C# ? Yes. I remember somebody I worked with once who write a C program using a whole pile of macros to make it look like BASIC:

Re: Un(der)documented bits of cgi.py

2007-09-17 Thread Aahz
In article [EMAIL PROTECTED], Bob Kline [EMAIL PROTECTED] wrote: I'm trying to detect and intelligently deal with problems created when a user of a Python CGI page uploads a file and then gets impatient and clicks on some other button or the browser's cancel button (or even closes the page). If

Re: simple regular expression problem

2007-09-17 Thread Diez B. Roggisch
duikboot wrote: Hello, I am trying to extract a list of strings from a text. I am looking it for hours now, googling didn't help either. Could you please help me? s = \norganisatie\nProfiel_Id28996/Profiel_Id\n/organisatie\norganisatie\nProfiel_Id28997/Profiel_Id\n/organisatie regex =

Re: once assigment in Python

2007-09-17 Thread Larry Bates
Lorenzo Di Gregorio wrote: Hello, I've been using Python for some DES simulations because we don't need full C speed and it's so much faster for writing models. During coding I find it handy to assign a variable *unless it has been already assigned*: I've found that this is often referred

Re: newbie: self.member syntax seems /really/ annoying

2007-09-17 Thread stef
Wildemar Wildenburger wrote: stef mientki wrote: Wildemar Wildenburger wrote: Bruno Desthuilliers wrote: OTHO, simple math-illeterate programmers like me will have hard time maintaining such a code. Certainly, but again: Such main people are not the intended audience. The code is

Re: Python with

2007-09-17 Thread Bruno Desthuilliers
Grant Edwards a écrit : On 2007-09-17, Laurent Pointal [EMAIL PROTECTED] wrote: Note3: Its funny to see how Python users tries to change the language, does this occure with C, C++, Java, C# ? Yes. I remember somebody I worked with once who write a C program using a whole pile of macros

Re: Python with

2007-09-17 Thread Bruno Desthuilliers
Laurent Pointal a écrit : (snip) Note3: Its funny to see how Python users tries to change the language, s/Python users/some new Python users/, IMHO. -- http://mail.python.org/mailman/listinfo/python-list

Re: Parsing problems: A journey from a text file to a directory tree

2007-09-17 Thread Larry Bates
Since you are going to need to do a dialog, I would use wxWindows tree control. It already knows how to do what you describe. Then you can just walk all the branches and create the folders. -Larry Martin M. wrote: Hi everybody, Some of my colleagues want me to write a script for easy

Re: Processing drag drop on the desktop

2007-09-17 Thread Larry Bates
Pierre Quentel wrote: Hi all, I would like to create an application on a Windows machine, such that when a document is dragged and dropped on the application icon on the desktop, the document is processed by the application For instance, if I drag drop an Outlook message or a PPT

Use GUI for Python

2007-09-17 Thread koutoo
I am new to python as I have been a VB programmer. I am used to the GUI interface, and was wondering if I had to choose between a GUI for Python, which one should I go with? Thanks. Kou -- http://mail.python.org/mailman/listinfo/python-list

ANNOUNCE: PyQt3Support r1 - Python bindings for Qt3Support

2007-09-17 Thread Matteo Bertini
PyQt3Support - Python bindings for Qt3Support http://www.develer.com/oss/PyQt3Support What is this? PyQt3Support is an extension to PyQt4 that adds bindings to Qt's Qt3Support library for usage from the Python language. This is very helpful to migrate existing PyQt3 applications

Re: Use GUI for Python

2007-09-17 Thread Bjoern Schliessmann
[EMAIL PROTECTED] wrote: I am new to python as I have been a VB programmer. I am used to the GUI interface, and was wondering if I had to choose between a GUI for Python, which one should I go with? Simple: The one you like most. Since this is an FAQ, I'll just list some popular GUI toolkits

Re: curses: x, y positioning

2007-09-17 Thread 7stud
On Sep 17, 7:21 am, 7stud [EMAIL PROTECTED] wrote: Hi, Thanks for the response. On Sep 16, 8:41 pm, Tim Roberts [EMAIL PROTECTED] wrote: Don't you want mvaddstr? import curses def my_program(screen): while True: ch = screen.getch() if ch == ord(q):

Re: curses: x, y positioning

2007-09-17 Thread 7stud
On Sep 17, 9:50 am, 7stud [EMAIL PROTECTED] wrote: Ok. This works: import curses import curses.wrapper Oops. That second import statement isn't necessary. -- http://mail.python.org/mailman/listinfo/python-list

Re: curses: x, y positioning

2007-09-17 Thread Ian Clark
7stud wrote: However, now I am having a problem trying to set the color of the text that is output: import curses def example(screen): if curses.has_colors(): curses.init_pair(1, curses.COLOR_GREEN, curses.COLOR_BLACK) curses.init_pair(2, curses.COLOR_YELLOW,

Re: Use GUI for Python

2007-09-17 Thread Jason
On Sep 17, 9:31 am, [EMAIL PROTECTED] wrote: I am new to python as I have been a VB programmer. I am used to the GUI interface, and was wondering if I had to choose between a GUI for Python, which one should I go with? Thanks. Kou You need to be more specific. Do you mean that you are

Re: Saving parameters between Python applications?

2007-09-17 Thread Stodge
You're probably right! Thanks all. :) On Sep 17, 10:15 am, Bruno Desthuilliers bruno. [EMAIL PROTECTED] wrote: Stodge a écrit : I'm trying to do the following. I have a Python application that is run: python app1.py --location=c:\test1 What I want to do is save the location

Re: how to join array of integers?

2007-09-17 Thread Paul Rudin
Steven D'Aprano [EMAIL PROTECTED] writes: On Sun, 16 Sep 2007 19:25:22 +0100, Paul Rudin wrote: The generator expression takes about twice as long to run, and in my opinion it is no more readable. So what's the advantage? If you do it with a decent size list they take more or less the same

Re: how to join array of integers?

2007-09-17 Thread timw.google
On Sep 17, 8:46 am, John Machin [EMAIL PROTECTED] wrote: On Sep 17, 10:16 pm, timw.google [EMAIL PROTECTED] wrote: On Sep 15, 8:36 am, Summercool [EMAIL PROTECTED] wrote: i think in Ruby, if you have an array (or list) of integers foo = [1, 2, 3] you can use foo.join(,) to join

Re: How to assign a function to another function

2007-09-17 Thread Paul Rudin
Stefano Esposito [EMAIL PROTECTED] writes: Hi all what i'm trying to do is this: def foo (): ... return None ... def bar (): ... print called bar ... def assigner (): ... foo = bar ... assigner() foo() called bar This piece of code is not working and even trying with... ...

How to assign a function to another function

2007-09-17 Thread Stefano Esposito
Hi all what i'm trying to do is this: def foo (): ... return None ... def bar (): ... print called bar ... def assigner (): ... foo = bar ... assigner() foo() called bar This piece of code is not working and even trying with def assigner (a, b): ... a = b ... assigner(foo, bar)

Re: How to assign a function to another function

2007-09-17 Thread Kurt Smith
On 9/17/07, Stefano Esposito [EMAIL PROTECTED] wrote: Hi all what i'm trying to do is this: def foo (): ... return None ... def bar (): ... print called bar ... def assigner (): ... foo = bar ... You need to tell assigner() that foo doesn't belong to the local (function)

Re: How to assign a function to another function

2007-09-17 Thread Stefano Esposito
On Mon, 17 Sep 2007 17:49:58 +0100 Paul Rudin [EMAIL PROTECTED] wrote: Stefano Esposito [EMAIL PROTECTED] writes: Hi all what i'm trying to do is this: def foo (): ... return None ... def bar (): ... print called bar ... def assigner (): ... foo = bar ... assigner()

Using python to create windows apps that everyone can use?

2007-09-17 Thread Tom Harding
Hi guys, sorry to post another topic on this, as I am aware that it has already been posted a few times, but not with specifically what I am looking for. I want an app that makes a gui interface for python (similar to Microsoft visual studio or qt designer, not a code based one) and/or an app that

Re: Using python to create windows apps that everyone can use?

2007-09-17 Thread Furkan Kuru
have a look at wxpython and py2exe. On 9/17/07, Tom Harding [EMAIL PROTECTED] wrote: Hi guys, sorry to post another topic on this, as I am aware that it has already been posted a few times, but not with specifically what I am looking for. I want an app that makes a gui interface for python

I´m trying to desenvolve a site in python

2007-09-17 Thread Andre P.S Duarte
I´m trying to desenvolve a site in python. Any recommendation on literature or sites I shoul see. Being that I´m a low experienced programmer, if even I could be cald one lol, but any information would really help! -- http://mail.python.org/mailman/listinfo/python-list

Re: Try this

2007-09-17 Thread [EMAIL PROTECTED]
On Sep 17, 6:09 am, Steve Holden [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: On Sep 16, 9:27?pm, Gabriel Genellina [EMAIL PROTECTED] wrote: En Sun, 16 Sep 2007 21:58:09 -0300, [EMAIL PROTECTED] [...] What about the rest of the world that don't speak English or even worse, don't

Re: how to join array of integers?

2007-09-17 Thread Arnaud Delobelle
On Sep 17, 4:57 pm, Paul Rudin [EMAIL PROTECTED] wrote: [...] Although it's not clear to me why the join method needs a sequence rather than just an iterator. Pure guess (I haven't looked at the code): the join method needs to know the length of the string it builds in order to allocate the

ANN: Python FTP Server library (pyftpdlib) 0.2.0 released

2007-09-17 Thread Giampaolo Rodolà
Hi, I'm pleased to announce release 0.2.0 of Python FTP Server library (pyftpdlib). http://code.google.com/p/pyftpdlib/ === About === Python FTP server library provides an high-level portable interface to easily write asynchronous FTP servers with Python. Based on asyncore framework pyftpdlib

Re: I´m trying to desenvolve a site in python

2007-09-17 Thread Bjoern Schliessmann
Andre P.S Duarte wrote: I´m trying to desenvolve a site in python. What does desenvolve mean? By site, do you mean a web site? Regards, Björn -- BOFH excuse #247: Due to Federal Budget problems we have been forced to cut back on the number of users able to access the system at one time.

  1   2   3   >