suid/sudo in python

2009-03-29 Thread rustom
Im trying to write a program that has su permissions for some file system tasks and is non-su elsewhere. This is typically done in C with suid root owned code. What is the python paradigm for this kind of thing? (if at all) -- http://mail.python.org/mailman/listinfo/python-list

Re: global name 'self' is not defined - noob trying to learn

2009-03-29 Thread Chris Rebert
2009/3/29 Scott David Daniels : > mark.sea...@gmail.com wrote: >> >> On Mar 29, 9:52 pm, Chris Rebert wrote: >>> >>> On Sun, Mar 29, 2009 at 9:18 PM,   wrote: ... >>> >>> ... Also, you shouldn't use `class_ ` as the name of the first argument >>> to >>> __new__(). Use `cls` instead since

Re: global name 'self' is not defined - noob trying to learn

2009-03-29 Thread Scott David Daniels
mark.sea...@gmail.com wrote: On Mar 29, 9:52 pm, Chris Rebert wrote: On Sun, Mar 29, 2009 at 9:18 PM, wrote: ... ... Also, you shouldn't use `class_ ` as the name of the first argument to __new__(). Use `cls` instead since that's the conventional name for it. Actually, according to PEP 8,

Re: PID lockfile

2009-03-29 Thread JanC
Aahz wrote: >>Okay. But is that something that needs to be accommodated with, >>specifically, PID file handling? Why would a PID file ever need to be >>on NFS storage instead of local? > > That's the question. You'll probably get some complaints from people > running diskless machines, eventually

Re-raising exceptions with a different type and message, preserving existing information

2009-03-29 Thread Ben Finney
Howdy all, I'm writing a module and want to have a unified exception hierarchy for the exceptions that it can raise. This allows users of the module to catch those particular exceptions and handle them distinctly, if needed. But many of the exceptions raised from the module are raised because of s

Re: global name 'self' is not defined - noob trying to learn

2009-03-29 Thread mark . seagoe
On Mar 29, 9:52 pm, Chris Rebert wrote: > On Sun, Mar 29, 2009 at 9:18 PM,   wrote: > > Hi.  So now I have this class that works to allow me to pass in my > > reg_info struct.  However when I try to make it part of my class it > > gets an error "global name 'self' is not defined.  I've never seen

Re: Problems with background processes on Windows

2009-03-29 Thread Gabriel Genellina
Gabriel Genellina yahoo.com.ar> writes: > En Sat, 28 Mar 2009 06:03:33 -0300, geoffbache jeppesen.com> > escribió: > > > > Well yes, but the point is surely that the standard output of the > > background sleeping process is pointed to a different location? (you > > can replace the null device

Re: global name 'self' is not defined - noob trying to learn

2009-03-29 Thread Chris Rebert
On Sun, Mar 29, 2009 at 9:18 PM, wrote: > Hi.  So now I have this class that works to allow me to pass in my > reg_info struct.  However when I try to make it part of my class it > gets an error "global name 'self' is not defined.  I've never seen > this error before.  If I comment out the line b

Speech activated scripting/macroing for Windows

2009-03-29 Thread John Doe
For a time, a Dr. Rick Mohr worked on a Vocola project that allowed continuous command recognition through Dragon NaturallySpeaking in Windows. Currently Vocola is available for Windows Vista and higher, but no longer available for use through DNS. More recently, Christo Butcher has begun a P

global name 'self' is not defined - noob trying to learn

2009-03-29 Thread mark . seagoe
Hi. So now I have this class that works to allow me to pass in my reg_info struct. However when I try to make it part of my class it gets an error "global name 'self' is not defined. I've never seen this error before. If I comment out the line below 'self.reg_info = reg_info" then the code runs

Re: i have to change default tab length in pydev

2009-03-29 Thread Coonay
On Mar 30, 6:13 am, "Rhodri James" wrote: > On Sat, 28 Mar 2009 11:30:36 -, Coonay wrote: > > during last few days, i code python using notepad++ or pydev, the > > compiler always complain there is a problem with Indentation,in my > > eyes ,there is no Indentation problem at all,because i for

Re: email from windows

2009-03-29 Thread prakash jp
nope not successful. DO let me know the usage of: #From : prakash.st...@gmail.com #To: prakash.st...@gmail.com import sys, smtplib import string fromaddr = raw_input("From: ") toaddrs = string.splitfields(raw_input("To: "), ',') print "Enter message, end with ^D:" msg = '' count = 3 while count >

Re: Python print and types selection

2009-03-29 Thread Scott David Daniels
mark.sea...@gmail.com wrote: ... I'm not sure what the "something * 3" does? Here is the printout: dog = HugeNumber(369) = 0171 But I was able to put the concept into practice. It was simply meant to be an absurd example. If you could apply it, you've got the idea. --Scott David

Re: Python print and types selection

2009-03-29 Thread mark . seagoe
On Mar 28, 1:47 pm, Scott David Daniels wrote: > mark.sea...@gmail.com wrote: > > ... > > It appears that if I make the class a subclass of long... > > class bignumber(long): > >     def __init__(self, initval): > >         self.val = initval > > > Then if I make a new class of subclass of bignumb

Fwd: Re: 2.5/2.4 multiprocessing backport doc typo

2009-03-29 Thread messlinger
Please get me off this merry-go-round from hell i plead the blood of JESUS you guys need help your clogging my computor and all i wanted to do was know about a movie give me a break take my e-mail off all your links please i feel as tho a pytho has ahold of me and i will kill it! christ blo

Fwd: Re: 2.5/2.4 multiprocessing backport doc typo

2009-03-29 Thread messlinger
Please get me off this merry-go-round from hell i plead the blood of JESUS you guys need help your clogging my computor and all i wanted to do was know about a movie give me a break take my e-mail off all your links please i feel as tho a pytho has ahold of me and i will kill it! christ blo

Fwd: Re: 2.5/2.4 multiprocessing backport doc typo

2009-03-29 Thread messlinger
Please get me off this merry-go-round from hell i plead the blood of JESUS you guys need help your clogging my computor and all i wanted to do was know about a movie give me a break take my e-mail off all your links please i feel as tho a pytho has ahold of me and i will kill it! christ blo

Fwd: Re: 2.5/2.4 multiprocessing backport doc typo

2009-03-29 Thread messlinger
Please get me off this merry-go-round from hell i plead the blood of JESUS you guys need help your clogging my computor and all i wanted to do was know about a movie give me a break take my e-mail off all your links please i feel as tho a pytho has ahold of me and i will kill it! christ blo

Fwd: Re: 2.5/2.4 multiprocessing backport doc typo

2009-03-29 Thread messlinger
Please get me off this merry-go-round from hell i plead the blood of JESUS you guys need help your clogging my computor and all i wanted to do was know about a movie give me a break take my e-mail off all your links please i feel as tho a pytho has ahold of me and i will kill it! christ blo

Re: email from windows

2009-03-29 Thread David Lyon
Hi Prakash, You need to tell the system your smtp host... ie > server = smtplib.SMTP('localhost') needs to read something like server = smtplib.SMTP('smtp.myisp.in') On Mon, 30 Mar 2009 08:58:49 +0530, prakash jp wrote: > preexistant code : > > import sys, smtplib > import string > froma

Re: email from windows

2009-03-29 Thread prakash jp
preexistant code : import sys, smtplib import string fromaddr = raw_input("From: ") toaddrs = string.splitfields(raw_input("To: "), ',') print "Enter message, end with ^D:" msg = '' count = 3 while count > 0: line = sys.stdin.readline() #if not line: #break msg = msg + line

Re: email from windows

2009-03-29 Thread Alan G Isaac
2009/3/29 prakash jp : In windows environment, how to send email from one gmail address to another gmail (or another mail) addrress On 3/29/2009 10:20 PM Chris Rebert apparently wrote: Use the `smtplib` and `email` standard libraries (which, as a bonus, are cross-platform): http://docs.python

Re: tkinter questions: behavior of StringVar, etc

2009-03-29 Thread Alan G Isaac
On Mon, 30 Mar 2009 00:13:46 +0100, Alan G Isaac wrote: Since you did not address my question about the nuance of "magic", I'm inclined to treat you as a "no" vote. On 3/29/2009 7:19 PM Rhodri James apparently wrote: And you'd be wrong. So seriously, you'd read e.g. John's usage of the te

RE: Cannot register to submit a bug report

2009-03-29 Thread John Posner
>> >> We can try to debug this :) >> >> > E-mail message checked by Spyware Doctor (6.0.0.386) >> > Database version: >> 5.12060http://www.pctools.com/en/spyware-doctor-antivirus/ >> >> Any chance it's Spyware Doctor or some anti-virus flagging >> the message >> and hiding it? >>

Re: Installing PLPython - Version Problem

2009-03-29 Thread Scott David Daniels
andrew cooke wrote: > ray wrote: >> I am trying to get Python 2.6 and PostgreSQL 8.3 to work together >> under Windows 2000. i haven't got much of a clue about python's binary api, but what you are doing sounds absolutely crazy to me. Andrew is right; unless you want to do exploratory work, inst

Re: email from windows

2009-03-29 Thread Chris Rebert
2009/3/29 prakash jp : > Hi all, > > In windows environment, how to send email from one gmail address to another > gmail (or another mail) addrress Use the `smtplib` and `email` standard libraries (which, as a bonus, are cross-platform): http://docs.python.org/library/smtplib.html http://docs.pyth

email from windows

2009-03-29 Thread prakash jp
Hi all, In windows environment, how to send email from one gmail address to another gmail (or another mail) addrress Regards Prakash -- http://mail.python.org/mailman/listinfo/python-list

Re: 2.5/2.4 multiprocessing backport doc typo

2009-03-29 Thread Scott David Daniels
Aahz wrote: In article , Daniel Fetchinson wrote: === Changes === 2.6.1.1 -- 2009-12-07 I guess it should be 2008-12-07 :) That's just the time machine in operation. I thought I smelled ozone. -- http://mail.python.org/mailman/listinfo/python-list

Re: Installing PLPython - Version Problem

2009-03-29 Thread andrew cooke
i haven't got much of a clue about python's binary api, but what you are doing sounds absolutely crazy to me. i guess you are using a binary prebuilt to use a certain python version (ie 2.5). your simplest solution is to install that python version (it is possible to have more than one version o

Re: tkinter questions: behavior of StringVar, etc

2009-03-29 Thread Rhodri James
On Mon, 30 Mar 2009 00:45:41 +0100, Alan G Isaac wrote: On 3/29/2009 6:49 PM Scott David Daniels apparently wrote: What happens to your TV when you change the channel before turning it on? I think we can agree this is a safe action, but the result depends on the kind of TV (and on what "tu

Installing PLPython - Version Problem

2009-03-29 Thread ray
I am trying to get Python 2.6 and PostgreSQL 8.3 to work together under Windows 2000. When I try to add Python to PostgreSQL via: createlang plpythonu dbname But when doing so, I get an error: createlang: language installation failed: ERROR: could not load library "C:/Program Files/PostgreSQL/8.

Re: python -TFTP over LAN

2009-03-29 Thread MRAB
prakash jp wrote: Hi all, I am interested in using python based TFTP over my LAN. Do let me know how to ahead and any specific urls. Thaks in advance. http://sourceforge.net/projects/tftpy/ -- http://mail.python.org/mailman/listinfo/python-list

python -TFTP over LAN

2009-03-29 Thread prakash jp
Hi all, I am interested in using python based TFTP over my LAN. Do let me know how to ahead and any specific urls. Thaks in advance. Regards Prakash -- http://mail.python.org/mailman/listinfo/python-list

Re: 2.5/2.4 multiprocessing backport doc typo

2009-03-29 Thread Aahz
In article , Daniel Fetchinson wrote: > >=== >Changes >=== > >2.6.1.1 -- 2009-12-07 > >I guess it should be 2008-12-07 :) That's just the time machine in operation. -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "Debugging is twice as hard as w

Re: Understanding JSON

2009-03-29 Thread WallyDD
On Mar 29, 4:58 pm, Chris Rebert wrote: > On Sun, Mar 29, 2009 at 1:39 PM, WallyDD wrote: > > Hello, > > > I am trying to geocode some map data using the google maps API. > > > By using the urllib I can get the JSON output; > >http://maps.google.com/maps/geo?q=New+York+USA&output=json&oe=utf8&se.

Re: tkinter questions: behavior of StringVar, etc

2009-03-29 Thread Alan G Isaac
On 3/29/2009 6:49 PM Scott David Daniels apparently wrote: Right. Tkinter could have been built to make a root at the first instantiation of a StringVar or IntVar, but it wasn't. Answering your why is a bit like answering the "Why did Picasso choose primarily blue in his Blue Period, rather

Re: Bullshit Generator

2009-03-29 Thread livibetter
This is fun. I tried to add speech synthesis on Linux, hope you don't mind. If you have speech-dispatcher [1] worked normally, you can replace the main program with # -- # main program # -- try: im

Re: tkinter questions: behavior of StringVar, etc

2009-03-29 Thread Rhodri James
On Mon, 30 Mar 2009 00:13:46 +0100, Alan G Isaac wrote: Since you did not address my question about the nuance of "magic", I'm inclined to treat you as a "no" vote. And you'd be wrong. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-li

Re: dict view to list

2009-03-29 Thread Rhodri James
On Sun, 29 Mar 2009 08:39:10 +0100, Aaron Brady wrote: I guess there are two arguments for the change. 1. Flat is better than nested. I don't think that's really what this is refering to. 2. It interferes with the way people read text. Insert "some" before "people" and I'd have to ag

Re: tkinter questions: behavior of StringVar, etc

2009-03-29 Thread Alan G Isaac
On 3/29/2009 6:50 PM Rhodri James apparently wrote: In this case, your choice of wording (the nearest thing we have in print to "tone of voice") did not inspire me to go digging around in source that you have just as easy access to, in order to answer questions that I'm not particularly intereste

Re: Cannot register to submit a bug report

2009-03-29 Thread ajaksu
John Posner wrote: > I've tried twice to register myself at bugs.python.org. But the confirmation > email message never arrives. (Yes, I checked my spam folder.) What do I do > now? We can try to debug this :) > E-mail message checked by Spyware Doctor (6.0.0.386) > Database version: 5.12060http:

Re: if there is a return type of a method definition like java does

2009-03-29 Thread Rhodri James
On Sat, 28 Mar 2009 03:11:20 -, Coonay wrote: if there is a return type of a method definition,that would lead to faster decision to do with the method called,do you think so? A method definition always returns a function object. There. Less facetiously, I don't see how knowing the retu

Re: Cannot register to submit a bug report

2009-03-29 Thread Terry Reedy
John Posner wrote: I've tried twice to register myself at bugs.python.org. But the confirmation email message never arrives. (Yes, I checked my spam folder.) What do I do now? I will not suggest that you register at the roundup tracker to report this ;-, especially since it may be a local prob

Re: Python AppStore / Marketplace

2009-03-29 Thread Daniel Fetchinson
>> How will your solution be different from distutils, setuptools, pip, >> zc.buildout and a couple other similar packages I don't recall now? > > For a start.. it doesn't replace those.. it drives them... > >> Have you considered joining one of these efforts in order to not >> fragment the "packag

Re: tkinter questions: behavior of StringVar, etc

2009-03-29 Thread Rhodri James
On Sun, 29 Mar 2009 22:37:24 +0100, Alan G Isaac wrote: On 3/29/2009 2:46 PM Scott David Daniels apparently wrote: You ask, "What exactly is the role of ...", rather than saying something like, "I don't understand the role of ...", and continue to ask why the code is not architected the w

Re: tkinter questions: behavior of StringVar, etc

2009-03-29 Thread Scott David Daniels
Alan G Isaac wrote: Alan asked: - Why does a Variable need a master? - If s is a StringVar instance, why is str(s) its name rather than its value? On 3/29/2009 2:46 PM Scott David Daniels apparently wrote: The answer to that, grasshopper, lies in the answer to the question, "What are String

Re: Bullshit Generator

2009-03-29 Thread james
just make sure it stays out of the hands of IT managers. Quoting Dotan Cohen : Hello, For those of you that - want to surf on the edge of Web technology without understanding it, - desire to be considered as a software guru, - are forced to write technical documents that nobody will read. - wa

2.5/2.4 multiprocessing backport doc typo

2009-03-29 Thread Daniel Fetchinson
Whoever wrote the multiprocessing backport for 2.4/2.5, a big thank you! Just one note: on the page http://pypi.python.org/pypi/multiprocessing/ there is a news item from the future: === Changes === 2.6.1.1 -- 2009-12-07 I guess it should be 2008-12-07 :) Cheers, Daniel -- Ps

Re: PyGTK and skins?

2009-03-29 Thread Emanuele D'Arrigo
On Mar 29, 12:28 am, Cousin Stanley wrote: >     You might try the pygtk mailing list available >     via the  news.gmane.org  server Than you Stanley, much appreciated! Manu -- http://mail.python.org/mailman/listinfo/python-list

Re: i have to change default tab length in pydev

2009-03-29 Thread Rhodri James
On Sat, 28 Mar 2009 11:30:36 -, Coonay wrote: during last few days, i code python using notepad++ or pydev, the compiler always complain there is a problem with Indentation,in my eyes ,there is no Indentation problem at all,because i format the code to make it comply with python style guide

Re: How to access object created in Main?

2009-03-29 Thread Rhodri James
On Sun, 29 Mar 2009 19:12:23 +0100, Muddy Coder wrote: Hi Folks, I need to update the text field of a Label created in Main, but can't find a way to do it. Please take a look at my code: from Tkinter import * def makemenu(r) amenu = Menu(r) amenu.add_command(., command=update_lab

Re: Python AppStore / Marketplace

2009-03-29 Thread David Lyon
On Fri, 27 Mar 2009 08:16:01 -0700, Daniel Fetchinson wrote: > > How will your solution be different from distutils, setuptools, pip, > zc.buildout and a couple other similar packages I don't recall now? For a start.. it doesn't replace those.. it drives them... > Have you considered joining o

Re: tkinter questions: behavior of StringVar, etc

2009-03-29 Thread Alan G Isaac
On 3/29/2009 2:46 PM Scott David Daniels apparently wrote: You ask, "What exactly is the role of ...", rather than saying something like, "I don't understand the role of ...", and continue to ask why the code is not architected the way you first expected it to be architected, calling those thi

Re: tkinter questions: behavior of StringVar, etc

2009-03-29 Thread Alan G Isaac
Alan asked: - Why does a Variable need a master? - If s is a StringVar instance, why is str(s) its name rather than its value? On 3/29/2009 2:46 PM Scott David Daniels apparently wrote: The answer to that, grasshopper, lies in the answer to the question, "What are StringVars designed to do?

RE: tkinter questions: behavior of StringVar, etc

2009-03-29 Thread John Posner
Scott David Daniels said: >> You ask, "What exactly is the role of ...", rather than saying >> something like, "I don't understand the role of ...", and continue >> to ask why the code is not architected the way you first expected >> it to be architected, calling those things you do not unders

Re: Can't get a simple TCP program to work

2009-03-29 Thread Irmen de Jong
Zach wrote: The following *extremely* simple script complains that "Socket is not connected" when I try to call recv. Could anyone provide some quick guidance? http://pastebin.com/m64317b32 replace node2.recv() by new_socket.recv() - you need to get data from the client socket that you got fro

Re: New Python Runtime

2009-03-29 Thread Tim Roberts
Adonis wrote: >Came across this article on Ars on a new LLVM (Low Level Virtual >Machine) JIT compiler for Python being built by Google: > >http://arstechnica.com/open-source/news/2009/03/google-launches-project-to-boost-python-performance-by-5x.ars > >Now the question is will this make Vista ru

Re: Introducing Python to others

2009-03-29 Thread BackSeat
On Mar 26, 10:35 am, "Paddy O'Loughlin" wrote: > If I were to do a (very) short demonstration one web framework for the > PHP devs, what should I use? No question: use web2py. See the website and the videos that demonstrate it. You could build a reasonably substantial application in 2-3 minutes

Re: Bullshit Generator

2009-03-29 Thread Dotan Cohen
> Hello, > > For those of you that > - want to surf on the edge of Web technology without understanding it, > - desire to be considered as a software guru, > - are forced to write technical documents that nobody will read. > - want to laugh a bit, > > I have written a "Bullshit Generator" script in

Re: Understanding JSON

2009-03-29 Thread Chris Rebert
On Sun, Mar 29, 2009 at 1:39 PM, WallyDD wrote: > Hello, > > I am trying to geocode some map data using the google maps API. > > By using the urllib I can get the JSON output; > http://maps.google.com/maps/geo?q=New+York+USA&output=json&oe=utf8&sensor=true&key=your_api_key > > I then read it using

Understanding JSON

2009-03-29 Thread WallyDD
Hello, I am trying to geocode some map data using the google maps API. By using the urllib I can get the JSON output; http://maps.google.com/maps/geo?q=New+York+USA&output=json&oe=utf8&sensor=true&key=your_api_key I then read it using; gmapiresult = json.loads(fg.read()) somedata = gmapiresult['

Re: PyFits for Windows?

2009-03-29 Thread andrew cooke
W. eWatson wrote: [...] > Along these lines, there was an astronomy python site at the U of > Washington > not many months ago. The link is broken. Any idea where it went? I sent > the > astro dept a msg about it a few hours ago. NASA has one too, but it's not > loading today. The govt. sites seem

if there is a return type of a method definition like java does

2009-03-29 Thread Coonay
if there is a return type of a method definition,that would lead to faster decision to do with the method called,do you think so? -- http://mail.python.org/mailman/listinfo/python-list

i have to change default tab length in pydev

2009-03-29 Thread Coonay
during last few days, i code python using notepad++ or pydev, the compiler always complain there is a problem with Indentation,in my eyes ,there is no Indentation problem at all,because i format the code to make it comply with python style guide strictly,but after i change the default tab length ,i

Wing IDE Backup configuration settings?

2009-03-29 Thread John Doe
Anyone know how to back up the configuration settings like font sizes and colors in the Wing IDE? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Cannot register to submit a bug report

2009-03-29 Thread John Posner
I've tried twice to register myself at bugs.python.org. But the confirmation email message never arrives. (Yes, I checked my spam folder.) What do I do now? E-mail message checked by Spyware Doctor (6.0.0.386) Database version: 5.12060 http://www.pctools.com/en/spyware-doctor-antivirus/ -- ht

Re: meta question - how to read comp.lang.python w/o usenet feed/google interface?

2009-03-29 Thread skip
aahz> In article <03081704-17b5-4c7d-82db-8efb7ebce...@q11g2000yqh.googlegroups.com>, aahz> Esmail wrote: >> >> I've been reading/posting to usenet since the 80s with a variety of >> tools (vn, and most recently Thunderbird) but since my ISP >> (TimeWarner) no longer pro

Re: Bullshit Generator

2009-03-29 Thread Irmen de Jong
Pierre Denis wrote: I have written a "Bullshit Generator" script in Python (see below). It generates English sentences at random, talking about leading-edge Web-based technologies. For example it can produce simple sentences like "The interface subscriber manages the web-based online ontology."

Re: Bullshit Generator

2009-03-29 Thread Martin P. Hellwig
Tim Chase wrote: Is it an upgrade from from urllib import urlopen bs = urlopen("http://xahlee.org";).read() Yes it is. Although both produce random quantities of text, only the name can be interpreted offensive, not the content. -- mph -- http://mail.python.org/mailman/listinfo/python-l

Re: Safe to call Py_Initialize() frequently?

2009-03-29 Thread Graham Dumpleton
On Mar 30, 4:35 am, a...@pythoncraft.com (Aahz) wrote: > [p&e] > > In article > , > Graham Dumpleton   wrote: > > > > > > >In mod_wsgi however, Apache will completely unload the mod_wsgi module > >on a restart. This would also mean that the Python library is also > >unloaded from memory. When it r

CGIXMLRPCRequestHandler example

2009-03-29 Thread Phoe6
I have the following CGIXMLRPCRequestHandler usage example. I have both the server and the client in the same directory. I based this following this example: http://mail.python.org/pipermail/python-list/2005-May/320696.html Server Code: Foo.py import os import SimpleXMLRPCServer class Foo:

speak or Speak ?, was Re: Bullshit Generator

2009-03-29 Thread Stef Mientki
quit nice ! But I had to replace "speak" by "Speak" voice.Speak ( generatedSentence ) not a big issue, but as I want to deploy programs with Sapi, I'm interested if there are different speak engines around. thanks Stef Mientki -- http://mail.python.org/mailman/listinfo/python-list

Re: Bullshit Generator

2009-03-29 Thread Tim Chase
For those of you that - want to surf on the edge of Web technology without understanding it, - desire to be considered as a software guru, - are forced to write technical documents that nobody will read. - want to laugh a bit, I have written a "Bullshit Generator" script in Python (see below). It

Re: numpy array sorting weirdness

2009-03-29 Thread Daniel Fetchinson
>> Is there any reason the 'axis' keyword argument doesn't default to the >> value that corresponds to python list behaviour? That would make lot >> of sense I think. Or retaining compatibility with python lists is not >> really a goal of numpy.array? > > Not at all. It's an entirely different data

Re: Bullshit Generator

2009-03-29 Thread Daniel Fetchinson
> Hello, > > For those of you that > - want to surf on the edge of Web technology without understanding it, > - desire to be considered as a software guru, > - are forced to write technical documents that nobody will read. > - want to laugh a bit, > > I have written a "Bullshit Generator" script in

Re: tkinter questions: behavior of StringVar, etc

2009-03-29 Thread Scott David Daniels
Alan G Isaac wrote: On 3/29/2009 3:43 AM Scott David Daniels apparently wrote: OK, that was plain rude. a couple of questions is not six questions. A reply telling you how to get to some of what you are looking for is assistance. If you want exact answers to an array of questions, pay someone

Re: Ordered Sets

2009-03-29 Thread CTO
On Mar 28, 3:33 am, "Gabriel Genellina" wrote: > En Thu, 26 Mar 2009 12:20:17 -0300, Scott David Daniels   > escribió: > > > (2) Why, oh why, do people feel so comforted adding double_underscores > >      to data structures? Probably because other authors feel too comfortable using single unders

How to access object created in Main?

2009-03-29 Thread Muddy Coder
Hi Folks, I need to update the text field of a Label created in Main, but can't find a way to do it. Please take a look at my code: from Tkinter import * def makemenu(r) amenu = Menu(r) amenu.add_command(., command=update_label) def update_label(): how to access mesg created in __

Re: Read Garmin XML (TCX) files in Python...

2009-03-29 Thread Diez B. Roggisch
cmalmqui schrieb: Dear All, Garmin uses XML as an exchange format for their Forerunner GPS series (http://developer.garmin.com/schemas/tcx/v2/) and I have been thinking about creating a python script that parses the Garmin XML file and dumps the training information to a KML file as well as vario

Bullshit Generator

2009-03-29 Thread Pierre Denis
Hello, For those of you that - want to surf on the edge of Web technology without understanding it, - desire to be considered as a software guru, - are forced to write technical documents that nobody will read. - want to laugh a bit, I have written a "Bullshit Generator" script in Python (see bel

Re: PyFits for Windows?

2009-03-29 Thread drobi...@gmail.com
On Mar 29, 9:39 am, "W. eWatson" wrote: > John Yeung wrote: > > On Mar 28, 4:03 pm, Michiel Overtoom wrote: > >> W. eWatson wrote: > >>> It looks like PyFits downloads are for Linux. > >>> Isn't there anything available for Win (xp)? > >> To install it, unpack the tar file and > >> type: python s

Read Garmin XML (TCX) files in Python...

2009-03-29 Thread cmalmqui
Dear All, Garmin uses XML as an exchange format for their Forerunner GPS series (http://developer.garmin.com/schemas/tcx/v2/) and I have been thinking about creating a python script that parses the Garmin XML file and dumps the training information to a KML file as well as various graphs (png or ma

Re: PyFits for Windows?

2009-03-29 Thread W. eWatson
andrew cooke wrote: W. eWatson wrote: I downloaded the tar file, and untarred it with IZarc. That's a strange way to package it, that is, for Windows. This almost suggests not many Win users are using it. One of the pages, , has a lot of tut

Re: Safe to call Py_Initialize() frequently?

2009-03-29 Thread Aahz
[p&e] In article , Graham Dumpleton wrote: > >In mod_wsgi however, Apache will completely unload the mod_wsgi module >on a restart. This would also mean that the Python library is also >unloaded from memory. When it reloads both, the global static >variables where information was left behind hav

Re: PyFits for Windows?

2009-03-29 Thread Scott David Daniels
W. eWatson wrote: Michiel Overtoom wrote: W. eWatson wrote: It looks like PyFits downloads are for Linux. Isn't there anything available for Win (xp)? According to http://www.stsci.edu/resources/software_hardware/pyfits: ... That link gives me a Resource Not Found!, but does have info about

Re: Geometry package

2009-03-29 Thread Max Erickson
Justin Pearson wrote: > Hi all, > > I'm looking for a geometry package in Python; something that will > let me define line segments, and can tell me if two line segments > intersect. It would be nice if the lines could be defined in > n-space (rather than be confined to 2 or 3 dimensions), but t

Re: Help with dict and iter

2009-03-29 Thread mattia
Il Sun, 29 Mar 2009 12:00:38 -0400, andrew cooke ha scritto: > mattia wrote: >>[i wrote]: >>> don't you just want to have a new job machine? >>> >>> for job_list in job_list_list: >>> job_machine = dict((x+1, iter(JOBS[x])) for x in range(NJOBS)) for x >>> in job_list: >>> print(next(job_m

Re: Ordered Sets

2009-03-29 Thread Aahz
In article <01d457aa$0$17208$c3e8...@news.astraweb.com>, Steven D'Aprano wrote: >On Fri, 20 Mar 2009 11:50:28 -0700, Scott David Daniels wrote: >> Raymond Hettinger wrote: >>> [Aahz] The doubly-linked list part is what's sick and perverted. >>> >>> The doubly-linked list part is what g

Re: meta question - how to read comp.lang.python w/o usenet feed/google interface?

2009-03-29 Thread Aahz
In article <03081704-17b5-4c7d-82db-8efb7ebce...@q11g2000yqh.googlegroups.com>, Esmail wrote: > >I've been reading/posting to usenet since the 80s with a variety of >tools (vn, and most recently Thunderbird) but since my ISP >(TimeWarner) no longer provides usenet feeds I'm stuck. You have optio

Re: Help with dict and iter

2009-03-29 Thread andrew cooke
mattia wrote: >[i wrote]: >> don't you just want to have a new job machine? >> >> for job_list in job_list_list: >> job_machine = dict((x+1, iter(JOBS[x])) for x in range(NJOBS)) for x >> in job_list: >> print(next(job_machine[x])) ok - btw you can probably simplify the code. this might w

Re: Help with dict and iter

2009-03-29 Thread mattia
Il Sun, 29 Mar 2009 11:17:50 -0400, andrew cooke ha scritto: > mattia wrote: >> Hi all, I a list of jobs and each job has to be processed in a >> particular order by a list of machines. >> A simple representation is: >> # Ordering of machines >> JOB1 = [3, 1, 2, 4] >> JOB2 = [2, 3, 1, 4] >> JOBS =

Re: tkinter questions: behavior of StringVar, etc

2009-03-29 Thread Alan G Isaac
On 3/29/2009 7:29 AM Francesco Bochicchio apparently wrote: 1. Tkinter is only a thin wrapper over Tk, a GUI library initially developed for Tcl language, so many of the answer to the design choices you question (e.g. what is the master) cannot between answered within the python documentation b

Re: Help with dict and iter

2009-03-29 Thread andrew cooke
mattia wrote: > Hi all, I a list of jobs and each job has to be processed in a particular > order by a list of machines. > A simple representation is: > # Ordering of machines > JOB1 = [3, 1, 2, 4] > JOB2 = [2, 3, 1, 4] > JOBS = [JOB1, JOB2] > NJOBS = len(JOBS) > Now, I have a list of jobs and I wa

Re: Python AppStore / Marketplace

2009-03-29 Thread Paul Boddie
On 27 Mar, 06:54, David Lyon wrote: > > Just a GUI for package management that lets you seperate what is available > for the python platform that you are running on. Install, deinstall, and > get package information. > > https://sourceforge.net/projects/pythonpkgmgr/ > > We only have source at the

Re: Cross platform installer builder for Python? (like IzPack for Java)

2009-03-29 Thread W. Martin Borgert
Hola Gabriel: On 2009-03-25 19:19, Gabriel Genellina wrote: > To distribute complete applications, py2exe + InnoSetup (Windows). That's the point: IzPack (Java) creates installers, that work at least on Windows and Linux, create menu entries in Windows and Gnome/KDE etc. Only one .jar file to dis

Help with dict and iter

2009-03-29 Thread mattia
Hi all, I a list of jobs and each job has to be processed in a particular order by a list of machines. A simple representation is: # Ordering of machines JOB1 = [3, 1, 2, 4] JOB2 = [2, 3, 1, 4] JOBS = [JOB1, JOB2] NJOBS = len(JOBS) Now, I have a list of jobs and I want to have the associated list

Re: tkinter questions: behavior of StringVar, etc

2009-03-29 Thread Alan G Isaac
On 3/29/2009 3:43 AM Scott David Daniels apparently wrote: OK, that was plain rude. a couple of questions is not six questions. A reply telling you how to get to some of what you are looking for is assistance. If you want exact answers to an array of questions, pay someone to fetch you the answ

Re: PyFits for Windows?

2009-03-29 Thread andrew cooke
W. eWatson wrote: > I downloaded the tar file, and untarred it with IZarc. That's a strange > way > to package it, that is, for Windows. This almost suggests not many Win > users > are using it. > > One of the pages, , > has a lot of tutorial ma

Re: Calendar module: HTMLCalendar overrides style sheet settings

2009-03-29 Thread Sibylle Koczian
Sibylle Koczian schrieb: > Hello, > > So I looked into the calendar module and made a LocalHTMLCalendar > subclass. Putting in additional style classes for "my" dates wasn't > difficult, but there is one thing I don't like at all: the methods > formatmonth() and formatyear() both return tables wit

Re: PyFits for Windows?

2009-03-29 Thread W. eWatson
W. eWatson wrote: Michiel Overtoom wrote: W. eWatson wrote: It looks like PyFits downloads are for Linux. Isn't there anything available for Win (xp)? According to http://www.stsci.edu/resources/software_hardware/pyfits: "PyFITS’s source code is pure Python. It requires Python version 2.3

  1   2   >