Re: Parsing numeric ranges

2011-02-25 Thread Simon Brunning
On 25 February 2011 09:27, Seldon sel...@katamail.it wrote: Hi all, I have to convert integer ranges expressed in a popular compact notation (e.g. 2, 5-7, 20-22, 41) to a the actual set of numbers (i.e. 2,5,7,20,21,22,41). Is there any library for doing such kind of things or I have to write

Re: multiple values for keyword argument

2011-01-31 Thread Simon Brunning
On 29 January 2011 18:39, pa...@cruzio.com wrote: I, myself, use the spanish word 'yo' instead (less keystrokes, I hate 'self', and it amuses me); if I'm working with my numerical experiments I'll use 'n' or 'x'... although, when posting sample code to c.l.py I do try to use 'self' to avoid

Re: list 2 dict?

2011-01-02 Thread Simon Brunning
On 2 January 2011 21:04, Octavian Rasnita orasn...@gmail.com wrote: No. As Ian said grouper() is a receipe in the itertools documentation. http://docs.python.org/library/itertools.html#recipes I know that, that is why I used: from itertools import * Isn't enough? Did you follow the link?

Re: remote control firefox with python

2010-11-29 Thread Simon Brunning
On 28 November 2010 15:22, News123 news1...@free.fr wrote: I wondered whether there is a simpe way to 'remote' control fire fox with python. Selenium might be worth a look, too: http://code.google.com/p/selenium/wiki/PythonBindings -- Cheers, Simon B. --

Re: Glob in python which supports the ** wildcard

2010-11-23 Thread Simon Brunning
On 22 November 2010 21:43, Martin Lundberg martin.lundb...@gmail.com wrote: Hi, I want to be able to let the user enter paths like this: apps/name/**/*.js and then find all the matching files in apps/name and all its subdirectories. However I found out that Python's glob function doesn't

Re: Glob in python which supports the ** wildcard

2010-11-23 Thread Simon Brunning
On 23 November 2010 09:26, Martin Lundberg martin.lundb...@gmail.com wrote: It does not seem to support the ** wildcard? It will recursively seek for files matching a pattern like *.js but it won't support /var/name/**/*.js as root, will it? I did say roughly. ;-) You'd need to do: for

Re: A question about yield

2010-11-08 Thread Simon Brunning
On 7 November 2010 18:14, Chris Rebert c...@rebertia.com wrote: On Sun, Nov 7, 2010 at 9:56 AM, chad cdal...@gmail.com wrote: But what happens if the input file is say 250MB? Will all 250MB be loaded into memory at once? No. As I said, the file will be read from 1 line at a time, on an

Re: ctypes

2010-09-23 Thread Simon Brunning
On 22 September 2010 21:13, jay thompson jayryan.thomp...@gmail.com 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/ 

Re: How to make a web services in python ???

2010-09-20 Thread Simon Brunning
On 20 September 2010 16:09, Ariel isaacr...@gmail.com wrote: Soap web services I think. I think the cool kids would be using https://fedorahosted.org/suds/, but for the fact that the cool kids all build REST (http://oreilly.com/catalog/9780596805838) rather than SOAP these days. -- Cheers,

Re: Printing the name of a variable

2010-09-10 Thread Simon Brunning
On 9 September 2010 20:43, Stephen Boulet stephen.bou...@gmail.com wrote: Does an arbitrary variable carry an attribute describing the text in its name? I'm looking for something along the lines of: x = 10 print x.name 'x'

Re: python interview quuestions

2010-08-13 Thread Simon Brunning
On 11 August 2010 13:34:09 UTC+1, Steven D'Aprano st...@remove-this-cybersource.com.au wrote: Getting interviewees to do a take-home problem just means you hire the guy who is friends with a good programmer, rather than the good programmer. We give a take-home problem. If we like the code we

Re: Mechanize - save to XML or CSV

2010-08-02 Thread Simon Brunning
On 2 August 2010 14:13, flebber flebber.c...@gmail.com wrote: HI guys and gals this is probably a simple question but I can't find the answer directly in the docs for python mechanize. http://pypi.python.org/pypi/mechanize/ Is it possible to retrieve and save a web page data as xml or a csv

Re: Load/Performance Testing of a Web Server

2010-07-09 Thread Simon Brunning
On 9 July 2010 14:17, kak...@gmail.com kak...@gmail.com wrote: Hi to all, i want to stress test   a tomcat web server, so that i could find out its limits. e.g how many users can be connected and request a resource concurrently. I used JMeter which is an excellent tool, but i would like to use

Re: optparse TypeError

2010-06-28 Thread Simon Brunning
On 28 June 2010 14:30, dirknbr dirk...@gmail.com wrote: I get an int object is not callable TypeError when I execute this. But I don't understand why. (snip)    lines=options.lines Here you are assigning the -l option to the name 'lines'.    lines(args[0],topbottom=tb,maxi=lines) Here you

Re: Python on Android Mobile?

2010-06-13 Thread Simon Brunning
On 13 June 2010 21:39, Anthony Papillion papill...@gmail.com wrote: I know Python is growing in popularity and some of Palms devices already let you run Python apps in a VM environment.  I'm wondering if anyone knows (or can make an educated guess) if there are any plans for Python to come to

Re: a +b ?

2010-06-11 Thread Simon Brunning
2010/6/11 yanhua gasf...@163.com: hi,all! it's a simple question: input two integers A and B in a line,output A+B? print sum(int(i) for i in raw_input(Please enter some integers: ).split()) -- Cheers, Simon B. -- http://mail.python.org/mailman/listinfo/python-list

Re: grep command

2010-06-10 Thread Simon Brunning
On 10 June 2010 07:38, madhuri vio madhuri@gmail.com wrote: i was wondering bout the usage and syntax of grep command..can u tall me its syntax so that i can use it and proceed...pls That's really not on topic for this list. -- Cheers, Simon B. --

Re: regarding the dimensions in gui

2010-06-10 Thread Simon Brunning
On 10 June 2010 08:19, Shashwat Anand anand.shash...@gmail.com wrote: And please stop using 'sir' for heaven's sake. Not least because list list isn't male only. -- Cheers, Simon B. -- http://mail.python.org/mailman/listinfo/python-list

Re: help me

2010-06-09 Thread Simon Brunning
On 9 June 2010 11:44, madhuri vio madhuri@gmail.com wrote: thankyou so much ..i made it finally... how do i make buttons and i want a lil text to label the buttons also You might want to run through http://www.pythonware.com/library/tkinter/introduction/. -- Cheers, Simon B. --

Re: help me

2010-06-09 Thread Simon Brunning
On 9 June 2010 11:47, madhuri vio madhuri@gmail.com wrote: yea i was able to import by capitalizing t...thank u so much but wats the reason behind they just changed it for the significance of each version ..is it that way? PEP 8 (http://www.python.org/dev/peps/pep-0008/) suggests that

Re: Python Forum

2010-06-02 Thread Simon Brunning
On 2 June 2010 09:04:56 UTC+1, pyDev einars.stra...@gmail.com wrote: I hope here will be someone ready to welcome and help newcomers to enter the beautiful world of Python. Just send them here, or to http://mail.python.org/mailman/listinfo/tutor. We'll be happy to help. -- Cheers, Simon B.

Re: Address of an immutable object

2010-05-30 Thread Simon Brunning
On 30 May 2010 18:38:23 UTC+1, candide cand...@free.invalid wrote: Two non mutable objects with the same value shall be allocated at a constant and unique address ? Nope. a = 999 b = 999 id(a) == id(b) False Your statement will be the case for small integers, but this in an implementation

Re: Email in 2.6.4

2010-05-24 Thread Simon Brunning
On 24 May 2010 14:59:24 UTC+1, dirknbr dirk...@googlemail.com wrote: It doesn't error on 'import email' but does on call to MimeText. import email msg = MIMEText('test') NameError: name 'MIMEText' is not defined Here you want: msg = email.MIMEText('test') -- Cheers, Simon B. --

Re: logging: AttributeError: 'module' object has no attribute 'getLogger'

2010-05-23 Thread Simon Brunning
On 23 May 2010 14:46, Frank GOENNINGER dg1...@googlemail.com wrote: Traceback (most recent call last):  File /.../src/pib/logging.py, line 37, in module    main() Here's a clue - looks like your own module is called logging. That's what's getting imported by your import. Try naming your module

Re: where are the program that are written in python?

2010-05-21 Thread Simon Brunning
On 21 May 2010 11:21:11 UTC+1, Deep_Feelings doctore...@gmail.com wrote: 1- where are the programs that is written in python ? 2- python is high productivity language : why there are no commercial programs written in python ? See http://www.python.org/about/success/ -- Cheers, Simon B. --

Re: where are the program that are written in python?

2010-05-21 Thread Simon Brunning
On 21 May 2010 12:12:18 UTC+1, Deep_Feelings doctore...@gmail.com wrote: from that list i have a feeling that python is acting only as quick and dirty work nothing more ! Really? Well, in any case, I can tell you that I know of a number of large commercial web sites built with Django. I just

Re: Reading data from a Microsoft Access 2003 database

2010-05-19 Thread Simon Brunning
On 19 May 2010 10:28:15 UTC+1, Jimoid jimmy.cul...@gmail.com wrote: I use Ubuntu 64 bit and need to develop a programme (ideally in Python) to work on data that is contained in a Microsoft Access 2003 database. I do not need to modify the database, simply read a few columns of data from some

Re: Is this an ok thing to do in a class

2010-05-18 Thread Simon Brunning
On 18 May 2010 06:21:32 UTC+1, Vincent Davis vinc...@vincentdavis.net wrote: Just wondering if there is a problem with mixing a dictionary into a class like this. Everything seems to work as I would expect. No problem at all AFAIC. -- Cheers, Simon B. --

Re: reading XML file using python

2010-05-17 Thread Simon Brunning
On 17 May 2010 09:34:51 UTC+1, shanti bhushan ershantibhus...@gmail.com wrote: Hi , i am new to python.i want to read the XML file using python it ,by using DOm or SAX any of them. I want to read the http://www.google.com(any hyper text) from XML and print that. please give me the sample

Re: reading XML file using python

2010-05-17 Thread Simon Brunning
On 17 May 2010 10:43:06 UTC+1, Shanti Bhushan ershantibhus...@gmail.com wrote: Hi simon, you are right in 2nd paragaraph. i have a piece of XML with some URLs in it that i want to extract. I have no clue from where to get help on this. Please atleast guide me for document or link where i can

Re: Deleting more than one element from a list

2010-04-21 Thread Simon Brunning
On 21 April 2010 20:56, candide cand...@free.invalid wrote: Is the del instruction able to remove _at the same_ time more than one element from a list ? Yup: z=[45,12,96,33,66,'c',20,99] del z[:] z [] -- Cheers, Simon B. -- http://mail.python.org/mailman/listinfo/python-list

Re: An open source AI research project

2010-04-17 Thread Simon Brunning
On 17 April 2010 09:03, David Zhang david...@gmail.com wrote: I have started an open source project to develop human-level Artificial Intelligence... Have you people never seen Terminator? Sheesh. -- Cheers, Simon B. -- http://mail.python.org/mailman/listinfo/python-list

Re: Sometimes the python shell cannot recognize the presence of an attribute.

2010-04-12 Thread Simon Brunning
2010/4/12 Ricardo Aráoz ricar...@gmail.com: Because . ... Guido says so: http://www.python.org/dev/peps/pep-0008/ -- Cheers, Simon B. -- http://mail.python.org/mailman/listinfo/python-list

Re: passing command line arguments to executable

2010-04-04 Thread Simon Brunning
On 3 April 2010 18:20, mcanjo mca...@gmail.com wrote: I tried doing the following code: from subprocess import Popen from subprocess import PIPE, STDOUT exefile = Popen('pmm.exe', stdout = PIPE, stdin = PIPE, stderr = STDOUT) exefile.communicate('MarchScreen.pmm\nMarchScreen.out')[0] and

Re: passing command line arguments to executable

2010-04-03 Thread Simon Brunning
On 3 April 2010 17:09, mcanjo mca...@gmail.com wrote: I have an executable (I don't have access to the source code) that processes some data. I double click on the icon and a Command prompt window pops up. The program asks me for the input file, I hit enter, and then it asks me for and output

Re: Can't define __call__ within __init__?

2010-03-10 Thread Simon Brunning
On 10 March 2010 13:12, Neal Becker ndbeck...@gmail.com wrote: Want to switch __call__ behavior.  Why doesn't this work?  What is the correct way to write this? class X (object):    def __init__(self, i):        if i == 0:            def __call__ (self):                return 0        

Re: Anything like Effective Java for Python?

2010-03-10 Thread Simon Brunning
On 10 March 2010 15:19, kj no.em...@please.post wrote: Subject line pretty much says it all: is there a book like Effective Java for Python.  I.e. a book that assumes that readers are experienced programmers that already know the basics of the language, and want to focus on more advanced

Re: a newbie's question

2010-03-09 Thread Simon Brunning
On 9 March 2010 13:51, Lan Qing efi...@gmail.com wrote: Hi all,       I'm a newbie of python programming language. Welcome! I have used c/c++ for 5 years, and one year experience in Lua programming language. Can any one give me some advice on learning python. Think you for any help!!

Re: Is automatic reload of a module available in Python?

2010-02-18 Thread Simon Brunning
2010/2/17 Arnaud Delobelle arno...@googlemail.com: I know some people will point at more 'pro' ways of testing but this has the merit of being very straightforward.  Then when you move on to more sophisticated techniques, I think you will understand better the motivations behind them. Oh, I

Re: Few questions on SOAP

2010-02-18 Thread Simon Brunning
On 18 February 2010 15:36, joy99 subhakolkata1...@gmail.com wrote: (iv)    Is SOAPpy fine? AFAIK, SOAPpy is unsupported, and a bit on the stale side. Those poor souls forced to make SOAP calls with Python seem to be using Suds mostly these days,. -- Cheers, Simon B. --

Re: search entire drive say c:

2010-02-12 Thread Simon Brunning
On 12 February 2010 12:17, prakash jp prakash.st...@gmail.com wrote: can any of u help to search a file say abc.txt in entire c drive (windows) and print the path/s stating such a files presence. http://code.activestate.com/recipes/499305/ might be a useful start. -- Cheers, Simon B. --

Re: Python version of perl's if (-T ..) and if (-B ...)?

2010-02-12 Thread Simon Brunning
On 12 February 2010 14:14, Christian Heimes li...@cheimes.de wrote: That's a butt ugly heuristic He did say it was from Perl, the home of butt-ugly. -- Cheers, Simon B. -- http://mail.python.org/mailman/listinfo/python-list

Re: Any way to turn off exception handling? (debugging)

2010-02-11 Thread Simon Brunning
On 11 February 2010 16:17, mk mrk...@gmail.com wrote: I'm getting an exception (on socket) handled in a program I'm trying to debug. I have trouble locating where exactly that happens. In such situation turning exception handling off could be useful, bc unhandled exception stack trace is

Re: if {negative} vs. if {positive} style (was: New to Python)

2010-02-10 Thread Simon Brunning
On 10 February 2010 03:36, Tim Chase python.l...@tim.thechases.com wrote: Any thoughts on how others make the choice? There are two criteria that I use here. I'll often tend towards the positive test; it's just that little bit easier to comprehend, I think. On the other hand, if one case is

Re: ANN: obfuscate

2010-02-10 Thread Simon Brunning
On 10 February 2010 01:24, Ben Finney ben+pyt...@benfinney.id.au wrote: The classic example is rot-13 encryption of text in internet messages; it would be a failure of imagination to suggest there are not other, similar use cases. That's built-in: Hello World!.encode('rot-13') 'Uryyb Jbeyq!'

Re: ANN: obfuscate

2010-02-09 Thread Simon Brunning
On 9 February 2010 16:29, Robert Kern robert.k...@gmail.com wrote: On 2010-02-09 09:37 AM, Daniel Fetchinson wrote: If the code base stabilizes in a production version after losing the alphas and betas they would be a great addition to the stdlib, I think. Why? I agree. Why wait? Put them

Re: Help parsing a page with python

2010-01-27 Thread Simon Brunning
2010/1/27 mierdatutis mi mmm...@gmail.com: Hi, I would like to parse a webpage to can get the url of the video download. I use pyhton and firebug but I cant get the url link. Example: The url where I have to get the video link is:

Re: Help parsing a page with python

2010-01-27 Thread Simon Brunning
2010/1/27 mierdatutis mi mmm...@gmail.com: Those videos are generated by javascript. There is some parser with python for javascript??? There is http://github.com/davisp/python-spidermonkey, but simulating the whole context of a browser is going to be a horror. You are probably far better off

Re: Help parsing a page with python

2010-01-27 Thread Simon Brunning
2010/1/27 mierdatutis mi mmm...@gmail.com: Hello again, What test case for Windmill? Can you say me the link, please? http://lmgtfy.com/?q=windmill+test -- Cheers, Simon B. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and Ruby

2010-01-27 Thread Simon Brunning
2010/1/27 Jean Guillaume Pyraksos wis...@hotmail.com: What are the arguments for choosing Python against Ruby for introductory programming ? Frankly, either would be a good choice. I think Python is a little cleaner, but I'm sure you'd find Ruby fans who'd argue the complete opposite. Both

Re: My experiences building a small app on Python

2010-01-26 Thread Simon Brunning
2010/1/26 Cascade3891 mlee3...@gmail.com: It's a bit of a read. But insightful. We'll be the judge of that, surely? ;-) -- Cheers, Simon B. -- http://mail.python.org/mailman/listinfo/python-list

Re: Is python not good enough?

2010-01-25 Thread Simon Brunning
2010/1/25 Albert van der Horst alb...@spenarnc.xs4all.nl: If Go was to compete with anything, they would have give it a name that was Googleable. ;-) If they want it Googleable, it will be. ;-) -- Cheers, Simon B. -- http://mail.python.org/mailman/listinfo/python-list

Re: use of super

2010-01-19 Thread Simon Brunning
2010/1/19 harryos oswald.ha...@gmail.com: I was going thru the weblog appln in practical django book by bennet .I came across this class Entry(Model):        def save(self):                dosomething()                super(Entry,self).save() I couldn't make out why Entry and self are

Re: Create list/dict from string

2010-01-19 Thread Simon Brunning
2010/1/19 Peter Otten __pete...@web.de: Both eval() and json.loads() will do. eval() is dangerous as it allows the user to run arbitrary python code. Something like http://code.activestate.com/recipes/364469/ might be worth a look too. -- Cheers, Simon B. --

Re: What is a list compression in Python?

2010-01-18 Thread Simon Brunning
2010/1/18 Kit wkfung.e...@gmail.com: Hello Everyone, I am not sure if I have posted this question in a correct board. Can anyone please teach me: What is a list compression in Python? Perhaps you mean a list comprehension? If so, see

Re: Author of a Python Success Story Needs a Job!

2010-01-15 Thread Simon Brunning
2010/1/14 Novocastrian_Nomad gregory.j.ba...@gmail.com: Why is it so many, so called high tech companies, insist on the 19th century practice of demanding an employee's physical presence in a specific geographic location. Pair programming and co-location with your end users both hugely

Re: Getting access to the process table from python?

2010-01-14 Thread Simon Brunning
2010/1/13 Roy Smith r...@panix.com: I need to get information about what processes are running on a box. Right now, I'm interested in Solaris and Linux, but eventually probably other systems too.  I need to know things like the pid, command line, CPU time, when the process started running, and

Re: pywinauto to show the dialog , menu, etc

2010-01-01 Thread Simon Brunning
2009/12/31 Hari h...@pillai.co.uk: Hi I am using pywinauto to automate an custom program to startup and load process , execute etc. But cannot determine menuselect. Is there a way or tool which can run against the exe to show the menu, dialog box, list box which are contained within it.

Re: Absolute beginner

2009-12-30 Thread Simon Brunning
2009/12/30 lucbo...@hotmail.com: At a dos-prompt : Python 3.1.1 (r311:74483, Aug 17 2009, 17:02:12) [MSC v.1500 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. print Hello  File stdin, line 1    print Hello                ^ SyntaxError: invalid

Re: Perl to Python conversion

2009-12-28 Thread Simon Brunning
2009/12/25 Aahz a...@pythoncraft.com: I'd write an imperial to metric converter in Python  ;-) Should be possible to use unum (http://bit.ly/4X0PwR) to do the conversions. The SI units are already defined - adding in any necessary imperial units should be easy enough. -- Cheers, Simon B. --

Re:

2009-12-28 Thread Simon Brunning
2009/12/24 Yulin yu...@linklater.co.za: Hi when I start my Pc I get error “ The specified module could not be found. LoadLibrary(pythondll)failed Please Help once I have enterd I get the following….C:\Documents and settings\all users\.clamwin\quarentine\python25.DLL PLEASE help I cant load

Re: OS independent way to check if a python app is running?

2009-12-14 Thread Simon Brunning
2009/12/14 pyt...@bdurham.com: Is there an os independent way to check if a python app is running? if True: print I'm running. ;-) -- Cheers, Simon B. -- http://mail.python.org/mailman/listinfo/python-list

Re: postgresql_autodoc in Python?

2009-12-07 Thread Simon Brunning
2009/12/6 Wolfgang Keller felip...@gmx.net: Hello, has anyone ever implemented something similar to postgresql_autodoc in Python? Dunno - what is it? -- Cheers, Simon B. -- http://mail.python.org/mailman/listinfo/python-list

Re: Where is my namespace?

2009-12-07 Thread Simon Brunning
2009/12/7 vsoler vicente.so...@gmail.com: I take the example from Mark Lutz's excellent book Learning Python. *** In nested1.py  I have: X=99 def printer(): print X *** In nested2.py  I have: from nested1 import X, printer X=88 printer() What is amazing is that running nested2.py

Re: Where is my namespace?

2009-12-07 Thread Simon Brunning
2009/12/7 Steven D'Aprano st...@remove-this-cybersource.com.au: On Mon, 07 Dec 2009 16:25:39 +, Simon Brunning wrote: If you do from blah import the imported module itself isn't bound to any name in the importing module - you can't get at it at all. Not quite -- you can get

Re: can python do this?

2009-12-02 Thread Simon Brunning
2009/12/2 Rounak irounakj...@gmail.com: I am a complete newbie. I want to know if the following can be done using python or should I learn some other language: (Basically, these are applescripts that I wrote while I used Mac OS) Python can do anything Applescript can do with the appscript

Re: pbs scripts

2009-12-02 Thread Simon Brunning
2009/12/2 aoife aoife...@hotmail.com: Hi,very new.hoping to incorporate python into my postgrad. Basically I have 2,000 files.I want to write a script that says: open each file in turn If they are in one directory, look at the glob module. If they are in a bunch of sub-directories, see

Re: reading from a text file

2009-11-30 Thread Simon Brunning
2009/11/27 baboucarr sanneh sanne...@hotmail.com: hi all i would like to create a python program that would read from a text file and returns one result at random. This might be of use: http://code.activestate.com/recipes/426332/#c2 -- Cheers, Simon B. --

Re: Is there something similar to list comprehension in dict?

2009-11-20 Thread Simon Brunning
2009/11/20 Michele Simionato michele.simion...@gmail.com: Yes, but only in Python 3: {(i, x) for i, x in enumerate('abc')} {(0, 'a'), (1, 'b'), (2, 'c')} In Python 2.x, you can do: dict((i, x) for i, x in enumerate('abc')) {0: 'a', 1: 'b', 2: 'c'} (Works in 2.5 - I can't remember when

Re: Language mavens: Is there a programming with if then else ENDIF syntax?

2009-11-18 Thread Simon Brunning
2009/11/17 sjm sjms...@gmail.com: On Nov 16, 12:54 pm, Steve Ferg steve.ferg.bitbuc...@gmail.com wrote: snip Does anybody know a language with this kind of syntax for ifThenElseEndif? Modern-day COBOL: IF      some-condition        do-something ELSE        do-something-else END-IF.

Re: QuerySets in Dictionaries

2009-11-12 Thread Simon Brunning
2009/11/12 scoopseven mark.ke...@gmail.com: I need to create a dictionary of querysets.  I have code that looks like: query1 = Myobject.objects.filter(status=1) query2 = Myobject.objects.filter(status=2) query3 = Myobject.objects.filter(status=3) d={} d['a'] = query1 d['b'] = query2

Re: why does help(import) not work?

2009-11-06 Thread Simon Brunning
2009/11/6 Robert P. J. Day rpj...@crashcourse.ca:  i'm sure there's a painfully obvious answer to this, but is there a reason i can't do: help(import)  File stdin, line 1    help(import)              ^ SyntaxError: invalid syntax import is a keyword, not an object. -- Cheers, Simon B.

Re: regexp help

2009-11-04 Thread Simon Brunning
2009/11/4 Nadav Chernin nada...@qualisystems.com: I’m trying to write regexp that find all files that are not with next extensions:  exe|dll|ocx|py,  but can’t find any command that make it. http://code.activestate.com/recipes/499305/ should be a good start. Use the re module and your regex

Re: regexp help

2009-11-04 Thread Simon Brunning
2009/11/4 Nadav Chernin nada...@qualisystems.com: Thanks, but my question is how to write the regex. re.match(r'.*\.(exe|dll|ocx|py)$', the_file_name) works for me. -- Cheers, Simon B. -- http://mail.python.org/mailman/listinfo/python-list

Re: regexp help

2009-11-04 Thread Simon Brunning
2009/11/4 Nadav Chernin nada...@qualisystems.com: No, I need all files except exe|dll|ocx|py not re.match(r'.*\.(exe|dll|ocx|py)$', the_file_name) Now that wasn't so hard, was it? ;-) -- Cheers, Simon B. -- http://mail.python.org/mailman/listinfo/python-list

Re: self.__dict__ tricks

2009-11-03 Thread Simon Brunning
2009/11/1 Steven D'Aprano st...@remove-this-cybersource.com.au: The only stupid question is the one you are afraid to ask. I was once asked, and I quote exactly, are there any fish in the Atlantic sea? That's pretty stupid. ;-) -- Cheers, Simon B. --

Re: Help with SOAPpy and WSDL.

2009-11-02 Thread Simon Brunning
2009/11/2 Henrik Aagaard Sørensen henrik.soren...@changenetworks.dk: I have a problem with SOAPpy and WSDL. It is explained here: http://www.python-forum.org/pythonforum/viewtopic.php?f=3t=15532 Why not explain it here? In any case, I imagine the advice is going to be to try Suds -

Re: Help with SOAPpy and WSDL.

2009-11-02 Thread Simon Brunning
2009/11/2 Henrik Aagaard Sørensen henrik.soren...@changenetworks.dk: I'll try to explain it here then: A small example on SOAPpy and WSDL. My code: from SOAPpy import WSDL wsdlFile = 'http://www.webservicex.net/country.asmx?wsdl' server = WSDL.Proxy(wsdlFile)

Re: New Python Novice

2009-10-02 Thread Simon Brunning
2009/10/2 baboucarr sanneh sanne...@hotmail.com: Hello Everyone, My name is Baboucarr ..am from the gambia (west africa).. I visited some years back. Friendly people. I just read about python and i want to know how to program with it.. I would like you guys to help me in my road to

Re: help wanted with list

2009-09-24 Thread Simon Brunning
2009/9/24 Ahmed Shamim partha.sha...@gmail.com: list = [ 'a', '1', 'b', '2'] what would be the logic, if I input a to get output 1. Turn it into a dictionary first: mylist = [ 'a', '1', 'b', '2'] mydict = dict(zip(mylist[::2], mylist[1::2])) mydict['a'] '1' -- Cheers, Simon B. --

Re: recommendation for webapp testing?

2009-09-17 Thread Simon Brunning
2009/9/17 Schif Schaf schifsc...@gmail.com: What's the difference between WebDriver and Selenium? Selenium runs in a browser, and uses JavaScript to perform all your automated actions. It need a browser running to work. Several are supported, Firefox, Safari, IE and I think others. You are at

Re: recommendation for webapp testing?

2009-09-16 Thread Simon Brunning
2009/9/16 Schif Schaf schifsc...@gmail.com: I need to do some basic website testing (log into account, add item to cart, fill out and submit forms, check out, etc.). What modules would be good to use for webapp testing like this? http://code.google.com/p/webdriver/ might be worth a look. --

Re: Use python to execute a windows program

2009-09-11 Thread Simon Brunning
2009/9/11 Doran, Harold hdo...@air.org: The way we do this now is a person sits in front of their machine and proceeds as follows: 1) Open windows program 2) Click file - open which opens a dialog box 3) Locate the file (which is a text file) click on it and let the program run. It might

Re: The future of Python immutability

2009-09-07 Thread Simon Brunning
2009/9/7 Terry Reedy tjre...@udel.edu: Dennis Lee Bieber wrote: I'd say the mutables are in the majority G I think it depends on whether one counts classes or instances. Typical programs have a lot of numbers and strings. Ah, but immutable instances can be, and often are, interned. This

Re: Usage of main()

2009-09-04 Thread Simon Brunning
2009/9/4 Manuel Graune manuel.gra...@koeln.de: How come the main()-idiom is not the standard way of writing a python-program (like e.g. in C)? Speaking for myself, it *is* the standard way to structure a script. I find it more readable, since I can put my main function at the very top where

Re: Question on the csv library

2009-08-28 Thread Simon Brunning
2009/8/28 John Machin sjmac...@lexicon.net: Mark, there exist parallel universes the denizens of which use strange notation e.g. 1.234,56 instead of 1,234.56 When displaying data, sure. and would you believe they use ';' instead of ',' as a list separator ... CSV is a data transfer format,

Re: Python for professsional Windows GUI apps?

2009-08-26 Thread Simon Brunning
2009/8/26 geekworking geekwork...@gmail.com: If you are planning a database driven app, you should first settle on a DB server. Any real enterprise DB system will put all of the business logic in the database server. The choice of a front end should be secondary. The trend for some years now

Re: Need cleanup advice for multiline string

2009-08-12 Thread Simon Brunning
2009/8/11 Robert Dailey rcdai...@gmail.com: On Aug 11, 3:40 pm, Bearophile bearophileh...@lycos.com wrote: There are gals too here. It's a figure of speech. And besides, why would I want programming advice from a woman? lol. Thanks for the help. Give the attitudes still prevalent in our

Re: iText for Python

2009-07-27 Thread Simon Brunning
2009/7/27 santhoshvkumar santhosh.vku...@gmail.com:           One of my cousin  suggested me to do a IText PDF converter for python. Actually I heard that there is no separate IText converter either we have to go for jython or GCJ with wrapper. Instead of wrapping, my plan is to create a

Re: generation of keyboard events

2009-07-06 Thread Simon Brunning
2009/7/6 RAM serverin2...@yahoo.com: I am trying to do this on windows. My program(executable) has been written in VC++ and when I run this program, I need to click on one button on the program GUI i,e just I am entering Enter key on the key board. But this needs manual process. So i need to

Re: Need Help

2009-07-02 Thread Simon Brunning
2009/7/2 Tengiz Davitadze davitadze.ten...@gmail.com: Hello. I can't find a wright mail address. If you can help me I need to get an information about UNICODE. I am georgian and I need to write programs on georgian language . If you can transfer this mail or send me a wright mail about

Re: Beginning with Python; the right choice?

2009-06-28 Thread Simon Brunning
2009/6/27 sato.ph...@gmail.com sato.ph...@gmail.com: Thank you for all of the links and advice. What do I want to learn Python for? Again, pardon me for my lack of relevant information.  I am also a journalist (an out of work one at the moment, like so many others) and I feel that learning

Re: Programming language comparison examples?

2009-06-06 Thread Simon Brunning
2009/6/5 bearophileh...@lycos.com: someone: I thought there was a website which demonstrated how to program a bunch of small problems in a number of different languages. http://www.rosettacode.org/wiki/Main_Page http://en.literateprograms.org/LiteratePrograms:Welcome

Re: Wrapping comments

2009-05-11 Thread Simon Brunning
2009/5/10 Tobias Weber t...@gmx.net: (still not gonna use software that doesn't let me type # because it's alt+3 on a UK layout; having to re-learn or configure that is just sick) To use Aquamacs with a UK keyboard, you want to select Options, Option Key, Meta British. Things just work then.

Re: Return value usage

2009-04-29 Thread Simon Brunning
2009/4/29 Zac Burns zac...@gmail.com: I would like to know when my function is called whether or not the return value is used. Is this doable in python? If it is, can it ever be pythonic? AFAIK, no, it's not. The use case is that I have functions who's side effects and return values are

Re: v 3.0 mpkg

2009-02-04 Thread Simon Brunning
2009/2/4 John Forse johnfo...@talktalk.net: Does anyone know if Python v3.0 is available as an .mpkg installer for Mac 10.5.6. I have used 2.5 updated to 2.6.1 this way, but can't find any reference to one on the Python.org download site. I've downloaded the Python 3.0 folder but can't

Re: Date Comparison

2009-02-03 Thread Simon Brunning
2009/2/3 Diez B. Roggisch de...@nospam.web.de: Use the java API of java.util. Or better still, use Joda. -- Cheers, Simon B. -- http://mail.python.org/mailman/listinfo/python-list

Re: JDBC in CPYTHON

2009-02-03 Thread Simon Brunning
2009/2/3 KMCB kmcbrea...@yahoo.com: I was wondering if anyone was aware of a JDBC DBAPI module for cpython. I have looked at PYJDBC and was interested in avoiding using that extra level of ICE. I was thinking maybe someone would have back ported zxJDBC from Jython. Or used that as a

Re: Reading text file with wierd file extension?

2009-02-02 Thread Simon Brunning
2009/2/2 Lionel lionel.ke...@gmail.com: Hi Folks, Python newbie here. I'm trying to open (for reading) a text file with the following filenaming convension: MyTextFile.slc.rsc Some kind of a resource fork, perhaps? Where did the file come from? Python doesn't do anything magic with

Re: Odd syntactic NON-error?

2009-01-30 Thread Simon Brunning
2009/1/30 Alaric Haag h...@lsu.edu: So, is the secret that the period is syntactically an operator like + or * ? Exactly that: http://users.rcn.com/python/download/Descriptor.htm. Sh! -- Cheers, Simon B. -- http://mail.python.org/mailman/listinfo/python-list

  1   2   3   4   5   6   >