Re: how many objects are loaded for hello world?

2008-09-16 Thread Fredrik Lundh
belred wrote: i just read this blog about how many objects (types) are loaded for a hello world program in C#. http://blogs.msdn.com/abhinaba/archive/2008/09/15/how-many-types-are-loaded-for-hello-world.aspx how can you find out how many are loaded for a python program: print 'hello' types

Re: help on python SWIG C++ extension

2008-09-16 Thread Tim Roberts
RLC <[EMAIL PROTECTED]> wrote: > >I am new to python SWIG. Recently I wrote a small program trying to >import collada files(using colladadom) into python so I could use >python cgkit to render them. However, during the progressing, I got >some problems. Every time I quit from Python, I get a segmen

Re: how many objects are loaded for hello world?

2008-09-16 Thread Chris Rebert
On Tue, Sep 16, 2008 at 11:13 PM, belred <[EMAIL PROTECTED]> wrote: > i just read this blog about how many objects (types) are loaded for a > hello world program in C#. > > http://blogs.msdn.com/abhinaba/archive/2008/09/15/how-many-types-are-loaded-for-hello-world.aspx > > how can you find out how

how many objects are loaded for hello world?

2008-09-16 Thread belred
i just read this blog about how many objects (types) are loaded for a hello world program in C#. http://blogs.msdn.com/abhinaba/archive/2008/09/15/how-many-types-are-loaded-for-hello-world.aspx how can you find out how many are loaded for a python program: print 'hello' -- http://mail.python

Re: Function getting a reference to its own module

2008-09-16 Thread Steven D'Aprano
On Wed, 17 Sep 2008 13:52:13 +1200, greg wrote: > Arnaud Delobelle wrote: > >> Or: >> >> import ModuleName as this_module > > Or: > > this_module = __import__(__name__) > > then you don't have to change anything. I like that solution! And it works regardless of whether the module holding i

minimum install & pickling

2008-09-16 Thread Aaron "Castironpi" Brady
Sometimes questions come up on here about unpickling safely and executing foreign code. I was thinking a minimum install that didn't even have access to modules like 'os' could be safe. (Potentially.) I have time to entertain this a little, though all the devs are busy. I can bring it up again i

Re: Python Linear Programming on Ubuntu

2008-09-16 Thread Fett
On Sep 16, 9:44 pm, "Aaron \"Castironpi\" Brady" <[EMAIL PROTECTED]> wrote: > On Sep 16, 9:25 pm, Fett <[EMAIL PROTECTED]> wrote: > > > > > On Sep 16, 9:00 pm, "Aaron \"Castironpi\" Brady" > > > <[EMAIL PROTECTED]> wrote: > > > On Sep 16, 8:50 pm, Fett <[EMAIL PROTECTED]> wrote: > > > > > I am tryi

Modifying the system menu

2008-09-16 Thread raj . indian . 08
Hi all, I am trying to modify the system menu of all the applications in my machine. For example say - I am creating multiple desktops for windows - and I want to give every application the capability to be moved across different desktops. So I wanted to modify the basic system menu list t

Re: Python Linear Programming on Ubuntu

2008-09-16 Thread Aaron "Castironpi" Brady
On Sep 16, 9:25 pm, Fett <[EMAIL PROTECTED]> wrote: > On Sep 16, 9:00 pm, "Aaron \"Castironpi\" Brady" > > > > <[EMAIL PROTECTED]> wrote: > > On Sep 16, 8:50 pm, Fett <[EMAIL PROTECTED]> wrote: > > > > I am trying to find a wrapper to do linear programming within python. > > > I am using an ubuntu

Re: Python Linear Programming on Ubuntu

2008-09-16 Thread Fett
On Sep 16, 9:00 pm, "Aaron \"Castironpi\" Brady" <[EMAIL PROTECTED]> wrote: > On Sep 16, 8:50 pm, Fett <[EMAIL PROTECTED]> wrote: > > > > > I am trying to find a wrapper to do linear programming within python. > > I am using an ubuntu machine and I have apt-get'd lp_solve, which > > works just fine

Re: Python Linear Programming on Ubuntu

2008-09-16 Thread Robert Kern
Fett wrote: I am trying to find a wrapper to do linear programming within python. I am using an ubuntu machine and I have apt-get'd lp_solve, which works just fine. If someone knows of a wrapper that will work with that that'd be great. I also heard that scipy has a wrapper, however, I can't fin

Re: Is 'x' an instance of a new-style class?

2008-09-16 Thread Asun Friere
On Sep 16, 8:05 pm, Hrvoje Niksic <[EMAIL PROTECTED]> wrote: > "Gabriel Genellina" <[EMAIL PROTECTED]> writes: > > In Python you would write isinstance(x, object). > > It will return True for all Python objects (except perhaps those that > fiddle with metaclasses), not only for instances of new-sty

Re: What is "finally:" for?

2008-09-16 Thread Scott David Daniels
Paul McGuire wrote: ... try: open database do database stuff except DatabaseException, de: log exception throw finally: close database Or try: transaction = new database transaction do database stuff do more database stuff commit transaction transaction =

Re: Python Linear Programming on Ubuntu

2008-09-16 Thread Aaron "Castironpi" Brady
On Sep 16, 8:50 pm, Fett <[EMAIL PROTECTED]> wrote: > I am trying to find a wrapper to do linear programming within python. > I am using an ubuntu machine and I have apt-get'd lp_solve, which > works just fine. If someone knows of a wrapper that will work with > that that'd be great. > > I also hea

Re: Function getting a reference to its own module

2008-09-16 Thread greg
Arnaud Delobelle wrote: Or: import ModuleName as this_module Or: this_module = __import__(__name__) then you don't have to change anything. -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Python Linear Programming on Ubuntu

2008-09-16 Thread Fett
I am trying to find a wrapper to do linear programming within python. I am using an ubuntu machine and I have apt-get'd lp_solve, which works just fine. If someone knows of a wrapper that will work with that that'd be great. I also heard that scipy has a wrapper, however, I can't find any document

ANN: Python GUI development using XULRunner

2008-09-16 Thread Todd Whiteman
I've put together a tutorial that shows off how to build a GUI application using XULRunner (same architectural components as Firefox uses) that can be used in conjunction with the Python programming language. The tutorial covers how to build a Python/XULRunner GUI application: http://pyxpcomext

Re: ka-ping yee tokenizer.py

2008-09-16 Thread Aaron "Castironpi" Brady
On Sep 16, 2:48 pm, "Karl Kobata" <[EMAIL PROTECTED]> wrote: > Hi Fredrik, > > This is exactly what I need.  Thank you. > I would like to do one additional function.  I am not using the tokenizer to > parse python code.  It happens to work very well for my application. > However, I would like eithe

Re: PyGUI as a standard GUI API for Python?

2008-09-16 Thread Todd Whiteman
Todd Whiteman wrote: Mark Hammond's Python/Mozilla work has enabled products like Komodo, Miro (Democracy) and the OLPC project to use Python as a major driver for consistent cross-platform GUI applications. Personally, I believe XULRunner has a lot to offer for Python GUI development, I'm cu

Re: backup with python

2008-09-16 Thread Zentrader
Depends on what OS you are using. The easiest way would be to tar the files you want to backup into an empty directory and then have the python backup program call whatever DVD write program you have on your system with the appropriate commands and your backup directory. -- http://mail.python.org/

Re: A unique instance of Python GUI program

2008-09-16 Thread Tim Golden
akineko wrote: On Sep 16, 1:58 am, Tim Golden <[EMAIL PROTECTED]> wrote: I swear this question's been asked twice this month already. Thank you very much for many pointers. I'm awfully sorry for posting something that is already answered in the past. I was more amused than annoyed. Don't le

Re: backup with python

2008-09-16 Thread Manuel Ebert
You may want to look into http://www.bigpaul.org/burn/ > Hi ! > I need some help to create backup with python. > I want to backup some bases on DVD - RW . > How i make this with python ? > I want to use python because the program is write on python . > > Thank you ! > -- > http://mail.python.org/m

Re: Representation of python code ?

2008-09-16 Thread Tim Golden
[EMAIL PROTECTED] wrote: On Sep 15, 4:38 am, Maric Michaud <[EMAIL PROTECTED]> wrote: Le Sunday 14 September 2008 15:44:03 Barak, Ron, vous avez écrit : Hi Guys, Is there a script/application, which gets as input python code, and produces a (graphic) representation of the inter-relationships b

Re: Gateway to python-list is generating bounce messages.

2008-09-16 Thread Maric Michaud
Le Monday 15 September 2008 16:45:12 Maric Michaud, vous avez écrit : > This is not sufficient for auto-responses, and given the following rfcs, it > would smart to both : > ... > - add or modify the Return-Path and/or Reply-To header for badly > implemented auto-responders to point to list maintai

Re: Case-insensitive string compare?

2008-09-16 Thread Maric Michaud
Le Friday 05 September 2008 19:36:56 Fredrik Lundh, vous avez écrit : > Maric Michaud wrote: > > I suspect you are coming to conclusions a bit quickly, without taking the > > pain of understanding the whole discussion. > > I'm pretty sure I was the first one to post an answer in this thread, > and

Re: Deflate with urllib2...

2008-09-16 Thread Sam
Gabriel, et al. It's hard to find a web site that uses deflate these days. Luckily, slashdot to the rescue. I even wrote a test script. If someone can tell me what's wrong that would be great. Here's what I get when I run it: Data is compressed using deflate. Length is: 107160 Traceback (mo

Re: Accessing __slots__ from C

2008-09-16 Thread Chris
Hrvoje Niksic xemacs.org> writes: ... > > You are getting that error because Carl forgot to cast the descriptor > > to the appropriate C type, in this case PyMemberDescrObject. The last > > line is also incorrect, I think. Try something like this: ... The code you gave was great, thanks! Now we

Re: optparse

2008-09-16 Thread Matimus
I'm assuming you read at least some of the docs. This page makes it pretty clear: http://docs.python.org/lib/optparse-default-values.html Matt -- http://mail.python.org/mailman/listinfo/python-list

Re: How do I add permanently to Pythons sys.path?

2008-09-16 Thread Fredrik Lundh
cnb wrote: no I can't... Python has supported packages since version 1.4 or so, so I'm pretty sure you can. -- http://mail.python.org/mailman/listinfo/python-list

Re: How do I add permanently to Pythons sys.path?

2008-09-16 Thread Aaron "Castironpi" Brady
On Sep 16, 4:24 pm, cnb <[EMAIL PROTECTED]> wrote: > On Sep 16, 10:53 pm, "Aaron \"Castironpi\" Brady" > > > > <[EMAIL PROTECTED]> wrote: > > On Sep 16, 3:16 pm, cnb <[EMAIL PROTECTED]> wrote: > > > > On Sep 16, 7:49 pm, "Aaron \"Castironpi\" Brady" > > > > > Now I have my personal programs in C:/P

Re: How do I add permanently to Pythons sys.path?

2008-09-16 Thread cnb
On Sep 16, 10:53 pm, "Aaron \"Castironpi\" Brady" <[EMAIL PROTECTED]> wrote: > On Sep 16, 3:16 pm, cnb <[EMAIL PROTECTED]> wrote: > > > > > On Sep 16, 7:49 pm, "Aaron \"Castironpi\" Brady" > > > > Now I have my personal programs in C:/Python25/Progs/ > > > > > How do I add so that I can just do "im

Re: help on python SWIG C++ extension

2008-09-16 Thread Diez B. Roggisch
RLC schrieb: Hello I am new to python SWIG. Recently I wrote a small program trying to import collada files(using colladadom) into python so I could use python cgkit to render them. However, during the progressing, I got some problems. Every time I quit from Python, I get a segmentation fault, a

Re: How do I add permanently to Pythons sys.path?

2008-09-16 Thread Aaron "Castironpi" Brady
On Sep 16, 2:40 pm, "Support Desk" <[EMAIL PROTECTED]> wrote: > What about on a unix box? I can't help you. I don't have access to '/opt/pkgs/python-2.0/lib/ python2.0/site-packages' (ha ha) on the one I have access to. If you do, try the same thing. > > Sincerely, > Michael H. > > -Origin

Re: How do I add permanently to Pythons sys.path?

2008-09-16 Thread Aaron "Castironpi" Brady
On Sep 16, 3:16 pm, cnb <[EMAIL PROTECTED]> wrote: > On Sep 16, 7:49 pm, "Aaron \"Castironpi\" Brady" > > > Now I have my personal programs in C:/Python25/Progs/ > > > > How do I add so that I can just do "import somefile" from anywhere in > > > that directory in the interpreter and it can load fil

Re: How do I add permanently to Pythons sys.path?

2008-09-16 Thread Aaron "Castironpi" Brady
On Sep 16, 2:40 pm, "Support Desk" <[EMAIL PROTECTED]> wrote: > What about on a unix box? Do you have write permissions on, in this case, '/opt/pkgs/python-2.0/ lib/python2.0/site-packages' ? (Or the entry in your sys.path.) >>> import sys >>> sys.path ['', '/opt/pkgs/python-2.0/lib/python2.0',

Re: Programmatically exit the REPL

2008-09-16 Thread David Huard
> [snip] > > Does anyone know how to make raw_input think it has gotten input? > > -Matt Hi Matt, So you really need raw_input ? Couldn't you use a mock-up ? sys.stdout.write('> ') sys.stdout.flush() And get the user input with something like: while self.continue: input = os.read(sys.st

Re: find the path of a module

2008-09-16 Thread Michael Palmer
On Sep 16, 4:07 pm, [EMAIL PROTECTED] wrote: > I'd like to know if I can somehow find the path for a module somewhere > in a the package hierarchy > for instance if I import my module like so > from spam.eggs import sausage > my hypothetical method would return something like > '/home/developer/pro

Re: How do I add permanently to Pythons sys.path?

2008-09-16 Thread cnb
On Sep 16, 7:49 pm, "Aaron \"Castironpi\" Brady" <[EMAIL PROTECTED]> wrote: > On Sep 16, 10:13 am, cnb <[EMAIL PROTECTED]> wrote: > > > > > >>> sys.path > > > ['C:\\Python25\\Progs\\NatLangProc', 'C:\\Python25\\Lib\\idlelib', 'C:\ > > \Windows\\system32\\python25.zip', 'C:\\Python25\\lib\\site-pack

find the path of a module

2008-09-16 Thread vvangelovski
I'd like to know if I can somehow find the path for a module somewhere in a the package hierarchy for instance if I import my module like so from spam.eggs import sausage my hypothetical method would return something like '/home/developer/projects/spam/eggs/sausage.py/c' given that module object. -

RE: ka-ping yee tokenizer.py

2008-09-16 Thread Karl Kobata
Hi Fredrik, This is exactly what I need. Thank you. I would like to do one additional function. I am not using the tokenizer to parse python code. It happens to work very well for my application. However, I would like either or both of the following variance: 1) I would like to add 2 other char

Re: optparse

2008-09-16 Thread Marc 'BlackJack' Rintsch
On Tue, 16 Sep 2008 21:35:05 +0200, Torsten Mohr wrote: > parser.add_option("-v", "--verbose", > dest = 'verb', > help = 'be loud', > action = 'store_true', > default = 'store_false') > > (opts, args) = parser.parse_args() >

Re: optparse

2008-09-16 Thread Torsten Mohr
Hi, > If i call it without any parameters i get: > > opts {'verb': 'store_false'} > args [] If i call it with parameter -v i get: ./script.py -v opts {'verb': True} args [] I wonder what's wrong here. Best regards, Torsten. -- http://mail.python.org/mailman/listinfo/python-list

RE: How do I add permanently to Pythons sys.path?

2008-09-16 Thread Support Desk
What about on a unix box? Sincerely, Michael H. -Original Message- From: Aaron "Castironpi" Brady [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 16, 2008 12:49 PM To: python-list@python.org Subject: Re: How do I add permanently to Pythons sys.path? On Sep 16, 10:13 am, cnb <[EMAIL

Re: new style classes, __new__, __init__

2008-09-16 Thread Christian Heimes
Torsten Mohr wrote: I just found an article that describes it better, this example works: class C2(object): def __new__(cls, a): obj = object.__new__(cls) print "new called" obj.a = 8 return obj __new__ = staticmethod(__new__) Staticmethod isnt' requir

optparse

2008-09-16 Thread Torsten Mohr
Hi, i use the module optparse to parse the command line: --example #! /usr/bin/python import optparse parser = optparse.OptionParser() parser.add_option("-v", "--verbose", dest = 'verb', help = 'be loud', action = 'store_true',

[ANN] XPN 1.2.5

2008-09-16 Thread Nemesis
XPN (X Python Newsreader) is a multi-platform newsreader with Unicode support. It is written with Python+GTK. It has features like scoring/actions, X-Face and Face decoding, muting of quoted text, newsrc import/export, find article and search in the body, spoiler char/rot13, random taglines and con

Re: on-the-fly translation with gettext

2008-09-16 Thread Mike Driscoll
On Sep 16, 4:57 am, Benjamin Sigonneau <[EMAIL PROTECTED]> wrote: > Hi all, > > I'm a complete beginner in python and in GUI designing, yet I'm writing > a GUI using python and Tkinter.  I need it to be available both in french > and english, so I read the Fine Manual and gave a try to gettext. > >

Re: new style classes, __new__, __init__

2008-09-16 Thread Torsten Mohr
Hello, > This way __new__ is not called, if i remove __init__ then > there are too many parameters to __new__, if i add a parameter > to __new__ then it says that __new__ does not take arguments. I just found an article that describes it better, this example works: class C2(object): def __ne

Re: new style classes, __new__, __init__

2008-09-16 Thread Larry Bates
Torsten Mohr wrote: Hi, i have some questions related to new style classes, they look quite useful but i wonder if somebody can give me an example on constructors using __new__ and on using __init__ ? I just see that when using it i can't give parameters to __new__ and when i additionally defin

Re: Python and Open Office

2008-09-16 Thread Terry Reedy
Hartmut Goebel wrote: As I thought everybody already knows, ODF is simply a Zip-File containing some XML files. I thought it just *was* xml. But examination with notepad showed otherwise. > So there is no need to use OOo for handling the files. So odfpy seams to be the best way to to thi

new style classes, __new__, __init__

2008-09-16 Thread Torsten Mohr
Hi, i have some questions related to new style classes, they look quite useful but i wonder if somebody can give me an example on constructors using __new__ and on using __init__ ? I just see that when using it i can't give parameters to __new__ and when i additionally define __init__ then __new_

Re: Zsi interoperability

2008-09-16 Thread Stefan Behnel
Marco Bizzarri wrote: > On Mon, Sep 15, 2008 at 8:15 PM, Stefan Behnel <[EMAIL PROTECTED]> wrote: >> Mailing List SVR wrote: >>> I have to implement a soap web services from wsdl, the server is >>> developed using oracle, is zsi or some other python library for soap >>> interoperable with oracle so

Re: append on lists

2008-09-16 Thread J. Cliff Dyer
On Tue, 2008-09-16 at 08:49 -0500, Grant Edwards wrote: > On 2008-09-16, Hrvoje Niksic <[EMAIL PROTECTED]> wrote: > > Duncan Booth <[EMAIL PROTECTED]> writes: > > > >> The only relatively common use I can think of where you might want to call > >> a method directly on a literal is to produce a li

Re: Porting a pygtk app to Windows

2008-09-16 Thread Michael Palmer
On Sep 16, 12:30 pm, binaryjesus <[EMAIL PROTECTED]> wrote: > hi everyone, > first of all > I had written an app using pygtk module and created the GUI with > glade.All the development was done on a linux machine and the app was > working fine all this tme in linux. > > now, the thing is i have to

Re: Python Nautilus script

2008-09-16 Thread Michel Leunen
kaer a écrit : #! /usr/bin/python # -*- coding: utf8 -*- import os, sys #NAUTILUS_SCRIPT_SELECTED_FILE_PATHS : chemins des fichiers sélectionnés séparés par des retours à la ligne (newline) (uniquement pour les fichiers locaux) #NAUTILUS_SCRIPT_SELECTED_URIS : URIs des fichiers sélectionnés sé

Re: Build Python, Numpy and Scipy source with Visual Studio 6.0 for windows

2008-09-16 Thread Terry Reedy
[EMAIL PROTECTED] wrote: Now comes the troubled bit...I now look for similar source code for Python extensions Numpy and Scipy but the source code and directories are not all obvious. Looks like these are normally built via other compilers. However I need to do all my builds in VS 6.0. Numpy/s

Re: Python GUI for animation

2008-09-16 Thread Terry Reedy
Virgil Stokes wrote: I have been using Python for a short time and I find it a very flexible language, and easy to learn and use. I have also worked some with PyGame and used it to create a simple animation that is controlled by the mouse and keyboard. The animation is designed to move filled c

Re: How do I add permanently to Pythons sys.path?

2008-09-16 Thread Aaron "Castironpi" Brady
On Sep 16, 10:13 am, cnb <[EMAIL PROTECTED]> wrote: > >>> sys.path > > ['C:\\Python25\\Progs\\NatLangProc', 'C:\\Python25\\Lib\\idlelib', 'C:\ > \Windows\\system32\\python25.zip', 'C:\\Python25\\lib\\site-packages\ > \orange', 'C:\\Python25\\lib\\site-packages\\orange\\OrangeWidgets', > 'C:\\Python

Re: A unique instance of Python GUI program

2008-09-16 Thread akineko
On Sep 16, 1:58 am, Tim Golden <[EMAIL PROTECTED]> wrote: > I swear this question's been asked twice this month already. Thank you very much for many pointers. I'm awfully sorry for posting something that is already answered in the past. I tried to find answers to my problem using "unique instanc

Re: literals optimization (was Re: append on lists)

2008-09-16 Thread Grant Edwards
On 2008-09-16, Maric Michaud <[EMAIL PROTECTED]> wrote: > Le Tuesday 16 September 2008 18:26:38 Grant Edwards, vous avez ?crit?: >> I was asking where in the specification >> it says that all >> expressions that return something, return a new object. ? > > I n

Re: how to exclude specific things when pickling?

2008-09-16 Thread Aaron "Castironpi" Brady
On Sep 14, 9:53 am, "inhahe" <[EMAIL PROTECTED]> wrote: > If I gather correctly pickling an object will pickle its entire hierarchy, > but what if there are certain types of objects anywhere within the hierarchy > that I don't want included in the serialization?  What do I do to exclude > them?   T

Re: ElementTree oddities

2008-09-16 Thread Stefan Behnel
Mark Thomas wrote: > here's how you would do it in lxml (http://codespeak.net/ > lxml/index.html), a library which supports XPath: > > from lxml import etree > tree = etree.fromstring('Bar:') > print ' '.join(tree.xpath('//text()')) If you want to use XPath, try this: print tree.xpath('s

Re: Python GUI for animation

2008-09-16 Thread Stef Mientki
Virgil Stokes wrote: I have been using Python for a short time and I find it a very flexible language, and easy to learn and use. I have also worked some with PyGame and used it to create a simple animation that is controlled by the mouse and keyboard. The animation is designed to move filled

Re: literals optimization (was Re: append on lists)

2008-09-16 Thread Terry Reedy
Maric Michaud wrote: Le Tuesday 16 September 2008 16:57:26 Grant Edwards, vous avez écrit : Where is that in the specification? Each literal creates a new instance, This does not answer 'where' but just adds another false claim. I just reread the Reference Manual, Lexical Analysis chapt

Re: Python and Open Office

2008-09-16 Thread Hartmut Goebel
Peter Georgeson schrieb: I can confirm that unfortunately, the PyUNO interface presently (OpenOffice 2.4) is built with Python 2.3... so to use the UNO interface from Python you have to write a separate script to run in the OpenOffice Python 2.3 environment. This may be true for Windows. On Li

Iwebs v1.2 - Open Source Web-Publishing Platform for Bloggers and website builders available Now

2008-09-16 Thread ronald.chis
Iwebs v1.2 - Open Source Web-Publishing Platform for Bloggers and website builders available Now- (Sept 16-2008) With more updations iwebs version 1.2 can be downloaded here - http://webs.investorline.co.in/. Features The following is a list of some of the features that come standard with iwebs

Re: append on lists

2008-09-16 Thread Terry Reedy
Maric Michaud wrote: Le Tuesday 16 September 2008 15:57:53 Grant Edwards, vous avez écrit : On 2008-09-16, Maric Michaud <[EMAIL PROTECTED]> wrote: all expressions that return something, return a new object, That's not _quite_ true: a=1 b=a.__add__(0) a is b True ;) This is implementation

Re: Python and Open Office

2008-09-16 Thread Hartmut Goebel
Marco Bizzarri schrieb: On Wed, Sep 10, 2008 at 10:04 PM, Greg Lindstrom <[EMAIL PROTECTED]> wrote: Hello, I would like to create and manipulate Open Office documents using Python. I [...] Is there someone here who can help me out, or is there an appropriate mailing list for me to join? Ci

Re: append on lists

2008-09-16 Thread Terry Reedy
Maric Michaud wrote: It is, please try to understand it, in python all expressions that mutate an object should return None, You are over-generalizing. For builtin classes, mutation methods return none. Guido recommends this as a general practice, but users may do whatever they like in the

Re: parse a midi file

2008-09-16 Thread binaryjesus
On Sep 16, 9:48 pm, Mr.SpOOn <[EMAIL PROTECTED]> wrote: > Hi, > I need to parse a midi file with Python. What I exactly need is the > possibility to distinguish all notes in all channels in a midi file > and put them in a list or something. > > I've found this: > > http://groups.google.com/group/al

Re: literals optimization (was Re: append on lists)

2008-09-16 Thread Grant Edwards
On 2008-09-16, Maric Michaud <[EMAIL PROTECTED]> wrote: > Le Tuesday 16 September 2008 18:26:38 Grant Edwards, vous avez écrit : >> I was asking where in the specification >> it says that all expressions that >> return something, return a >> new object.   > > I

parse a midi file

2008-09-16 Thread Mr.SpOOn
Hi, I need to parse a midi file with Python. What I exactly need is the possibility to distinguish all notes in all channels in a midi file and put them in a list or something. I've found this: http://groups.google.com/group/alt.sources/msg/22467419ad4bf416 I'm not sure how it does work, but loo

Re: literals optimization (was Re: append on lists)

2008-09-16 Thread Maric Michaud
Le Tuesday 16 September 2008 18:26:38 Grant Edwards, vous avez écrit : > I was asking where in the specification > it says that all expressions that > return something, return a > new object.   I never said this, I said it's the spirit of python APIs, with som

Porting a pygtk app to Windows

2008-09-16 Thread binaryjesus
hi everyone, first of all I had written an app using pygtk module and created the GUI with glade.All the development was done on a linux machine and the app was working fine all this tme in linux. now, the thing is i have to change the development environment to windows. So this means that i have

Re: literals optimization (was Re: append on lists)

2008-09-16 Thread Grant Edwards
On 2008-09-16, Maric Michaud <[EMAIL PROTECTED]> wrote: > Le Tuesday 16 September 2008 16:57:26 Grant Edwards, vous avez écrit : >> On 2008-09-16, Maric Michaud <[EMAIL PROTECTED]> wrote: >> > Le Tuesday 16 September 2008 15:57:53 Grant Edwards, vous avez écrit : >> >> On 2008-09-16, Maric Michaud

Re: Profiling, sum-comprehension vs reduce

2008-09-16 Thread Raymond Hettinger
On Sep 13, 9:27 pm, Hrvoje Niksic <[EMAIL PROTECTED]> wrote: > Note that, despite appearances, it's not as built-in as one might > wish.  sum(seq) is still completely generic and works on all > number-like objects (in fact on all objects that define an __add__ > operation except strings, which are

Re: literals optimization (was Re: append on lists)

2008-09-16 Thread Maric Michaud
Le Tuesday 16 September 2008 16:57:26 Grant Edwards, vous avez écrit : > On 2008-09-16, Maric Michaud <[EMAIL PROTECTED]> wrote: > > Le Tuesday 16 September 2008 15:57:53 Grant Edwards, vous avez écrit : > >> On 2008-09-16, Maric Michaud <[EMAIL PROTECTED]> wrote: > >> > all expressions that return

Re: How do I add permanently to Pythons sys.path?

2008-09-16 Thread Christian Heimes
Python wrote: a temp solution is to append it to that list: sys.path.append('C:/Python25/Progs/') a permanent solution is to add it to the environment variable (no idea where to set this in windows) $PYTHONPATH = "/C:/Python25/Progs/" Don't append a / or \!Use "C:/Python25/Progs" instead of

Re: How do I add permanently to Pythons sys.path?

2008-09-16 Thread cnb
On Sep 16, 5:25 pm, Python <[EMAIL PROTECTED]> wrote: > On 16 sep 2008, at 17:13, cnb wrote: > > > > sys.path > > ['C:\\Python25\\Progs\\NatLangProc', 'C:\\Python25\\Lib\\idlelib',   > > 'C:\ > > \Windows\\system32\\python25.zip', 'C:\\Python25\\lib\\site-packages\ > > \orange', 'C:\\Python25\

Re: How do I add permanently to Pythons sys.path?

2008-09-16 Thread Python
On 16 sep 2008, at 17:13, cnb wrote: sys.path ['C:\\Python25\\Progs\\NatLangProc', 'C:\\Python25\\Lib\\idlelib', 'C:\ \Windows\\system32\\python25.zip', 'C:\\Python25\\lib\\site-packages\ \orange', 'C:\\Python25\\lib\\site-packages\\orange\\OrangeWidgets', 'C:\\Python25\\lib\\site-packages\\

How do I add permanently to Pythons sys.path?

2008-09-16 Thread cnb
>>> sys.path ['C:\\Python25\\Progs\\NatLangProc', 'C:\\Python25\\Lib\\idlelib', 'C:\ \Windows\\system32\\python25.zip', 'C:\\Python25\\lib\\site-packages\ \orange', 'C:\\Python25\\lib\\site-packages\\orange\\OrangeWidgets', 'C:\\Python25\\lib\\site-packages\\orange\\OrangeCanvas', 'C:\ \Python25\\D

backup with python

2008-09-16 Thread [EMAIL PROTECTED]
Hi ! I need some help to create backup with python. I want to backup some bases on DVD - RW . How i make this with python ? I want to use python because the program is write on python . Thank you ! -- http://mail.python.org/mailman/listinfo/python-list

Re: MVC with Python

2008-09-16 Thread Georg Altmann
Maric Michaud schrieb: Le Tuesday 16 September 2008 14:47:02 Marco Bizzarri, vous avez écrit : On Tue, Sep 16, 2008 at 1:26 PM, Georg Altmann <[EMAIL PROTECTED]> wrote: Marco Bizzarri schrieb: On Mon, Sep 15, 2008 at 9:37 PM, Georg Altmann <[EMAIL PROTECTED]> wrote: But this implies all the o

Re: append on lists

2008-09-16 Thread Grant Edwards
On 2008-09-16, Maric Michaud <[EMAIL PROTECTED]> wrote: > Le Tuesday 16 September 2008 15:57:53 Grant Edwards, vous avez écrit : >> On 2008-09-16, Maric Michaud <[EMAIL PROTECTED]> wrote: >> > all expressions that return something, return a new object, >> >> That's not _quite_ true: >> >>> a=1 >> >

Re: append on lists

2008-09-16 Thread Maric Michaud
Le Tuesday 16 September 2008 15:57:53 Grant Edwards, vous avez écrit : > On 2008-09-16, Maric Michaud <[EMAIL PROTECTED]> wrote: > > all expressions that return something, return a new object, > > That's not _quite_ true: > >>> a=1 > >>> b=a.__add__(0) > >>> a is b > > True > > ;) This is implemen

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

2008-09-16 Thread Gabriel Genellina
QOTW: "There is no point in creating new hardware without new software." - Niklaus Wirth http://www.modulaware.com/mdlt52.htm The first Release Candidate for Python 2.6 is out: http://groups.google.com/group/comp.lang.python/browse_thread/thread/bdf349528605e27f/ Ab