Re: Eric on XP for Newbie

2007-03-01 Thread Larry Bates
[EMAIL PROTECTED] wrote: > I'm starting on the path of freeing myself from proprietory software > but I need to migrate, not make one huge jump. > > I'm looking at using Python and Eric for programming > > I've got Python up and running but can someone please point me to a > simple step by step g

Re: Importing binary modules

2007-03-01 Thread Thinker
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > Well, unfortunately I don't have access to the binary like that. It > is given me, I just wanted to use it the way it was compiled. What > could be done then? You have better set LD_LIBRARY_PATH environment variable, or use ldconfig (plz, man ldconf

Re: design question: no new attributes

2007-03-01 Thread Paul Boddie
On 28 Feb, 15:39, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > > However I will observe that > > - entire languages are structured on the premise that dynamic > > attribute creation can be hazardous > > Yup, and you are free to use one of them. And as an additional benefit, they > will be more p

Re: imagemagick

2007-03-01 Thread Terry Hancock
azrael wrote: > Hy > did anyone manage to work with imahemagick through python. I've been > googling like a crazy for some instalation instructions, but i cant > find anything. please help. There have been a few wrappers for ImageMagick over the last few years. There was once something called "Py

Re: How to check for remaining hard drive space in Windows?

2007-03-01 Thread kevinliu23
Thanks Tim, I only need to run the get hard drive space function on one drive for one machine so I'll stick to GetDiskFreeSpace. If I need to expand this feature to multiple harddrives/machines, I'll be sure to come back to this thread. :) Kevin On Mar 1, 4:17 am, Tim Golden <[EMAIL PROTECTED]>

Re: django learn

2007-03-01 Thread [EMAIL PROTECTED]
On 1 mar, 14:36, Gigs_ <[EMAIL PROTECTED]> wrote: > HI folks! > > I want to learn to make web pages with django. > I dont know nothing about HTML. > > How much of HTML I need to know to be able to learn django well? > Anyway : 1/ you'll obviously need to have a good knowledge of html (plus css an

Re: design question: no new attributes

2007-03-01 Thread Alan Isaac
"greg" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > There's a problem with that when you want to subclass: Agreed. The following addresses that and, I think, some of the other objections that have been raised. Alan class Lockable: a = 0 def __init__(self, lock=False):

Re: Extract String From Enclosing Tuple

2007-03-01 Thread rshepard
On 2007-02-28, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: import itertools tuple(itertools.chain((t[0], t2[0].encode('ascii')), t[2:])) > ('eco', 'Roads', 0.073969887301348305) Steven, As suggested in the previous article, I handled it where the values are read from the list retrie

imagemagick

2007-03-01 Thread azrael
Hy did anyone manage to work with imahemagick through python. I've been googling like a crazy for some instalation instructions, but i cant find anything. please help. thnx -- http://mail.python.org/mailman/listinfo/python-list

Re: How to update DNS record

2007-03-01 Thread Jean-Paul Calderone
On 1 Mar 2007 04:14:23 -0800, [EMAIL PROTECTED] wrote: >On Mar 1, 10:33 am, Bjoern Schliessmann [EMAIL PROTECTED]> wrote: >> Read RFC 2136 (Dynamic updates in the DNS) and see if your server >> can be configured to do this. If not, you'll have to change the >> zone files manually and reload the DNS

Re: How to update DNS record

2007-03-01 Thread Bjoern Schliessmann
[EMAIL PROTECTED] wrote: > It worked before with a perl script, but now I'm using django for > all our web services so I want to implement this update function > in Python as well. > I don't know how to do this in Python, right now I'm trying it > with twisted, but I don't what to do exactly. It w

Re: design question: no new attributes

2007-03-01 Thread Alan Isaac
"Bruno Desthuilliers" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I don't share your definition of "reasonable". But you should have > guessed by now My view may be shaped by a different experience. I have found dynamic attribute creation convenient when doing something "quick a

Re: installing "pysqlite"

2007-03-01 Thread Nader
On Mar 1, 2:40 pm, "Paul Boddie" <[EMAIL PROTECTED]> wrote: > On 1 Mar, 12:46, "Nader" <[EMAIL PROTECTED]> wrote: > > > > > ldd returens the next result: > > ldd /usr/people/emami/lib/python2.4/site-packages/pysqlite2/_sqlite.so > > linux-gate.so.1 => (0xe000) > > libpthread.so.0 => /l

Re: quickly read a formated file?

2007-03-01 Thread Jussi Salmela
rzed kirjoitti: > [EMAIL PROTECTED] wrote in > news:[EMAIL PROTECTED]: > >> lialie: >>> The formated file may be very popularly, but the module >>> ConfigPaser doesn't handle it. Is there a way to process it >>> freely? >> First try, assuming the input file can be read whole. The code >> isn't m

Re: How do I Color a QTableView row in PyQt4

2007-03-01 Thread Mel
On Feb 28, 5:08 pm, David Boddie <[EMAIL PROTECTED]> wrote: > On Wednesday 28 February 2007 18:55, Mel wrote: > > > > > I am currently porting an SQL centered Visual Basic application to run > > on Linux, Python, and Qt4. Currently I am stumped on changing row > > colors in the QTableView widget.

Re: django learn

2007-03-01 Thread René Fleschenberg
Hi Gigs_ schrieb: > I want to learn to make web pages with django. > I dont know nothing about HTML. > > How much of HTML I need to know to be able to learn django well? You need to get a profound knowledge of it, unless you have someone else who does the HTML/Templating for your project. In tha

Re: Python Tutorial

2007-03-01 Thread Jerry Hill
On 3/1/07, Timm Florian Gloger <[EMAIL PROTECTED]> wrote: > is Guido van Rossum's "Python Tutorial" in non-HTML formats (e.g. PDF > or PS) avaiable for free? Yes. Download one of the PDF documentation zips from here: http://docs.python.org/download and extract the tut.pdf file. AFAIK it's not av

Re: How to Read Bytes from a file

2007-03-01 Thread Bart Ogryczak
On Mar 1, 7:52 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > It seems like this would be easy but I'm drawing a blank. > > What I want to do is be able to open any file in binary mode, and read > in one byte (8 bits) at a time and then count the number of 1 bits in > that byte. > > I got as

Re: installing "pysqlite"

2007-03-01 Thread Paul Boddie
On 1 Mar, 12:46, "Nader" <[EMAIL PROTECTED]> wrote: > > ldd returens the next result: > ldd /usr/people/emami/lib/python2.4/site-packages/pysqlite2/_sqlite.so > linux-gate.so.1 => (0xe000) > libpthread.so.0 => /lib/tls/libpthread.so.0 (0x4004) > libc.so.6 => /lib/tls/libc.so.6

django learn

2007-03-01 Thread Gigs_
HI folks! I want to learn to make web pages with django. I dont know nothing about HTML. How much of HTML I need to know to be able to learn django well? Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Python Tutorial

2007-03-01 Thread Timm Florian Gloger
Hi, is Guido van Rossum's "Python Tutorial" in non-HTML formats (e.g. PDF or PS) avaiable for free? Regards, Timm -- http://mail.python.org/mailman/listinfo/python-list

Questions about app design - OOP with python classes

2007-03-01 Thread adriancico
Hi I am working on a python app, an outliner(a window with a TreeCtrl on the left to select a document, and a RichTextBox at the right to edit the current doc). I am familiarized with OOP concepts and terms but I lack practical experience , so any comment/tip/pointer to docs will be welco

pattern matching

2007-03-01 Thread azrael
can someone give me good links for pattern matching in images using python -- http://mail.python.org/mailman/listinfo/python-list

Re: Importing binary modules

2007-03-01 Thread André
On 1 mar, 12:21, Thinker <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > [EMAIL PROTECTED] wrote: > > cut .. > > > The problem appears when libMyNewModule.so depends on another > > library, say libfoo.so, which sits also in /my/module/dir. In tha

Re: Python installation problem (sorry if this is a dup)

2007-03-01 Thread [EMAIL PROTECTED]
On 1 mar, 06:22, Ray Buck <[EMAIL PROTECTED]> wrote: > I've been trying to install Mailman, which requires a newer version > of the Python language compiler (p-code generator?) It's actually the whole thing : (byte-code) compiler, virtual machine, and stdlib. > than the one I > currently have on

Re: urlDecode()

2007-03-01 Thread Gabriel Genellina
En Wed, 28 Feb 2007 22:45:40 -0300, gert <[EMAIL PROTECTED]> escribió: > import re > > def htc(m): > return chr(int(m.group(1),16)) > > def urldecode(url): > rex=re.compile('%([0-9a-hA-H][0-9a-hA-H])',re.M) > return rex.sub(htc,url) > > if __name__ == '__main__': > print urldecode

Re: Dialog with a process via subprocess.Popen blocks forever

2007-03-01 Thread Gabriel Genellina
En Wed, 28 Feb 2007 18:27:43 -0300, <[EMAIL PROTECTED]> escribió: > Hi, > > I am trying to communicate with a subprocess via the subprocess > module. Consider the following example: > from subprocess import Popen, PIPE Popen("""python -c 'input("hey")'""", shell=True) > hey > > Her

Re: How to update DNS record

2007-03-01 Thread andi . clemens
On Mar 1, 10:33 am, Bjoern Schliessmann wrote: > Read RFC 2136 (Dynamic updates in the DNS) and see if your server > can be configured to do this. If not, you'll have to change the > zone files manually and reload the DNS config. It worked before with a perl script, but now I'm using django for a

Re: Reading csv files using SQL

2007-03-01 Thread skip
>> You could maybe use SQLite to load the CSV file and process in an >> actual DBMS... Pablo> Ok, this is the solution I'm using actually (with PostGres). My Pablo> hope is to find a way to do the same thing without using a DBMS Pablo> but working directly with the files. If

Re: quickly read a formated file?

2007-03-01 Thread rzed
[EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: > lialie: >> The formated file may be very popularly, but the module >> ConfigPaser doesn't handle it. Is there a way to process it >> freely? > > First try, assuming the input file can be read whole. The code > isn't much readable, it needs be

Re: installing "pysqlite"

2007-03-01 Thread Nader
On Mar 1, 11:46 am, "Paul Boddie" <[EMAIL PROTECTED]> wrote: > On 1 Mar, 10:34, "Nader" <[EMAIL PROTECTED]> wrote: > > > > > I have expanded the LD_LIBRARY_PATH to my home lib (export > > LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/people/emami/lib). > > I have built and installed the 'pysqlite-2.3.3'

Re: How to check for remaining hard drive space in Windows?

2007-03-01 Thread Tim Golden
[EMAIL PROTECTED] wrote: > HI, > > I am new to Python and wanted to know how to check for the remaining > disk space on my Windows machine using Python? I was thinking of using > the command line "dir" and trying to extract the output from there. > But I'm not sure how to extract command line stri

Re: How to Read Bytes from a file

2007-03-01 Thread Leif K-Brooks
Alex Martelli wrote: > You should probaby prepare before the loop a mapping from char to number > of 1 bits in that char: > > m = {} > for c in range(256): > m[c] = countones(c) Wouldn't a list be more efficient? m = [countones(c) for c in xrange(256)] -- http://mail.python.org/mailman/listin

Re: How to check for remaining hard drive space in Windows?

2007-03-01 Thread Gabriel Genellina
En Wed, 28 Feb 2007 18:54:53 -0300, kevinliu23 <[EMAIL PROTECTED]> escribió: > It's great because I don't even have to worry about the computer name. > A question regarding the rootPath parameter...how would I be passing > it? Would I be passing it as... > >tuple = win32api.GetDiskFreeSpace(

Re: class declaration shortcut

2007-03-01 Thread Arnaud Delobelle
On Feb 28, 7:26 pm, "Luis M. González" <[EMAIL PROTECTED]> wrote: > I've come across a code snippet inwww.rubyclr.comwhere they show how > easy it is to declare a class compared to equivalent code in c#. > I wonder if there is any way to emulate this in Python. > > The code is as follows: > > Perso

Re: Importing binary modules

2007-03-01 Thread Thinker
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [EMAIL PROTECTED] wrote: cut .. > > The problem appears when libMyNewModule.so depends on another > library, say libfoo.so, which sits also in /my/module/dir. In that > case, '/my/ module/dir', needs to be preset in the LD_LIBRARY_P

Pydev 1.2.8 Released

2007-03-01 Thread Fabio Zadrozny
Hi All, Pydev and Pydev Extensions 1.2.8 have been released Details on Pydev Extensions: http://www.fabioz.com/pydev Details on Pydev: http://pydev.sf.net Details on its development: http://pydev.blogspot.com Release Highlights in Pydev Extensions: --

Re: newbie question(file-delete trailing comma)

2007-03-01 Thread kavitha thankaian
thanks,,, i tried another way and it works,,, f.writelines(','.join([('\"%s\"' % some[field]) for field in field_order])) thanks a lot,,, Gabriel Genellina <[EMAIL PROTECTED]> wrote: En Wed, 28 Feb 2007 08:34:29 -0300, kavitha thankaian escribió: > thanks,, > now i have on

Re: Is there a technic to avoid this bug

2007-03-01 Thread Fabio Zadrozny
On 2/27/07, hg <[EMAIL PROTECTED]> wrote: Michele Simionato wrote: > pychecker Thanks all ... pydev extension does not however ... will have to install pychecker also. Just as a note: pydev extensions 1.2.8 supports that... (just released) Cheers, Fabio -- http://mail.python.org/mailman/

Re: class declaration shortcut

2007-03-01 Thread BJörn Lindqvist
On 28 Feb 2007 13:53:37 -0800, Luis M. González <[EMAIL PROTECTED]> wrote: > Hmmm... not really. > The code above is supposed to be a shorter way of writing this: > > class Person: > def __init__(self, name, birthday, children): > self.name = name > self.birthday = birthday >

Re: splitting perl-style find/replace regexp using python

2007-03-01 Thread Peter Otten
John Pye wrote: > Is there an easy and general way that I can split these perl-style > find-and-replace expressions into something I can use with Python, eg > re.sub('search','replace',str) ? Another candidate: >>> re.compile(r"(?:/((?:\\.|[^/])*))").findall(r"/abc\\/def\/ghi//jkl") ['abc',

Re: splitting perl-style find/replace regexp using python

2007-03-01 Thread Peter Otten
James Stroud wrote: > Yes, this would be a case of the expression (left side) ending with a > "\" as I mentioned above. Sorry for not tracking the context. Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Tuples vs Lists: Semantic difference (was: Extract String From Enclosing Tuple)

2007-03-01 Thread bearophileHUGS
George Sakkis, I agree with the things you say. Sometimes you may have a sequence of uniform data with unknown len (so its index doesn't have semantic meaning). You may want to use it as dict key, so you probably use a tuple meant as just an immutable list. I don't know Ruby, but I think it allows

Importing binary modules

2007-03-01 Thread andre . dos . anjos
How can I, in python (linux, python version >= 2.4.2), dynamically set the path and import a binary module that depends on libraries which are not declared in LD_LIBRARY_PATH or any other automated linker path when python starts? This is a an example: Suppose I have a new python module, called My

Re: class declaration shortcut

2007-03-01 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Bjoern Schliessmann wrote: > Michele Simionato wrote: >> On Mar 1, 9:40 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> >>> In <[EMAIL PROTECTED]>, Bjoern Schliessmann > But what's it (__name__) good for? >>> >>> As objects don't know to which name they are bound, th

Re: installing "pysqlite"

2007-03-01 Thread Paul Boddie
On 1 Mar, 10:34, "Nader" <[EMAIL PROTECTED]> wrote: > > I have expanded the LD_LIBRARY_PATH to my home lib (export > LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/people/emami/lib). > I have built and installed the 'pysqlite-2.3.3' with the next > 'setup.cfg' : > > [build_ext] > define= > include_dirs=/u

Re: Eric on XP for Newbie

2007-03-01 Thread jeffwatkins2000
Thanks guys Found this on another blog and it seems to work - you need to run the SPE.pyo file ... Stani said... In order to run SPE you need to install python from www.python.org and wxpython 2.6 from wxpython.org. -- http://mail.python.org/mailman/listinfo/python-list

Re: splitting perl-style find/replace regexp using python

2007-03-01 Thread James Stroud
Peter Otten wrote: > James Stroud wrote: > >> James Stroud wrote: >>> John Pye wrote: Hi all I have a file with a bunch of perl regular expressions like so: /(^|[\s\(])\*([^ ].*?[^ ])\*([\s\)\.\,\:\;\!\?]|$)/$1'''$2'''$3/ # bold /(^|[\s\(])\_\_([^ ].*?[^ ])\_\_([

Re: finding out the precision of floats

2007-03-01 Thread Bart Ogryczak
On Feb 28, 10:29 pm, "John Machin" <[EMAIL PROTECTED]> wrote: > On Mar 1, 4:19 am, "BartOgryczak" <[EMAIL PROTECTED]> wrote: > > > > > On Feb 28, 3:53 pm, "John Machin" <[EMAIL PROTECTED]> wrote: > > > > On Feb 28, 10:38 pm, "BartOgryczak" <[EMAIL PROTECTED]> wrote: > > > > > [1] eg. consider calcu

Re: splitting perl-style find/replace regexp using python

2007-03-01 Thread Peter Otten
James Stroud wrote: > James Stroud wrote: >> John Pye wrote: >>> Hi all >>> >>> I have a file with a bunch of perl regular expressions like so: >>> >>> /(^|[\s\(])\*([^ ].*?[^ ])\*([\s\)\.\,\:\;\!\?]|$)/$1'''$2'''$3/ # >>> bold >>> /(^|[\s\(])\_\_([^ ].*?[^ ])\_\_([\s\)\.\,\:\;\!\?]|$)/$1''$2<\/ >

Re: Python Source Code Beautifier

2007-03-01 Thread Gabriel Genellina
En Wed, 28 Feb 2007 19:09:09 -0300, [EMAIL PROTECTED] <[EMAIL PROTECTED]> escribió: > On Feb 28, 11:24 am, Alan Franzoni > <[EMAIL PROTECTED]> wrote: >> Il 27 Feb 2007 16:14:20 -0800, [EMAIL PROTECTED] ha scritto: >> >> > Those mean different things: >> >> a=[1] >> b=a >> a += [2]

Re: splitting perl-style find/replace regexp using python

2007-03-01 Thread James Stroud
James Stroud wrote: > John Pye wrote: >> Hi all >> >> I have a file with a bunch of perl regular expressions like so: >> >> /(^|[\s\(])\*([^ ].*?[^ ])\*([\s\)\.\,\:\;\!\?]|$)/$1'''$2'''$3/ # >> bold >> /(^|[\s\(])\_\_([^ ].*?[^ ])\_\_([\s\)\.\,\:\;\!\?]|$)/$1''$2<\/ >> b>''$3/ # italic bold >> /(^|

Re: splitting perl-style find/replace regexp using python

2007-03-01 Thread Peter Otten
John Pye wrote: > I have a file with a bunch of perl regular expressions like so: > > /(^|[\s\(])\*([^ ].*?[^ ])\*([\s\)\.\,\:\;\!\?]|$)/$1'''$2'''$3/ # > bold > /(^|[\s\(])\_\_([^ ].*?[^ ])\_\_([\s\)\.\,\:\;\!\?]|$)/$1''$2<\/ > b>''$3/ # italic bold > /(^|[\s\(])\_([^ ].*?[^ ])\_([\s\)\.\,\:\;\!

Re: splitting perl-style find/replace regexp using python

2007-03-01 Thread James Stroud
John Pye wrote: > Hi all > > I have a file with a bunch of perl regular expressions like so: > > /(^|[\s\(])\*([^ ].*?[^ ])\*([\s\)\.\,\:\;\!\?]|$)/$1'''$2'''$3/ # > bold > /(^|[\s\(])\_\_([^ ].*?[^ ])\_\_([\s\)\.\,\:\;\!\?]|$)/$1''$2<\/ > b>''$3/ # italic bold > /(^|[\s\(])\_([^ ].*?[^ ])\_([\s\

Re: class declaration shortcut

2007-03-01 Thread Bjoern Schliessmann
Michele Simionato wrote: > On Mar 1, 9:40 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> >> In <[EMAIL PROTECTED]>, Bjoern Schliessmann >>> But what's it (__name__) good for? >> >> As objects don't know to which name they are bound, that's a good >> way to give some information in stack traces o

Re: Tuples vs Lists: Semantic difference

2007-03-01 Thread Bjoern Schliessmann
Ben Finney wrote: > Bjoern Schliessmann <[EMAIL PROTECTED]> >> Explain. > > Well, since you ask so politely :-) I admit, sometimes I'm a little short-spoken ;) >> I know tuples as immutable lists ... > > That's a common misconception. > [...] Thanks for pointers, there's more to it than I su

Re: Dialog with a process via subprocess.Popen blocks forever

2007-03-01 Thread bayer . justin
Hi, Thanks for your answer. I had a look into the fcntl module and tried to unlock the output-file, but >>> fcntl.lockf(x.stdout, fcntl.LOCK_UN) Traceback (most recent call last): File "", line 1, in IOError: [Errno 9] Bad file descriptor I wonder why it does work with the sys.stdin It's real

Re: installing "pysqlite"

2007-03-01 Thread Nader
On Feb 28, 12:51 pm, "Paul Boddie" <[EMAIL PROTECTED]> wrote: > On 28 Feb, 12:07, Nader Emami <[EMAIL PROTECTED]> wrote: > > > > > I am back with another problem. I suppose that I can tell it! > > I have installed both, 'sqlite' and 'pysqlite' without any problem. But > > If I try to test whether t

Converting a c array to python list

2007-03-01 Thread zefciu
Hi! I want to embed a function in my python application, that creates a two-dimensional array of integers and passes it as a list (preferably a list of lists, but that is not necessary, as the python function knows the dimensions of this array). As I read the reference, I see, that I must first i

Re: How to update DNS record

2007-03-01 Thread Bjoern Schliessmann
Andi Clemens wrote: > I want to change the A-Record for some IPs, this shouldn't be too > hard. I looked at dnspython and twisted, but I really don't have a > clue how to do this. > Has anyone done this before? Read RFC 2136 (Dynamic updates in the DNS) and see if your server can be configured to

splitting perl-style find/replace regexp using python

2007-03-01 Thread John Pye
Hi all I have a file with a bunch of perl regular expressions like so: /(^|[\s\(])\*([^ ].*?[^ ])\*([\s\)\.\,\:\;\!\?]|$)/$1'''$2'''$3/ # bold /(^|[\s\(])\_\_([^ ].*?[^ ])\_\_([\s\)\.\,\:\;\!\?]|$)/$1''$2<\/ b>''$3/ # italic bold /(^|[\s\(])\_([^ ].*?[^ ])\_([\s\)\.\,\:\;\!\?]|$)/$1''$2''$3/ # it

Re: Reading csv files using SQL

2007-03-01 Thread Pablo was Paolo
Paul McGuire ha scritto: > Sqlite has an in-memory option, so that you can read in your csv, then > load into actual tables. Thanks, this could be the perfect solution. Paolo -- http://mail.python.org/mailman/listinfo/python-list

Re: class declaration shortcut

2007-03-01 Thread Michele Simionato
On Mar 1, 9:40 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > In <[EMAIL PROTECTED]>, Bjoern Schliessmann wrote: > > > But what's it (__name__) good for? > > As objects don't know to which name they are bound, that's a good way to > give some information in stack traces or when doing int

Re: design question: no new attributes

2007-03-01 Thread Michele Simionato
On Feb 26, 10:48 pm, "Alan Isaac" <[EMAIL PROTECTED]> wrote: > I have a class whose instances should only receive attribute > assignments for attributes that were created at inititialization. > If slots are not appropriate, what is the Pythonic design for this? > > Thanks, > Alan Isaac There is a

[ANN] pylint 0.13 / astng 0.17

2007-03-01 Thread Sylvain Thénault
Hi there! I'm very pleased to announce new releases of pylint (0.13) and its underlying library astng (0.17). The PyLint release contains a bunch of bugs fixes, some new checks and command line changes, and a new checker dedicated to Restricted Python checking. If this doesn't sound familiar to

Re: How to check for remaining hard drive space in Windows?

2007-03-01 Thread Tim Golden
kevinliu23 wrote: > Just tried your solution Tim, worked like a charm. :) > > It's great because I don't even have to worry about the computer name. > A question regarding the rootPath parameter...how would I be passing > it? Would I be passing it as... > >tuple = win32api.GetDiskFreeSpace(r'

Re: design question: no new attributes

2007-03-01 Thread greg
Alan Isaac wrote: > class NothingNew: > a = 0 > def __init__(self): > self.b = 1 > self.initialized = True There's a problem with that when you want to subclass: class NothingElseNew(NothingNew): def __init__(self): NothingNew.__init__(self) self.c

Re: quickly read a formated file?

2007-03-01 Thread bearophileHUGS
lialie: > The formated file may be very popularly, but the module ConfigPaser > doesn't handle it. Is there a way to process it freely? First try, assuming the input file can be read whole. The code isn't much readable, it needs better variable names (name names?), comments, etc. data = """ %HEAD

Re: Vector, matrix, normalize, rotate. What package?

2007-03-01 Thread greg
Mattias Brändström wrote: > 1. Create 3d vectors. > 2. Normalize those vectors. > 3. Create a 3x3 rotation matrix from a unit 3-d vector and an angle in > radians. > 4. Perform matrix multiplication. > > Meybe someone knows a way to use numpy for 2 and 3? Here's some code I wrote recently to do

Re: class declaration shortcut

2007-03-01 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Bjoern Schliessmann wrote: > Bruno Desthuilliers wrote: > >> class Toto(object): >> pass >> >> print Toto.__name__ > > Okay, I revoke my statement and assert the opposite. > > But what's it (__name__) good for? As objects don't know to which name they are bound, t

Fwd: gmpy moving to code.google.com

2007-03-01 Thread Daniel Nogradi
> > Could you please tell me, on that 64-bit build, what happens with: > > > >>> importgmpy, sys, operator > > >>> sys.maxint > > ??? > > >>>gmpy.mpz(sys.maxint) > > ??? > > >>> operator.index(gmpy.mpz(sys.maxint)) > > ??? > > >>> sys.maxint+1 > > ??? > > >>>gmpy.mpz(sys.maxint+1) > > ??? > > >>> o

Re: Curious UnboundLocalError Behavior

2007-03-01 Thread [EMAIL PROTECTED]
On 28 fév, 18:15, "Matthew Franz" <[EMAIL PROTECTED]> wrote: > I'm probably fundamentally misunderstanding the way the interpreter > works with regard to scope, but is this the intended behavior... > (snip traceback) > import os,sys > > SOMEGLOBAL=1 > > def foo(): > dome=False > if dome: >

Re: Question about raise and exceptions.

2007-03-01 Thread [EMAIL PROTECTED]
On 1 mar, 04:46, Daniel Klein <[EMAIL PROTECTED]> wrote: > On Wed, 28 Feb 2007 22:03:13 +0100, Bruno Desthuilliers > > > > <[EMAIL PROTECTED]> wrote: > >Daniel Klein a écrit : > >> The arguments for TransitionError must be a tuple, > > >Err... > > >> eg: > > >> msg = "Going to error state %d from s

PyQt4: Clickable links in QLabel?

2007-03-01 Thread Tina I
Hi everyone, A short and sweet question: Is it possible to put a clickable link in a QLabel that will open in the systems default browser? I tried to put in some HTML but it did (of course?) simply display the code instead of a link. I also tried to set openExternalLinks 'true' but then pyuic4

quickly read a formated file?

2007-03-01 Thread lialie
Hi, Is there a fine way to read a formated file like: %HEADER title = "Untilted" username = "User" %DATA .. .. The formated file may be very popularly, but the module ConfigPaser doesn't handle it. Is there a way to process it freely? -- http://mail.python.org/mailman/listinfo/python-l

<    1   2