Re: UnicodeDecodeError having fetch web page

2010-05-26 Thread John Machin
Rob Williscroft rtw.me.uk> writes: > > Barry wrote in news:83dc485a-5a20-403b-99ee-c8c627bdbab3 > @m21g2000vbr.googlegroups.com in gmane.comp.python.general: > > > UnicodeDecodeError: 'utf8' codec can't decode byte 0x8b in position 1: > > unexpected code byte > > It may not be you, en.wiktion

Re: function that counts...

2010-05-26 Thread Bryan
I wrote: > My prttn() calls ndsums() once for each > digit, so the whole thing is polynomial in the number of digits. Correction: my prttn() function calls ndsums() at most 9 times per digit of n. That still provides run time polynomial in the length of the input. -- --Bryan -- http://mail.pyth

Re: asyncore loop and cmdloop problem

2010-05-26 Thread kak...@gmail.com
On May 26, 2:03 am, exar...@twistedmatrix.com wrote: > On 04:31 pm, kak...@gmail.com wrote: > > > > >On May 25, 5:47 pm, "kak...@gmail.com" wrote: > >>On May 25, 5:23 pm, Michele Simionato > >>wrote: > > >> > On May 25, 2:56 pm, "kak...@gmail.com" wrote: > > >> > > Could you please provide me wi

Re: function that counts...

2010-05-26 Thread Bryan
I wrote: > > I came up with a recursive memo-izing algorithm that > > handles 100-digit n's. Oops. I missed Richard Thomas's post. He posted the same algorithm a couple days before. -- --Bryan -- http://mail.python.org/mailman/listinfo/python-list

Kohonen neural network

2010-05-26 Thread Lex Lebedeff
Hello! Has anyone tried to build an implementation of subject in Python? Any help is appreciated! --- news://freenews.netfront.net/ - complaints: n...@netfront.net --- -- http://mail.python.org/mailman/listinfo/python-list

MySQLDB - server has gone on blob insertion...

2010-05-26 Thread Durumdara
Hi! I want to test my program that coded into PGSQL, and PySQLite. With these DBs I have problem on many blob deletion (2 hours) and compact/vacuum (1 hours)... So I'm trying to port my program, and before that making a test to check, which time needs to delete 1 GB of blobs. I installed MySQLDb

TypeError: _new_() takes exactly 3 arguments (2 given) - what does it mean?

2010-05-26 Thread Jesse McDonnell
I'm attempting to install Powerline http://code.google.com/p/powerline/, a computer reservation software based on CherryPy/Python using a MYSql database, at my local library and I've run up against an error that I cannot google my way out of!   The google groups for the application is inactive so

Vote to Add Python Package "pubsub" to the Python Standard Library

2010-05-26 Thread Tom
I vote for adding the Python package "pubsub" to the Python standard library. It has recently been added to wxpython (replacing the old wx.lib.pubsub package), but it has application to non-gui programs as well. For more information see: . -- http://mail.python.o

[WxPython] Advice on Temperature Application Method & Structure

2010-05-26 Thread Jimbo
Hello I have made a simple application using WxPython that is a temperature converter. This is my first application made in WxPython, the only other apps I have made were in Win32 c++ so I am new to widgets in general. I am looking for advice & criticism on when you should use classes in GUI wid

Re: speed up a numpy code with huge array

2010-05-26 Thread Alexzive
thank you all for the tips. I 'll try them soon. I also notice another bottleneck, when python tries to access some array data stored in the odb files (---> in text below), even before starting the algoritm: ### EPS_nodes = range(len(frames)) for f in frames: ... sum = 0 --->UN = F[f].fie

Re: speed up a numpy code with huge array

2010-05-26 Thread Alexzive
sorry it was just bullshit what I wrote about the second bottleneck, it seemed to hang up but it was just me forgetting to double-enter during debugging after "for cycle". On May 26, 1:43 pm, Alexzive wrote: > thank you all for the tips. > I 'll try them soon. > > I also notice another bottlenec

Re: A Quick MySQL Question

2010-05-26 Thread Victor Subervi
On Wed, May 26, 2010 at 2:42 AM, Dennis Lee Bieber wrote: > I was, for that example, assuming that the user input "values" was > being used in a select query and hence wrapped it with wildcard markers > so that the phrase would match anywhere in the data field. > In said thread you wrote the foll

Re: Kohonen neural network

2010-05-26 Thread alex23
On May 26, 7:21 pm, Lex Lebedeff wrote: > Has anyone tried to build an implementation of subject in Python? > Any help is appreciated! http://www.dia.fi.upm.es/~jamartin/download.htm Seriously, though, any reason why you couldn't just type "kohonen neural network python" into Google? You would'v

Re: [WxPython] Advice on Temperature Application Method & Structure

2010-05-26 Thread Philip Semanchuk
On May 26, 2010, at 7:36 AM, Jimbo wrote: Hello I have made a simple application using WxPython that is a temperature converter. This is my first application made in WxPython, the only other apps I have made were in Win32 c++ so I am new to widgets in general. I am looking for advice & criti

Inheritable Slots Metaclass

2010-05-26 Thread Rebel Lion
I made a metaclass to inherit __slots__ automatically. I think this feature should be included in builtin object's metaclass. You can now write: class Foo(object): __metaclass__ = SlotMetaclass @slot def foo(): pass class Bar(Foo): @slot

Looking for matlab to python converter.

2010-05-26 Thread Steven W. Orr
I found something on sourceforge called mat2py, but there's nothing there. (It seems to be just a placeholder.) I figure that if anyone would know of something useful, this would be the place to try. TIA -- Time flies like the wind. Fruit flies like a banana. Stranger things have .0. happened

LJ.com top article

2010-05-26 Thread Aahz
I'm finally getting around to reading my copy of Linux Journal 8/2009 (picked up at OSCON last year), and on page 17, they list the most popular articles from linuxjournal.com. Given that I'm posting here, I'm sure all long-time readers already know what that article is: Eric Raymond's "Why Python

Re: Looking for matlab to python converter.

2010-05-26 Thread alex23
On May 26, 10:52 pm, "Steven W. Orr" wrote: > I found something on sourceforge called mat2py, but there's nothing there. (It > seems to be just a placeholder.) I figure that if anyone would know of > something > useful, this would be the place to try. http://sourceforge.net/projects/libermate/

Does pickled objects work fine between different OS?

2010-05-26 Thread Oltmans
If I dump a Python dictionary into a file named "data.pkl" using Pickle module on a Linux operating system, will the data contained in "data.pkl" load fine in a Windows OS? I mean will I be able to load the dictionary data contained in "data.pkl" just fine on Windows XP? I could have tested it but

Re: python command line manual

2010-05-26 Thread Aahz
In article , Chris Rebert wrote: >On Mon, May 24, 2010 at 3:52 PM, Peng Yu wrote: >> >> I mainly check online python manual. But I feel that it would be nice >> if there is command line manual available (just like perl command line >> manual). Could you please let me know if such command line ma

Re: python command line manual

2010-05-26 Thread Tim Golden
On 26/05/2010 14:50, Aahz wrote: In article, Chris Rebert wrote: On Mon, May 24, 2010 at 3:52 PM, Peng Yu wrote: I mainly check online python manual. But I feel that it would be nice if there is command line manual available (just like perl command line manual). Could you please let me know

Python-URL! archives

2010-05-26 Thread Mark Lawrence
According to http://www.python.org/community/lists/ these are archived here http://www.equi4.com/wikis/urls/82. As the latter hasn't been updated since 2000-07-20 isn't it time to change the former :) Regards. Mark Lawrence -- http://mail.python.org/mailman/listinfo/python-list

Re: python command line manual

2010-05-26 Thread Mark Lawrence
On 26/05/2010 14:59, Tim Golden wrote: On 26/05/2010 14:50, Aahz wrote: In article, Chris Rebert wrote: On Mon, May 24, 2010 at 3:52 PM, Peng Yu wrote: I mainly check online python manual. But I feel that it would be nice if there is command line manual available (just like perl command line

Re: function that counts...

2010-05-26 Thread Albert van der Horst
In article <4bf442cd$0$31377$4fafb...@reader1.news.tin.it>, superpollo wrote: >... how many positive integers less than n have digits that sum up to m: > >In [197]: def prttn(m, n): > tot = 0 > for i in range(n): > s = str(i) > sum = 0 > for j in range(len(s)): >

Re: speed up a numpy code with huge array

2010-05-26 Thread bobicanprogram
On May 26, 7:43 am, Alexzive wrote: > thank you all for the tips. > I 'll try them soon. > > I also notice another bottleneck, when python tries to access some > array data stored in the odb files (---> in text below), even before > starting the algoritm: > > ### > EPS_nodes = range(len(frames)) >

Re: Another Little MySQL Problem

2010-05-26 Thread Kushal Kumaran
On Tue, 2010-05-25 at 14:45 -0400, Victor Subervi wrote: > Hi; > I have this code: > > clientCursor.execute('select ID from %s' % (personalDataTable)) > upds = [itm[0] for itm in clientCursor] > print "" % upds > > The problem is that the values passed are 1L, 2L When I retrieve >

Re: UnicodeDecodeError having fetch web page

2010-05-26 Thread Kushal Kumaran
On Tue, 2010-05-25 at 20:12 +, Rob Williscroft wrote: > Barry wrote in news:83dc485a-5a20-403b-99ee-c8c627bdbab3 > @m21g2000vbr.googlegroups.com in gmane.comp.python.general: > > > Hi, > > > > The code below is giving me the error: > > > > Traceback (most recent call last): > > File "C:\Us

Re: Does pickled objects work fine between different OS?

2010-05-26 Thread Daniel Fetchinson
> If I dump a Python dictionary into a file named "data.pkl" using > Pickle module on a Linux operating system, will the data contained in > "data.pkl" load fine in a Windows OS? Yes. > I mean will I be able to load the dictionary data contained in "data.pkl" > just fine on Windows XP? Yes. Che

Re: Does pickled objects work fine between different OS?

2010-05-26 Thread Ross Ridge
Oltmans wrote: >If I dump a Python dictionary into a file named "data.pkl" using >Pickle module on a Linux operating system, will the data contained in >"data.pkl" load fine in a Windows OS? I mean will I be able to load >the dictionary data contained in "data.pkl" just fine on Windows XP? That

Re: Does pickled objects work fine between different OS?

2010-05-26 Thread Grant Edwards
On 2010-05-26, Oltmans wrote: > If I dump a Python dictionary into a file named "data.pkl" using > Pickle module on a Linux operating system, will the data contained in > "data.pkl" load fine in a Windows OS? That depends on the data and the version of Python. Older versions didn't handle some

question

2010-05-26 Thread Kent Tenney
In a docutils svn checkout. [docutils/trunk/docutils]$ python setup.py install --root /tmp OK [docutils/trunk/docutils]$ python setup.py install_data --root /tmp distutils.errors.DistutilsFileError: could not delete '/usr/local/lib/python2.6/dist-packages/docutils/parsers/rst/include/README.txt'

Re: Troubles with python internationalization

2010-05-26 Thread Dan Stromberg
On May 25, 10:46 am, Pascal Chambon wrote: > * code safety : it seems default python string formatting technics (% > operator, .format() method) are normally used when one needs to > substitute placeholders in translated strings. But the thing is : I DONT > want my view to raise an exception simp

uk girls

2010-05-26 Thread devi
we are write here uk girls body language uk girls clture and that feature what about this last man visit in earth. visit www.ukgirlsbody.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list

uk girls

2010-05-26 Thread devi
we are write here uk girls body language uk girls clture and that feature what about this last man visit in earth. visit www.onlineairlinesjobs.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list

Yet Another Configuration Parser Module

2010-05-26 Thread christian schulze
Hey folks, I've written a small configuration parser for a recent project. I think it's pretty usefull and not that "fat" or "complex" as the regular python configuration modules like ConfigParser. The file contains everything you need to know. http://crac.pcriot.com/dl/config.py If you have any

Re: Another Little MySQL Problem

2010-05-26 Thread Victor Subervi
On Wed, May 26, 2010 at 11:25 AM, Kushal Kumaran wrote: > On Tue, 2010-05-25 at 14:45 -0400, Victor Subervi wrote: > > Hi; > > I have this code: > > > > clientCursor.execute('select ID from %s' % (personalDataTable)) > > upds = [itm[0] for itm in clientCursor] > > print "" % upds > > >

Error

2010-05-26 Thread William Miner
I¹m relative new to python and I puzzled by the following strange (to me) behavior. I was taking pieces from two old scripts to build a new one. When I began to debug it I got the following error message: Traceback (most recent call last): File "/Users/williamminer/ex2gen/ex2gen-3.0.5/src/Scrip

Re: Ugly modification of a class, can it be done better ?

2010-05-26 Thread Stef Mientki
On 21-05-2010 03:27, Steven D'Aprano wrote: > Sorry for breaking threading, but Stef's original post has not come > through to me. > > >> On Thu, May 20, 2010 at 8:13 PM, Stef Mientki >> wrote: >> > >>> So I want to change the behavior of the class dynamically. I've done it >>> by addi

Re: Error

2010-05-26 Thread Chris Rebert
On Wed, May 26, 2010 at 10:48 AM, William Miner wrote: > I’m relative new to python and I puzzled by the following strange (to me) > behavior. I was taking pieces from two old scripts to build a new one. When > I began to debug it I got the following error message: > > Traceback (most recent call

Re: UnicodeDecodeError having fetch web page

2010-05-26 Thread Rob Williscroft
Kushal Kumaran wrote in news:1274889564.2339.16.ca...@nitrogen in gmane.comp.python.general: > On Tue, 2010-05-25 at 20:12 +, Rob Williscroft wrote: >> Barry wrote in news:83dc485a-5a20-403b-99ee-c8c627bdbab3 >> @m21g2000vbr.googlegroups.com in gmane.comp.python.general: >> >> > Hi, >> > >>

Re: Error

2010-05-26 Thread MRAB
William Miner wrote: I’m relative new to python and I puzzled by the following strange (to me) behavior. I was taking pieces from two old scripts to build a new one. When I began to debug it I got the following error message: Traceback (most recent call last): File "/Users/williamminer/ex2g

Re: Error

2010-05-26 Thread D'Arcy J.M. Cain
On Wed, 26 May 2010 13:48:42 -0400 William Miner wrote: > #!/usr/bin/env python > import sys, math, os, shutil, commands, re, mpmath > from mpmath import * > > When I deleted this line, the script ran. Why did the line > > from mpmath import * > > Trash the search function fro the regular expre

Re: TypeError: _new_() takes exactly 3 arguments (2 given) - what does it mean?

2010-05-26 Thread Terry Reedy
On 5/24/2010 2:52 PM, Jesse McDonnell wrote: I'm attempting to install Powerline http://code.google.com/p/powerline/, a computer reservation software based on CherryPy/Python using a MYSql database, at my local library and I've run up against an error that I cannot google my way out of! The googl

Re: Error

2010-05-26 Thread Gary Herron
On 05/26/2010 10:48 AM, William Miner wrote: I'm relative new to python and I puzzled by the following strange (to me) behavior. I was taking pieces from two old scripts to build a new one. When I began to debug it I got the following error message: Traceback (most recent call last): File "

multiprocessing and accessing server's stdout

2010-05-26 Thread Tim Arnold
Hi, I'm using multiprocessing's BaseManager to create a server on one machine and a client on another. The client fires a request and the server does some work, the result of which ends up on a shared file system that both the client and server can see. However, I need the client machine to see th

Re: TypeError: _new_() takes exactly 3 arguments (2 given) - what does it mean?

2010-05-26 Thread Carl Banks
[Again, can't see the original, sorry] On May 26, 11:30 am, Terry Reedy wrote: > On 5/24/2010 2:52 PM, Jesse McDonnell wrote: > > > I'm attempting to install Powerlinehttp://code.google.com/p/powerline/, > > a computer reservation software based on CherryPy/Python using a MYSql > > database, at m

Fetching a gzipped webpage

2010-05-26 Thread Barry
Hi, Here's my attempt at petching a webpage which is gzip encoded - import urllib.request import gzip import io request = urllib.request.Request(url='http://en.wiktionary.org/wiki/ baby',headers={'Accept': 'text/html','User-Agent':'Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0 like Mac OS X; en-us)

Re: Another Little MySQL Problem

2010-05-26 Thread John Nagle
Kushal Kumaran wrote: On Tue, 2010-05-25 at 14:45 -0400, Victor Subervi wrote: Hi; I have this code: clientCursor.execute('select ID from %s' % (personalDataTable)) upds = [itm[0] for itm in clientCursor] print "" % upds The problem is that the values passed are 1L, 2L When I r

Re: MySQL, Python, NumPy and formatted read

2010-05-26 Thread John Nagle
Ian Hoffman wrote: Hello, I'm having significant Python difficulties (and I'm new to Python). I'm trying to read BLOB ASCII (numerical) data from a MySQL database using MySQLdb in a formatted fashion. The BLOB data is a sequence of numbers separated by newlines (\n), like this: 5 6 10 45 etc.

Re: Fetching a gzipped webpage

2010-05-26 Thread Peter Otten
Barry wrote: > Here's my attempt at petching a webpage which is gzip encoded - > > import urllib.request > import gzip > import io > > request = urllib.request.Request(url='http://en.wiktionary.org/wiki/ > baby',headers={'Accept': 'text/html','User-Agent':'Mozilla/5.0 > (iPhone; U; CPU iPhone OS

Fastest way to apply a function to an iterable

2010-05-26 Thread Shashank Singh
What is the most efficient way of applying a function to all the elements of an iterable while discarding the result (i.e. operations are done only for side-effects). For example if I want to save all elements in a list of items (and am not interested in what save() returns), the simplest way is:

Indentation

2010-05-26 Thread William Miner
I have a script which I would now put inside a loop. Is there any way to ³automatically² indent the old script so it can be put inside the new loop. Doing it by hand seems so inelegant and time consuming. By the way, thanks for the answer to my previous question. Thanks! Buff Miner -- Enig Asso

Re: Indentation

2010-05-26 Thread Adam Tauno Williams
On Wed, 2010-05-26 at 16:13 -0400, William Miner wrote: > I have a script which I would now put inside a loop. Is there any way > to “automatically” indent the old script so it can be put inside the > new loop. Doing it by hand seems so inelegant and time consuming. Open script in MonoDevelop High

Re: Error

2010-05-26 Thread Alister
On Wed, 26 May 2010 11:09:58 -0700, Chris Rebert wrote: > On Wed, May 26, 2010 at 10:48 AM, William Miner > wrote: >> I’m relative new to python and I puzzled by the following strange (to >> me) behavior. I was taking pieces from two old scripts to build a new >> one. When I began to debug it I g

Re: Another Little MySQL Problem

2010-05-26 Thread Alister
On Wed, 26 May 2010 12:43:29 -0700, John Nagle wrote: > Kushal Kumaran wrote: >> On Tue, 2010-05-25 at 14:45 -0400, Victor Subervi wrote: >>> Hi; >>> I have this code: >>> >>> clientCursor.execute('select ID from %s' % (personalDataTable)) >>> upds = [itm[0] for itm in clientCursor] print

atexit/signal for non-interactive jobs

2010-05-26 Thread kj
I want to implement clean-up functions for scripts to be run on a Linux cluster (through LSF). The goal is to make sure that a minimal wrap-up sequence (print diagnostic info, flush buffers, etc.) gets executed if the job is terminated for some reason. (The most common reason for premature te

Using Babel: How to protect translator comments (and old translations) in GNU gettext PO files?

2010-05-26 Thread python
We're using the Python based Babel gettext utilities. Is there any technique we can use to make sure that translator comments and old ("obsolete") translations (marked with #~) in PO files are preserved across PO file updates? Thanks, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: Kohonen neural network

2010-05-26 Thread Lex Lebedeff
On Wed, 26 May 2010 05:26:56 -0700, alex23 wrote: > On May 26, 7:21 pm, Lex Lebedeff wrote: >> Has anyone tried to build an implementation of subject in Python? Any >> help is appreciated! > > http://www.dia.fi.upm.es/~jamartin/download.htm > > Seriously, though, any reason why you couldn't jus

Re: Fastest way to apply a function to an iterable

2010-05-26 Thread Stefan Behnel
Shashank Singh, 26.05.2010 21:48: What is the most efficient way of applying a function to all the elements of an iterable while discarding the result (i.e. operations are done only for side-effects). For example if I want to save all elements in a list of items (and am not interested in what sa

Re: multiprocessing and accessing server's stdout

2010-05-26 Thread Adam Tauno Williams
On Wed, 2010-05-26 at 11:47 -0700, Tim Arnold wrote: > Hi, > I'm using multiprocessing's BaseManager to create a server on one > machine and a client on another. The client fires a request and the > server does some work, the result of which ends up on a shared file > system that both the client an

Re: Indentation

2010-05-26 Thread Tim Chase
On 05/26/2010 03:13 PM, William Miner wrote: I have a script which I would now put inside a loop. Is there any way to ³automatically² indent the old script so it can be put inside the new loop. Doing it by hand seems so inelegant and time consuming. It's usually a function of your editor -- mos

Re: Inheritable Slots Metaclass

2010-05-26 Thread Carl Banks
On May 26, 5:49 am, Rebel Lion wrote: > I made a metaclass to inherit __slots__ automatically. > > I think this feature should be included in builtin object's metaclass. I'd be ok with a metatype in the standard library that makes slots more transparent, but since slots are intended as an optimiz

Re: Fastest way to apply a function to an iterable

2010-05-26 Thread Peter Otten
Stefan Behnel wrote: > Shashank Singh, 26.05.2010 21:48: >> What is the most efficient way of applying a function to all the elements >> of an iterable while discarding the >> result (i.e. operations are done only for side-effects). >> >> For example if I want to save all elements in a list of ite

Re: Fastest way to apply a function to an iterable

2010-05-26 Thread Shashank Singh
On Thu, May 27, 2010 at 1:56 AM, Stefan Behnel wrote: > If all items have the exact same type, you can get away with an unbound > method: > >class MyType(object): >... >def safe(self): >... > >itemlist = [ MyType() for i in range(20) ] > ># this is what you

Re: Fastest way to apply a function to an iterable

2010-05-26 Thread Stefan Behnel
Shashank Singh, 26.05.2010 23:16: > I probably didn't state the problem properly. I was assuming the > availability of a static method that could be passed on to map based > solution (or imap for that matter). > > The question was, if one wants to apply a function on each member of list > and dis

Re: Inheritable Slots Metaclass

2010-05-26 Thread geremy condra
On Wed, May 26, 2010 at 1:50 PM, Carl Banks wrote: > On May 26, 5:49 am, Rebel Lion wrote: >> I made a metaclass to inherit __slots__ automatically. >> >> I think this feature should be included in builtin object's metaclass. > > I'd be ok with a metatype in the standard library that makes slots

Re: Another Little MySQL Problem

2010-05-26 Thread John Nagle
Alister wrote: I think you should probably also write your execute differently: clientCursor.execute('select ID from %s' , (personalDataTable,)) this ensures the parameters are correctly escaped to prevent mysql injection attacks,the "," after personalDataTable is necessary to ensure th

Re: Another Little MySQL Problem

2010-05-26 Thread Christian Heimes
Actually, no. The names of tables are not quoted in SQL. One writes SELECT ID FROM mytable; not SELECT ID FROM "mytable"; nit picking mode: Some RDBMS support case sensitive table names. You have to quote the table name if you using the feature. Yeah I know, it's prett

Re: atexit/signal for non-interactive jobs

2010-05-26 Thread Cameron Simpson
On 26May2010 20:19, kj wrote: | If I start the script interactively and after a few seconds (i.e. | before it terminates) I hit Ctrl-C (which sends a TERM signal to | the process), the wrapup function gets called as desired (although | this action appears to be triggered by atexit, and not by the

Re: Inheritable Slots Metaclass

2010-05-26 Thread Carl Banks
On May 26, 2:51 pm, geremy condra wrote: > On Wed, May 26, 2010 at 1:50 PM, Carl Banks wrote: > > On May 26, 5:49 am, Rebel Lion wrote: > >> I made a metaclass to inherit __slots__ automatically. > > >> I think this feature should be included in builtin object's metaclass. > > > I'd be ok with a

confusing error with nntplib

2010-05-26 Thread Eduardo Alvarez
When trying to use nntplib to connect to the news server nntp.aioe.org, a bizarre sequence of events occurs: 1) I import the module, and create an instance, as follows: s = nntplib.NNTP('nntp.aioe.org') I get no errors, which leads me to believe all went well. The I try fetching info on a newsgr

Re: Inheritable Slots Metaclass

2010-05-26 Thread Rebel Lion
> I'd be ok with a metatype in the standard library that makes slots > more transparent, but since slots are intended as an optimization, it > doesn't really need (and might be detrimental to have) transparency > for ordinary objects. > But why there is __slots__ if it's not indeed needed. we sho

Re: Inheritable Slots Metaclass

2010-05-26 Thread John Nagle
Rebel Lion wrote: I'd be ok with a metatype in the standard library that makes slots more transparent, but since slots are intended as an optimization, it doesn't really need (and might be detrimental to have) transparency for ordinary objects. But why there is __slots__ if it's not indeed nee

Re: Another Little MySQL Problem

2010-05-26 Thread Alister
On Wed, 26 May 2010 15:30:16 -0700, John Nagle wrote: > Alister wrote: >> I think you should probably also write your execute differently: >> > clientCursor.execute('select ID from %s' , (personalDataTable,)) >> >> this ensures the parameters are correctly escaped to prevent mysql >> inj

Re: Inheritable Slots Metaclass

2010-05-26 Thread Carl Banks
On May 26, 8:33 pm, Rebel Lion wrote: > > I'd be ok with a metatype in the standard library that makes slots > > more transparent, but since slots are intended as an optimization, it > > doesn't really need (and might be detrimental to have) transparency > > for ordinary objects. > > But why there

Re: UnicodeDecodeError having fetch web page

2010-05-26 Thread Kushal Kumaran
On Wed, May 26, 2010 at 11:40 PM, Rob Williscroft wrote: > Kushal Kumaran wrote in news:1274889564.2339.16.ca...@nitrogen in > gmane.comp.python.general: > >> On Tue, 2010-05-25 at 20:12 +, Rob Williscroft wrote: >>> Barry wrote in news:83dc485a-5a20-403b-99ee-c8c627bdbab3 >>> @m21g2000vbr.goo

Re: Inheritable Slots Metaclass

2010-05-26 Thread Carl Banks
On May 26, 9:55 pm, Carl Banks wrote: > I don't want to sound to pessimistic about it, I really wouldn't mind > a metaclass that makes slots more normal; but you have work to do. Just as a minor followup, I'll mention that slots and inheritance have some issues that aren't going to be resolvable

Re: Kohonen neural network

2010-05-26 Thread alex23
Lex Lebedeff wrote: > Thanx, I've already googled this stuff. Rather unreadable and freaky code. Then please remember to mention what you've already seen & tried when asking in the future, it saves us all from wasting each others time. -- http://mail.python.org/mailman/listinfo/python-list

"AUSTRALIAN LEADERSHIP AWARDS SCHOLARSHIPS FOR THE YEAR 2010 - 2011" on http://scholarships-education.blogspot.com/2010/05/australian-leadership-awards.html "SCHOLARSHIPS IN AUSTRALIA, UK, CANADA, PA

2010-05-26 Thread Naeem
"AUSTRALIAN LEADERSHIP AWARDS SCHOLARSHIPS FOR THE YEAR 2010 - 2011" on http://scholarships-education.blogspot.com/2010/05/australian-leadership-awards.html "SCHOLARSHIPS IN AUSTRALIA, UK, CANADA, PAKISTAN, AMERICA, EUROPEAN UNION""AUSTRALIAN LEADERSHIP AWARDS SCHOLARSHIPS FOR THE YEAR 2010 - 201