Re: trouble getting google through urllib

2006-12-19 Thread Will McGugan
Dr. Locke Z2A wrote: > Does anyone know how I would get the bot to have permission to get the > url? When I put the url in on firefox it works fine. I noticed that in > the output html that google gave me it replaced some of the characters > in the url with different stuff like the "&" and "%7C",

Re: merits of Lisp vs Python

2006-12-19 Thread Jon Harrop
Rob Thorpe wrote: > Once you can do the above then you can phrase programs entirely in > terms of composition of functions, which is what functional programming > is about. There are many aspects to functional programming. Some languages (like Lisp and Python) are very impure and hardly encourage

RE: Can a Tkinter GUI check for abort script:

2006-12-19 Thread Mohammad Tayseer
I don't know why this happen. do you call mainloop() inside the test3.py?? you shouldn't Michael Yanowitz <[EMAIL PROTECTED]> wrote:> Presently what happens is that the script takes over and all the buttons on > the GUI disappear > as the GUI is not given any cpu time to refresh or ch

Re: should I distribute .pyc files?

2006-12-19 Thread Duncan Booth
"akbar" <[EMAIL PROTECTED]> wrote: > I am creating not-so-important opensource application written in python > for Linux. I have two files python source in src directory, named > blabla1.py and blabla2.py. There are byte compiled files too, named > blabla1.pyc and blabla2.pyc. Should I distribute

Re: trouble getting google through urllib

2006-12-19 Thread Duncan Booth
Will McGugan <[EMAIL PROTECTED]> wrote: > Dr. Locke Z2A wrote: > >> Does anyone know how I would get the bot to have permission to get the >> url? When I put the url in on firefox it works fine. I noticed that in >> the output html that google gave me it replaced some of the characters >> in the

Re: trouble getting google through urllib

2006-12-19 Thread Fredrik Lundh
Dr. Locke Z2A wrote: > Forbidden > Your client does not have permission to get URL > /translate_t?text='%20como%20estas'&hl=en&langpair=es%7Cen&tbb=1 > from this server. > Does anyone know how I would get the bot to have permission to get the > url? http://www.google.com/terms_of_service.h

Re: urllib.unquote and unicode

2006-12-19 Thread Peter Otten
George Sakkis wrote: > The following snippet results in different outcome for (at least) the > last three major releases: > import urllib urllib.unquote(u'%94') > # Python 2.4.2 > UnicodeDecodeError: 'ascii' codec can't decode byte 0x94 in position 0: > ordinal not in range(128) Pytho

Re: trouble getting google through urllib

2006-12-19 Thread Paul Rubin
"Dr. Locke Z2A" <[EMAIL PROTECTED]> writes: > Does anyone know how I would get the bot to have permission to get the url? That's what this was for: http://code.google.com/apis/soapsearch/ -- http://mail.python.org/mailman/listinfo/python-list

Re: urllib.unquote and unicode

2006-12-19 Thread Fredrik Lundh
George Sakkis wrote: > The following snippet results in different outcome for (at least) the > last three major releases: > import urllib urllib.unquote(u'%94') > > # Python 2.3.4 > u'%94' > > # Python 2.4.2 > UnicodeDecodeError: 'ascii' codec can't decode byte 0x94 in position 0: > o

Apache 2.2.3 and mod_python 3.2.10

2006-12-19 Thread m.banaouas
I installed Apache 2.2.3 and mod_python 3.2.10 on WinXP plateform I configured mod_python via httpd.conf: LoadModule python_module modules/mod_python.so but my script folder configuration doesn't work correctely: Alias /myfolder D:/myfolder Order allow,deny Allow from all AddHand

Re: urllib.unquote and unicode

2006-12-19 Thread Duncan Booth
"Leo Kislov" <[EMAIL PROTECTED]> wrote: > George Sakkis wrote: >> The following snippet results in different outcome for (at least) the >> last three major releases: >> >> >>> import urllib >> >>> urllib.unquote(u'%94') >> >> # Python 2.3.4 >> u'%94' >> >> # Python 2.4.2 >> UnicodeDecodeError: 'as

Re: Apache 2.2.3 and mod_python 3.2.10

2006-12-19 Thread m.banaouas
sorry, I give here the right paths: I installed Apache 2.2.3 and mod_python 3.2.10 on WinXP plateform I configured mod_python via httpd.conf: LoadModule python_module modules/mod_python.so but my script folder configuration doesn't work correctely: Alias /myfolder D:/myfolder Order allow,

Re: Script to upload Files via http/cgi

2006-12-19 Thread Fredrik Lundh
Richard Konrad wrote: > Does anyone know about a python-script to upload Files via http/cgi? do you want the script to do the actual upload at the client side (i.e. behave like a browser) or to handle the uploaded data on the server side? for the latter, see this: http://docs.python.org/l

wrapping problem with old-style class

2006-12-19 Thread manstey
I have a problem I would like some advice on. We have a Python binding to the Intersystems Cache OO database. It provides an old style class in Python as an in memory instance of a Cache class, and this is a intersystems.pythonbind.object type (= ipo). The ipo class has three basic methods, namel

Adding an instance to a data tree

2006-12-19 Thread pgarrone
Hi, I have a data tree. A node in the tree "assembles" itself when called upon to do so by the level-of-detail algorithm. It creates and adds its children to itself using a base class method called "add". However in the pseudo-constructor called "setup", the child node needs to be already linked i

ElementTree and utf-16 encoding

2006-12-19 Thread Sébastien Boisgérault
Hi, ET being ElementTree in the following code, could anyone explain why it fails ? >>> xml = ET.tostring(ET.Element("root"), "UTF-16") >>> xml "\n<\xff\xfer\x00o\x00o\x00t\x00 />" >>> ET.fromstring(xml) Traceback (most recent call last): ... xml.parsers.expat.ExpatError: encoding specified in X

Re: ElementTree and utf-16 encoding

2006-12-19 Thread Fredrik Lundh
Sébastien Boisgérault wrote: > ET being ElementTree in the following code, could anyone explain > why it fails ? I'm afraid the standard serializer in 1.2 only supports ASCII-compatible encodings. this will be fixed in 1.3. as a workaround, you can do: tostring(elem).decode("utf-8").enco

Re: python-hosting.com projects: dead?

2006-12-19 Thread greg
[EMAIL PROTECTED] wrote: > I certainly hope so, but this is what I'm reacting to (from > http://www.webfaction.com/freetrac): > > "We're sorry, we're not longer accepting applications for free trac/svn > accounts. People have left their Trac sites unattended and as a result > our server is being

Re: Apache 2.2.3 and mod_python 3.2.10

2006-12-19 Thread Graham Dumpleton
m.banaouas wrote: > sorry, I give here the right paths: > > I installed Apache 2.2.3 and mod_python 3.2.10 on WinXP plateform > I configured mod_python via httpd.conf: > LoadModule python_module modules/mod_python.so > > but my script folder configuration doesn't work correctely: > > Alias /myfold

Re: ElementTree and utf-16 encoding

2006-12-19 Thread Sébastien Boisgérault
On Dec 19, 10:49 am, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Sébastien Boisgérault wrote: > > ET being ElementTree in the following code, could anyone explain > > why it fails ?I'm afraid the standard serializer in 1.2 only supports > > ASCII-compatible > encodings. this will be fixed in 1.3

Re: tuple.index()

2006-12-19 Thread Nick Maclaren
In article <[EMAIL PROTECTED]>, greg <[EMAIL PROTECTED]> writes: |> Nick Maclaren wrote: |> |> > Unfortunately, you are confusing the issue, because there are far |> > more extraneous aspects than relevant ones, and your view of the |> > similarities requires looking at the issue in a very strang

Re: regular expression

2006-12-19 Thread Erwin Moller
Asper Faner wrote: > I seem to always have hard time understaing how this regular expression > works, especially how on earth do people bring it up as part of > computer programming language. Natural language processing seems not > enough to explain by the way. Why no eliminate it ? I am sure you

Re: tuple.index()

2006-12-19 Thread Simon Brunning
On 19 Dec 2006 10:01:47 GMT, Nick Maclaren <[EMAIL PROTECTED]> wrote: > > It does explain why you think of lists as homogeneous, but the > analogy doesn't hold water on closer inspection. There doesn't seem > to be ANYTHING in the specification or implementation that assumes > lists are homoge

Re: wrapping problem with old-style class

2006-12-19 Thread Gerard Flanagan
manstey wrote: > The ipo class has three basic methods, namely, get, set, and > run_obj_method (which takes the Cache class method, as its first > argument, and the list of its arguments as the second argument) > > e.g. > >>> CacheClass=ipo() > >>> CacheClass.set('Name','John') > >>> valName = Ca

Re: python-hosting.com projects: dead?

2006-12-19 Thread Robert Kern
greg wrote: > [EMAIL PROTECTED] wrote: > >> I certainly hope so, but this is what I'm reacting to (from >> http://www.webfaction.com/freetrac): >> >> "We're sorry, we're not longer accepting applications for free trac/svn >> accounts. People have left their Trac sites unattended and as a result >>

Re: Core dump revisited

2006-12-19 Thread Nick Craig-Wood
Sheldon <[EMAIL PROTECTED]> wrote: > Sheldon skrev: > > Wonderful! Now I know how to used gdb with python. Good! > > The are results area posted below. Since I am new at this I could > > used some help in interpreting the problem. What I do know is > > this: my allocation of the array is good bu

python poetry?

2006-12-19 Thread BartlebyScrivener
I'm working on a book of technology and computer programming humor. First, can anybody recommend any other such books? And second is there a repository of Python poetry, poems translated into Python, or humorous Python pseudo code limericks anywhere? I'm making my way through "The Larch," but if

Class constant for extension

2006-12-19 Thread Yue . Nicholas
Hi, I have written a small prototype Python extension for a C-library. I have the methods all sorted out and it is working fine. In the C-library, they are various constants of types like string, integer, float and matrix. I'd like to expose them as READONLY values. Is the use of PyMemb

Re: Adding an instance to a data tree

2006-12-19 Thread pgarrone
And of course the solution occurs to me about 30 minutes after posting, to have the add method return an instance which then invokes setup. self.add(name, child_type, other_info).setup(child-setup-parameters) -- http://mail.python.org/mailman/listinfo/python-list

Re: Class property with value and class

2006-12-19 Thread Diez B. Roggisch
manstey wrote: > Hi, > > Is is possible to have two classes, ClassA and ClassB, and > setattr(ClassA, 'xx',ClassB), AND to then have ClassA.xx store an > integer value as well, which is not part of ClassB? > > e.g. If ClassB has two properties, name and address: > > ClassA.xx=10 > ClassA.xx.nam

RE: Can a Tkinter GUI check for abort script:

2006-12-19 Thread Michael Yanowitz
No. test3.py (for example) is just plain Python code that sends and receives socket data from another machine. It does (or could) contain loops that last a long time, repeating the read or write operations to and from the socket. This grabs the CPU. What I am hoping for is a function call I can

Re: regular expression

2006-12-19 Thread Thomas Ploch
Asper Faner schrieb: > I seem to always have hard time understaing how this regular expression > works, especially how on earth do people bring it up as part of > computer programming language. Natural language processing seems not > enough to explain by the way. Why no eliminate it ? > Erm, I am

Returned mail: Data format error

2006-12-19 Thread isa_mail
The message was undeliverable due to the following reason: Your message was not delivered because the destination computer was not reachable within the allowed queue period. The amount of time a message is queued before it is returned depends on local configura- tion parameters. Most likely there

on PySol's popularity

2006-12-19 Thread Tshepang Lekhonkhobe
Hi, On Python docs, on faq/installed.html, it's mentioned that PySol is the most common Python application. Is this a platform-specific fact? -- http://mail.python.org/mailman/listinfo/python-list

Re: regular expression

2006-12-19 Thread Kleine Aap
Asper Faner wrote: > I seem to always have hard time understaing how this regular expression > works, especially how on earth do people bring it up as part of > computer programming language. Natural language processing seems not > enough to explain by the way. Why no eliminate it ? I.M.H.O. anyo

RE: Can a Tkinter GUI check for abort script:

2006-12-19 Thread Mohammad Tayseer
Michael Yanowitz <[EMAIL PROTECTED]> wrote: > What I am hoping for is a function call I can make, without knowing any > of the GUI objects, I can call from test3.py (or while test3.py is running) > which will refresh the GUI and check for activity such as button presses > on the GUI itse

Re: on PySol's popularity

2006-12-19 Thread Fredrik Lundh
Tshepang Lekhonkhobe wrote: > On Python docs, on faq/installed.html, it's mentioned that PySol is > the most common Python application. not really; that page says that installing PySol is a common way to get a Python installation installed without noticing, not that PySol is in itself the most

Re: Strange error with getattr() function

2006-12-19 Thread Hole
Gabriel Genellina ha scritto: > At Monday 18/12/2006 13:25, Hole wrote: > > > > At this point, I got the error: attribute name must be string > > > >I'm wondering if the exception is raised in a hidden function and not > >in the explicit call to getattr(). How can I view the traceback in a > >scr

Re: python-hosting.com projects: dead?

2006-12-19 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > It looks to me like python hosting, aka webfaction, have shut down > access to all projects hosted under their free hosting for open source > python projects program. Including mine (nose). With no notice -- at > least none that I received. > > Surprised doesn't quite c

Re: urllib.unquote and unicode

2006-12-19 Thread George Sakkis
Fredrik Lundh wrote: > George Sakkis wrote: > > > The following snippet results in different outcome for (at least) the > > last three major releases: > > > import urllib > urllib.unquote(u'%94') > > > > # Python 2.3.4 > > u'%94' > > > > # Python 2.4.2 > > UnicodeDecodeError: 'ascii' code

Re: Is htmlGen still alive?

2006-12-19 Thread Walter Dörwald
[EMAIL PROTECTED] wrote: > Does anybody know whether htmlGen, the Python-class library for > generating HTML, is still being maintained? Or from where it can be > downloaded? The Starship site where it used to be hosted is dead. I don't know if HTMLgen is still alive, but if you're looking for alt

Re: pyExcelerator question

2006-12-19 Thread Gerry
Thanks!!! Looks great. Works for me. I'll try to submit the patch. Gerry -- http://mail.python.org/mailman/listinfo/python-list

Re: python-hosting.com projects: dead?

2006-12-19 Thread Remi
> > I certainly hope so, but this is what I'm reacting to (from > > http://www.webfaction.com/freetrac): > > > > "We're sorry, we're not longer accepting applications for free trac/svn > > accounts. People have left their Trac sites unattended and as a result > > our server is being flooded with sp

Re: Is htmlGen still alive?

2006-12-19 Thread hg
[EMAIL PROTECTED] wrote: > Does anybody know whether htmlGen, the Python-class library for > generating HTML, is still being maintained? Or from where it can be > downloaded? The Starship site where it used to be hosted is dead. > > Thanks for your help! > > Klaus Muller I am not certain it is,

Re: trouble getting google through urllib

2006-12-19 Thread Will McGugan
Duncan Booth wrote: > > > > Google doesnt like Python scripts. You will need to pretend to be a > > browser by setting the user-agent string in the HTTP header. > > > and possibly also run the risk of having your system blocked by Google if > they figure out you are lying to them? It is possible

Re: Using DCOP from Python

2006-12-19 Thread David Boddie
Jeffrey Barish wrote: > The package python-dcop makes it possible to use DCOP from Python. Does > anyone know of a tutorial for this package or an example of its use? I > would like to use it to read a journal entry in Korganizer. I got as far > as figuring out that DCOP offers the interface > k

Re: Good Looking UI for a stand alone application

2006-12-19 Thread Chris Mellon
> Ok, now here's a question for you: if crossplatform toolkits/frameworks > are so great and automagically allow to produce superlickable and > native-looking/feeling applications on all three major platforms, why is > there so few of those applications on OS X ? > > "Because Mac users are elit

update attribute - (newbie)

2006-12-19 Thread Bruce
>>> class A: ... def __init__(self): ... self.t = 4 ... self.p = self._get_p() ... def _get_p(self): ... return self.t ... >>> a = A() >>> a.p 4 >>> a.t += 7 >>> a.p 4 I would like to have it that when I ask for p, method _get_p is always called so that attribute can be updated. How can I

Re: Good Looking UI for a stand alone application

2006-12-19 Thread hg
The Night Blogger wrote: > Can someone recommend me a good API for writing a sexy looking (Rich UI > like WinForms) shrink wrap application > > My requirement is that the application needs to look as good on Windows as > on the Apple Mac I would download the wxPython demo and test it on all pla

permutations - fast & with low memory consumption?

2006-12-19 Thread Christian Meesters
Hi, I'd like to hack a function which returns all possible permutations as lists (or tuples) of two from a given list. So far, I came up with this solution, but it turned out to be too slow for the given problem, because the list passed ("atomlist") can be some 1e5 items long: def permute(at

Re: Can a Tkinter GUI check for abort script:

2006-12-19 Thread hg
Michael Yanowitz wrote: > Hello: > >I have successfully implemented a Tkinter GUI which has > this (simplified here for explanation): > +-+ > | filename: [./test3.py] | > | | > | [Run Script]

getting subchild of a tree through xerces

2006-12-19 Thread Divya Prakash
Hi I m able to parse xml file using xerces as well as JAXP but I am unable to parse the sub- child of my tree Eg : ...(not able to parse this)

FW: [Jython-users] ERROR : parsing xml in jython

2006-12-19 Thread Divya Prakash
Hi But I am unable to parse all the nodes of the tree .especially the subtree of the main tree It displays only the sibling not the subtree Regards Divya -Original Message- From: Matthias Berth [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 19, 2006 3:18 PM To: Divya Praka

Re: update attribute - (newbie)

2006-12-19 Thread Diez B. Roggisch
Bruce wrote: class A: > ... def __init__(self): > ... self.t = 4 > ... self.p = self._get_p() > ... def _get_p(self): > ... return self.t > ... a = A() a.p > 4 a.t += 7 a.p > 4 > > I would like to have it that when I ask for p, method _get_p is always > called so

Using difflib to compare text ignoring whitespace differences

2006-12-19 Thread Neilen Marais
Hi I'm trying to compare some text to find differences other than whitespace. I seem to be misunderstanding something, since I can't even get a basic example to work: In [104]: d = difflib.Differ(charjunk=difflib.IS_CHARACTER_JUNK) In [105]: list(d.compare([' a'], ['a'])) Out[105]: ['- a', '+

Re: update attribute - (newbie)

2006-12-19 Thread Larry Bates
Bruce wrote: class A: > ... def __init__(self): > ... self.t = 4 > ... self.p = self._get_p() > ... def _get_p(self): > ... return self.t > ... a = A() a.p > 4 a.t += 7 a.p > 4 > > I would like to have it that when I ask for p, method _get_p is always > called so t

Re: Is htmlGen still alive?

2006-12-19 Thread Christian Meesters
If starship does not get up anymore (give it a few hours) you might want to have a look here: http://www.python.org/ftp/python/contrib-09-Dec-1999/Network/ Else, I can send you a tarfile of version 2.1, too. As hg said, apart from a few deprecation warnings it's working fine for me (but I'm only u

Re: permutations - fast & with low memory consumption?

2006-12-19 Thread Simon Brunning
On 12/19/06, Christian Meesters <[EMAIL PROTECTED]> wrote: > Hi, > > I'd like to hack a function which returns all possible permutations as lists > (or tuples) of two from a given list. So far, I came up with this solution, > but it turned out to be too slow for the given problem, because the list

Re: permutations - fast & with low memory consumption?

2006-12-19 Thread Gerard Flanagan
Christian Meesters wrote: > Hi, > > I'd like to hack a function which returns all possible permutations as lists > (or tuples) of two from a given list. So far, I came up with this solution, > but it turned out to be too slow for the given problem, because the list > passed ("atomlist") can be so

Re: permutations - fast & with low memory consumption?

2006-12-19 Thread Christian Meesters
Thanks Simon & Gerard! I will check those exampels out. Christian PS Of course, I did google - but apparently not creative enough. -- http://mail.python.org/mailman/listinfo/python-list

Need Help on IDLE start up

2006-12-19 Thread TonyHa
Hello I have install Python 2.5 under an user directory "/user/dtgtools/packages/python/2.5" after installation python works ok. but when I try "idle" I have the following Error message: ** IDLE can't import Tkinter. Your Python may not be configured for Tk. ** I have read the README file it me

Re: Core dump revisited

2006-12-19 Thread pythoncurious
Sheldon wrote: > > Program received signal SIGSEGV, Segmentation fault. > [Switching to Thread 1077321856 (LWP 32710)] > 0x40297b83 in mallopt () from /lib/tls/libc.so.6 > (gdb) bt > #0 0x40297b83 in mallopt () from /lib/tls/libc.so.6 > #1 0x402958ba in free () from /lib/tls/libc.so.6 > #2 0x40

Re: When Closure get external variable's value?

2006-12-19 Thread Huayang Xia
Thanks for the clarification. But my question is: When does the closure get the value of the maxIndex in the following code snippet? def testClosure(maxIndex) : def closureTest(): return maxIndex maxIndex += 5 return closureTest

Re: tuple.index()

2006-12-19 Thread J. Clifford Dyer
Roy Smith wrote: > In article <[EMAIL PROTECTED]>, > greg <[EMAIL PROTECTED]> wrote: > >> Roy Smith wrote: >> >>> The struct does lookup by name, the tuple is inherently index based. >> I was trying to help people understand the distinction >> we're talking about by showing an example of the same

Re: tuple.index()

2006-12-19 Thread J. Clifford Dyer
James Stroud wrote: > Christoph Zwerschke wrote: >> "Inhomogenous" in some meaning of the word --> tuple > > I think that you have nailed it here. I don't think anyone on this list > is capable of giving a "concrete" (as you have put it) operational > definition of "inhomogenous". They will resort

Re: permutations - fast & with low memory consumption?

2006-12-19 Thread Anton Vredegoor
Gerard Flanagan wrote: > No claims with respect to speed, but the kslice function here: > > http://gflanagan.net/site/python/utils/sequtils/ > > will give the 'k-subsets' which then need to be permuted - > alternatively Google. Maybe the function below could then do these permutations. Ant

Re: Core dump revisited

2006-12-19 Thread Sheldon
Nick Craig-Wood skrev: > Sheldon <[EMAIL PROTECTED]> wrote: > > Sheldon skrev: > > > Wonderful! Now I know how to used gdb with python. > > Good! > > > > The are results area posted below. Since I am new at this I could > > > used some help in interpreting the problem. What I do know is > > > th

FW: Crash in PyImport_Import()

2006-12-19 Thread Geert Van Muylem
Hi, And everything works fine if I link with the shared version of python. The ldap extension works fine in the interpreter, as well as with embedded python. Does anyone knows why it seems to be needed that extension modules have to be linked against the shared version of python? Reg

Re: python-hosting.com projects: dead?

2006-12-19 Thread [EMAIL PROTECTED]
Fredrik Lundh wrote: > have you tried mailing webfaction instead of ranting on the usenet? I did. I didn't get a reply within minutes (indeed not until this morning), so I posted a public message to try to find out if anyone knew what was going on -- and also to warn other people whose projects m

Re: When Closure get external variable's value?

2006-12-19 Thread Fredrik Lundh
Huayang Xia wrote: > When does the closure get the value of the maxIndex in the following > code snippet? > > def testClosure(maxIndex) : > > def closureTest(): > return maxIndex > > maxIndex += 5 > > return closureTest() > >

Re: def index(self):

2006-12-19 Thread Bruno Desthuilliers
Gert Cuykens a écrit : >> FWIW, the first version raises an exception (unless of course the name >> 'index' is already bound in the enclosing scope). And the second won't >> probably work as expected with CherryPy. > > > > class HelloWorld: > def index(self): > return "Hello world!" > index.exp

SQLALCHEMY - Method to have the last word, by Michael Bayer

2006-12-19 Thread Ilias Lazaridis
[1] - Ο/Η metaperl: >>> TurboEntity was quite sweet. Supposedly a complete rewrite as a new >>> product is on its way though. Ilias Lazaridis: >>the first major problem of this rewrite: >>it happens 'silently' (non-public) Michael Bayer wrote within: http://groups.google.com/group/sqlalchemy/ms

Re: python-hosting.com projects: dead?

2006-12-19 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > my svn repository and tickets again. I'm sure you can understand why I > was dismayed by this and why, unfortunately, I'll never be comfortable > trusting my data to them again. not really, but maybe I've just worked with computers and human beings long enough not to t

Re: python poetry?

2006-12-19 Thread Bruno Desthuilliers
BartlebyScrivener a écrit : > I'm working on a book of technology and computer programming humor. > > First, can anybody recommend any other such books? You of course alreeady know "Tao of programming" and "BOFH" (aka the Bastard Operator From Hell') ? -- http://mail.python.org/mailman/listinf

Reduced invective

2006-12-19 Thread BBands
My fat-fingered alter ego typed delete from iv where date > '2006-01-01'; instead of delete from iv where date > '2006-12-01'; leaving me with 50 tables to reload. :( estimated time to fix > several hours estimated invective dispensed during fix = classified Python to the rescue! import

Re: tuple.index()

2006-12-19 Thread Nick Maclaren
In article <[EMAIL PROTECTED]>, "J. Clifford Dyer" <[EMAIL PROTECTED]> writes: |> |> How about: "A heterogenous sequence is one in which each element plays a |> unique role, specific to its position in the sequence. A homogenous |> sequence is one in which position is determinative of nothing |>

Cpoying a PyList to a C string array

2006-12-19 Thread Sheldon
Hi, The code below is a rookie attempt to copy a python list of strings to a string array in C. It works to some extent but results in memory problems when trying to free the C string array. Does anyone know how to do this properly? *** /*Re

Re: SQLALCHEMY - Method to have the last word, by Michael Bayer

2006-12-19 Thread Diez B. Roggisch
> I understand your elaborations. > > Possibly "sqlalchemy" should do the same, until it's fully functional > and do not 'frustrate users'. > > And "Turbogears", too. And Django, as it's still not fully functional > (mainly due to it's deficient ORM layer). > > Or all those projects remain open(

Re: python poetry?

2006-12-19 Thread BartlebyScrivener
Bruno Desthuilliers wrote: > You of course already know . . . and "BOFH" (aka the > Bastard Operator From Hell') ? Didn't know this one. It's funny! Thanks rd -- http://mail.python.org/mailman/listinfo/python-list

Re: python poetry?

2006-12-19 Thread Fredrik Lundh
BartlebyScrivener wrote: > First, can anybody recommend any other such books? And second is there > a repository of Python poetry, poems translated into Python, or > humorous Python pseudo code limericks anywhere? I'm making my way > through "The Larch," but if there's more elsewhere please point

Re: python-hosting.com projects: dead?

2006-12-19 Thread [EMAIL PROTECTED]
Fredrik Lundh wrote: > [EMAIL PROTECTED] wrote: > > > my svn repository and tickets again. I'm sure you can understand why I > > was dismayed by this and why, unfortunately, I'll never be comfortable > > trusting my data to them again. > > not really, but maybe I've just worked with computers and h

Re: permutations - fast & with low memory consumption?

2006-12-19 Thread Paul McGuire
"Christian Meesters" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I'd like to hack a function which returns all possible permutations as > lists > (or tuples) of two from a given list. So far, I came up with this > solution, > but it turned out to be too slow for the giv

Re: Core dump revisited

2006-12-19 Thread Duncan Booth
"Sheldon" <[EMAIL PROTECTED]> wrote: > I am new to this and copied this code from a colleague. So, it > corrupts the pointer. How do I do this properly? > Here is at least part of your problem: msgop = PyList_GetItem(work.msgobj, i); work.msg_scenes[i] = PyString_AsString(msgop); pps

Re: SQLALCHEMY - Method to have the last word, by Michael Bayer

2006-12-19 Thread Ilias Lazaridis
Ο/Η Diez B. Roggisch έγραψε: ... (several off-topics) Please control yourself. Ï/Ç metaperl: >>> TurboEntity was quite sweet. Supposedly a complete rewrite as a new >>> product is on its way though. Ilias Lazaridis: >>the first major problem of this rewrite: >>it happens 'silently' (non-public)

Re: When Closure get external variable's value?

2006-12-19 Thread Huayang Xia
That is a really concise and precise answer. Thanks. So the object binding can only happen explicitly at the closure declaration argument list(non-free variable). On Dec 19, 10:37 am, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Huayang Xia wrote: > > When does the closure get the value of the maxI

Re: SQLALCHEMY - Method to have the last word, by Michael Bayer

2006-12-19 Thread Fredrik Lundh
Ilias Lazaridis wrote: > How can one contribute? you can't. -- http://mail.python.org/mailman/listinfo/python-list

Portable apps

2006-12-19 Thread Andreas
Hi Group, I want to get into writing portable apps that can run solely off a USB stick, but I have a few problems. I'm originally a java/.net developer, but I don't want it to be a requirement that the host computer has .net or a jre installed. I also am not very fond of developing with VC++ *cry

Re: python script terminating

2006-12-19 Thread Fredrik Lundh
Aditya Vaish wrote: > I have a python script running on Debian sarge. It loops and walk > through a directory > > while 1: > > for dirn in os.listdir(buildpath): > > if os.path.exists(os.path.join(buildpath, dirn, 'pass')) and > dirn.find(build1) != -1: > > # ca

Re: on PySol's popularity

2006-12-19 Thread Harry George
Fredrik Lundh <[EMAIL PROTECTED]> writes: > Tshepang Lekhonkhobe wrote: > > > On Python docs, on faq/installed.html, it's mentioned that PySol is > > the most common Python application. > > not really; that page says that installing PySol is a common way to > get a Python installation installed

wxPython and activex problem.

2006-12-19 Thread 一首诗
Hi all! Have u tried genaxmodule.py provided by wxPython to create a wrapper module for an activex control? For me, some times it works, but some times, it doesn't. - Traceback (most recent call last): File "genaxmodule.py", line 42, in ? main(s

Re: New os.path.exists() behavior - bug or feature?

2006-12-19 Thread klappnase
Martin v. Löwis schrieb: > > Neither, nor. In both cases, the operating system is asked, and gives > this answer. However, in the Windows API, there is no "exists" function > (nor is there on Unix); instead, exists is implemented by calling > several underlying functions. The precise set of functi

Re: Core dump revisited

2006-12-19 Thread Sheldon
Duncan Booth skrev: > "Sheldon" <[EMAIL PROTECTED]> wrote: > > > I am new to this and copied this code from a colleague. So, it > > corrupts the pointer. How do I do this properly? > > > Here is at least part of your problem: > > msgop = PyList_GetItem(work.msgobj, i); > work.msg_scenes[i

Re: Tkdnd--does anyone use it?

2006-12-19 Thread klappnase
Kevin Walzer schrieb: > Does anyone use the Tkdnd module that comes with Tkinter to allow > drag-and-drop of Tkinter widgets in your application? (Not the binary > extension that hooks into Xdnd and OLE-dnd on Windows.) I've looked at > the various documents for Tkdnd, and it looks somewhat compl

Re: on PySol's popularity

2006-12-19 Thread skip
Harry> A plug for PySol. Harry> My wife is totally non-techno. She doesn't "get" the notions of Harry> windows, or minimize/maximize, or clicking on the icon down on Harry> the toolbar. My wife appears to be only slightly less non-techno than yours. Aside from mail and web brow

Re: tuple.index()

2006-12-19 Thread J. Clifford Dyer
Nick Maclaren wrote: > In article <[EMAIL PROTECTED]>, > "J. Clifford Dyer" <[EMAIL PROTECTED]> writes: > |> > |> How about: "A heterogenous sequence is one in which each element plays a > |> unique role, specific to its position in the sequence. A homogenous > |> sequence is one in which positio

[ANN] rest2web 0.5.1

2006-12-19 Thread Fuzzyman
`rest2web 0.5.1 `_ is now available. This is a minor feature enhancement release. * `Download rest2web-0.5.1.zip `_ * `Download rest2web-0.5.1.tar.gz

Re: When Closure get external variable's value?

2006-12-19 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Huayang Xia wrote: > That is a really concise and precise answer. Thanks. > > So the object binding can only happen explicitly at the closure > declaration argument list(non-free variable). That's no declaration that's a definition and it happens at runtime! It's execute

Re: permutations - fast & with low memory consumption?

2006-12-19 Thread Jack Diederich
On Tue, Dec 19, 2006 at 03:14:51PM +0100, Christian Meesters wrote: > Hi, > > I'd like to hack a function which returns all possible permutations as lists > (or tuples) of two from a given list. So far, I came up with this solution, > but it turned out to be too slow for the given problem, because

Re: python poetry?

2006-12-19 Thread Michael Spencer
BartlebyScrivener wrote: > Python pseudo code limericks anywhere? I wrote the following in response to Steve Holden's limerick challenge a couple of years ago: # run me or voice the alphanumeric tokens from itertools import repeat for feet in [3,3,2,2,3]: print " ".join("DA-DA-DUM"

Re: tuple.index()

2006-12-19 Thread Nick Maclaren
In article <[EMAIL PROTECTED]>, "J. Clifford Dyer" <[EMAIL PROTECTED]> writes: |> |> On the contrary, I think that example fits perfectly with my definition |> of homogenous. If there is no constraint on position, then what is the |> position determinative of? Order in the queue. Nothing more.

  1   2   >