Re: queries about exceptions(newbie)

2010-06-03 Thread Chris Rebert
On Thu, Jun 3, 2010 at 11:31 PM, Payal wrote: > Hi all, > I am trying to learn exceptions and have few small doubts from > http://docs.python.org/tutorial/errors.html > There are many statements there of the form, > > ... except Exception as inst: >        do something > > ... except ZeroDivisionE

queries about exceptions(newbie)

2010-06-03 Thread Payal
Hi all, I am trying to learn exceptions and have few small doubts from http://docs.python.org/tutorial/errors.html There are many statements there of the form, ... except Exception as inst: do something ... except ZeroDivisionError as detail: do something ... except MyError as e:

Re: Python Forum

2010-06-03 Thread D'Arcy J.M. Cain
On 04 Jun 2010 05:41:17 GMT Steven D'Aprano wrote: > Sure, a lot of those 1,800 posts are spam, but the spammers wouldn't > waste their time if they didn't think there were people still on Usenet. Kidding, right? Cost to spam is virtually zero so the ROI is pretty close to infinite no matter ho

Re: changing format of time duration.

2010-06-03 Thread Gabriel Genellina
On 3 jun, 17:24, dave wrote: > Quick question. I have to time stamps (now and now2). > > now = datetime.datetime.now(); > now2 = datetime.datetime.now(); > > now2-now1 yields me a result in 0:00:00.11221 (H:MM:SS.) > > I wanted to know if there is a standard python method or a quick hack > to

Re: Python Forum

2010-06-03 Thread John Nagle
Steven D'Aprano wrote: On Thu, 03 Jun 2010 03:16:03 -0700, Pierre Quentel wrote: So the OP's initiative should be an incentive to think on the format of the interaction between all the range of Python users, from newbees to gurus. We are in the 2.0 era, with social networks all over the place u

Re: Python Forum

2010-06-03 Thread Steven D'Aprano
On Thu, 03 Jun 2010 22:05:19 -0700, Phlip wrote: > On Jun 3, 9:54 pm, Steven D'Aprano cybersource.com.au> wrote: > >> I don't know what rubbish ISPs you're dealing with > > You've heard of a little fly-by-night outfit called AT&T? Yes I have. Aren't they the people who were engaged in a long-r

Re: Vote to Add Python Package "pubsub" to the Python Standard Library

2010-06-03 Thread Vinay Sajip
On Jun 4, 1:03 am, Carl Banks wrote: > Which is an implementation of publish-subscribe pattern.  I didn't say > or imply it was general purpose.  And it doesn't have to be to make a > case for inclusion of a general-purpose implementation in the standard > library. It's analogous, but it's not m

Re: Python Forum

2010-06-03 Thread Steven D'Aprano
On Thu, 03 Jun 2010 06:15:20 -0400, Adam Tauno Williams wrote: > So? NNTP is the living dead. Time to let it go. So you say. I think the millions of posts on Usenet say different. According to Wikipedia, the average number of all text posts in the Big-8 newsgroups is 1,800 new messages every

Re: Python Forum

2010-06-03 Thread geremy condra
On Fri, Jun 4, 2010 at 1:05 AM, Phlip wrote: > On Jun 3, 9:54 pm, Steven D'Aprano cybersource.com.au> wrote: > >> I don't know what rubbish ISPs you're dealing with > > You've heard of a little fly-by-night outfit called AT&T? They were my ISP as of three weeks ago. Has something changed since t

Re: Python Forum

2010-06-03 Thread Steven D'Aprano
On Thu, 03 Jun 2010 03:16:03 -0700, Pierre Quentel wrote: > So the OP's initiative should be an incentive to think on the format of > the interaction between all the range of Python users, from newbees to > gurus. We are in the 2.0 era, with social networks all over the place > using a pleasant in

Re: Python Forum

2010-06-03 Thread Phlip
On Jun 3, 9:54 pm, Steven D'Aprano wrote: > I don't know what rubbish ISPs you're dealing with You've heard of a little fly-by-night outfit called AT&T? -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Forum

2010-06-03 Thread Chris Rebert
On Thu, Jun 3, 2010 at 9:54 PM, Steven D'Aprano wrote: > On Thu, 03 Jun 2010 15:43:58 +, Monte Milanuk wrote: >> Decent NNTP access is harder to find.  Not impossible, but no longer a >> 'free' part of most standard ISP access any more. > > I disagree. Since I've been on the Internet, over a d

Re: An empty object with dynamic attributes (expando)

2010-06-03 Thread Steven D'Aprano
On Thu, 03 Jun 2010 14:00:11 -0700, dmtr wrote: > How can I create an empty object with dynamic attributes? It should be > something like: > m = object() m.myattr = 1 > > But this doesn't work. And I have to resort to: > class expando(object): pass m = expando() m.myatt

Re: Python Forum

2010-06-03 Thread Steven D'Aprano
On Thu, 03 Jun 2010 15:43:58 +, Monte Milanuk wrote: > Decent NNTP access is harder to find. Not impossible, but no longer a > 'free' part of most standard ISP access any more. I disagree. Since I've been on the Internet, over a decade now (what can I say? I was a slow starter), I've had th

Re: questions about how to parse a string and put it in a dictionary

2010-06-03 Thread Bryan
joblack wrote: > I've got a string which (without any CR or LF) consists of > > 'attribute1=attribute_value;attribute2=attribute_value2; ...' Technically that's short of a rigorous specification, but it sure looks like a standard web "query string", the content type known as "application/x-www-for

Re: plac, the easiest command line arguments parser in the world

2010-06-03 Thread Michele Simionato
On Jun 2, 6:37 am, Michele Simionato wrote: > I would like to announce to the world the first public release of > plac: > >  http://pypi.python.org/pypi/plac The second release is out. I have added the recognition of keyword arguments, improved the formatting of the help message, and added many t

Re: Plain simple unix timestamp with an HTTP GET

2010-06-03 Thread livibetter
I forgot to mention I redirect stderr to /dev/null, because curl returns error code 56 to me with this message "curl: (56) Failure when receiving data from the peer" On Jun 4, 11:20 am, livibetter wrote: > This? > > hwclock --utc --set --date="$(datestr="$(curlhttp://208.66.175.36:13/ > 2>/dev/n

Re: Plain simple unix timestamp with an HTTP GET

2010-06-03 Thread livibetter
This? hwclock --utc --set --date="$(datestr="$(curl http://208.66.175.36:13/ 2>/dev/null | cut -d \ -f 2-3)" ; echo ${datestr//-//})" Only hwclock, curl, cut, and Bash. PS. I didn't know I can set the time via hwclock, learned from Paul's post, but still didn't try to see if it does work. On J

great

2010-06-03 Thread joblack
Great - it works. Thanks a lot. -- http://mail.python.org/mailman/listinfo/python-list

Diff of Text

2010-06-03 Thread GZ
Hi All, I am looking for an algorithm that can compare to source code files line by line and find the minimum diff. I have looked at the difflib included in python. The problem is that it is designed to make the diff results easier for humans to read, instead of minimize the size of the output dif

Re: CTYPES structure passing

2010-06-03 Thread Bryan
Correction/addendum: I wrote: > try to to > be to upset when you find out how your three days were wasted... Of course that's, "try not to be too upset..." [...] > You're probably familiar with the Python > convention of special member names with double-underscores at each > end? Well, ctypes doe

Re: questions about how to parse a string and put it in a dictionary

2010-06-03 Thread MRAB
joblack wrote: I've got a string which (without any CR or LF) consists of 'attribute1=attribute_value;attribute2=attribute_value2; ...' and I want them to read in a dictionary so that the attribute name is the key and the attribute value is the data. Any ideas for an implementation? Greetings

Re: questions about how to parse a string and put it in a dictionary

2010-06-03 Thread Benjamin Kaplan
On Thu, Jun 3, 2010 at 7:21 PM, joblack wrote: > I've got a string which (without any CR or LF) consists of > > 'attribute1=attribute_value;attribute2=attribute_value2; ...' > > and I want them to read in a dictionary so that the attribute name is > the key and the attribute value is the data. > >

questions about how to parse a string and put it in a dictionary

2010-06-03 Thread joblack
I've got a string which (without any CR or LF) consists of 'attribute1=attribute_value;attribute2=attribute_value2; ...' and I want them to read in a dictionary so that the attribute name is the key and the attribute value is the data. Any ideas for an implementation? Greetings and thanks jb --

How to generate execute file that include enthought.traits.api , enthought.traits.ui.api ?

2010-06-03 Thread ray
Hi all, I code the program that using enthought.traits.api , enthought.traits.ui.api. I want to genereate execute file.I try PY2EXE,bb- freeze,cx_freeze,Pyinstaller ,but the execute files can not run successful. The attach file is my source code. My environment : 1.Python 2.6.2 2. OS platform

Re: CTYPES structure passing

2010-06-03 Thread Bryan
Peter West wrote: > I'm hoping someone here can tell me what I'm doing wrong as I've spent > the best part of three days reading docs and trying code. Yeah, I imagine a person could re-read them over and over and not see the gotcha. Sit down, maybe prepare some comfort food, and try to to be to up

Re: getting MemoryError with dicts; suspect memory fragmentation

2010-06-03 Thread dmtr
I'm still unconvinced that it is a memory fragmentation problem. It's very rare. Can you give more concrete example that one can actually try to execute? Like: python -c "list([list([0]*xxx)+list([1]*xxx)+list([2]*xxx) +list([3]*xxx) for xxx in range(10)])" & -- Dmitry -- http://mail.python.

Re: Python Forum

2010-06-03 Thread John Bokma
Phlip writes: > On Jun 3, 3:20 pm, geremy condra wrote: > >> > You mean like how I never get answers, to my super-easy GED-level >> > questions, here??! >> >> I agree. This proves conclusively that a web forum is the right >> place for you. > > Ah, so you feel up to my "xsl for xmlrunner.py" que

Re: Python Forum

2010-06-03 Thread Ben Finney
Dennis Lee Bieber writes: > I'm tempted to offer up that a lot of things that may once have been > covered in this general group have been migrated to specific mailing > lists (which are too many for me to consider subscribing just to do > one or two posts)... Which is also where NNTP shines: it

Re: How to run a python script with a configuration file at command line ?

2010-06-03 Thread Ben Finney
steph_awk writes: > I have been searching for quite some times without success. Did you try the standard library? > I have a python script that needs to start from command line and it > should have a config file to fill out the detais (itis one program, > and many possible configurations). The

Re: Plain simple unix timestamp with an HTTP GET

2010-06-03 Thread Paul Rubin
Ross writes: > I'd like to just quickly and with a minimum of parsing (ie no screen- > scraping) get a unix epoch timestamp (or another format if necessary). I haven't used this in a while and can't promise it still works: http://www.nightsong.com/phr/python/setclock.py -- http://mail.python.

Re: Plain simple unix timestamp with an HTTP GET

2010-06-03 Thread Ross
No - it's not really a python specific need, it's just what I'm using just now, and can't think of where else to ask. It's also my fav test- bed, as it's so easy. Your curl example is using grep and date which I don't have available. I have no fancy libraries, just core parsing capability. I foun

Re: Plain simple unix timestamp with an HTTP GET

2010-06-03 Thread livibetter
I don't know what tools do you have on embedded system, but I really don't think this has to be using Python. Here is what I would do on a normal desktop using your unique way to set up time: date -s "$(curl -s -I http://example.com | grep Date | cut -d \ -f 2-)" On Jun 4, 8:05 am, Ross wro

Plain simple unix timestamp with an HTTP GET

2010-06-03 Thread Ross
I'd like to just quickly and with a minimum of parsing (ie no screen- scraping) get a unix epoch timestamp (or another format if necessary). I thought with a quick second search on Google I'd find a URL where I could do a simple urllib2 based HTTP GET and have a timestamp returned to me. I don'

Re: getting MemoryError with dicts; suspect memory fragmentation

2010-06-03 Thread Emin.shopper Martinian.shopper
On Thu, Jun 3, 2010 at 7:41 PM, dmtr wrote: > On Jun 3, 3:43 pm, "Emin.shopper Martinian.shopper" > wrote: >> Dear Experts, >> > > Are you sure you have enough memory available? > Dict memory usage can jump x2 during re-balancing. > I'm pretty sure. When I did  p setattr(self,'q',dict([(xxx,xxx

Re: Vote to Add Python Package "pubsub" to the Python Standard Library

2010-06-03 Thread Carl Banks
On Jun 3, 8:46 am, Vinay Sajip wrote: > On Jun 2, 4:09 am, Carl Banks wrote: > > > I think it has a pretty good chance of being accepted, too.  The > > publish-subscribe pattern, if you will, seems to have been implemented > > separately in many places.  The logging module in the standard library

Re: Python Forum

2010-06-03 Thread geremy condra
On Thu, Jun 3, 2010 at 4:11 PM, Phlip wrote: > On Jun 3, 3:58 pm, geremy condra wrote: >> On Thu, Jun 3, 2010 at 3:40 PM, Phlip wrote: >> > On Jun 3, 3:20 pm, geremy condra wrote: >> >> >> > You mean like how I never get answers, to my super-easy GED-level >> >> > questions, here??! >> >> >> I

Re: getting MemoryError with dicts; suspect memory fragmentation

2010-06-03 Thread dmtr
> I have a long running processing which eventually dies to a > MemoryError exception. When it dies, it is using roughly 900 MB on a 4 > GB Windows XP machine running Python 2.5.4. If I do "import pdb; BTW have you tried the same code with the Python 2.6.5? -- Dmitry -- http://mail.python.org/ma

Re: getting MemoryError with dicts; suspect memory fragmentation

2010-06-03 Thread dmtr
On Jun 3, 3:43 pm, "Emin.shopper Martinian.shopper" wrote: > Dear Experts, > > I am getting a MemoryError when creating a dict in a long running > process and suspect this is due to memory fragmentation. Any > suggestions would be welcome. Full details of the problem are below. > > I have a long r

Re: Python Forum

2010-06-03 Thread Phlip
On Jun 3, 3:58 pm, geremy condra wrote: > On Thu, Jun 3, 2010 at 3:40 PM, Phlip wrote: > > On Jun 3, 3:20 pm, geremy condra wrote: > > >> > You mean like how I never get answers, to my super-easy GED-level > >> > questions, here??! > > >> I agree. This proves conclusively that a web forum is the

Re: CTYPES structure passing

2010-06-03 Thread Rhodri James
On Thu, 03 Jun 2010 11:54:13 +0100, Peter West wrote: class LUCAM_FRAME_FORMAT(Structure): __fields__ = [( "xOffset", c_ulong), # x coordinate on imager of top left corner of subwindow in pixels [snip] ( "XUnion", FRAME_FORMAT_UNION), ( "flagsX", c_ushort),

Re: Python Forum

2010-06-03 Thread geremy condra
On Thu, Jun 3, 2010 at 3:40 PM, Phlip wrote: > On Jun 3, 3:20 pm, geremy condra wrote: > >> > You mean like how I never get answers, to my super-easy GED-level >> > questions, here??! >> >> I agree. This proves conclusively that a web forum is the right >> place for you. > > Ah, so you feel up to

Re: Python Forum

2010-06-03 Thread Phlip
On Jun 3, 3:20 pm, geremy condra wrote: > > You mean like how I never get answers, to my super-easy GED-level > > questions, here??! > > I agree. This proves conclusively that a web forum is the right > place for you. Ah, so you feel up to my "xsl for xmlrunner.py" question? -- http://mail.pyth

getting MemoryError with dicts; suspect memory fragmentation

2010-06-03 Thread Emin.shopper Martinian.shopper
Dear Experts, I am getting a MemoryError when creating a dict in a long running process and suspect this is due to memory fragmentation. Any suggestions would be welcome. Full details of the problem are below. I have a long running processing which eventually dies to a MemoryError exception. When

Re: Python Forum

2010-06-03 Thread geremy condra
On Thu, Jun 3, 2010 at 2:23 PM, Phlip wrote: > On Jun 2, 3:18 am, Adam Tauno Williams wrote: > >> +1 >> >> Yuck; no better way to make new users hate your product than have a web >> forum - where they post questions > > Free of all the spam that leaks into here from the remnants of > USENET!!

Re: An empty object with dynamic attributes (expando)

2010-06-03 Thread Alf P. Steinbach
* dmtr, on 03.06.2010 23:00: How can I create an empty object with dynamic attributes? It should be something like: m = object() m.myattr = 1 But this doesn't work. And I have to resort to: class expando(object): pass m = expando() m.myattr = 1 Is there a one-liner that would do the thing

Re: Python Forum

2010-06-03 Thread Phlip
On Jun 2, 3:18 am, Adam Tauno Williams wrote: > +1 > > Yuck; no better way to make new users hate your product than have a web > forum - where they post questions Free of all the spam that leaks into here from the remnants of USENET!! > and never get answers... You mean like how I never ge

Re: Issue with xml iterparse

2010-06-03 Thread bfrederi
On Jun 3, 3:59 pm, Chris Rebert wrote: > On Thu, Jun 3, 2010 at 1:44 PM, bfrederi wrote: > > I am using lxml iterparse and running into a very obscure error. When > > I run iterparse on a file, it will occasionally return an element that > > has a element.text == None when the element clearly has

Re: FIle transfer over network - with Pyro?

2010-06-03 Thread Irmen de Jong
On 3-6-2010 19:47, Nathan Huesken wrote: Hi, I am writing a network application which needs from time to time do file transfer (I am writing the server as well as the client). For simple network messages, I use pyro because it is very comfortable. But I suspect, that doing a file transfer is ver

An empty object with dynamic attributes (expando)

2010-06-03 Thread dmtr
How can I create an empty object with dynamic attributes? It should be something like: >>> m = object() >>> m.myattr = 1 But this doesn't work. And I have to resort to: >>> class expando(object): pass >>> m = expando() >>> m.myattr = 1 Is there a one-liner that would do the thing? -- Cheers, D

Re: Issue with xml iterparse

2010-06-03 Thread Chris Rebert
On Thu, Jun 3, 2010 at 1:44 PM, bfrederi wrote: > I am using lxml iterparse and running into a very obscure error. When > I run iterparse on a file, it will occasionally return an element that > has a element.text == None when the element clearly has text in it. > > I copy and pasted the problem x

Issue with xml iterparse

2010-06-03 Thread bfrederi
I am using lxml iterparse and running into a very obscure error. When I run iterparse on a file, it will occasionally return an element that has a element.text == None when the element clearly has text in it. I copy and pasted the problem xml into a python string, used StringIO to create a file-li

changing format of time duration.

2010-06-03 Thread dave
Quick question. I have to time stamps (now and now2). now = datetime.datetime.now(); now2 = datetime.datetime.now(); now2-now1 yields me a result in 0:00:00.11221 (H:MM:SS.) I wanted to know if there is a standard python method or a quick hack to add an extra zero in the beginning. So the r

Re: problems with CSV module

2010-06-03 Thread Neil Cerutti
On 2010-06-03, Carlos Grohmann wrote: >> Use: >> ? ?csvfile = csv.reader(csvfile, dialect=dialect) >> dialect is a keyword argument. > > thanks for pointing that out.it stopped the errors when there s > only one data line, but it still can't get the values for that > line Is it possible your data

Re: FIle transfer over network - with Pyro?

2010-06-03 Thread exarkun
On 06:58 pm, strom...@gmail.com wrote: On Jun 3, 10:47�am, Nathan Huesken wrote: Hi, I am writing a network application which needs from time to time do file transfer (I am writing the server as well as the client). For simple network messages, I use pyro because it is very comfortable. But

Re: Another MySQL Question

2010-06-03 Thread John Nagle
MRAB wrote: Victor Subervi wrote: Hi; I have this code: options = '' our_options = [] our_options_string = '' for op in ops: options += '%s varchar(40) not null, ' % (op[0].upper() + op[1:]) our_options.append('%s' % form.getfirst('%s' % op)) our_options_string

Re: problems with CSV module

2010-06-03 Thread Carlos Grohmann
Thanks for your prompt response, Neil. > That data doesn't appear to be csv worthy. Why not use str.split > or str.partition? Well, I should have said that this is one kind of data. The function is part of a larger app, and there is the possibility that someone uses headers in the data files, or

Re: problems with CSV module

2010-06-03 Thread Neil Cerutti
On 2010-06-03, Neil Cerutti wrote: > Do you really need to use the Sniffer? You'll probably be better > off... ...defining your own dialect based on what you know to be the file format. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: problems with CSV module

2010-06-03 Thread Neil Cerutti
On 2010-06-03, Carlos Grohmann wrote: > Hi all, I'm using csv to read text files, and its working fine, except > in two cases: > > - when there is only one line of text (data) in the file > - when there is a blank line after the last data line > > this is the kind of data: > > 45 67 89 > 23 45 06

Re: FIle transfer over network - with Pyro?

2010-06-03 Thread Dan Stromberg
On Jun 3, 10:47 am, Nathan Huesken wrote: > Hi, > > I am writing a network application which needs from time to time do > file transfer (I am writing the server as well as the client). > For simple network messages, I use pyro because it is very comfortable. > But I suspect, that doing a file tran

problems with CSV module

2010-06-03 Thread Carlos Grohmann
Hi all, I'm using csv to read text files, and its working fine, except in two cases: - when there is only one line of text (data) in the file - when there is a blank line after the last data line this is the kind of data: 45 67 89 23 45 06 12 34 67 ... and this is the function: def getData(pa

Re: Windows and My Documents

2010-06-03 Thread Christian Heimes
> You're asking, it seems, for the equivalent of a UNIX softlink... > Normal Windows doesn't support those (I think they are in the OS > somewhere but not made visible to the user). Actually NTFS supports hard links, soft links and junction points since Windows 2k. [1] Christian [1] http:/

Re: Another MySQL Question

2010-06-03 Thread Victor Subervi
On Thu, Jun 3, 2010 at 1:48 PM, Dennis Lee Bieber wrote: > On Thu, 3 Jun 2010 08:49:44 -0400, Victor Subervi > declaimed the following in > gmane.comp.python.general: > > > options += '%s varchar(40) not null, ' % (op[0].upper() + op[1:]) > > Please modernize... Python supports a .c

FIle transfer over network - with Pyro?

2010-06-03 Thread Nathan Huesken
Hi, I am writing a network application which needs from time to time do file transfer (I am writing the server as well as the client). For simple network messages, I use pyro because it is very comfortable. But I suspect, that doing a file transfer is very inefficient over pyro, am I right (the fi

Re: Another MySQL Question

2010-06-03 Thread MRAB
Victor Subervi wrote: Hi; I have this code: options = '' our_options = [] our_options_string = '' for op in ops: options += '%s varchar(40) not null, ' % (op[0].upper() + op[1:]) our_options.append('%s' % form.getfirst('%s' % op)) our_options_string += '%s", "'

sandboxing python code

2010-06-03 Thread Amit Sethi
On Thu, Jun 3, 2010 at 9:12 PM, Shashwat Anand wrote: > I have not much idea but Online Judges like SPOJ/codechef have regular > programming-contests and python is one of allowed languages. So yes, it's I am trying to make an online test for Python . P.S Sorry ,I did not realize I sent the mail

Re: Embedding Python in a C extension

2010-06-03 Thread kai028
Thanks for the reply. I'm checking this out today. On Wed, 2 Jun 2010 22:30:37 -0700 (PDT), Carl Banks wrote: >On Jun 2, 1:46 pm, Paul Grunau wrote: >> I have a problem with embedding Python into a C extension in Windows >> Vista. I have implemented a timer routine in C as an extension, which >>

Re: Embedding Python in a C extension

2010-06-03 Thread kai028
Thanks for the reply. I'm looking into the Global Interpreter Lock today. On Thu, 03 Jun 2010 01:07:39 +0100, MRAB wrote: >p...@mail.python.org wrote: >> I have a problem with embedding Python into a C extension in Windows >> Vista. I have implemented a timer routine in C as an extension, which

Re: How to run a python script with a configuration file at command line ?

2010-06-03 Thread steph_py
On Jun 3, 12:50 pm, Jean-Michel Pichavant wrote: > Andreas Jung wrote: > > optparse > > > is your friend. > > > -aj > > > 2010/6/3 steph_awk > > > > >     I have been searching for quite some times without success. > > >     I have a python script that needs

Re: Another MySQL Question

2010-06-03 Thread Victor Subervi
On Thu, Jun 3, 2010 at 12:25 PM, MRAB wrote: > So our_options is a list containing two values, which you're putting > into a tuple: > > >>> our_options = ["first", "second"] > >>> print len(our_options) > 2 > >>> value_tuple = (our_options,) > >>> print len(value_tuple) > 1 > >>> > > In other wo

Re: Windows and My Documents

2010-06-03 Thread Bob Greschke
On 2010-06-03 09:57:11 -0600, Tim Golden said: On 03/06/2010 16:39, Bob Greschke wrote: How do I do a "listdir" (or whatever I need to use) of the Desktop on a Windows machine and have "folders" like My Documents show up in the result? I'm specifically trying to get a link to VMWare Shared Fo

Re: How to run a python script with a configuration file at command line ?

2010-06-03 Thread Jean-Michel Pichavant
Andreas Jung wrote: optparse is your friend. -aj 2010/6/3 steph_awk > I have been searching for quite some times without success. I have a python script that needs to start from command line and it should have a config file to fill out the

What's a good XSL to translate xmlrunner.py output into a test report?

2010-06-03 Thread Phlip
Hypo Nt: Here's xmlrunner.py: http://www.rittau.org/python/xmlrunner.py you attach it to your developer tests, and it emits a file called "TEST-unittest.TestSuite.xml", containing auspicious wackiness like this: That looks just like the kind of stereotypical XML that XSL was designe

Re: How to run a python script with a configuration file at command line ?

2010-06-03 Thread Andreas Jung
optparse is your friend. -aj 2010/6/3 steph_awk > I have been searching for quite some times without success. > > I have a python script that needs to start from command line and it > should have a config file to fill out the detais (itis one program, > and many possible configurations). > > s

How to run a python script with a configuration file at command line ?

2010-06-03 Thread steph_awk
I have been searching for quite some times without success. I have a python script that needs to start from command line and it should have a config file to fill out the detais (itis one program, and many possible configurations). something as simple as PHP would be nice %> ./PHPscript -c config

Re: Another MySQL Question

2010-06-03 Thread MRAB
Victor Subervi wrote: Hi; I have this code: options = '' our_options = [] our_options_string = '' for op in ops: options += '%s varchar(40) not null, ' % (op[0].upper() + op[1:]) our_options.append('%s' % form.getfirst('%s' % op)) our_options_string += '%s", "'

Re: Windows and My Documents

2010-06-03 Thread Tim Golden
On 03/06/2010 16:39, Bob Greschke wrote: How do I do a "listdir" (or whatever I need to use) of the Desktop on a Windows machine and have "folders" like My Documents show up in the result? I'm specifically trying to get a link to VMWare Shared Folders to show up so I can navigate to files in OSX

Re: SOAP with fancy HTTPS requirements

2010-06-03 Thread exarkun
On 03:23 pm, li...@zopyx.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi there, I need to implement the following: sending SOAP requests and receiving SOAP responses over HTTPS with - authentication based on client-certificates _and_ basic authorization - verification of the serve

Re: Python Forum

2010-06-03 Thread Monte Milanuk
Adam Tauno Williams whitemice.org> writes: > > However, whether we like it or not: > > Fewer and fewer newcomers are willing, knowledgable, aware of nntp > > So? NNTP is the living dead. Time to let it go. > True. Decent NNTP access is harder to find. Not impossible, but no longer a 'free

Re: Vote to Add Python Package "pubsub" to the Python Standard Library

2010-06-03 Thread Vinay Sajip
On Jun 2, 4:09 am, Carl Banks wrote: > I think it has a pretty good chance of being accepted, too.  The > publish-subscribe pattern, if you will, seems to have been implemented > separately in many places.  The logging module in the standard library > uses something like this. Only in a very gen

Windows and My Documents

2010-06-03 Thread Bob Greschke
I know this must have been asked before, but today Google is not my friend. How do I do a "listdir" (or whatever I need to use) of the Desktop on a Windows machine and have "folders" like My Documents show up in the result? I'm specifically trying to get a link to VMWare Shared Folders to sho

Re:

2010-06-03 Thread Shashwat Anand
I have not much idea but Online Judges like SPOJ/codechef have regular programming-contests and python is one of allowed languages. So yes, it's possible. If I guess right, are you making an Online Judge for python. On Thu, Jun 3, 2010 at 8:39 PM, Amit Sethi wrote: > Hi , > > I wish to execute so

SOAP with fancy HTTPS requirements

2010-06-03 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi there, I need to implement the following: sending SOAP requests and receiving SOAP responses over HTTPS with - authentication based on client-certificates _and_ basic authorization - verification of the server cert The client cert is protected

Simple hack to get $500 to your home.

2010-06-03 Thread money mania
Simple hack to get $500 to your home at http://uslatest.tk Due to high security risks,i have hidden the cheque link in an image. in that website on left side below search box, click on image and enter your name and address where you want to receive your cheque.please dont tell to anyone. -- http

Gift 4 U

2010-06-03 Thread ekr3d
Do you want the safety of the computer ? * Take this gift * Advanced SystemCare Free 3.3.1 http://free-ekramy.blogspot.com ** Are you introduced to the 2010 Men's Fashion fashion-ekramy.blogspot.com/2010/04/man-fashion-week-z-zegna- spring-2010.html A

[no subject]

2010-06-03 Thread Amit Sethi
Hi , I wish to execute some user submitted python code and have absolutely no other way out . I saw that there used to be a module called rexec which could define which modules can be imported and which cannot however exec doesn't have that kind of feature . Please if you could tell me what would

Re: Python Forum

2010-06-03 Thread Ben Finney
Andreas Waldenburger writes: > But consolidation is the *only* way to go, really. The parallelism > between c.l.p. and python-list is great already. Now throw some sort > of Forum in the mix This already *is* a forum. Whatever it is you think is needed, it's already a forum. Can you be more spec

Re: Python Forum

2010-06-03 Thread Colin J. Williams
On 03-Jun-10 09:08 AM, Grant Edwards wrote: On 2010-06-03, News123 wrote: pyDev wrote: Hello, I would like to let the community know that there is a new web-based forum for Python enthusiasts over at PythonForum.org (http:// pythonforum.org). Web-based forums is a preferred method by Python n

Re: Python Forum

2010-06-03 Thread Colin J. Williams
On 03-Jun-10 09:08 AM, Grant Edwards wrote: On 2010-06-03, News123 wrote: pyDev wrote: Hello, I would like to let the community know that there is a new web-based forum for Python enthusiasts over at PythonForum.org (http:// pythonforum.org). Web-based forums is a preferred method by Python n

Re: Python Forum

2010-06-03 Thread Lie Ryan
On 06/03/10 22:50, Adam Tauno Williams wrote: > On Thu, 2010-06-03 at 13:42 +0100, Paul Rudin wrote: >> Adam Tauno Williams writes: >>> On Thu, 2010-06-03 at 12:35 +0100, Paul Rudin wrote: Adam Tauno Williams writes: > Most people use this list via e-mail... Do you know this to be t

Re: Python Forum

2010-06-03 Thread Andreas Waldenburger
On Thu, 3 Jun 2010 03:16:03 -0700 (PDT) Pierre Quentel wrote: > So the OP's initiative should be an incentive to think on the format > of the interaction between all the range of Python users, from newbees > to gurus. We are in the 2.0 era, with social networks all over the > place using a pleasa

Re: Python Forum

2010-06-03 Thread Grant Edwards
On 2010-06-03, Adam Tauno Williams wrote: > On Thu, 2010-06-03 at 13:42 +0100, Paul Rudin wrote: >> Adam Tauno Williams writes: >> > On Thu, 2010-06-03 at 12:35 +0100, Paul Rudin wrote: >> >> Adam Tauno Williams writes: >> >> > Most people use this list via e-mail... >> >> Do you know this to be

Re: Python Forum

2010-06-03 Thread Grant Edwards
On 2010-06-03, Martin P. Hellwig wrote: > On 06/03/10 12:46, Michele Simionato wrote: >> On Jun 3, 12:28 pm, "Martin P. Hellwig" >> wrote: >>> On the other hand it might not be so bad that you don't get questions >>> from users here who are unable to use a nntp reader or news to mail service. >> >

Re: Python Forum

2010-06-03 Thread Grant Edwards
On 2010-06-03, News123 wrote: > pyDev wrote: >> Hello, >> >> I would like to let the community know that there is a new web-based >> forum for Python enthusiasts over at PythonForum.org (http:// >> pythonforum.org). Web-based forums is a preferred method by Python >> newcomers to get help in expl

How to efficiently work with gettext PO files when making small edits to large text values

2010-06-03 Thread python
Any one using the GNU gettext utilities to internationalize their python applications? I'm looking for tips and/or tools on how to efficiently work with gettext PO files when making small edits to large msgid values. Example: We have lots of multi-sentence/multi-paragraph messages that are stored

Re: Python Forum

2010-06-03 Thread Adam Tauno Williams
On Thu, 2010-06-03 at 13:42 +0100, Paul Rudin wrote: > Adam Tauno Williams writes: > > On Thu, 2010-06-03 at 12:35 +0100, Paul Rudin wrote: > >> Adam Tauno Williams writes: > >> > Most people use this list via e-mail... > >> Do you know this to be the case, or is that a guess > > Scan through a b

Another MySQL Question

2010-06-03 Thread Victor Subervi
Hi; I have this code: options = '' our_options = [] our_options_string = '' for op in ops: options += '%s varchar(40) not null, ' % (op[0].upper() + op[1:]) our_options.append('%s' % form.getfirst('%s' % op)) our_options_string += '%s", "' % op cursor.execute(

Re: Python Forum

2010-06-03 Thread Paul Rudin
Adam Tauno Williams writes: > On Thu, 2010-06-03 at 12:35 +0100, Paul Rudin wrote: >> Adam Tauno Williams writes: >> > Most people use this list via e-mail... >> Do you know this to be the case, or is that a guess? > > Scan through a bunch of threads with show-headers. Watch the User-Agent > va

Re: Python Forum

2010-06-03 Thread Tim Chase
On 06/03/2010 07:16 AM, Adam Tauno Williams wrote: Most people use this list via e-mail... Do you know this to be the case, or is that a guess? Scan through a bunch of threads with show-headers. Watch the User-Agent value (set by the senders client). The results become obvious pretty quickly

Re: Python Forum

2010-06-03 Thread Adam Tauno Williams
On Thu, 2010-06-03 at 12:35 +0100, Paul Rudin wrote: > Adam Tauno Williams writes: > > Most people use this list via e-mail... > Do you know this to be the case, or is that a guess? Scan through a bunch of threads with show-headers. Watch the User-Agent value (set by the senders client). The re

  1   2   >