[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

wxTayLayout 00.00.12 i

2007-03-01 Thread [EMAIL PROTECTED]
wxTayLayout 00.00.12 is now available for download! This brings the wxPython version of TayLayout very close to feature parity with the IronPython version. Just compound controls to go (e.g. File browser, colour picker). http://code.google.com/p/taylayout/downloads/list Thanks, Davy --

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:

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-list

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

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 state %d %

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:

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) ??? operator.index(gmpy.mpz(sys.maxint)+1) ???

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, that's a good

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: 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 = %HEADER

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 = 42

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'C:')

[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: 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 Cookbook

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

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

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''b$2\/ b''$3/ # italic bold /(^|[\s\(])\_([^ ].*?[^ ])\_([\s\)\.\,\:\;\!\?]|$)/$1''$2''$3/ #

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 do

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

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 the 'pysqlite'

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 stdin, line 1, in module IOError: [Errno 9] Bad file descriptor I wonder why it does work with the sys.stdin

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 suspected.

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 or when doing

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''b$2\/ b''$3/ # italic bold /(^|[\s\(])\_([^ ].*?[^

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''b$2\/ b''$3/ # italic bold /(^|[\s\(])\_([^ ].*?[^

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''b$2\/ b''$3/ # italic bold /(^|[\s\(])\_([^ ].*?[^

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] a [1, 2] b [1, 2]

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''b$2\/ b''$3/ # italic bold

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 calculating interests rate, which

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\(])\_\_([^ ].*?[^ ])\_\_([\s\)\.\,\:\;\!\?]|$)/$1''b$2\/

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: 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=

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, that's a good way to

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

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

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: 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: 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: 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 --

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 one

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_PATH

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: Person =

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(r'C:')

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)] --

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 strings

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' with the next

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 better

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 you

Re: How to update DNS record

2007-03-01 Thread andi . clemens
On Mar 1, 10:33 am, Bjoern Schliessmann usenet- [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 config. It worked before with a perl script, but now

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) subprocess.Popen object at 0x729f0 hey

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

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 my

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: 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 that case,

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

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

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

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

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 (0x4005)

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 far as

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

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 that

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. My test

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 much readable, it

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 =

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 and

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 would

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 usenet- [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

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: 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 retrieved from

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: 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? OT Anyway : 1/ you'll obviously need to have a good knowledge of html (plus css and

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: 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

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 performant

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

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 guide

Re: How to Read Bytes from a file

2007-03-01 Thread Jussi Salmela
Bart Ogryczak kirjoitti: 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

Re: starship.python.net is down

2007-03-01 Thread Matthew . Cahn
On Feb 26, 3:46 pm, Tom Bryan [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: Any news onstarship.python.net? It still seems to bedown. Yes. Unfortunately, there may be a hardware problem. Stefan, the admin who owns the hosted machine, is working with the host company to determine

Re: How to update DNS record

2007-03-01 Thread andi . clemens
Hi, I'm just a trainee working here and I don't really know how the old Perl script worked. But I can post the function, maybe you can recognize what is going on there: my $domain = wiv-dom.com; my $nameserver = bldc01.wiv-dom.com; sub makeDNSEntry { my $res = new Net::DNS::Resolver; my

Re: Python Tutorial

2007-03-01 Thread Timm Florian Gloger
Thanks. And excuse this now so obviously foolish question. It seems that my so-called brain was not able to recognise Downloads as a valueable possibility to dive into when searching some non-HTML content. Sorry for wasting your time, and thanks even more for answering nevertheless. Regards, Timm

Re: imagemagick

2007-03-01 Thread azrael
i need to use some common filters lik the edge, blur. it was pretty easy and fast to use python magick. but now as I want to use it with python, it is impossible. there is the PIL_usm, but also no installation instrucions. Is there a way to blur the image using the PIL by a specific radius. On

Re: How to Read Bytes from a file

2007-03-01 Thread Alex Martelli
Leif K-Brooks [EMAIL PROTECTED] wrote: 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

Re: How to Read Bytes from a file

2007-03-01 Thread [EMAIL PROTECTED]
On Mar 1, 8:53 am, Bart Ogryczak [EMAIL PROTECTED] wrote: 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

Re: class declaration shortcut

2007-03-01 Thread Steven Bethard
Arnaud Delobelle wrote: 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

Re: pattern matching

2007-03-01 Thread Diez B. Roggisch
azrael wrote: can someone give me good links for pattern matching in images using python There is a python-binding available for the OpenCV library, a collection of state-of-the-art CV algorithms. And it comes with a free manual Diez --

Re: finding out the precision of floats

2007-03-01 Thread John Machin
On Mar 1, 9:33 pm, Bart Ogryczak [EMAIL PROTECTED] wrote: 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]

Re: How to Read Bytes from a file

2007-03-01 Thread John Machin
On Mar 2, 12:53 am, Bart Ogryczak [EMAIL PROTECTED] wrote: import struct buf = open('somefile','rb').read() count1 = lambda x: (x1)+(x20)+(x40)+(x80)+(x160)+(x320)+ (x640)+(x1280) byteOnes = map(count1,struct.unpack('B'*len(buf),buf)) byteOnes = map(count1,struct.unpack('%dB'%len(buf),buf))

GIS Shape file upload FTP server

2007-03-01 Thread Ahmed, Shakir
HI Group, As I am very new in python field so this question might be very silly but If I get any help that is highly appreciated. Problem: I have a python script which is working fine to upload files to the ftp server but the problem is it is reducing the actual size after

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

2007-03-01 Thread MonkeeSage
On Mar 1, 5:02 am, [EMAIL PROTECTED] wrote: I don't know Ruby, but I think it allows such purposes with a freezing function. In ruby all objects can be frozen (freeze is a method on Object, from which all other objects derive), not just Arrays (Arrays == lists in python; ruby has no built-in

Re: Reading csv files using SQL

2007-03-01 Thread Pablo was Paolo
[EMAIL PROTECTED] ha scritto: If you want to work directly with the files why not just use Python's csv module? Now, with Java, I use the same class to read several databases and csv files (with SQL instructions). I'd like to find a library for using the same approach in Python. Thank you,

Re: New to Tkinter GUI building

2007-03-01 Thread Adonis Vargas
Adam wrote: On Feb 28, 9:13 pm, Adonis Vargas [EMAIL PROTECTED] wrote: Adam wrote: snip I think my main questions are: 1. How can I get the Window to be sized the way I want it? 2. How can I get the Scrollbars to fill the side of the text box instead of being small? (like .pack(fill=

Re: Reading csv files using SQL

2007-03-01 Thread Tim Golden
Pablo was Paolo wrote: [EMAIL PROTECTED] ha scritto: If you want to work directly with the files why not just use Python's csv module? Now, with Java, I use the same class to read several databases and csv files (with SQL instructions). I'd like to find a library for using the same

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

2007-03-01 Thread bayer . justin
Okay, here is what I want to do: I have a C Program that I have the source for and want to hook with python into that. What I want to do is: run the C program as a subprocess. The C programm gets its commands from its stdin and sends its state to stdout. Thus I have some kind of dialog over

Re: How to Read Bytes from a file

2007-03-01 Thread Bart Ogryczak
On Mar 1, 4:58 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Mar 1, 8:53 am, Bart Ogryczak [EMAIL PROTECTED] wrote: 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

Python on a mac: how to build pythonw?

2007-03-01 Thread Ron Garret
I'm trying to run the Python examples distributed with XCode and they all give me the same error: Traceback (most recent call last): File checktext.py, line 35, in module main() File checktext.py, line 8, in main pathname = EasyDialogs.AskFileForOpen(message='File to check

Re: How to update DNS record

2007-03-01 Thread Martin P. Hellwig
Andi Clemens wrote: Hi, I want to update our DNS servers periodically with some IP addresses. But I don't know how to do this. I searched the Internet quite a while but I haven't found a good example how to do this. I want to change the A-Record for some IPs, this shouldn't be too hard. I

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

2007-03-01 Thread George Trojan
[EMAIL PROTECTED] wrote: Okay, here is what I want to do: I have a C Program that I have the source for and want to hook with python into that. What I want to do is: run the C program as a subprocess. The C programm gets its commands from its stdin and sends its state to stdout. Thus I

Re: Python on a mac: how to build pythonw?

2007-03-01 Thread Robert Kern
Ron Garret wrote: I'm trying to run the Python examples distributed with XCode and they all give me the same error: Traceback (most recent call last): File checktext.py, line 35, in module main() File checktext.py, line 8, in main pathname =

  1   2   >