Re: Help needed with Windows Service in Python

2010-09-23 Thread Aahz
In article , Ian Hobson wrote: > >I am attempting to create a Windows Service in Python. BTW, you probably want to subscribe to http://mail.python.org/mailman/listinfo/python-win32 -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "If you think it's expensive to

Re: Python in Linux - barrier to Python 3.x

2010-09-23 Thread Lawrence D'Oliveiro
In message , Antoine Pitrou wrote: > comp.lang.python doesn't handle Linux packaging [issues] ... Why not? We regularly seem to was^H^H^Hspend a lot of time with Windows- specific packaging problems, installation problems and configuration problems, why not Linux ones as well? -- http://mail.p

Re: Python in Linux - barrier to Python 3.x

2010-09-23 Thread Lawrence D'Oliveiro
In message <87zkvbytnk@web.de>, Diez B. Roggisch wrote: > Of course, in a ideal world, distutils would hook into the distros > dependency system + simply say "please install python-dev first". > > But I'm not convinced that putting the weight here on the shoulders of > the python-communtiy to

Re: Python in Linux - barrier to Python 3.x

2010-09-23 Thread Lawrence D'Oliveiro
In message <2ab95324-4394-4510-b953-3c8555b0a...@q9g2000vbd.googlegroups.com>, Ant wrote: > Still, no Python 3 unless I upgrade to Fedora 13, and upgrading > an OS in order to get the latest version of one package is a bit much! You’re using Fedora, a distro that pretty much demands you upgrade

Re: Subprocess does not return for longer-running process

2010-09-23 Thread Lawrence D'Oliveiro
In message , Nobody wrote: > On Thu, 23 Sep 2010 12:25:53 +1200, Lawrence D'Oliveiro wrote: > >>> And I can't think of any reason why you should use os.waitpid() or >>> similar; use the .wait() method. >> >> I have used WNOHANG to poll for completion of a subprocess while >> providing progress u

Finding email threads with mailbox.mbox

2010-09-23 Thread Skye
Hello, I'm working on a script to read large numbers of mail list archives in mbox format and dump them into a database. I was happy to find mailbox.mbox because I like writing Python =) However I need to find email threads (replies, quoted test, Re: subjects etc) and it doesn't look like anythi

Call for proposals -- PyCon 2011

2010-09-23 Thread Jesse Noller
Call for proposals -- PyCon 2011 -- === Proposal Due date: November 1st, 2010 PyCon is back! With a rocking new website, a great location and more Python hackers and luminaries under one roof than you could po

pyqt on portable python?

2010-09-23 Thread Lee Harr
Is it possible / easy to use PyQt with portable python? I've done some googling and found one message that said this is coming in the next version, but I can't find anything on portablepython.com that mentions it. Has anyone done this before? Have any better information on how to set it up, or

Re: Best way for rotating a matrix of data?

2010-09-23 Thread Raphaël Plasson
On Sep 23, 1:50 am, Nobody wrote: > You can use arrays as indices, so applying a transformation to a set of > index arrays (e.g. np.indices) then using those as indices is equivalent > to applying a spatial transform to the data. I am not sure that this would do the trick, e.g. for extracting a

Re: lists and list item matches (ghost wodgame)

2010-09-23 Thread Baba
On Sep 23, 8:13 pm, nn wrote: > On Sep 23, 1:25 pm, Baba wrote: > > > > > On Sep 23, 4:17 pm, nn wrote: > > > > On Sep 23, 10:56 am, nn wrote: > > > > > On Sep 22, 6:39 pm, Baba wrote: > > > > > > On Sep 22, 9:18 pm, Baba wrote: > > > > > > > On Sep 22, 3:38 pm, nn wrote: > > > > > > > > On

Re: lists and list item matches (ghost wodgame)

2010-09-23 Thread Baba
On Sep 23, 8:13 pm, nn wrote: > On Sep 23, 1:25 pm, Baba wrote: > > > > > On Sep 23, 4:17 pm, nn wrote: > > > > On Sep 23, 10:56 am, nn wrote: > > > > > On Sep 22, 6:39 pm, Baba wrote: > > > > > > On Sep 22, 9:18 pm, Baba wrote: > > > > > > > On Sep 22, 3:38 pm, nn wrote: > > > > > > > > On

Python 2.6: How to turn off cgitb.py's DeprecationWarning: BaseException.message has been deprecated

2010-09-23 Thread python
Python 2.6: We're using the standard lib's cgitb module to provide diagnostic messages when unexpected exceptions occur. Unfortunately, this module raises a DeprecationWarning like below when it is used: C:\Python26\lib\cgitb.py:245: DeprecationWarning: BaseException.message has been deprecated

Re: Parsing error for ConfigParser

2010-09-23 Thread Philip Semanchuk
On Sep 23, 2010, at 1:22 PM, Andrew Z. wrote: > Is there a way to parse RealPlayer's realplayerrc in Python? I need > to support Python 2.5 - 2.7 > > Example code > > import urllib2 > import ConfigParser > f = urllib2.urlopen('http://pastebin.com/download.php?i=N1AcUg3w') > config = ConfigPars

Raw Sockets - IP-Encapsulation

2010-09-23 Thread Matthias Guentert
Hello list members I would like to create an IP tunnel using the IP protocol type 4 (socket.IPPROTO_IPIP) on a Linux host. (I also would be happy if I could create a GRE tunnel) The thing is, I just don't understand how I such a socket could be created and then later on handled. Regarding to hel

Re: ctypes

2010-09-23 Thread jay thompson
My apologies! I worte the email while doing 3 other things. I haven't really tried anything to access this struct other than trying to find different elements with ctypes.c_int.in_dll(dll, 'symbol') and access the elements in the same way I do in C. I didn't think either of these would work but ho

Re: lists and list item matches (ghost wodgame)

2010-09-23 Thread nn
On Sep 23, 1:25 pm, Baba wrote: > On Sep 23, 4:17 pm, nn wrote: > > > > > On Sep 23, 10:56 am, nn wrote: > > > > On Sep 22, 6:39 pm, Baba wrote: > > > > > On Sep 22, 9:18 pm, Baba wrote: > > > > > > On Sep 22, 3:38 pm, nn wrote: > > > > > > > On Sep 21, 6:39 pm, Baba wrote: > > > > > > > > H

upload file using post to https server

2010-09-23 Thread cerr
hi, I've been unsucessfully trying to upload a file using POST to an https server. I've succesfully logged in and gotten to read something from the server.. I have come up with something like this: authinfo = urllib2.HTTPBasicAuthHandler() authinfo.add_password(realm='Configurati

Re: collections.namedtuple: conflicting instances?

2010-09-23 Thread nn
On Sep 23, 1:40 pm, Chris Rebert wrote: > On Thu, Sep 23, 2010 at 9:28 AM, David A. Barrett > wrote: > > > > >  I've noticed that it's possible to create conflicting instances of the > > collections.namedtuple class: > > >  from collections  import namedtuple as nt > >  IX = nt('X', 'a b') > >  

Re: collections.namedtuple: conflicting instances?

2010-09-23 Thread Chris Rebert
On Thu, Sep 23, 2010 at 9:28 AM, David A. Barrett wrote: >  I've noticed that it's possible to create conflicting instances of the > collections.namedtuple class: > >  from collections  import namedtuple as nt >  IX = nt('X', 'a b') >  IY = nt('Y', 'c d') >  x = IX(0, 1) >  y = IY(2, 3) > > The ab

Re: lists and list item matches (ghost wodgame)

2010-09-23 Thread Baba
On Sep 23, 4:17 pm, nn wrote: > On Sep 23, 10:56 am, nn wrote: > > > > > On Sep 22, 6:39 pm, Baba wrote: > > > > On Sep 22, 9:18 pm, Baba wrote: > > > > > On Sep 22, 3:38 pm, nn wrote: > > > > > > On Sep 21, 6:39 pm, Baba wrote: > > > > > > > Hi > > > > > > > query level: beginner > > > > > >

Re: Check whether file is being written to

2010-09-23 Thread Nobody
On Thu, 23 Sep 2010 17:55:52 +0200, Diez B. Roggisch wrote: > Last time I checked, file-locking in unix was co-operative. Linux supports mandatory locking, but it's seldom enabled. -- http://mail.python.org/mailman/listinfo/python-list

Parsing error for ConfigParser

2010-09-23 Thread Andrew Z.
Is there a way to parse RealPlayer's realplayerrc in Python? I need to support Python 2.5 - 2.7 Example code import urllib2 import ConfigParser f = urllib2.urlopen('http://pastebin.com/download.php?i=N1AcUg3w') config = ConfigParser.RawConfigParser() config.readfp(f) Error Traceback (most rece

Re: Subprocess does not return for longer-running process

2010-09-23 Thread Nobody
On Thu, 23 Sep 2010 12:25:53 +1200, Lawrence D'Oliveiro wrote: >> And I can't think of any reason why you should use os.waitpid() or >> similar; use the .wait() method. > > I have used WNOHANG to poll for completion of a subprocess while providing > progress updates to the user. This can be don

collections.namedtuple: conflicting instances?

2010-09-23 Thread David A. Barrett
I've noticed that it's possible to create conflicting instances of the collections.namedtuple class: from collections import namedtuple as nt IX = nt('X', 'a b') IY = nt('Y', 'c d') x = IX(0, 1) y = IY(2, 3) The above are non-conflicting class instances and of two distinct namedtup

Re: Playing sounds at time indexes

2010-09-23 Thread Burton Samograd
"OKB (not okblacke)" writes: > I'm looking for an audio library for Python. I googled and found a > few, but none of them seem to have a simple way to play a particular > sound file from a particular start-time to an end-time. Like, I'd want > to load a file and say "Play the section of

Re: Check whether file is being written to

2010-09-23 Thread Diez B. Roggisch
Thomas Jollans writes: > On Thursday 23 September 2010, it occurred to loial to exclaim: >> How can I check whether a file is being written to by another process >> before I access it? >> >> Platform is unix. > > As such, you can't. But you can lock the file using the functions in the > fcntl

Re: Scheduling in python

2010-09-23 Thread Paul Rudin
loial writes: > I want to enable my end users to be able to schedule a task(actually > running another python or shell script). Rather than scheduling it > directly in cron, are there any python modules I could use? First hit when googling "python schedule"? -- http://mail.python.org/mailman/li

Re: Too much code - slicing

2010-09-23 Thread Seebs
On 2010-09-23, Andreas Waldenburger wrote: > On 23 Sep 2010 03:54:52 GMT Seebs wrote: >> I don't generally like constructs where important structural >> information comes late in the construct. [snip] > I think that is precisely the reason that the elements of the list come > *first* in the list

Re: Playing sounds at time indexes

2010-09-23 Thread Thomas Jollans
On Wednesday 22 September 2010, it occurred to OKB (not okblacke) to exclaim: > I'm looking for an audio library for Python. I googled and found a > few, but none of them seem to have a simple way to play a particular > sound file from a particular start-time to an end-time. Like, I'd want

Re: Too much code - slicing

2010-09-23 Thread Andreas Waldenburger
On Wed, 22 Sep 2010 20:45:55 -0500 John Bokma wrote: > What surprises me is that this is still discussed. It's like argueing > about significant whitespace. :-) Which is evil! /W -- INVALID? DE! -- http://mail.python.org/mailman/listinfo/python-list

Re: Too much code - slicing

2010-09-23 Thread Andreas Waldenburger
On 23 Sep 2010 00:33:28 GMT Steven D'Aprano wrote: > On Tue, 21 Sep 2010 12:26:29 -0400, Andreas Waldenburger wrote: > > > On Sat, 18 Sep 2010 19:09:33 -0700 (PDT) Carl Banks > > wrote: > > > >> On Sep 17, 1:01 pm, Andreas Waldenburger > >> wrote: > >> > On Thu, 16 Sep 2010 16:20:33 -0400 AK

Re: Too much code - slicing

2010-09-23 Thread Andreas Waldenburger
On 23 Sep 2010 03:54:52 GMT Seebs wrote: > On 2010-09-23, Steven D'Aprano > wrote: > [snip] > > I don't see anyone bitching about: > > > for x in seq: > > if x: > > f(x) > > > vs > > > [f(x) for x in seq if x] > > In my case, that's because I only ran into that syntax about an h

Distributing Packages

2010-09-23 Thread Greg Lindstrom
I am not intending to start anything, here, but would like to know if any consensus has been reached in how to distribute Python modules. Specifically, I'd like to use something to install packages on various machines in our enterprise (mostly Linux, but some windows boxes, too). I've read up on di

Re: Scheduling in python

2010-09-23 Thread Thomas Jollans
On Thursday 23 September 2010, it occurred to loial to exclaim: > I want to enable my end users to be able to schedule a task(actually > running another python or shell script). Rather than scheduling it > directly in cron, are there any python modules I could use? If you have a "master" process r

Re: Check whether file is being written to

2010-09-23 Thread Thomas Jollans
On Thursday 23 September 2010, it occurred to loial to exclaim: > How can I check whether a file is being written to by another process > before I access it? > > Platform is unix. As such, you can't. But you can lock the file using the functions in the fcntl module. -- http://mail.python.org/ma

Re: Check whether file is being written to

2010-09-23 Thread Seebs
On 2010-09-23, loial wrote: > How can I check whether a file is being written to by another process > before I access it? You mean "written to" or "open for possible writing"? It may be possible (with sufficient privileges) to determine that a file has been opened for writing. I don't think you

Re: lists and list item matches (ghost wodgame)

2010-09-23 Thread nn
On Sep 23, 10:56 am, nn wrote: > On Sep 22, 6:39 pm, Baba wrote: > > > > > On Sep 22, 9:18 pm, Baba wrote: > > > > On Sep 22, 3:38 pm, nn wrote: > > > > > On Sep 21, 6:39 pm, Baba wrote: > > > > > > Hi > > > > > > query level: beginner > > > > > > as part of a learning exercise i have written

Re: lists and list item matches (ghost wodgame)

2010-09-23 Thread nn
On Sep 22, 6:39 pm, Baba wrote: > On Sep 22, 9:18 pm, Baba wrote: > > > > > On Sep 22, 3:38 pm, nn wrote: > > > > On Sep 21, 6:39 pm, Baba wrote: > > > > > Hi > > > > > query level: beginner > > > > > as part of a learning exercise i have written code that: > > > > > a) asks for a single letter

Scheduling in python

2010-09-23 Thread loial
I want to enable my end users to be able to schedule a task(actually running another python or shell script). Rather than scheduling it directly in cron, are there any python modules I could use? -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Macros's Not the Power in OOo they should be ?

2010-09-23 Thread John Pinner
On Sep 23, 10:12 am, Boris Borcic wrote: > Lawrence D'Oliveiro wrote: > > flebber wrote: > > >> Has anyone had much success with python macro's. Or developing powerful > >> macro's in an language? > > > I did an application for my own use recently, involving automatically > > generating invoices i

Re: Python Macros's Not the Power in OOo they should be ?

2010-09-23 Thread Lawrence D'Oliveiro
In message , Tim Harig wrote: > The UNO architecture seems to have been rather mishandled. While the > general idea was nice, the implementation seems to be overly complicated > and poorly documented. For an example of a much nicer way of doing things, compare the Python support in Blender: it’s

Re: HTML6 proposal (Re: sexp xml syntax transformation)

2010-09-23 Thread Xah Lee
On Sep 23, 1:18 am, smh wrote: > The following is not exactly what you are looking for, but you might > find it interesting. > > http://www.franz.com/support/tech_corner/xml-generator-blurb.html > > This blurb is an example of a self-embedding document. > I've used this XML generator in many appli

Re: Python Macros's Not the Power in OOo they should be ?

2010-09-23 Thread Boris Borcic
Lawrence D'Oliveiro wrote: flebber wrote: Has anyone had much success with python macro's. Or developing powerful macro's in an language? I did an application for my own use recently, involving automatically generating invoices in editable OOWriter format from my billing database. I gave up o

Re: HTML6 proposal (Re: sexp xml syntax transformation)

2010-09-23 Thread smh
The following is not exactly what you are looking for, but you might find it interesting. http://www.franz.com/support/tech_corner/xml-generator-blurb.html This blurb is an example of a self-embedding document. I've used this XML generator in many applications, and it is usually elegant to use th

Re: ctypes

2010-09-23 Thread Simon Brunning
On 22 September 2010 21:13, jay thompson wrote: > Hello, > > I posted in regard to this in the past but it didn't go very far, no ones > fault, but I'm again atempting to make this work and could use some help. > > I would like to use libraw.dll (http://www.libraw.org/  version 0.10) from > python