Re: any ways to judge whether an object is initilized or not in a class

2007-03-19 Thread Diez B. Roggisch
momobear schrieb: > hi, I am puzzled about how to determine whether an object is > initilized in one class, anyone could give me any instructions? > here is an example code: > > class coffee: > def boil(self): >self.temp = 80 > > a = coffer() > if a.temp > 60: > pri

Re: any ways to judge whether an object is initilized or not in a class

2007-03-19 Thread momobear
On Mar 19, 4:19 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > momobear schrieb: > > > > > hi, I am puzzled about how to determine whether an object is > > initilized in one class, anyone could give me any instructions? > > here is an example code: > > > class coffee: > > def boil(se

Re: 911 was a RACIST crime by YANK BASTARDS against all other NATIONS Re: *POLL* How many sheeple believe in the 911 fairy tale and willing to accept an Orwellian doublespeak and enslavement world ?

2007-03-19 Thread Don Stockbauer
911's primary utility was that, inadvertently, it sparked off the formation of the global brain: The Social Superorganism and its Global Brain http://pespmc1.vub.ac.be/SUPORGLI.html Have a nice Monday, all. - Don -- http://mail.python.org/mailman/listinfo/python-list

Re: any ways to judge whether an object is initilized or not in a class

2007-03-19 Thread Ben Finney
"momobear" <[EMAIL PROTECTED]> writes: > class coffee: > def __init__(self): > ''' > do something here > ''' > def boil(self): >self.temp = 80 > > a = coffer() > if a.temp > 60: > print "it's boiled" class Coffe

Re: any ways to judge whether an object is initilized or not in a class

2007-03-19 Thread Duncan Booth
"momobear" <[EMAIL PROTECTED]> wrote: > in C++ language we must initilized a variable first, so there is no > such problem, but in python if we don't invoke a.boil(), we will not > get self.temp to be initilized, any way to determine if it's initilzed > before self.temp be used. > The simplest th

Re: Documentation for "str()" could use some adjustment.

2007-03-19 Thread Daniel Nogradi
> The Python documentation for "str" says > "str([object]) : > Return a string containing a nicely printable representation of an > object." > > However, there's no mention of the fact that "str" of a Unicode string > with non-ASCII characters will raise a conversion exception. The > document

Re: Private data

2007-03-19 Thread Bruno Desthuilliers
Dustan a écrit : > http://dustangroups.googlepages.com/privateattributesinpython > > This is something that I just threw together this morning, after a > eureka moment. It's a way of creating private class attributes What for ? We already have one: prefix 'private' names with a single underscore

Re: any ways to judge whether an object is initilized or not in a class

2007-03-19 Thread James Stroud
momobear wrote: > hi, I am puzzled about how to determine whether an object is > initilized in one class, anyone could give me any instructions? > here is an example code: > > class coffee: > def boil(self): >self.temp = 80 > > a = coffer() > if a.temp > 60: > print

Re: any ways to judge whether an object is initilized or not in a class

2007-03-19 Thread momobear
On Mar 19, 4:50 pm, Duncan Booth <[EMAIL PROTECTED]> wrote: > "momobear" <[EMAIL PROTECTED]> wrote: > > in C++ language we must initilized a variable first, so there is no > > such problem, but in python if we don't invoke a.boil(), we will not > > get self.temp to be initilized, any way to determi

keyword arguments for xml-rpc

2007-03-19 Thread [EMAIL PROTECTED]
I've just noticed that I can't seem to use keyword arguments for xml-rpc requests even though the protocol itself encodes parameter names, types, and values when it sends the xml across the network. This becomes a bit problematic for me because I want to store some XML- RPC method dispatch sign

Re: keyword arguments for xml-rpc

2007-03-19 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > I've just noticed that I can't seem to use keyword arguments for > xml-rpc requests even though the protocol itself encodes parameter > names, types, and values when it sends the xml across the network. > This becomes a bit problematic for me because I want to store

from maple to python + numpy/scipy

2007-03-19 Thread Daniel Nogradi
I'm just getting started with numpy/scipy and first would like to get a view of what it can do and what it can't. The main idea is to move from maple to python and the first thing that poped up is the fact that maple is very convenient for both formal manipulations and exact integer calculations. F

Re: XML based programming language

2007-03-19 Thread stefaan
Thank you Diez for answering. As far as I can see, it more or less corresponds to what I have. But my question was perhaps more this: "If elementtree is "lex", what is "yacc" ? " -- http://mail.python.org/mailman/listinfo/python-list

Re: Private data

2007-03-19 Thread Dustan
On Mar 19, 4:09 am, Bruno Desthuilliers wrote: > Dustan a écrit : > > >http://dustangroups.googlepages.com/privateattributesinpython > > > This is something that I just threw together this morning, after a > > eureka moment. It's a way of creating private class attributes > > What for ? We already

Re: any ways to judge whether an object is initilized or not in a class

2007-03-19 Thread Duncan Booth
"momobear" <[EMAIL PROTECTED]> wrote: > thanks for help:), I am puzzled about if I have to use try and except > to determine it. finnal code should like this? > class coffee: > def __init__(self): > ''' > do something here > ''' > def b

Re: keyword arguments for xml-rpc

2007-03-19 Thread [EMAIL PROTECTED]
Diez, Yes thanx - that (structs) is indeed where my confusion lies... :) Alas, ordered parameters it is. On Mar 19, 5:44 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > I don't see[1] the possibility to pass keyword arguments via XMLRPC. Where > did you get that impression from? You can

Re: from maple to python + numpy/scipy

2007-03-19 Thread stef
Daniel Nogradi wrote: > I'm just getting started with numpy/scipy and first would like to get > a view of what it can do and what it can't. The main idea is to move > from maple to python and the first thing that poped up is the fact > that maple is very convenient for both formal manipulations and

Re: from maple to python + numpy/scipy

2007-03-19 Thread Jaap Spies
Daniel Nogradi wrote: > I'm just getting started with numpy/scipy and first would like to get > a view of what it can do and what it can't. The main idea is to move > from maple to python and the first thing that poped up is the fact > that maple is very convenient for both formal manipulations and

Re: XML based programming language

2007-03-19 Thread Diez B. Roggisch
stefaan wrote: > Thank you Diez for answering. > As far as I can see, it more or less corresponds to what I have. > > But my question was perhaps more this: > > "If elementtree is "lex", what is "yacc" ? " Elementtree isn't lex. You are comparing apples and oranges here. Lex tokenizes, yacc cre

Re: Building several parsing modules

2007-03-19 Thread Diez B. Roggisch
Robert Neville wrote: > Basically, I want to create a table in html, xml, or xslt; with any > number of regular expressions; a script (Perl or Python) which reads > each table row (regex and replacement); and performs the replacement > on any file name, folder, or text file (e.g. css, php, html).

Looking for a job?

2007-03-19 Thread good_online_jobs
Free. Find a Job here now--> http://www.jobbankdata.com -- http://mail.python.org/mailman/listinfo/python-list

PythonCard thoughts

2007-03-19 Thread king kikapu
Hi to all folks here, i downloaded and "playing" with PythonCard and i just want to share my thoughts so maybe we can discuss a little about it. I was used to wxGlade before and i think PythonCard is even better. I like the separate implementation of GUI and Code that PythonCard provides, i also l

Re: List to string

2007-03-19 Thread Bruno Desthuilliers
Hitesh a écrit : > On Mar 18, 12:28 am, "Hitesh" <[EMAIL PROTECTED]> wrote: >> Hi, >> >> I've a list like this.. >> str1 = ['this is a test string inside list'] >> >> I am doing it this way. >> >> for s in str1: >> temp_s = s >> print temp_s Why this useless temp_s var ? >> >> Any better

Fun little project

2007-03-19 Thread Fabio FZero
This is what happens when a joke goes too far - so far that it generates Python code. http://code.google.com/p/pr0nbot/ Have fun! []s FZero -- http://mail.python.org/mailman/listinfo/python-list

Re: Still the __new__ hell ...

2007-03-19 Thread Bruno Desthuilliers
Paulo da Silva a écrit : (snip) Not an answer to your question, just a couple advices: > from datetime import date > import cPickle,string The string module is mostly deprecated. You should use str type methods whenever possible (cf below) > class MyDate(date): > def __new__(cls,year,mon

Re: Private data

2007-03-19 Thread Bruno Desthuilliers
Dustan a écrit : > On Mar 19, 4:09 am, Bruno Desthuilliers [EMAIL PROTECTED]> wrote: >> Dustan a écrit : >> >>> http://dustangroups.googlepages.com/privateattributesinpython >>> This is something that I just threw together this morning, after a >>> eureka moment. It's a way of creating private cla

Re: XML based programming language

2007-03-19 Thread stefaan
> Elementtree isn't lex. You are comparing apples and oranges here. Lex > tokenizes, yacc creates trees. Both of is covered in XML itself - it's > defined the tokenization and parsing, built into elementtree. So, > elemnttree is lex _and_ yacc for XML. And if your language is written in > XML, that

Re: Still the __new__ hell ...

2007-03-19 Thread Jean-Paul Calderone
On Mon, 19 Mar 2007 13:17:11 +0100, Bruno Desthuilliers > > [snip] > >And what if it's a unicode string ? >The correct idiom here is: > if isinstance(year, basestring): > >> year,month,day=map(int,string.split(year,'-')) > year, month,

Re: IDE for wxPython

2007-03-19 Thread Bruno Desthuilliers
Ghirai a écrit : > Hello python-list, > > Can anyone suggest an IDE for wxPython? > Or an IDE for TkInter? Do you really mean IDE, or are you in fact looking for a GUI designer tool ? If the latter, you may want to have a look at wxGlade. -- http://mail.python.org/mailman/listinfo/python-list

Re: XML based programming language

2007-03-19 Thread Laurent Pointal
stefaan a écrit : >> Elementtree isn't lex. You are comparing apples and oranges here. Lex >> tokenizes, yacc creates trees. Both of is covered in XML itself - it's >> defined the tokenization and parsing, built into elementtree. So, >> elemnttree is lex _and_ yacc for XML. And if your language is

Re: any ways to judge whether an object is initilized or not in a class

2007-03-19 Thread Bruno Desthuilliers
Diez B. Roggisch a écrit : > momobear schrieb: >> hi, I am puzzled about how to determine whether an object is >> initilized in one class, anyone could give me any instructions? >> here is an example code: >> >> class coffee: >> def boil(self): >>self.temp = 80 >> >> a = c

Re: any ways to judge whether an object is initilized or not in a class

2007-03-19 Thread Bruno Desthuilliers
momobear a écrit : > hi, I am puzzled about how to determine whether an object is > initilized in one class, anyone could give me any instructions? > here is an example code: > > class coffee: > def boil(self): >self.temp = 80 > > a = coffer() > if a.temp > 60: > pr

Real Time Embedded Systems Monitor in Python?

2007-03-19 Thread frikk
Hey Everyone! I've got a question regarding the capabilities of python in a real time environment. I'll start by saying I'm a little bit flaky when it comes to terminology, so please correct me or ask where it seems I'm not beings specific or using the wrong wording. I am looking into a project fo

Re: XML based programming language

2007-03-19 Thread Diez B. Roggisch
stefaan wrote: >> Elementtree isn't lex. You are comparing apples and oranges here. Lex >> tokenizes, yacc creates trees. Both of is covered in XML itself - it's >> defined the tokenization and parsing, built into elementtree. So, >> elemnttree is lex _and_ yacc for XML. And if your language is wr

Report options...

2007-03-19 Thread Mario Lacunza
> Hello, > > Right now Im migrating an VB6+Crystal report+Word App to Python+wxPython > +Reportlab+??? > > The VB system work with Word, creating some patterns (title, foot prints, > etc) and users maybe could insert some new text and Form fields (like > parameters) to personalize the > output,

Timeout to readline()/readlines()

2007-03-19 Thread Horta
Hi folks, Sometimes, when I do an os.popen*(), the process executed by the command hangs, and the script stops forever on the readline()/ readlines() calls. I found that I can use select, but I'm thinking... if, after a sellect() call returns, the stdout (for example) has more than one line

Re: XML based programming language

2007-03-19 Thread Jarek Zgoda
Diez B. Roggisch napisał(a): > I'm not sure where element-tree stands regarding this, but I think 4suite > offers DTD, W3C-Schema and Relax-NG support. This varies depending on implementation. As Fredrik Lundh's original implementation is based on expat parser, it has no ability to check anything

Boost Python properties/getter functions for strings

2007-03-19 Thread Shawn McGrath
Hi, I'm trying to expose a C++ class' internals to python via boost::python. I can do integer/boolean functions fine, but as soon as I do a string get/set it craps out. boost::python::class_ >("Entity") //publics .def("isActive", &Entity::isActive) //bool

Re: any ways to judge whether an object is initilized or not in a class

2007-03-19 Thread Gabriel Genellina
En Mon, 19 Mar 2007 05:35:00 -0300, momobear <[EMAIL PROTECTED]> escribió: >> > in C++ language we must initilized a variable first, so there is no >> > such problem, but in python if we don't invoke a.boil(), we will not >> > get self.temp to be initilized, any way to determine if it's initilzed

Re: PythonCard thoughts

2007-03-19 Thread John Salerno
king kikapu wrote: > The only "problem" i see with this design is that by that separation > of Gui/Code, you loose the intellisense that (ex. PyDev) some editors/ > plugins can provide because in the .py file nothing is indicating > that , for example, the btnDoWork is a Button object. > This forc

Re: Choosing Python

2007-03-19 Thread John Salerno
[EMAIL PROTECTED] wrote: > One of the many things I like about Ada is that it is the same wherever > you use it. Python seems to be that way too. Java started out that way. > It was the intention for Java to be more portable than it is. I have heard > that Java was released before the develo

Re: Still the __new__ hell ...

2007-03-19 Thread Bruno Desthuilliers
Jean-Paul Calderone a écrit : > On Mon, 19 Mar 2007 13:17:11 +0100, Bruno Desthuilliers >> >> [snip] >> >> And what if it's a unicode string ? >> The correct idiom here is: >> if isinstance(year, basestring): >> >>> year,month,day=map(int,string.split(year,'-')) >>

When is List Comprehension inappropriate?

2007-03-19 Thread Ben
I have recently learned how list comprehension works and am finding it extremely cool. I am worried, however, that I may be stuffing it into places that it does not belong. What's the most "pythony" way to do this: even = [] for x in range(0,width,2): for y in range(0,height,2): colo

Re: PythonCard thoughts

2007-03-19 Thread king kikapu
> I don't know much about PythonCard or wxGlade, but I use wxPython (which > wxGlade uses, right?) and you now have the option to separate your GUI > and code using an XRC file (xml file that describes layout). So perhaps > this is something you can do with wxGlade, but at the same time it might >

Re: class objects, method objects, function objects

2007-03-19 Thread Fredrik Lundh
"7stud" wrote: > But the last part of the passage makes no sense to me: > -- > When the method object is called with an argument list, it is unpacked > again, a new argument list is constructed from the instance object and > the original argument list, and the function object is called with > t

Re: Executing a list of functions

2007-03-19 Thread HMS Surprise
On Mar 16, 6:44 pm, James Stroud <[EMAIL PROTECTED]> wrote: > HMS Surprise wrote: > > Seems to me that one should be able to put the names of several > > functions in a list and then have the list executed. But it seems the > > output of the functions is hidden, only their return value is visible.

Re: When is List Comprehension inappropriate?

2007-03-19 Thread Alex Martelli
Ben <[EMAIL PROTECTED]> wrote: > I have recently learned how list comprehension works and am finding it > extremely cool. I am worried, however, that I may be stuffing it into > places that it does not belong. > > What's the most "pythony" way to do this: > > even = [] > for x in range(0,width,

Re: Executing a list of functions

2007-03-19 Thread Alex Martelli
HMS Surprise <[EMAIL PROTECTED]> wrote: ... > Why is apply deprecated? Because it does exacly the same job as just calling the function with *a/**k, and there should preferably be only one obvious way to perform a given task (this guiding principle leads to simplicity in the language, and is co

Re: PythonCard thoughts

2007-03-19 Thread Luis M. González
On Mar 19, 11:44 am, "king kikapu" <[EMAIL PROTECTED]> wrote: > > I don't know much about PythonCard or wxGlade, but I use wxPython (which > > wxGlade uses, right?) and you now have the option to separate your GUI > > and code using an XRC file (xml file that describes layout). So perhaps > > this

Re: PythonCard thoughts

2007-03-19 Thread king kikapu
> Would you please explain more in detail this "Message Watcher" option? > I use PythonCard from time to time, and I find it very easy to use and > practical, even considering the small shortcomings you mentioned > above, but I have no idea of this feature you're talking about.. > > Regards, > Luis

Re: Grep Equivalent for Python

2007-03-19 Thread tereglow
On Mar 18, 7:33 pm, [EMAIL PROTECTED] (Aahz) wrote: > In article <[EMAIL PROTECTED]>, > > > > > > tereglow <[EMAIL PROTECTED]> wrote: > >On Mar 15, 1:47 am, [EMAIL PROTECTED] (Alex Martelli) wrote: > >> tereglow <[EMAIL PROTECTED]> wrote: > > >>>grep^MemTotal /proc/meminfo | awk '{print $2}' > > >>

Using pxssh

2007-03-19 Thread tereglow
Hello, I am trying to convert some Expect/Tcl code into Python by using the Pexpect module. The environment is such that authenticated keys are disabled although SSH is available. I do not have control over this environment, so I'm trying to automate tasks within it via Expect. I noticed that,

Re: When is List Comprehension inappropriate?

2007-03-19 Thread Paul McGuire
On Mar 19, 9:41 am, "Ben" <[EMAIL PROTECTED]> wrote: > even = [] > for x in range(0,width,2): > for y in range(0,height,2): > color = im.getpixel((x,y)) > even.append(((x,y), color)) > > versus list comprehension: > > even2 = [((x,y), im.getpixel((x,y))) for x in range(0,width,2

Re: Still the __new__ hell ...

2007-03-19 Thread Jean-Paul Calderone
On Mon, 19 Mar 2007 15:39:49 +0100, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: >Jean-Paul Calderone a écrit : >> On Mon, 19 Mar 2007 13:17:11 +0100, Bruno Desthuilliers >>> >>> [snip] >>> >>> And what if it's a unicode string ? >>> The correct idiom here is: >>> if isinstance(

Re: Boost Python properties/getter functions for strings

2007-03-19 Thread Shawn McGrath
I forgot to mention, getname is defined as: const std::string &Entity::getName() const; -- http://mail.python.org/mailman/listinfo/python-list

check if files are the same on Windows

2007-03-19 Thread Beliavsky
A crude way to check if two files are the same on Windows is to look at the output of the "fc" function of cmd.exe, for example def files_same(f1,f2): cmnd= "fc " + f1 + " " + f2 return ("no differences" in popen(cmnd).read()) This is needlessly slow, because one can stop comparing tw

Re: check if files are the same on Windows

2007-03-19 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Beliavsky wrote: > […] How should one check that files are the same in Python? The files > are plain text. Take a look at the `filecmp` module. Pay attention to the shallow argument of `filecmp.cmp()` and the default value! Ciao, Marc 'BlackJack' Rintsch -- htt

Embedding and undefined symbols

2007-03-19 Thread Lane Brooks
I am embedding python into a linux shared library (let's call it libembedpy.so). The main application loads this shared library dynamically using libdl and is not linked against libembedpy.so Under this scenerio, I get ImportErrors when I try import modules: File "test.py", line 3, in ?

Re: When is List Comprehension inappropriate?

2007-03-19 Thread BJörn Lindqvist
On 19 Mar 2007 07:41:59 -0700, Ben <[EMAIL PROTECTED]> wrote: > I have recently learned how list comprehension works and am finding it > extremely cool. I am worried, however, that I may be stuffing it into > places that it does not belong. > > What's the most "pythony" way to do this: > > even =

tracking memory usage

2007-03-19 Thread Erik Johnson
Sort of two questions here: The first is about the internal view: are there Python introspection functions that can be called such that a running script can keep tabs on how much memory is being used? And the second is about using either os or system calls on Windows such that a Python

SQLObject 0.7.4

2007-03-19 Thread Oleg Broytmann
Hello! I'm pleased to announce the 0.7.4 release of SQLObject. What is SQLObject = SQLObject is an object-relational mapper. Your database tables are described as classes, and rows are instances of those classes. SQLObject is meant to be easy to use and quick to get started wit

Re: List to string

2007-03-19 Thread Hitesh
On Mar 19, 8:11 am, Bruno Desthuilliers wrote: > Hitesh a écrit : > > > On Mar 18, 12:28 am, "Hitesh" <[EMAIL PROTECTED]> wrote: > >> Hi, > > >> I've a list like this.. > >> str1 = ['this is a test string inside list'] > > >> I am doing it this way. > > >> for s in str1: > >> temp_s = s > >>

Re: Boost Python properties/getter functions for strings

2007-03-19 Thread Shawn McGrath
On Mar 19, 12:00 pm, "Shawn McGrath" <[EMAIL PROTECTED]> wrote: > I forgot to mention, getname is defined as: > const std::string &Entity::getName() const; After more reading I found the copy_const_reference, and replaced: boost::python::return_internal_reference<>()); with: boost::python::ret

Re: Boost Python properties/getter functions for strings

2007-03-19 Thread Jon Clements
On 19 Mar, 16:40, "Shawn McGrath" <[EMAIL PROTECTED]> wrote: > On Mar 19, 12:00 pm, "Shawn McGrath" <[EMAIL PROTECTED]> wrote: > > > I forgot to mention, getname is defined as: > > const std::string &Entity::getName() const; > > After more reading I found the copy_const_reference, and replaced: >

Re: check if files are the same on Windows

2007-03-19 Thread Shane Geiger
In the unix world, 'fc' would be like diff. """ Python example of checksumming files with the MD5 module. In Python 2.5, the hashlib module would be preferable/more elegant. """ import md5 import string, os r = lambda f: open(f, "r").read() def readfile(f,strip=False): return (strip and stripp

Re: * operator--as in *args?

2007-03-19 Thread 7stud
On Mar 18, 7:52 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > def f(*args, **kw): > > ... print "args",args > ... print "kw",kw > ...>>> d = {"a":1, "b":2, "c":3} > >>> f(**d) > Whoa! **? And applied to a function parameter? Back to the drawing board. On Mar 18, 7:21 pm, [EMAIL PROTEC

SQLObject 0.8.1

2007-03-19 Thread Oleg Broytmann
Hello! I'm pleased to announce the 0.8.1 release of SQLObject. What is SQLObject = SQLObject is an object-relational mapper. Your database tables are described as classes, and rows are instances of those classes. SQLObject is meant to be easy to use and quick to get started wi

Re: Documentation for "str()" could use some adjustment - Unicode issue

2007-03-19 Thread John Nagle
Daniel Nogradi wrote: >> The Python documentation for "str" says >> "str([object]) : >> Return a string containing a nicely printable representation of an >> object." >> >> However, there's no mention of the fact that "str" of a Unicode string >> with non-ASCII characters will raise a conversi

Re: any ways to judge whether an object is initilized or not in a class

2007-03-19 Thread Steve Holden
Bruno Desthuilliers wrote: > Diez B. Roggisch a écrit : >> momobear schrieb: >>> hi, I am puzzled about how to determine whether an object is >>> initilized in one class, anyone could give me any instructions? >>> here is an example code: >>> >>> class coffee: >>> def boil(self): >>>

Re: class objects, method objects, function objects

2007-03-19 Thread 7stud
Hi, Thanks for the responses. I understand that python automatically sends 'self' to a member function, i.e. self gets prepended to the argument list. I guess I am having trouble with this statement: When the method object is called with an argument list, it is unpacked again, a new argumen

PythonCard or Dabo?

2007-03-19 Thread Kevin Walzer
I'm curious to know what others think of these two frameworks for building wxPython apps. PythonCard has been around longer, but its development seems to have slowed. The last release, 0.8.2, has been out for quite awhile now. Dabo is newer and seems to have gathered a lot of buzz. Anyone try

[ANNOUNCE] Boxtream v0.991 is out

2007-03-19 Thread Jerome Alet
Hi there, I'm pleased to announce the immediate availability of Boxtream v0.991 Boxtream is a mobile audio/video recording and streaming studio, made from a set of optional hardware bricks and of a Python written, GNU GPLed, GStreamer based software. The software part can be used without most of

Re: check if files are the same on Windows

2007-03-19 Thread kyosohma
On Mar 19, 11:55 am, Shane Geiger <[EMAIL PROTECTED]> wrote: > In the unix world, 'fc' would be like diff. > > """ > Python example of checksumming files with the MD5 module. > > In Python 2.5, the hashlib module would be preferable/more elegant. > """ > > import md5 > > import string, os > r = lam

Re: PythonCard or Dabo?

2007-03-19 Thread kyosohma
On Mar 19, 12:24 pm, Kevin Walzer <[EMAIL PROTECTED]> wrote: > I'm curious to know what others think of these two frameworks for > building wxPython apps. > > PythonCard has been around longer, but its development seems to have > slowed. The last release, 0.8.2, has been out for quite awhile now. >

Re: 911 was a RACIST crime by YANK BASTARDS against all other NATIONS Re: *POLL* How many sheeple believe in the 911 fairy tale and willing to accept an Orwellian doublespeak and enslavement world ?

2007-03-19 Thread thermate2
On Mar 19, 12:42 am, "Don Stockbauer" <[EMAIL PROTECTED]> wrote: > 911's primary utility was that, inadvertently, it sparked off the > formation of the global brain: > > The Social Superorganism and its Global Brain > > http://pespmc1.vub.ac.be/SUPORGLI.html > > Have a nice Monday, all. > > - Don

Re: 911 was a RACIST crime by YANK BASTARDS against all other NATIONS Re: *POLL* How many sheeple believe in the 911 fairy tale and willing to accept an Orwellian doublespeak and enslavement world ?

2007-03-19 Thread Tonico
On 19 mar, 19:47, [EMAIL PROTECTED] wrote: > On Mar 19, 12:42 am, "Don Stockbauer" <[EMAIL PROTECTED]> > wrote: > > > 911's primary utility was that, inadvertently, it sparked off the > > formation of the global brain: > > > The Social Superorganism and its Global Brain > > >http://pespmc1.vub.ac.b

pyosd question

2007-03-19 Thread Eugene Antimirov
Small script used to work, by last week I noticed that it simply hangs up. Can someone run this code on his own python and tell me about results? Help me please. import time import pyosd import re default_font="-adobe-helvetica-medium-r-*-*-24-*" interval = 2 temp_led_number = pyosd.osd(defaul

Re: PythonCard thoughts

2007-03-19 Thread Steve Holden
king kikapu wrote: >> I don't know much about PythonCard or wxGlade, but I use wxPython (which >> wxGlade uses, right?) and you now have the option to separate your GUI >> and code using an XRC file (xml file that describes layout). So perhaps >> this is something you can do with wxGlade, but at th

Re: tracking memory usage

2007-03-19 Thread kyosohma
On Mar 19, 11:34 am, "Erik Johnson" <[EMAIL PROTECTED]> wrote: > Sort of two questions here: > > The first is about the internal view: are there Python introspection > functions that can be called such that a running script can keep tabs on how > much memory is being used? > > And the sec

Re: PythonCard or Dabo?

2007-03-19 Thread Steve Holden
Kevin Walzer wrote: > I'm curious to know what others think of these two frameworks for > building wxPython apps. > > PythonCard has been around longer, but its development seems to have > slowed. The last release, 0.8.2, has been out for quite awhile now. > > Dabo is newer and seems to have ga

Re: PythonCard or Dabo?

2007-03-19 Thread Paul Rudin
Kevin Walzer <[EMAIL PROTECTED]> writes: > I'm curious to know what others think of these two frameworks for > building wxPython apps. > > PythonCard has been around longer, but its development seems to have > slowed. The last release, 0.8.2, has been out for quite awhile now. > > Dabo is newer an

Re: Renaming or Overloading In Python

2007-03-19 Thread gamename
On Mar 18, 4:57 pm, [EMAIL PROTECTED] (Alex Martelli) wrote: > gamename <[EMAIL PROTECTED]> wrote: > > Hi, > > > I'm a recent convert from TCL. One of the more powerful aspects of > > TCL is the ability to rename a function at will (generally for testing > > purposes). > > > Example from the tcl d

Re: PythonCard or Dabo?

2007-03-19 Thread John Henry
On Mar 19, 10:24 am, Kevin Walzer <[EMAIL PROTECTED]> wrote: > I'm curious to know what others think of these two frameworks for > building wxPython apps. > > PythonCard has been around longer, but its development seems to have > slowed. The last release, 0.8.2, has been out for quite awhile now. >

Re: PythonCard thoughts

2007-03-19 Thread John Henry
On Mar 19, 5:08 am, "king kikapu" <[EMAIL PROTECTED]> wrote: > Hi to all folks here, > > i downloaded and "playing" with PythonCard and i just want to share my > thoughts so maybe we can discuss a little about it. > I was used to wxGlade before and i think PythonCard is even better. > I like the se

Load three different modules which have the same name

2007-03-19 Thread abcd
I have the following directory structure setup... c:\alpha\Person.py -- class Person(IPerson): def __init__(self): print "Alpha person here" c:\beta\Person.py -- class Person(IPerson): def __init__(self): print "Beta person here" c:\gamma\P

Re: Load three different modules which have the same name

2007-03-19 Thread abcd
nevermind this took care of it: import sys def tryAllThree(): a = "c:\\alpha" b = "c:\\beta" g = "c:\\gamma" sys.path.append(a) import Person alpha = Person.Person() sys.path.remove(a) sys.path.append(b) reload(Person) beta = Person.Person() sys.path

RE: Choosing Python

2007-03-19 Thread Sells, Fred
glad to hear it. Those of us who would like to introduce it in reluctant schools elsewhere could benefit from a post-semester evaluation, including student comments and some sample, running projects. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of [EMAIL P

Pycron for windows - please help

2007-03-19 Thread Al
Hey all, I'm using Pycron for windows to run 5 scripts at various times of the day, all of which work well. I recently added a 6th job, a simply file copy operation, and it won't run. Once the job is configured, I click the test execution button, and it works fine. However, it won't run automa

Re: Choosing Python

2007-03-19 Thread kyosohma
On Mar 19, 1:52 pm, "Sells, Fred" <[EMAIL PROTECTED]> wrote: > glad to hear it. Those of us who would like to introduce it in reluctant > schools elsewhere could benefit from a post-semester evaluation, including > student comments and some sample, running projects. > > -Original Message-

Re: Load three different modules which have the same name

2007-03-19 Thread Carsten Haese
On Mon, 2007-03-19 at 11:42 -0700, abcd wrote: > nevermind this took care of it: > > import sys > > def tryAllThree(): > a = "c:\\alpha" > b = "c:\\beta" > g = "c:\\gamma" > > sys.path.append(a) > import Person > alpha = Person.Person() > > sys.path.remove(a) > s

Create TarFile using string buffers

2007-03-19 Thread [EMAIL PROTECTED]
I have a program that generates a number of files that will be packaged into a tarball. Can I stream the content into TarFile without first writing them out to the file system? All add(), addfile() and gettarinfo() seems to assume there is a file in the disk. But for me I seems inefficient to write

Anything available that can read Microsoft .MDB files from Python?

2007-03-19 Thread John Nagle
I'm looking for something that can read .MDB files, the format Microsoft Access uses, from Python. I need to do this on Linux, without using Microsoft tools. I just need to read the files once, so I can load the tables into another database. Speed isn't an issue, and I don't need to access the

Re: Boost Python properties/getter functions for strings

2007-03-19 Thread Shawn McGrath
On Mar 19, 12:49 pm, "Jon Clements" <[EMAIL PROTECTED]> wrote: > On 19 Mar, 16:40, "Shawn McGrath" <[EMAIL PROTECTED]> wrote: > > > On Mar 19, 12:00 pm, "Shawn McGrath" <[EMAIL PROTECTED]> wrote: > > > > I forgot to mention, getname is defined as: > > > const std::string &Entity::getName() const;

Re: Anything available that can read Microsoft .MDB files from Python?

2007-03-19 Thread Diez B. Roggisch
John Nagle schrieb: > I'm looking for something that can read .MDB files, the format > Microsoft Access uses, from Python. I need to do this on > Linux, without using Microsoft tools. I just need to read > the files once, so I can load the tables into another database. > Speed isn't an issue, a

Writing files

2007-03-19 Thread Adonis Vargas
I am writing a program that walks a directory full of mp3s reads their ID3 data (using Mutagen), this part works perfectly. The problem is I write these tags to a CSV file through the CSV module. But when I read the file the file seems to be incomplete. Further inspecting it has seemed to have

Re: PythonCard thoughts

2007-03-19 Thread king kikapu
Ο/Η John Henry έγραψε: > (If I understand your question correctly) > > There is no restirction on what you call your objects. For instance, > I do call all of my buttons btnSomeThing, and so forth. No, i surely didn't mean this! What i mean is that the creation of these components happens to NOT

Re: any ways to judge whether an object is initilized or not in a class

2007-03-19 Thread Bruno Desthuilliers
Steve Holden a écrit : > Bruno Desthuilliers wrote: > >> Diez B. Roggisch a écrit : >> (snip) >>> You want boil to be called __init__, which is python's constructor name. >> >> >> Actually, __init__ is the initializer. The proper constructor is __new__. >> >> > I'm not sure Diez qualifies as

Re: When is List Comprehension inappropriate?

2007-03-19 Thread Duncan Booth
"Ben" <[EMAIL PROTECTED]> wrote: > What's the most "pythony" way to do this: > > even = [] > for x in range(0,width,2): > for y in range(0,height,2): > color = im.getpixel((x,y)) > even.append(((x,y), color)) > > versus list comprehension: > > even2 = [((x,y), im.getpixel((x

Re: Using pxssh

2007-03-19 Thread Nick Craig-Wood
tereglow <[EMAIL PROTECTED]> wrote: > I am trying to convert some Expect/Tcl code into Python by using the > Pexpect module. The environment is such that authenticated keys are > disabled although SSH is available. I do not have control over this > environment, so I'm trying to automate tasks

Re: Private data

2007-03-19 Thread Bruno Desthuilliers
Dustan a écrit : > http://dustangroups.googlepages.com/privateattributesinpython > May I report a small typo ? """ def interanalDataDecorator(func): """ Talking about private attributes... !-) -- http://mail.python.org/mailman/listinfo/python-list

  1   2   >