BayPIGgies at OSCON: 7/23 8-9:30pm

2009-07-10 Thread Aahz
NOTE: time change AND location change The July BayPIGgies meeting will be held at OSCON in the San Jose Convention Center as one of the BoF (Birds of a Feather) sessions from 8pm to 9:30pm Thursday July 23. Everyone is welcome: you do NOT need to be an OSCON member to attend a BoF. Wesley Chun

way for a function to understand whether it's being run through a OnCreate callback or not

2009-07-10 Thread slamdunk
is there a way for a function to understand whether it's being run through a OnCreate callback or not? I have working functions that I want to recycle through the OnCreate but need to catch the nuke.thisNode() bit inside them so they can still function when called manually through other scripts

Re: AP -- MeAmI.org Paces Google

2009-07-10 Thread Bruce C. Baker
Floetry scribe...@yahoo.com wrote in message news:803a7f06-8e43-4ff5-86a6-9fd9d2eee...@2g2000prl.googlegroups.com... On Jul 9, 8:33 pm, Bruce C. Baker b...@undisclosedlocation.net wrote: scribe...@yahoo.com wrote in message

Re: way for a function to understand whether it's being run through a OnCreate callback or not

2009-07-10 Thread Chris Rebert
On Thu, Jul 9, 2009 at 11:18 PM, slamdunks.de...@gmail.com wrote: is there a way for a function to understand whether it's being run through a OnCreate callback or not? I have working functions that I want to recycle through the OnCreate but need to catch the nuke.thisNode() bit inside them so

Re: way for a function to understand whether it's being run through a OnCreate callback or not

2009-07-10 Thread Gary Herron
slamdunk wrote: is there a way for a function to understand whether it's being run through a OnCreate callback or not? I have working functions that I want to recycle through the OnCreate but need to catch the nuke.thisNode() bit inside them so they can still function when called manually

Re: Examples of Python driven Microsoft UI Automation wanted

2009-07-10 Thread Kelie
On Jul 9, 5:50 pm, Tim Roberts t...@probo.com wrote: The University of North Carolina at Chapel Hill has a great Python package called pyAA that does exactly this: http://www.cs.unc.edu/Research/assist/developer.shtmlhttp://mindtrove.info/articles/gui-automation-with-pyaa/ -- Tim Roberts,

Re: AP -- MeAmI.org Paces Google

2009-07-10 Thread Musatov
On Jul 9, 11:21 pm, Bruce C. Baker b...@undisclosedlocation.net wrote: Floetry scribe...@yahoo.com wrote in message news:803a7f06-8e43-4ff5-86a6-9fd9d2eee...@2g2000prl.googlegroups.com... On Jul 9, 8:33 pm, Bruce C. Baker b...@undisclosedlocation.net wrote: scribe...@yahoo.com wrote in

Re: way for a function to understand whether it's being run through a OnCreate callback or not

2009-07-10 Thread Martin Vilcans
On Fri, Jul 10, 2009 at 8:18 AM, slamdunks.de...@gmail.com wrote: is there a way for a function to understand whether it's being run through a OnCreate callback or not? I have working functions that I want to recycle through the OnCreate but need to catch the nuke.thisNode() bit inside them so

Re: Looking for the right library for a simple HTTP client

2009-07-10 Thread David Stanek
On Fri, Jul 10, 2009 at 1:29 AM, scriptlear...@gmail.comscriptlear...@gmail.com wrote: I am trying to implement a simple client that can do the following: 1)to send the following kinds of HTTP requests and validate responses 1.1 GET 1.2 POST with application/x-www-form-urlencoded encoding 1.3

Httplib issues

2009-07-10 Thread jayesh bhardwaj
Hi, i was trying to download file frm a terminal having apache with httplib manipulation. It worked, now i want to upload file to the terminal. Can this b done by httplib too? -- http://mail.python.org/mailman/listinfo/python-list

need to write a assembly progrm

2009-07-10 Thread m.reddy prasad reddy
my aim is to run the assembly programs in python.by that we can use that in the any labs.because we can run the python in the mobiles also.if we write assembly programs in the mobile ,the mobile act as a tool kit for the lab.tell me any other solutions for this --

Re: AP -- MeAmI.org Paces Google

2009-07-10 Thread The Masked Logician
On Jul 9, 6:18 pm, Bruce C. Baker b...@undisclosedlocation.net wrote: Musatov marty.musa...@gmail.com wrote in message news:fe9969b0-3c6a-49f7-8f38-0ed89dc9a...@x6g2000prc.googlegroups.com... [snip-a-rooney] violator. Google could not be reached for comment. Possibly because they were

Re: AP -- MeAmI.org Paces Google

2009-07-10 Thread Bruce C. Baker
Musatov marty.musa...@gmail.com wrote in message news:fe9969b0-3c6a-49f7-8f38-0ed89dc9a...@x6g2000prc.googlegroups.com... [snip-a-rooney] violator. Google could not be reached for comment. Possibly because they were laughing so hard they couldn't hear their cell phones ringing ...? --

Re: gett error message: TypeError: 'int' object is not callable

2009-07-10 Thread Lie Ryan
Friðrik Már Jónsson wrote: Hi Rhodri, It's only really a pitfall if you try to use the built-in after you've redefined it. That's the thing to keep an eye open for. You're right, but in cases where you're editing a codebase which you didn't author entirely by yourself you may not be

Re: gett error message: TypeError: 'int' object is not callable

2009-07-10 Thread Lie Ryan
Simon Forman wrote: On Thu, Jul 9, 2009 at 9:42 AM, Nicknleio...@gmail.com wrote: snip fields = line.split() for i in range(len(fields)): fields[i] = float(fields[i]) instead of the above code you could say: fields = [float(n) for n in in line.split()] Have fun getting

Re: Package for fast plotting of many data points in Python?

2009-07-10 Thread Jeremy Sanders
tt-industries wrote: Hi, I am programming a oscilloscope module in Python. For this reason, I want to plot very many data points as fast as possible. This can be more than 100 000 at once. So far I have been using the ploting module of wxPython. However, it becomes unstable for more than

Re: Httplib issues

2009-07-10 Thread Diez B. Roggisch
jayesh bhardwaj schrieb: Hi, i was trying to download file frm a terminal having apache with httplib manipulation. It worked, now i want to upload file to the terminal. Can this b done by httplib too? Upload file to the terminal makes no sense to me. You can upload something to a server. You

Re: Clarity vs. code reuse/generality

2009-07-10 Thread Jean-Michel Pichavant
Nobody wrote: On Thu, 09 Jul 2009 04:57:15 -0300, Gabriel Genellina wrote: Nobody says you shouldn't check your data. Only that assert is not the right way to do that. assert is not the right way to check your *inputs*. It's a perfectly reasonable way to check data which should be

Re: Colour of output text

2009-07-10 Thread garabik-news-2005-05
Tim Harig user...@ilthio.net wrote: On 2009-07-09, Alex Rosslyn black.line...@gmail.com wrote: I would like to learn a way of changing the colour of a particular part of the output text. I've tried the following On Unix operating systems this would be done through the curses interface:

the ultimate logging facility for debugging code

2009-07-10 Thread Jean-Michel Pichavant
Greetings, Sorry for the dubious title :o). I was wandering if there is a standard (or reliable) python module that implements the following feature: http://code.activestate.com/recipes/198078/ Recipe 198078: Wrapping method calls (meta-class example) A metaclass is used to wrap all (or just

help me to find the error

2009-07-10 Thread jhinak sen
hi, i am a beginner in python language, i am trying with this programme : to find the addition and mean from a data set in a file and writing the mean and sum in some other file : *#! /usr/bin/env python import re import cPickle as p import math from numpy import * f0=

A zlib question

2009-07-10 Thread Roland Hedberg
Hi! I have a problem with zlib and compressing/decompressing according to RFC 1951. It seems like I can decompress, something compressed according to RFC 1951 by someone else, provided I set wbits to something negative (used -8 but I guess any negative number would work?). But how can

Re: help me to find the error

2009-07-10 Thread Xavier Ho
I'm new to Python myself, but I think it's because the method readlist() returns a list. Hence, f0 is typed 'list'. And lists can't be closed. If you leave it to: *f0= open(temp9,r+) *and then assign another variable to the readlist, such as: *lines = f0.readlines()* Then in the for loop,

Re: Concatenating images (numpy arrays), but they look like HSV images

2009-07-10 Thread Sebastian Schabe
Robert Kern schrieb: Probably, you need to use zeros(..., dtype=uint8). When you use dtype=int, that will result in dtype=int arrays. I suspect that matplotlib is then interpreting that to mean that you want it to treat the input as scalar data (which it will pass through a colormap) rather

Re: hoe to build a patched socketmodule.c

2009-07-10 Thread jacopo mondi
Roger Binns wrote: jacopo mondi wrote: Hi all, I need to patch socketmodule.c (the _socket module) in order to add support to an experimental socket family. You may find it considerably easier to use ctypes since that will avoid the need for any patching. You'll also be able to control how

Re: property using a classmethod

2009-07-10 Thread Bruno Desthuilliers
Lie Ryan a écrit : Bruno Desthuilliers wrote: Lie Ryan a écrit : Emanuele D'Arrigo wrote: (snip) Ultimately all I want is a non-callable class-level attribute MyClass.myProperty that gives the result of MyClass.myClassMethod(). This works like what you seem to want (it's ugly): Ugly,

Re: Python-list Digest, Vol 70, Issue 142

2009-07-10 Thread jhinak sen
hey Xavier thnx a lot :) its working and ya.. i got your pont regarding typecasting . jhinak On Fri, Jul 10, 2009 at 3:30 PM, python-list-requ...@python.org wrote: Send Python-list mailing list submissions to python-list@python.org To subscribe or unsubscribe via the World Wide Web,

Re: tough-to-explain Python

2009-07-10 Thread Hendrik van Rooyen
Steven D'Aprano st...@remove-this-cye.com.au wrote: On Wed, 08 Jul 2009 22:05:57 -0700, Simon Forman wrote: persistent idea out there that programming is a very accessible skill, like cooking or gardening, anyone can do it, and even profit from it, monetarily or otherwise, etc., and to

Re: subprocess + python-daemon - bug/problem?

2009-07-10 Thread Ben Finney
Andy Clegg andy...@gmail.com writes: import daemon import subprocess daemon.DaemonContext(stderr = open(fakeConsole.txt,w+)).open() subprocess.Popen(['echo','1']).wait() However the error remains the same. The error appears in the file specified for the stderr output of the

Re: property using a classmethod

2009-07-10 Thread Bruno Desthuilliers
Bruno Desthuilliers a écrit : (snip) You could write your own custom descriptor. Or just use an additional level of indirection, ie: myProperty = property(lambda self: self.myClassMethod()) Sorry, looks like I didn't read carefully enough. The above code won't work if you intend to

Re: can i write a assemly language programs in python

2009-07-10 Thread Dave Angel
Terry Reedy wrote: div class=moz-text-flowed style=font-family: -moz-fixedDave Angel wrote: m.reddy prasad reddy wrote: can any one tell me how to write assembly language programs in python...if no is there any other way to write the programs in python Reddi prasad reddy ph.no:09958083797

Query regarding set([])?

2009-07-10 Thread vox
Hi, I'm contsructing a simple compare-script and thought I would use set ([]) to generate the difference output. But I'm obviosly doing something wrong. file1 contains 410 rows. file2 contains 386 rows. I want to know what rows are in file1 but not in file2. This is my script: s1 =

Re: Query regarding set([])?

2009-07-10 Thread Peter Otten
vox wrote: I'm contsructing a simple compare-script and thought I would use set ([]) to generate the difference output. But I'm obviosly doing something wrong. file1 contains 410 rows. file2 contains 386 rows. I want to know what rows are in file1 but not in file2. This is my script:

Re: psyco V2 beta2 benchmark

2009-07-10 Thread Paul Boddie
On 10 Jul, 04:54, Zac Burns zac...@gmail.com wrote: Where do you get this beta? I heard that Psyco V2 is coming out but can't find anything on their site to support this. I found the Subversion repository from the Psyco site: http://psyco.sourceforge.net/ -

Re: help me to find the error

2009-07-10 Thread Rhodri James
On Fri, 10 Jul 2009 10:41:03 +0100, jhinak sen jhinak@gmail.com wrote: hi, i am a beginner in python language, i am trying with this programme : to find the addition and mean from a data set in a file and writing the mean and sum in some other file : *#! /usr/bin/env python import

Re: need to write a assembly progrm

2009-07-10 Thread Rhodri James
On Thu, 09 Jul 2009 11:52:44 +0100, m.reddy prasad reddy reddy@gmail.com wrote: my aim is to run the assembly programs in python.by that we can use that in the any labs.because we can run the python in the mobiles also.if we write assembly programs in the mobile ,the mobile act as a

Re: language analysis to enforce code standards

2009-07-10 Thread Jean-Michel Pichavant
Steven D'Aprano wrote: On Fri, 10 Jul 2009 02:06:35 +, Jason S. Friedman wrote: Hello, I administer the Informatica ETL tool at my company. Part of that role involves creating and enforcing standards. I want the Informatica developers to add comments to certain key objects and I want

Re: Examples of Python driven Microsoft UI Automation wanted

2009-07-10 Thread Mark
Hi, I am the author of pywinauto (http://pywinauto.openqa.org/). It doesn't have specific functionality built in for winforms - but many winforms controls are built on top of win32 functionality and pywinauto can work with them for that. On Jul 9, 4:41 pm, Paul McGuire pt...@austin.rr.com

Re: can i write a assemly language programs in python

2009-07-10 Thread Tim Chase
m.reddy prasad reddy wrote: can any one tell me how to write assembly language programs in python...if no is there any other way to write the programs in python Bah, writing assembly language is easy in Python: print(MOV EAX, [EBX]) print(XOR EBX, EBX) Just adjust the strings for your

Re: language analysis to enforce code standards

2009-07-10 Thread Peter Otten
Jason S. Friedman wrote: Hello, I administer the Informatica ETL tool at my company. Part of that role involves creating and enforcing standards. I want the Informatica developers to add comments to certain key objects and I want to be able to verify (in an automated fashion) that they have

Re: Query regarding set([])?

2009-07-10 Thread vox
On Jul 10, 2:04 pm, Peter Otten __pete...@web.de wrote: You are probably misinterpreting len(s3). s3 contains lines occuring in file1 but not in file2. Duplicate lines are only counted once, and the order doesn't matter. So there are 119 lines that occur at least once in file2, but not in

Re: Query regarding set([])?

2009-07-10 Thread David Robinow
On Fri, Jul 10, 2009 at 8:52 AM, voxvox2...@gmail.com wrote: I am looking for a script that compares file1 and file2, for each line in file1, check if line is present in file2. If the line from file1 is not present in file2, print that line/write it to file3, because I have to know what lines

Re: hoe to build a patched socketmodule.c

2009-07-10 Thread jacopo mondi
Roger Binns wrote: jacopo mondi wrote: Hi all, I need to patch socketmodule.c (the _socket module) in order to add support to an experimental socket family. You may find it considerably easier to use ctypes since that will avoid the need for any patching. You'll also be able to control how

Re: tough-to-explain Python

2009-07-10 Thread Steven D'Aprano
On Fri, 10 Jul 2009 12:54:21 +0200, Hendrik van Rooyen wrote: Steven D'Aprano st...@remove-this-cye.com.au wrote: On Wed, 08 Jul 2009 22:05:57 -0700, Simon Forman wrote: persistent idea out there that programming is a very accessible skill, like cooking or gardening, anyone can do it,

Re: AP -- MeAmI.org Paces Google

2009-07-10 Thread David Bernier
Musatov wrote: Los Angeles (AP) --MeAmI.org now has users in 50 countries following its adopted use in Pakistan. The search engine has grown in popularity 10,000 fold following its Beta test launch three months ago in April, 2009. Supporters of the site claim it is better than rival Google upon

Re: The meaning of = (Was: tough-to-explain Python)

2009-07-10 Thread Aahz
[excessive quoting ahead, I'm too tired to trim] In article h32i2o$eo...@reader1.panix.com, kj no.em...@please.post wrote: In h32fon$26...@panix3.panix.com a...@pythoncraft.com (Aahz) writes: In article h32eoh$ql...@reader1.panix.com, kj no.em...@please.post wrote: OK, so, scratching from my

Re: help me to find the error

2009-07-10 Thread Dave Angel
jhinak sen wrote: hi, i am a beginner in python language, i am trying with this programme : to find the addition and mean from a data set in a file and writing the mean and sum in some other file : *#! /usr/bin/env python import re import cPickle as p import math from numpy import * f0=

Re: Colour of output text

2009-07-10 Thread Tim Harig
On 2009-07-10, garabik-news-2005...@kassiopeia.juls.savba.sk garabik-news-2005...@kassiopeia.juls.savba.sk wrote: Tim Harig user...@ilthio.net wrote: On 2009-07-09, Alex Rosslyn black.line...@gmail.com wrote: I would like to learn a way of changing the colour of a particular part of the

Tkinter only: table widget with canvas...

2009-07-10 Thread Thomas Lehmann
My intention is to keep dependencies low that means using python and tkinter as base package is quite easy because it's available on nearly every system. There is good documentation on Tkinter but going into the depth I'm missing many details. As an example... Using the Tkinter.Canvas class I

Implementing a cache

2009-07-10 Thread Nikolaus Rath
Hello, I want to implement a caching data structure in Python that allows me to: 1. Quickly look up objects using a key 2. Keep track of the order in which the objects are accessed (most recently and least recently accessed one, not a complete history) 3. Quickly retrieve and remove the

Re: Query regarding set([])?

2009-07-10 Thread Dave Angel
vox wrote: On Jul 10, 2:04 pm, Peter Otten __pete...@web.de wrote: You are probably misinterpreting len(s3). s3 contains lines occuring in file1 but not in file2. Duplicate lines are only counted once, and the order doesn't matter. So there are 119 lines that occur at least once in file2,

Re: Implementing a cache

2009-07-10 Thread Steven D'Aprano
On Fri, 10 Jul 2009 09:22:29 -0400, Nikolaus Rath wrote: Hello, I want to implement a caching data structure in Python that allows me to: 1. Quickly look up objects using a key 2. Keep track of the order in which the objects are accessed (most recently and least recently accessed

Re: Where does setuptools live?

2009-07-10 Thread Chris Withers
Inky 788 wrote: Currently, distutils itself is being actively developed. More info about this here: http://tarekziade.wordpress.com/ My (albeit anonymous) advice is: use distutils. Manually download packages as-needed from PyPI and install manually using standard distutils. No thanks. I'm a

Re: Query regarding set([])?

2009-07-10 Thread vox
On Jul 10, 4:17 pm, Dave Angel da...@ieee.org wrote: vox wrote: On Jul 10, 2:04 pm, Peter Otten __pete...@web.de wrote: You are probably misinterpreting len(s3). s3 contains lines occuring in file1 but not in file2. Duplicate lines are only counted once, and the order doesn't matter.

Re: Clarity vs. code reuse/generality

2009-07-10 Thread Tim Rowe
2009/7/9 kj no.em...@please.post: Thanks for the encouragement. [snip] into code.  And by this I mean not only assumptions about the correctness of their code (the typical scope of assertions), but also, more broadly, assumptions about the data that they are dealing with (which often comes

Re: Query regarding set([])?

2009-07-10 Thread Peter Otten
vox wrote: On Jul 10, 4:17 pm, Dave Angel da...@ieee.org wrote: vox wrote: On Jul 10, 2:04 pm, Peter Otten __pete...@web.de wrote: You are probably misinterpreting len(s3). s3 contains lines occuring in file1 but not in file2. Duplicate lines are only counted once, and the order

Re: PyGtk Depends on Numeric

2009-07-10 Thread Aahz
In article 1ebe9314-9434-459a-bd3e-2b2386a35...@n11g2000yqb.googlegroups.com, dieter vel.ac...@gmail.com wrote: Get with the times people and port to numpy. :P Don't you think its about time? Are you trying to get something to happen or just posting a random drive-by? -- Aahz

Re: AP -- MeAmI.org Paces Google

2009-07-10 Thread Fran�ois Grondin
David Bernier david...@videotron.ca a écrit dans le message de news: h36ki102...@news5.newsguy.com... Musatov wrote: On Jul 9, 7:54 pm, David Bernier david...@videotron.ca wrote: Musatov wrote: Los Angeles (AP) --MeAmI.org now has users in 50 countries following its adopted use in Pakistan.

Re: language analysis to enforce code standards

2009-07-10 Thread Aahz
In article mailman.2948.1247229186.8015.python-l...@python.org, Jean-Michel Pichavant jeanmic...@sequans.com wrote: You could also verify there are at least N different characters used in the sentence: N = 5 # must contains at least 5 different characters record = [] for c in s: if c not

problem with keys combination!

2009-07-10 Thread Alex
Hi at all, I made a simple program that make a screenshot of Desktop and use it as fullscreen background and then a ball erase image making illusion that erase Desktop. The program working fine and I succesfully blocked all keys but I have a problem with hotkey combination Ctrl-Alt- Del...that

Threading.Condition problem

2009-07-10 Thread Gabriel Rossetti
Hello everyone, I wrote a small example that listens for xmpp msgs in a thread. The main program calls a function that blocks (using Condition.wait) until a msg has been received and then returns the msg. When a msg arrives, it is put in a variable in the thread's object, it then calls the

Re: Threading.Condition problem

2009-07-10 Thread Gabriel Rossetti
The previous msg w/ attached code is the wrong code, please use the code attached to this msg, thank you and sorry for this. Gabriel Gabriel Rossetti wrote: Hello everyone, I wrote a small example that listens for xmpp msgs in a thread. The main program calls a function that blocks (using

Threading.Condition problem

2009-07-10 Thread Gabriel Rossetti
Sorry if this appears twice, I sent it once with an attachment and it never arrived so maybe the attachment is posing problems. I inlined the code this time (at the bottom), thank you, Gabriel ## Original message Hello everyone, I wrote a

Re: tough-to-explain Python

2009-07-10 Thread Steven D'Aprano
On Fri, 10 Jul 2009 08:28:29 -0700, Scott David Daniels wrote: Steven D'Aprano wrote: Even *soup stock* fits the same profile as what Hendrik claims is almost unique to programming. On its own, soup stock is totally useless. But you make it, now, so you can you feed it into something else

Re: help me to find the error

2009-07-10 Thread Dave Angel
jhinak sen wrote: hey, thanx a lot :) i got ur points .. and it really helps.. and please also tell me ... where i can get more basic and detail knowledge of python.. as i am beginners in this , i need more examples of python programmes so that i can understand better. also if you know of any

Re: tough-to-explain Python

2009-07-10 Thread D'Arcy J.M. Cain
On 10 Jul 2009 15:48:47 GMT Steven D'Aprano st...@remove-this-cybersource.com.au wrote: I meant the instant coffee powder is prepared in advance. It's useless on it's own, but later on you feed it into boiling water, add sugar and milk, and it's slightly less useless. I don't know about

Automate rsync w/ authentication

2009-07-10 Thread Bryan
I am trying to automate rsync to backup server A from server B. I have set up a private/public key between the two servers so I don't have to enter a password when using rsync. Running rsync manually with the following command works fine: rsync -av --dry-run -e /usr/bin/ssh -i

Re: problem with keys combination!

2009-07-10 Thread Steven D'Aprano
On Fri, 10 Jul 2009 08:33:18 -0700, Alex wrote: Hi at all, I made a simple program that make a screenshot of Desktop and use it as fullscreen background and then a ball erase image making illusion that erase Desktop. The program working fine and I succesfully blocked all keys but I have a

Re: DBI module deprecated at Python 2.5--what to use in its place?

2009-07-10 Thread M.-A. Lemburg
dana wrote: I have a variety of Python 2.4 scripts that utilitize the DBI and ODBC modules together. Although I don't have Python 2.5, I've been informed the DBI module has been deprecated at 2.5. A few questions: 1) Although deprecated, will it work at all in 2.5? Does the fact that it is

Re: Remoting over SSH

2009-07-10 Thread M.-A. Lemburg
Lucas Carvalho wrote: Hussein B wrote: Hey, I want to perform commands on a remote server over SSH. What do I need? Thanks. Hi, If you want to use the SSH2 protocol into a python code, you should take a look at this module: paramiko [1]. [1] http://www.lag.net/paramiko/ If you're

Re: help me to find the error

2009-07-10 Thread Steven D'Aprano
On Fri, 10 Jul 2009 11:57:21 -0400, Dave Angel wrote: [...] Please don' t top-post. Putting your reply out of order makes it harder for others to see the sequences of things. Some people top-post everything, but on this mailing list (and maybe most), the standard is to add to bottom, or

Re: tough-to-explain Python

2009-07-10 Thread pdpi
On Jul 10, 2:11 pm, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Fri, 10 Jul 2009 12:54:21 +0200, Hendrik van Rooyen wrote: Steven D'Aprano st...@remove-this-cye.com.au wrote: On Wed, 08 Jul 2009 22:05:57 -0700, Simon Forman wrote: persistent idea out there that

Re: Clarity vs. code reuse/generality

2009-07-10 Thread Charles Yeomans
On Jul 9, 2009, at 10:57 PM, Steven D'Aprano wrote: On Fri, 10 Jul 2009 03:28:04 +0100, Nobody wrote: On Thu, 09 Jul 2009 04:57:15 -0300, Gabriel Genellina wrote: Nobody says you shouldn't check your data. Only that assert is not the right way to do that. assert is not the right way to

BayPIGgies at OSCON: 7/23 8-9:30pm

2009-07-10 Thread Aahz
NOTE: time change AND location change The July BayPIGgies meeting will be held at OSCON in the San Jose Convention Center as one of the BoF (Birds of a Feather) sessions from 8pm to 9:30pm Thursday July 23. Everyone is welcome: you do NOT need to be an OSCON member to attend a BoF. Wesley Chun

problem with subprocess

2009-07-10 Thread gabrielmonnerat
Hi all, I need start a openoffice in Xvfb, but when I call with the DISPLAY occurs this error: [r...@localhost oood]# Xvfb :99 -screen 0 1024x768x24 In [9]: subprocess.call('/opt/ooo-dev3/program/soffice.bin') Out[9]: 0 In [10]: subprocess.call('DISPLAY=:99

Re: Where does setuptools live?

2009-07-10 Thread Inky 788
On Jul 10, 10:26 am, Chris Withers ch...@simplistix.co.uk wrote: Inky 788 wrote: Currently, distutils itself is being actively developed. More info about this here:http://tarekziade.wordpress.com/ My (albeit anonymous) advice is: use distutils. Manually download packages as-needed from

Re: tkinter problem

2009-07-10 Thread Paul Simon
David Smith d...@cornell.edu wrote in message news:h35f78$pt...@ruby.cit.cornell.edu... Paul Simon wrote: Peter Otten __pete...@web.de wrote in message news:h3481q$d95$0...@news.t-online.com... Paul Simon wrote: Chris Rebert c...@rebertia.com wrote in message

Re: Clarity vs. code reuse/generality

2009-07-10 Thread J. Cliff Dyer
On Fri, 2009-07-10 at 02:57 +, Steven D'Aprano wrote: On Fri, 10 Jul 2009 03:28:04 +0100, Nobody wrote: On Thu, 09 Jul 2009 04:57:15 -0300, Gabriel Genellina wrote: Nobody says you shouldn't check your data. Only that assert is not the right way to do that. assert is not the

Re: problem with keys combination!

2009-07-10 Thread Alex
Hi Steven, As I understand it, you can't block, modify, or otherwise access Ctrl-Alt- Del while running under Windows: it is the Secure Attention Key, and is designed to be virtually impossible to interfere with. It's not *quite* impossible, but it is the deepest, darkest black magic.

Re: problem with subprocess

2009-07-10 Thread gabrielmonnerat
gabrielmonnerat wrote: Hi all, I need start a openoffice in Xvfb, but when I call with the DISPLAY occurs this error: [r...@localhost oood]# Xvfb :99 -screen 0 1024x768x24 In [9]: subprocess.call('/opt/ooo-dev3/program/soffice.bin') Out[9]: 0 In [10]: subprocess.call('DISPLAY=:99

Re: Clarity vs. code reuse/generality

2009-07-10 Thread Robert Kern
On 2009-07-10 11:50, J. Cliff Dyer wrote: On Fri, 2009-07-10 at 02:57 +, Steven D'Aprano wrote: On Fri, 10 Jul 2009 03:28:04 +0100, Nobody wrote: On Thu, 09 Jul 2009 04:57:15 -0300, Gabriel Genellina wrote: Nobody says you shouldn't check your data. Only that assert is not the right way

Re: Where does setuptools live?

2009-07-10 Thread Inky 788
On Jul 10, 10:26 am, Chris Withers ch...@simplistix.co.uk wrote: Inky 788 wrote: Currently, distutils itself is being actively developed. More info about this here:http://tarekziade.wordpress.com/ My (albeit anonymous) advice is: use distutils. Manually download packages as-needed from

Nested Classes and Instances

2009-07-10 Thread Manuel Graune
Hello, as an example of what I would like to achieve, think of a street where each house has a door and a sign with a unique (per house) number on it. I tried to model this like this: class House(object): class Door(object): def __init__(self,color): self.color=color

Re: problem with subprocess

2009-07-10 Thread Christian Heimes
gabrielmonnerat wrote: I am using subprocess because I need store the pid. Any suggestions? Sorry, I was forgot the parameter shell=True. i.e In [20]: subprocess.call('DISPLAY=:99 /opt/ooo-dev3/program/soffice.bin',shell=True) You should avoid using the shell=True parameter. It may result in

Re: can i write a assemly language programs in python

2009-07-10 Thread member thudfoo
On Fri, Jul 10, 2009 at 5:37 AM, Tim Chasepython.l...@tim.thechases.com wrote: m.reddy prasad reddy wrote: can any one tell me how to write assembly language programs in python...if no is there any other way to write the programs in python Bah, writing assembly language is easy in Python:  

Re: gett error message: TypeError: 'int' object is not callable

2009-07-10 Thread Nick
On Jul 9, 8:22 pm, Paul Rubin http://phr...@nospam.invalid wrote: Nick nleio...@gmail.com writes: text = file.readlines() len = len(text) fields = text[1].split() Is that intended to split the first line of the file? Remember that arrays in python begin at index 0. no the '1st line' is

Re: Nested Classes and Instances

2009-07-10 Thread Peter Otten
Manuel Graune wrote: as an example of what I would like to achieve, think of a street where each house has a door and a sign with a unique (per house) number on it. I tried to model this like this: class House(object): class Door(object): def __init__(self,color):

Re: tough-to-explain Python

2009-07-10 Thread Wesley Chun
On Jul 7, 1:04 pm, kj no.em...@please.post wrote: I'm having a hard time coming up with a reasonable way to explain certain things to programming novices. : How do I explain to rank beginners (no programming experience at all) why x and y remain unchanged above, but not z? : What do

Re: Running a script to build docs from setup.py

2009-07-10 Thread Tony Houghton
On Fri, 10 Jul 2009 11:06:34 +1000 Ben Finney ben+pyt...@benfinney.id.au wrote: Tony Houghton h...@realh.co.uk writes: I've looked through the manual but I can't find any hooks in distutils for generating files at install time other than extension modules and .pyc files. Should I just

python make dies :libtk8.5.so: cannot open shared object file: No such file or directory

2009-07-10 Thread Lay, Tony
Trying to build python-2.6.2 ./configure --prefix=/usr/local --exec-prefix=/usr/local LDFLAGS=-L/usr/local (runs through happily, had to make some libs local) make runs most of the way until. building '_tkinter' extension gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -fwrapv

Re: language analysis to enforce code standards

2009-07-10 Thread Tim Rowe
2009/7/10 Peter Otten __pete...@web.de: Don't be a fool. Have someone other than the author read the comment. That's the winning answer as far as I'm concerned. Automated tools are good for picking up some types of accidental mistakes, but for checking that comments are meaningful (and variable

Re: Automate rsync w/ authentication

2009-07-10 Thread Chris Rebert
On Fri, Jul 10, 2009 at 9:13 AM, Bryanbryanv...@gmail.com wrote: I am trying to automate rsync to backup server A from server B.  I have set up a private/public key between the two servers so I don't have to enter a password when using rsync.  Running rsync manually with the following command

Re: tough-to-explain Python

2009-07-10 Thread Scott David Daniels
Steven D'Aprano wrote: On Fri, 10 Jul 2009 08:28:29 -0700, Scott David Daniels wrote: Steven D'Aprano wrote: Even *soup stock* fits the same profile as what Hendrik claims is almost unique to programming. On its own, soup stock is totally useless. But you make it, now, so you can you feed it

Re: Clarity vs. code reuse/generality

2009-07-10 Thread J. Cliff Dyer
On Fri, 2009-07-10 at 11:57 -0500, Robert Kern wrote: On 2009-07-10 11:50, J. Cliff Dyer wrote: On Fri, 2009-07-10 at 02:57 +, Steven D'Aprano wrote: On Fri, 10 Jul 2009 03:28:04 +0100, Nobody wrote: On Thu, 09 Jul 2009 04:57:15 -0300, Gabriel Genellina wrote: Nobody says you

Re: gett error message: TypeError: 'int' object is not callable

2009-07-10 Thread J. Cliff Dyer
On Thu, 2009-07-09 at 13:53 +, Friðrik Már Jónsson wrote: Look at: len = len(text) You're overriding `len` (a built-in method), with an integer (`len(text)`). You then call: for i in range(len(fields)): But `len` is no longer a callable, but merely an integer.

ANN: Leo 4.6 rc1 released

2009-07-10 Thread Edward K Ream
Leo 4.6 rc1 is now available at: http://sourceforge.net/project/showfiles.php?group_id=3458package_id=29106 Leo is a text editor, data organizer, project manager and much more. See: http://webpages.charter.net/edreamleo/intro.html The highlights of Leo 4.6: -- - Cached

Re: Clarity vs. code reuse/generality

2009-07-10 Thread Robert Kern
On 2009-07-10 13:56, J. Cliff Dyer wrote: On Fri, 2009-07-10 at 11:57 -0500, Robert Kern wrote: On 2009-07-10 11:50, J. Cliff Dyer wrote: On Fri, 2009-07-10 at 02:57 +, Steven D'Aprano wrote: On Fri, 10 Jul 2009 03:28:04 +0100, Nobody wrote: On Thu, 09 Jul 2009 04:57:15 -0300, Gabriel

Re: Colour of output text

2009-07-10 Thread Chris Rebert
On Fri, Jul 10, 2009 at 2:23 AM, garabik-news-2005...@kassiopeia.juls.savba.sk wrote: Tim Harig user...@ilthio.net wrote: On 2009-07-09, Alex Rosslyn black.line...@gmail.com wrote: I would like to learn a way of changing the colour of a particular part of the output text. I've tried the

Why not enforce four space indentations in version 3.x?

2009-07-10 Thread walterbyrd
I believe Guido himself has said that all indentions should be four spaces - no tabs. Since backward compatibility is being thrown away anyway, why not enforce the four space rule? At least that way, when I get python code from somebody else, I would know what I am looking at, without having to

Re: AP -- MeAmI.org Paces Google

2009-07-10 Thread Musatov
François Grondin wrote: David Bernier david...@videotron.ca a �crit dans le message de news: h36ki102...@news5.newsguy.com... Musatov wrote: On Jul 9, 7:54 pm, David Bernier david...@videotron.ca wrote: Musatov wrote: Los Angeles (AP) --MeAmI.org now has users in 50 countries following

  1   2   >