Re: Why are String Formatted Queries Considered So Magical?

2010-07-01 Thread Jorgen Grahn
On Wed, 2010-06-30, Steven D'Aprano wrote: > On Wed, 30 Jun 2010 14:14:38 +, Jorgen Grahn wrote: > >> On Tue, 2010-06-29, Stephen Hansen wrote: >>> On 6/29/10 5:41 AM, Roy Smith wrote: Nobody wrote: >> And what about regular expressions? > > What about them? As the saying

Re: [OT] Re: Why Is Escaping Data Considered So Magical?

2010-07-01 Thread Jorgen Grahn
On Wed, 2010-06-30, Michael Torrie wrote: > On 06/30/2010 03:00 AM, Jorgen Grahn wrote: >> On Wed, 2010-06-30, Michael Torrie wrote: >>> On 06/29/2010 10:17 PM, Michael Torrie wrote: On 06/29/2010 10:05 PM, Michael Torrie wrote: > #include > > int main(int argc, char ** argv)

Re: Why are String Formatted Queries Considered So Magical?

2010-07-01 Thread Stephen Hansen
On 6/30/10 11:58 PM, Jorgen Grahn wrote: On Wed, 2010-06-30, Steven D'Aprano wrote: On Wed, 30 Jun 2010 14:14:38 +, Jorgen Grahn wrote: On Tue, 2010-06-29, Stephen Hansen wrote: There's nothing silly about it. It is an exaggeration though: but it does represent a good thing to keep in mi

executable builder

2010-07-01 Thread King
Hi, I am trying to build python a cross platform python executable builder to deploy python app. I tried various tools such as py2exe, pyinstaller, cx_freeze but some how they are not upto the mark except py2exe. Unfortunately py2exe is working only on windows based systems. The task is divide in

Re: [farther OT] Re: Why Is Escaping Data Considered So Magical?

2010-07-01 Thread Nobody
On Wed, 30 Jun 2010 23:40:06 -0600, Michael Torrie wrote: > Given "char buf[512]", buf's type is char * according to the compiler > and every C textbook I know of. No, the type of "buf" is "char [512]", i.e. "array of 512 chars". If you use "buf" as an rvalue (rather than an lvalue), it will be i

Re: Very odd output from subprocess

2010-07-01 Thread Nobody
On Wed, 30 Jun 2010 21:12:12 -0700, m wrote: > If I add the line: > for l in line: print ord(l),'\t',l > after the first readline, I get the following: > > > 27 > 91[ > 480 > 480 > 109 m > 27 > 91[ > 513 > 557 > 109 m > > before the codes begin for the

Re: Composition of functions

2010-07-01 Thread Terry Reedy
On 7/1/2010 12:32 AM, Mladen Gogala wrote: On Wed, 30 Jun 2010 21:04:28 -0700, Stephen Hansen wrote: However, you can easily get what you want by using the 'reversed' function (and similarly, the 'sorted' function), a la: >>> y = ''.join(reversed(list(x))) The 'reversed' and 'sorted' func

Re: Composition of functions

2010-07-01 Thread Stephen Hansen
On 7/1/10 12:45 AM, Terry Reedy wrote: On 7/1/2010 12:32 AM, Mladen Gogala wrote: On Wed, 30 Jun 2010 21:04:28 -0700, Stephen Hansen wrote: However, you can easily get what you want by using the 'reversed' function (and similarly, the 'sorted' function), a la: >>> y = ''.join(reversed(list(x

stupid question about html page

2010-07-01 Thread luca72
hello with webbrowser i open the html or php etc page, how i can save the opened page with python? Thanks Luca -- http://mail.python.org/mailman/listinfo/python-list

Re: Ignorance and Google Groups (again)

2010-07-01 Thread Mithrandir
"D'Arcy J.M. Cain" wrote in news:mailman.46.1277931314.1673.python-l...@python.org: > On Wed, 30 Jun 2010 13:10:43 -0700 (PDT) > garryTX wrote: >> On Jun 29, 5:31 pm, nanothermite911fbibustards > [...] >> you ignorant mf. stfu. > > You shouldn't be calling people ignorant for what they post i

Re: Composition of functions

2010-07-01 Thread Paul Rubin
Terry Reedy writes: > sequential statements are a form of composition, even if > strict functionalists do not like to see it that way. They actually do like to see it that way: http://blog.sigfpe.com/2006/08/you-could-have-invented-monads-and.html -- http://mail.python.org/mailman/listinfo/py

Re: stupid question about html page

2010-07-01 Thread Mithrandir
luca72 wrote in news:abfb7720-6132-4b7b-8084- 5c1a48164...@y11g2000yqm.googlegroups.com: > hello > with webbrowser i open the html or php etc page, how i can save the > opened page with python? > > Thanks > > Luca Not sure of a way to capture info from a browser (like Firefox.) I know though

Re: stupid question about html page

2010-07-01 Thread luca72
On 1 Lug, 10:16, Mithrandir wrote: > luca72 wrote in news:abfb7720-6132-4b7b-8084- > 5c1a48164...@y11g2000yqm.googlegroups.com: > > > hello > > with webbrowser i open the html or php etc page, how i can save the > > opened page with python? > > > Thanks > > > Luca > > Not sure of a way to capture

Extract doc strings

2010-07-01 Thread moerchendiser2k3
Hi all, when I have a PyCodeObject, is there any way to extract a doc string from the code? For instance the following script <---script> """ Hello World! """ def main(): pass main() I would like to get "Hello World!". Any chance? Thanks in advance!! Bye, moerchendiser2k3 -- http://ma

Re: Extract doc strings

2010-07-01 Thread Ben Finney
moerchendiser2k3 writes: > when I have a PyCodeObject, is there any way to extract a doc string > from the code? I'm not very familiar with using the C interface for Python, but does it help to know that a docstring for an object is available at that object's ‘__doc__’ attribute? -- \

Re: Extract doc strings

2010-07-01 Thread moerchendiser2k3
Hi ben, thanks for your answer. Sure, __doc__ is the access point to the docstring, but in this case, I just get the docstring of the code object. So an explanation what a code object, but I need the docstring of real docstring of the script. bye, moerchendiser -- http://mail.python.org/mailman/

Re: Extract doc strings

2010-07-01 Thread Jean-Michel Pichavant
moerchendiser2k3 wrote: Hi all, when I have a PyCodeObject, is there any way to extract a doc string from the code? For instance the following script <---script> """ Hello World! """ def main(): pass main() I would like to get "Hello World!". Any chance? Thanks in advance!! Bye, moer

tp_richcompare vs tp_compare

2010-07-01 Thread moerchendiser2k3
Hi all, just another question. Can anyone explain me whats the real difference between tp_richcompare and tp_compare? I read some stuff, but sometimes I believe the author doesnt know either whats the real difference or they forget it to explain. The Function definition looks very similiar, except

Re: Extract doc strings

2010-07-01 Thread Thomas Jollans
On 07/01/2010 11:12 AM, moerchendiser2k3 wrote: > Hi all, > > when I have a PyCodeObject, is there any way to extract a doc string > from the code? > For instance the following script Code objects don't have doc strings, as such. However, for functions at least (this may or may not be true for co

Re: Why are String Formatted Queries Considered So Magical?

2010-07-01 Thread Jean-Michel Pichavant
Stephen Hansen wrote: On 6/30/10 11:58 PM, Jorgen Grahn wrote: On Wed, 2010-06-30, Steven D'Aprano wrote: On Wed, 30 Jun 2010 14:14:38 +, Jorgen Grahn wrote: On Tue, 2010-06-29, Stephen Hansen wrote: There's nothing silly about it. It is an exaggeration though: but it does represent a g

Re: Extract doc strings

2010-07-01 Thread Ben Finney
moerchendiser2k3 writes: > thanks for your answer. Sure, __doc__ is the access point to the > docstring, but in this case, I just get the docstring of the code > object. So an explanation what a code object, but I need the docstring > of real docstring of the script. I'm probably not understandi

List-type attributes and name strings

2010-07-01 Thread egbert
Normally you use setattr() if the name of the attribute is in a namestring: setattr(self, namestring, value) But my attributes are lists or dictionaries, and I don't seem to be able to use setattr anymore. Now I use for a list something like: >>> self.__dict__[namestring].append(value) and fo

Re: List-type attributes and name strings

2010-07-01 Thread Chris Rebert
On Thu, Jul 1, 2010 at 3:56 AM, egbert wrote: > Normally you use setattr() if the name of the attribute is in a > namestring: > setattr(self, namestring, value) > But my attributes are lists or dictionaries, and I don't seem to be > able to use setattr anymore. Because you're not setting an a

Re: CONTROLLED DEMOLITION INC explosive-charge placement technician Tom Sullivan 911 TESTIMONIAL Video

2010-07-01 Thread n...@bid.nes
On Jun 29, 9:31 am, nanothermite911fbibustards wrote: > On Jun 29, 5:24 am, "n...@bid.nes" wrote: > > > > > On Jun 26, 12:16 pm, nanothermite911fbibustards > > > wrote: > > >   Let's talk about thermite. > > >   Do you know anything about thermite? It's a powdered mixture of a > > metal oxide an

Re: optphart (alpha2)

2010-07-01 Thread Jean-Michel Pichavant
Stephen Hansen wrote: On 6/28/10 11:50 PM, rantingrick wrote: You just don't get the point, do you? And just what *point* an i supposed to be "getting" Stephen? That you don't like my contribution? If thats your point then i very much "get" it. This garbage: "optphart is the nemisis of the

Re: List-type attributes and name strings

2010-07-01 Thread Lie Ryan
On 07/01/10 20:56, egbert wrote: self.__dict__[namestring][keystring]=value try this: getattr(self, namestring)[keystring] = value -- http://mail.python.org/mailman/listinfo/python-list

Re: List-type attributes and name strings

2010-07-01 Thread egbert
On Thu, Jul 01, 2010 at 04:02:49AM -0700, Chris Rebert wrote: > switch to getattr() as demonstrated above. > Thanks for opening my eyes, Chris. egbert -- Egbert Bouwman - Keizersgracht 197 II - 1016 DS Amsterdam - 020 6257991 =

Re: Ignorance and Google Groups (again)

2010-07-01 Thread Bruno Desthuilliers
D'Arcy J.M. Cain a écrit : On Wed, 30 Jun 2010 14:06:05 -0700 Stephen Hansen wrote: Gmail and Google Groups are not one and the same. There's a number of people who subscribe to the list directly, use Gmail, and don't go anywhere near Google Groups. I know that. My filter doesn't catch them

Re: Why are String Formatted Queries Considered So Magical?

2010-07-01 Thread Roy Smith
Stephen Hansen wrote: > The quote does not deny the power of regular expressions; it challenges > widely held assumption and belief that comes from *somewhere* that they > are the best way to approach any problem that is text related. Well, that assumption comes from historical unix usage wher

Re: Extract doc strings

2010-07-01 Thread Steven D'Aprano
On Thu, 01 Jul 2010 11:55:05 +0200, Thomas Jollans wrote: > On 07/01/2010 11:12 AM, moerchendiser2k3 wrote: >> Hi all, >> >> when I have a PyCodeObject, is there any way to extract a doc string >> from the code? >> For instance the following script > > Code objects don't have doc strings, as suc

Re: List-type attributes and name strings

2010-07-01 Thread Bruno Desthuilliers
egbert a écrit : Normally you use setattr() if the name of the attribute is in a namestring: setattr(self, namestring, value) But my attributes are lists or dictionaries, and I don't seem to be able to use setattr anymore. Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41) [GCC 4.3.3] on

Re: Composition of functions

2010-07-01 Thread Wolfram Hinderer
On 1 Jul., 06:04, Stephen Hansen wrote: > The 'reversed' and 'sorted' functions are generators that lazilly > convert an iterable as needed. 'sorted' returns a new list (and is not lazy). -- http://mail.python.org/mailman/listinfo/python-list

Re: Ignorance and Google Groups (again)

2010-07-01 Thread D'Arcy J.M. Cain
On Thu, 01 Jul 2010 14:07:27 +0200 Bruno Desthuilliers wrote: > And AFAICT you're wrong. I read and post to c.l.py using my newsreader > (so NOT going thru GG), and my personal address is @gmail.com. But... > From: Bruno Desthuilliers -- D'Arcy J.M. Cain | Democracy is three wolves

Re: Python dynamic attribute creation

2010-07-01 Thread Bruno Desthuilliers
Stephen Hansen a écrit : On 6/30/10 10:37 PM, Aahz wrote: In article<4c29ad38$0$26210$426a7...@news.free.fr>, Bruno Desthuilliers wrote: Aahz a écrit : In article<4c285e7c$0$17371$426a7...@news.free.fr>, Bruno Desthuilliers wrote: Aahz a écrit : In article<4c2747c1$0$4545$426a7...@news.fre

Re: Ignorance and Google Groups (again)

2010-07-01 Thread Bruno Desthuilliers
D'Arcy J.M. Cain a écrit : On Thu, 01 Jul 2010 14:07:27 +0200 Bruno Desthuilliers wrote: And AFAICT you're wrong. I read and post to c.l.py using my newsreader (so NOT going thru GG), and my personal address is @gmail.com. But... From: Bruno Desthuilliers Sorry, there's a missing "some

Re: stupid question about html page

2010-07-01 Thread drygal
On 1 July, 09:31, luca72 wrote: > On 1 Lug, 10:16, Mithrandir > wrote: > > > > > > > luca72 wrote in news:abfb7720-6132-4b7b-8084- > > 5c1a48164...@y11g2000yqm.googlegroups.com: > > > > hello > > > with webbrowser i open the html or php etc page, how i can save the > > > opened page with python?

Re: python source code -> win/dos executable (on linux)

2010-07-01 Thread Bill Davy
"Stephen Hansen" wrote in message news:mailman.2344.1277821469.32709.python-l...@python.org... > On 6/29/10 12:27 AM, Lawrence D'Oliveiro wrote: >> In message<4c286d71$0$18654$4fafb...@reader3.news.tin.it>, superpollo >> wrote: >> >>> Lawrence D'Oliveiro ha scritto: Is it really such a

Re: I strongly dislike Python 3

2010-07-01 Thread Lou Pecora
In article <3f35dcf5-25ff-4aa7-820c-592cbffa4...@u26g2000yqu.googlegroups.com>, rantingrick wrote: > On Jun 30, 4:21 pm, geremy condra wrote: > > > Actually, I agree with this complaint though- it is much easier to type > > spaces than parens. > > Oh Geremy please. If you're going to whine a

Re: Python dynamic attribute creation

2010-07-01 Thread WANG Cong
On 06/30/10 01:25, Ethan Furman wrote: >> But if so why setattr() still exists? What is it for if we can do the >> same thing via assignments? Also, in order to be perfect, Python should >> accept to add dynamic attributes dynamically, something like PEP >> 363. That doesn't happen. > > Setattr a

Re: Composition of functions

2010-07-01 Thread Stephen Hansen
On 7/1/10 5:29 AM, Wolfram Hinderer wrote: On 1 Jul., 06:04, Stephen Hansen wrote: The 'reversed' and 'sorted' functions are generators that lazilly convert an iterable as needed. 'sorted' returns a new list (and is not lazy). Oops, you're right. Got the two crossed into one in my head. --

Re: Why are String Formatted Queries Considered So Magical?

2010-07-01 Thread Stephen Hansen
On 7/1/10 3:03 AM, Jean-Michel Pichavant wrote: Re is part of the python standard library, for some purpose I guess. No, *really*? So all those people who have been advocating its useless and shouldn't be are already too late? Damn. Well, there goes *that* whole crusade we were all out on.

Re: Why are String Formatted Queries Considered So Magical?

2010-07-01 Thread Stephen Hansen
On 7/1/10 5:11 AM, Roy Smith wrote: Stephen Hansen wrote: The quote does not deny the power of regular expressions; it challenges widely held assumption and belief that comes from *somewhere* that they are the best way to approach any problem that is text related. Well, that assumption comes

Re: Python dynamic attribute creation

2010-07-01 Thread WANG Cong
On 06/30/10 01:20, Stephen Hansen wrote: >> But if so why setattr() still exists? What is it for if we can do the >> same thing via assignments? Also, in order to be perfect, Python should >> accept to add dynamic attributes dynamically, something like PEP >> 363. That doesn't happen. > > What do

Re: Python dynamic attribute creation

2010-07-01 Thread Stephen Hansen
On 7/1/10 5:41 AM, Bruno Desthuilliers wrote: Stephen Hansen a écrit : On 6/30/10 10:37 PM, Aahz wrote: It may not be "the" primary concern, but elegance certainly is *a* primary concern. I concur. Its not explicitly stated, but it is the Zen 0. This is further supported by its implied prese

Re: Python dynamic attribute creation

2010-07-01 Thread WANG Cong
On 07/01/10 13:49, Stephen Hansen wrote: Hi, Stephen, >> >> It may not be "the" primary concern, but elegance certainly is *a* >> primary concern. > > I concur. > > Its not explicitly stated, but it is the Zen 0. This is further > supported by its implied presence in many of the Axioms and Truth

Re: I strongly dislike Python 3

2010-07-01 Thread Ricardo Aráoz
On 30/06/2010 01:23 p.m., Lie Ryan wrote: On 07/01/10 01:42, Michele Simionato wrote: On Jun 30, 2:52 pm, Lie Ryan wrote: On 06/27/10 11:24, Steven D'Aprano wrote: Producing print function takes a little bit more effort than producing a print statement. (1) The main use-cases for prin

Re: Python dynamic attribute creation

2010-07-01 Thread Stephen Hansen
On 7/1/10 7:31 AM, WANG Cong wrote: On 06/30/10 01:20, Stephen Hansen wrote: But if so why setattr() still exists? What is it for if we can do the same thing via assignments? Also, in order to be perfect, Python should accept to add dynamic attributes dynamically, something like PEP 363. That

Re: Python dynamic attribute creation

2010-07-01 Thread Aahz
In article , Michael Torrie wrote: >On 06/28/2010 02:31 PM, Aahz wrote: >> In article , >> Michael Torrie wrote: >>> >>> True. But you can't really criticize a language's implementation of OOP >>> without a good understanding of the "pure" OO language. For example, in >>> Smalltalk If/Then st

Re: Python dynamic attribute creation

2010-07-01 Thread Aahz
In article , WANG Cong wrote: >On 07/01/10 13:49, Stephen Hansen wrote: >>Wang Cong deleted the attribution for Aahz: >>> >>> It may not be "the" primary concern, but elegance certainly is *a* >>> primary concern. >> >> I concur. >> >> Its not explicitly stated, but it is the Zen 0. This is furt

Re: Python dynamic attribute creation

2010-07-01 Thread WANG Cong
On 06/27/10 09:06, Steven D'Aprano wrote: >> In that situation, certainly: adding an attribute on the fly to that >> formal definition seems entirely strange and special of an activity. But >> that's only because you *chose* to *see* and *use* the object that way. >> The "special"ness of the acti

Re: I strongly dislike Python 3

2010-07-01 Thread Aahz
In article , geremy condra wrote: >On Wed, Jun 30, 2010 at 4:34 PM, Steven D'Aprano > wrote: >> On Wed, 30 Jun 2010 22:52:06 +1000, Lie Ryan wrote: >>> >>> That is precisely how the quick-and-dirty syntax of print statement can >>> be justified. While debugging, you'll need to be able to quickly

Re: Python dynamic attribute creation

2010-07-01 Thread Stephen Hansen
On 7/1/10 7:44 AM, WANG Cong wrote: On 07/01/10 13:49, Stephen Hansen wrote: It may not be "the" primary concern, but elegance certainly is *a* primary concern. I concur. Its not explicitly stated, but it is the Zen 0. This is further supported by its implied presence in many of the Axioms a

Sphinx-1.0b compilation for python3.1

2010-07-01 Thread Richard Mathar
I am trying to install Sphinx-1.0b under a Python3 environment. Does anyone have experience with that task? cd *1.0b2 python3 setup.py build File "setup.py", line 50 print 'ERROR: Sphinx requires at least Python 2.4 to run.' So ../ 2to3 -w Sphinx-1.0b2 ... RefactoringTool: Warnings/mes

Re: Python dynamic attribute creation

2010-07-01 Thread WANG Cong
On 06/28/10 17:43, Bruno Desthuilliers wrote: > Carl Banks a écrit : >> On Jun 27, 3:49 am, Bruno Desthuilliers >> wrote: >>> WANG Cong a écrit : >>> On 06/26/10 00:11, Neil Hodgson wrote: > WANG Cong: >> 4) Also, this will _somewhat_ violate the OOP princples, in OOP, >> this

Re: Python dynamic attribute creation

2010-07-01 Thread Stephen Hansen
On 7/1/10 8:02 AM, WANG Cong wrote: On 06/27/10 09:06, Steven D'Aprano wrote: In that situation, certainly: adding an attribute on the fly to that formal definition seems entirely strange and special of an activity. But that's only because you *chose* to *see* and *use* the object that way. Th

Re: Composition of functions

2010-07-01 Thread MRAB
Zubin Mithra wrote: Er, I don't think you thought that one entirely through (/ tried it out): My Apologies. Here is a working one. >>> x="123" >>> t = list(x) >>> t.reverse() >>> print ''.join(t) 321 But of course, the method which was suggested earlier is far more elegant. >

Re: Python dynamic attribute creation

2010-07-01 Thread WANG Cong
On 07/01/10 22:53, Stephen Hansen wrote: > > One uses assignment syntax when the name of the attribute they are > setting is known at the time when one writes the code. > > One uses the setattr function when the name of the attribute is not > known until runtime. > > The difference has *nothing a

Re: [farther OT] Re: Why Is Escaping Data Considered So Magical?

2010-07-01 Thread Mel
Nobody wrote: > On Wed, 30 Jun 2010 23:40:06 -0600, Michael Torrie wrote: >> Given "char buf[512]", buf's type is char * according to the compiler >> and every C textbook I know of. References from Kernighan & Ritchie _The C Programming Language_ second edition: > No, the type of "buf" is "char

Re: Python dynamic attribute creation

2010-07-01 Thread WANG Cong
On 07/01/10 23:19, Stephen Hansen wrote: >> >> As long as setattr() exists in Python, that will be not so ordinary. :) > > setattr is perfectly ordinary. If you think setattr() is as ordinary as a trivial assignment, I will argue with you, this is personal taste. However, I think setattr() is a

Re: [farther OT] Re: Why Is Escaping Data Considered So Magical?

2010-07-01 Thread Michael Torrie
On 07/01/2010 01:24 AM, Nobody wrote: > No, the type of "buf" is "char [512]", i.e. "array of 512 chars". If you > use "buf" as an rvalue (rather than an lvalue), it will be implicitly > converted to char*. Yes this is true. I misstated. I meant that most text books I've seen say to just use the

Python 2.4.2 Installation error

2010-07-01 Thread Dhilip S
Hello Everyone.. I'm using Ubuntu 10.04, i try to install Python 2.4.2 & Python 2.4.3 got error message while doing make command. anybody can tell tell, How to overcome this error -- with regards, Dhilip.S -- http://mail.python.org/mailman/listinfo/python-list

Re: Solutions for hand injury from computer use

2010-07-01 Thread Ethan Furman
Ben Finney wrote: geremy condra writes: Right. I'm much more concerned about the position of my Ctrl key, to avoid hand injury from all the key chording done as a programmer. Not saying its a cure-all, but I broke my hand pretty badly a few years ago and had a lot of luck with a homemade foot

OT Komodo Edit, line selection gutter is one pixel wide?

2010-07-01 Thread John Doe
Is there a way to increase the line selection gutter width? It seems to be only one pixel wide. In other words... When I single click on the left side of the line, in order to automatically select the line, the pointer must be in a precise single pixel location immediately to the left of the line.

Re: Python dynamic attribute creation

2010-07-01 Thread Stephen Hansen
On 7/1/10 8:46 AM, WANG Cong wrote: However, I think setattr() is a builtin function, using it exposes the *magic* of metaprogramming (or class-programming, if more correct) at a first glance. I'm going to try this one more time -- you place a great deal of importance and special properties on

Re: Solutions for hand injury from computer use

2010-07-01 Thread Andreas Waldenburger
On Thu, 01 Jul 2010 09:35:31 -0700 Ethan Furman wrote: > I'll have to give the left-handed mouse a try... hmmm -- not too bad > so far. Since we're on the subject: I find the best solution for "lots of typing with a little mousing" to be a keyboard with a pointing stick (or track point or nav st

Re: Solutions for hand injury from computer use

2010-07-01 Thread Emile van Sebille
On 7/1/2010 10:00 AM Andreas Waldenburger said... On Thu, 01 Jul 2010 09:35:31 -0700 Ethan Furman wrote: I'll have to give the left-handed mouse a try... hmmm -- not too bad so far. Since we're on the subject: I find the best solution for "lots of typing with a little mousing" to be a keyboar

Re: Python 2.4.2 Installation error

2010-07-01 Thread Thomas Jollans
On 07/01/2010 06:21 PM, Dhilip S wrote: > Hello Everyone.. > > I'm using Ubuntu 10.04, i try to install Python 2.4.2 & Python 2.4.3 got > error message while doing make command. anybody can tell tell, How to > overcome this error Which error? > -- > with regards, > Dhilip.S > > -- h

escape character / csv module

2010-07-01 Thread V N
string "\x00" has a length of 1. When I use the csv module to write that to a file csv_f = csv.writer(file("test.csv","wb"),delimiter="|") csv_f.writerow(["\x00","zz"]) The output file looks like this: |zz Is it possible to force the writer to write that string? -- http://mail.python.org/mailm

Re: Python 2.4.2 Installation error

2010-07-01 Thread Christian Heimes
> I'm using Ubuntu 10.04, i try to install Python 2.4.2 & Python 2.4.3 got > error message while doing make command. anybody can tell tell, How to > overcome this error Perhaps somebody is able to help you if you provide the full error message and describe all steps that lead to the error mesa

Re: [farther OT] Re: Why Is Escaping Data Considered So Magical?

2010-07-01 Thread John Nagle
On 7/1/2010 8:36 AM, Mel wrote: Nobody wrote: On Wed, 30 Jun 2010 23:40:06 -0600, Michael Torrie wrote: Given "char buf[512]", buf's type is char * according to the compiler and every C textbook I know of. References from Kernighan& Ritchie _The C Programming Language_ second edition: No,

Re: Solutions for hand injury from computer use

2010-07-01 Thread Andreas Waldenburger
On Thu, 01 Jul 2010 10:09:30 -0700 Emile van Sebille wrote: > On 7/1/2010 10:00 AM Andreas Waldenburger said... > > On Thu, 01 Jul 2010 09:35:31 -0700 Ethan Furman > > wrote: > > > >> I'll have to give the left-handed mouse a try... hmmm -- not too > >> bad so far. > > > > Since we're on the subj

Re: Python/C++ timer intermittent bug

2010-07-01 Thread Thomas Jollans
On 06/30/2010 09:28 PM, p...@mail.python.org wrote: > I have a problem with threading using the Python/C API. I have an > extension that implements a timer, and the C++ timer callback function > calls a Python function. The relevant code looks like this: > > [snip] > > static void CALLBACK

Re: Python 2.4.2 Installation error

2010-07-01 Thread Albert Hopkins
On Thu, 2010-07-01 at 21:51 +0530, Dhilip S wrote: > Hello Everyone.. > > I'm using Ubuntu 10.04, i try to install Python 2.4.2 & Python 2.4.3 > got error message while doing make command. anybody can tell tell, How > to overcome this error "this" error apparently did not get included in you

Re: Extract doc strings

2010-07-01 Thread moerchendiser2k3
Great! Thanks a lot! This is what I was looking for. :) Bye, moerchendiser2k3 -- http://mail.python.org/mailman/listinfo/python-list

Re: Solutions for hand injury from computer use

2010-07-01 Thread Brian Victor
Emile van Sebille wrote: > When I started having trouble about ten years ago, I switched to a > keyboard with integrated mouse pad. No problems since... Where did you find that? I've been looking for one. (Assuming you mean a trackpad, and not a mouse pad.) That said, my own solution was the

Re: Python dynamic attribute creation

2010-07-01 Thread Rami Chowdhury
On 2010-07-01 23:42, WANG Cong wrote: > On 07/01/10 22:53, Stephen Hansen wrote: > > > > > One uses assignment syntax when the name of the attribute they are > > setting is known at the time when one writes the code. > > > > One uses the setattr function when the name of the attribute is not > >

Re: Ignorance and Google Groups (again)

2010-07-01 Thread Mithrandir
Bruno Desthuilliers wrote in news:4c2c9002$0$17075$426a3...@news.free.fr: > D'Arcy J.M. Cain a écrit : >> On Thu, 01 Jul 2010 14:07:27 +0200 >> Bruno Desthuilliers >> wrote: >>> And AFAICT you're wrong. I read and post to c.l.py using my >>> newsreader (so NOT going thru GG), and my personal a

Re: Solutions for hand injury from computer use

2010-07-01 Thread Emile van Sebille
On 7/1/2010 10:46 AM Brian Victor said... Emile van Sebille wrote: When I started having trouble about ten years ago, I switched to a keyboard with integrated mouse pad. No problems since... Where did you find that? I've been looking for one. (Assuming you mean a trackpad, and not a mouse p

Re: OT Komodo Edit, line selection gutter is one pixel wide?

2010-07-01 Thread Ian Kelly
On Thu, Jul 1, 2010 at 10:39 AM, John Doe wrote: > Is there a way to increase the line selection gutter width? It > seems to be only one pixel wide. In other words... When I single > click on the left side of the line, in order to automatically > select the line, the pointer must be in a precise s

Re: Ignorance and Google Groups (again)

2010-07-01 Thread Stephen Hansen
On 7/1/10 11:05 AM, Mithrandir wrote: Just thought of this last night: If you view the full header you can see this: Complaints-To: groups-ab...@google.com Try blocking posts with that in the header. :) Better idea: auto-forward any messages with that header, to that address. Odds are it's

Re: OT Komodo Edit, line selection gutter is one pixel wide?

2010-07-01 Thread Thomas Jollans
On 07/01/2010 06:39 PM, John Doe wrote: > Is there a way to increase the line selection gutter width? It > seems to be only one pixel wide. In other words... When I single > click on the left side of the line, in order to automatically > select the line, the pointer must be in a precise single pixe

Re: Ignorance and Google Groups (again)

2010-07-01 Thread Thomas Jollans
On 07/01/2010 08:20 PM, Stephen Hansen wrote: > On 7/1/10 11:05 AM, Mithrandir wrote: > >> Just thought of this last night: If you view the full header you can see >> this: >> >> Complaints-To: groups-ab...@google.com >> >> Try blocking posts with that in the header. :) > > Better idea: auto-forw

Re: Ignorance and Google Groups (again)

2010-07-01 Thread Dotan Cohen
On 1 July 2010 00:06, Stephen Hansen wrote: > Gmail and Google Groups are not one and the same. There's a number of people > who subscribe to the list directly, use Gmail, and don't go anywhere near > Google Groups. > I'm one of them. Gmail is great for mailing lists, though I would never use it

Re: Solutions for hand injury from computer use

2010-07-01 Thread Aahz
In article <20100701190033.15cea...@geekmail.invalid>, Andreas Waldenburger wrote: > >Since we're on the subject: I find the best solution for "lots of >typing with a little mousing" to be a keyboard with a pointing stick >(or track point or nav stick or whatever people call it). I'm not quite >s

Anyone using GPG or PGP encryption/signatures in your Python apps?

2010-07-01 Thread python
Curious if any of you are using GPG or PGP encryption and/or signatures in your Python apps? In particular are you: 1. clearsigning specific emails? 2. validating clearsigned emails from others? 3. encrypting/decrypting files? 4. generating signatures for files that you are exchanging/posting for

Re: escape character / csv module

2010-07-01 Thread anon
V N wrote: string "\x00" has a length of 1. When I use the csv module to write that to a file csv_f = csv.writer(file("test.csv","wb"),delimiter="|") csv_f.writerow(["\x00","zz"]) The output file looks like this: |zz Is it possible to force the writer to write that string? This will do what

Re: Solutions for hand injury from computer use

2010-07-01 Thread Cameron Simpson
On 01Jul2010 19:00, Andreas Waldenburger wrote: | On Thu, 01 Jul 2010 09:35:31 -0700 Ethan Furman | wrote: | > I'll have to give the left-handed mouse a try... hmmm -- not too bad | > so far. | | Since we're on the subject: I find the best solution for "lots of | typing with a little mousing" to

Re: escape character / csv module

2010-07-01 Thread MRAB
V N wrote: string "\x00" has a length of 1. When I use the csv module to write that to a file csv_f = csv.writer(file("test.csv","wb"),delimiter="|") csv_f.writerow(["\x00","zz"]) The output file looks like this: |zz Is it possible to force the writer to write that string? It can write "\x0

python ctypes to int main(int argc, char *argv[])

2010-07-01 Thread lkcl
hi, i need to convert an application (fontforge) to a python library. yes, libfontforge is already done as is libgdraw (fontforge-pygtk) but i need to make fontforge the _application_ a python application, using the same ctypes trick that's already done. my question is, therefore, how do i specif

Re: python ctypes to int main(int argc, char *argv[])

2010-07-01 Thread Stefan Behnel
lkcl, 01.07.2010 22:22: i need to convert an application (fontforge) to a python library. yes, libfontforge is already done as is libgdraw (fontforge-pygtk) but i need to make fontforge the _application_ a python application, using the same ctypes trick that's already done. my question is, there

Packaging question

2010-07-01 Thread snorble
My question is, why do the modules bar and foo show up in mypack's dir()? I intend for Foo (the class foo.Foo) and Bar (the class bar.Bar) to be there, but was not sure about the modules foo and bar. My big picture intention is to create smaller modules, but more of them (like I am used to doing w

Re: List-type attributes and name strings

2010-07-01 Thread egbert
On Thu, Jul 01, 2010 at 02:28:37PM +0200, Bruno Desthuilliers wrote: > Either I failed to understand you or you overlooked some other > problem in you code and jumped to the wrong conclusions. > In my problem the the name of the list or dict to mutate arrives in namestring, so I could not use th

Namespace problem?

2010-07-01 Thread Josh English
I have a script that generates a report from a bunch of data I've been collecting for the past year. I ran the script, successfully, for several weeks on test runs and creating more detailed reports. Today (back from vacation) and the script doesn't work. It's giving me a name error. I'm running

Re: Ignorance and Google Groups (again)

2010-07-01 Thread Mithrandir
Thomas Jollans wrote in news:mailman.55.1277936519.1673.python-l...@python.org: > On 06/30/2010 10:55 PM, D'Arcy J.M. Cain wrote: >> in all it's glory. >> >> :0: Hir >> * ^List-Id:.*python-list.python.org >> * ^From:@gmail.com >> * ^Newsgroups: >> /dev/null > > * X-Complaints-To: groups-a

Re: Namespace problem?

2010-07-01 Thread Matt McCredie
Josh English gmail.com> writes: > > I have a script that generates a report from a bunch of data I've been > collecting for the past year. I ran the script, successfully, for > several weeks on test runs and creating more detailed reports. > > Today (back from vacation) and the script doesn't w

Re: automate minesweeper with python

2010-07-01 Thread Jay
pywinauto looks to be almost perfect. All I need now is to read the numbers uncovered when a minesweeper square is clicked on, or that I just hit a mine. On Jun 30, 6:51 pm, Paul McGuire wrote: > On Jun 30, 6:39 pm, Jay wrote: > > > I would like to create a python script that plays the Windows g

Re: Python/C++ timer intermittent bug

2010-07-01 Thread Paul
Thanks, Thomas. The answer to most of your questions is that I'm very new at this! I'm asking this on the forums you suggested. - Paul On Thu, 01 Jul 2010 19:23:53 +0200, Thomas Jollans wrote: >On 06/30/2010 09:28 PM, p...@mail.python.org wrote: >> I have a problem with threading using the Py

Re: Python v3.1.2 documentation question

2010-07-01 Thread Aahz
In article , Ethan Furman wrote: >Stephen Hansen wrote: >> On 6/29/10 10:01 AM, Ethan Furman wrote: >>> In the glossary section it states: >>> >>> >>> nested scope >>> >>> The ability to refer to a variable in an enclosing definition. For >>> instance, a function defined inside another function

Re: python ctypes to int main(int argc, char *argv[])

2010-07-01 Thread Christian Heimes
> my question is, therefore, how do i specify a ctypes wrapper around > the standard int main(int argc, char *argv[]) which i am (obviously) > going to move to a (new) c library? Maybe I missing something here but libraries don't have a main() function. The main() function is the entry point of a

[ANN]: Emacs For Python 0.1, collection of emacs extensions for python development

2010-07-01 Thread Gabriele Lanaro
Emacs For Python 0.1 Emacs for python (epy) is a collection of emacs extensions for python development, yet ready and configured for you. It includes also tweaks to commonly used extension to provide extra functionality and fast bug correction. There are also sane configuration that helps you ge

  1   2   >