Dr. Dobb's Python-URL! - weekly Python news and links (Apr 4)

2005-04-04 Thread Simon Brunning
QOTW: Paraphrasing Occam, I would say 'don't multiply base classes without necessity'. ;) - Michele Simionato The world diversifies, the world congeals. - Raymond Hettinger (commenting on the fact that py.test happily runs unittest test suites) I can think of no better reason for a programmer

Dr. Dobb's Python-URL! - weekly Python news and links (Apr 18)

2005-04-19 Thread Simon Brunning
QOTW: Darn. I finally say something that gets into Quote of the Week, and it's attributed to someone else! -- Greg Ewing (we think) http://groups-beta.google.com/group/comp.lang.python/msg/15b836a557afccb2 If there were something wrong with the API, Guido would have long since fired up the

Dr. Dobb's Python-URL! - weekly Python news and links (Apr 25)

2005-04-26 Thread Simon Brunning
QOTW: Sure, but what about the case where his program is on paper tape and all he has for an editor is an ice pick? - Grant Edwards And in this case, you get improved usability *and* improved speed at the same time. That's the way it should be. - Fredrik Lundh The Simplest Possible

Dr. Dobb's Python-URL! - weekly Python news and links (May 3)

2005-05-03 Thread Simon Brunning
QOTW: The security 'droids have decided that since the MS Office Suite is a 'standard' application then software written in MS Office VBA must be 'safe.' Any other development environments (such as Java, Perl, Cygwin) are 'unsafe' and can't be installed. - Peter Olsen There's nothing wrong with

Dr. Dobb's Python-URL! - weekly Python news and links (May 9)

2005-05-09 Thread Simon Brunning
QOTW: It's not perfect, but then nobody in this thread has offered anything even remotely resembling perfect documentation for regular expressions yet. wink - Peter Hansen Python's flavor of OO is perfectly valid and usable, even though it doesn't follow the Java Holy Bible of Object Orientation

Dr. Dobb's Python-URL! - weekly Python news and links (May 16)

2005-05-16 Thread Simon Brunning
QOTW: As you learn Python, you will find that your PHP code will improve, possibly becoming more and more concise until it disappears completely. - Jorey Bump (Responding to a quotaton of Sturgeon's law: Ninety percent of everything is crap.) fwiw, this is of course why google displays 10 results

Dr. Dobb's Python-URL! - weekly Python news and links (Jul 5)

2005-07-06 Thread Simon Brunning
QOTW: That's what I love in that news group. Someone comes with a stupid and arrogant question, and someone else answers in a calm and reasonable way. - Gustavo Niemeyer After 25 years doing this, I've become something of a Luddite as far as fancy IDEs and non-standard features go... and a huge

Dr. Dobb's Python-URL! - weekly Python news and links (Jul 13)

2005-07-14 Thread Simon Brunning
QOTW: The posts do share an erroneous, implied assumption that the investment in learning each language is equal. Python has a strong competitive advantage over Java and C++ in terms of learnability. A person can get up to speed in a few days with Python. - Raymond Hettinger You know, this is

Dr. Dobb's Python-URL! - weekly Python news and links (Jul 20)

2005-07-21 Thread Simon Brunning
QOTW: Discussing goto statements and Microsoft together is like mixing dynamite and gasoline. - DH 'Spaghetti doesn't quite describe it. I've settled on Lovecraftian: reading the code, you can't help but get the impression of writhing tentacles and impossible angles.' - Robert Kern

Dr. Dobb's Python-URL! - weekly Python news and links (Jul 29)

2005-07-30 Thread Simon Brunning
QOTW: Guido has marked the trail; don't ignore the signs unless you really know where you're going. - Raymond Hettinger 'Proverbs 28:14 JPS Happy is the man that feareth alway; but he that hardeneth his heart shall fall into evil. Obviously an exhortation to not ignore raised exceptions with

London Python Meetup, Wednesday the 4th of October

2006-09-26 Thread Simon Brunning
I'm organising another London Python meetup at The Stage Door, Waterloo, London SE1 8QA (see http://tinyurl.com/ko27s) for Wednesday the 4th of October, anytime after work. Hope to see you there! -- Cheers, Simon B, [EMAIL PROTECTED] --

London Python meetup, Wednesday, October the 10th

2007-09-18 Thread Simon Brunning
ThoughtWorks UK (my employer) have given us the use of a room this time, so I'm looking for volunteer speakers, too. Details here: http://announce.londonpython.org.uk/2007/09/18/london-python-meetup-wednesday-october-the-10th/. -- Cheers, Simon B. [EMAIL PROTECTED] --

London Python meetup, Wednesday, December the 5th

2007-11-13 Thread Simon Brunning
Details here: http://tinyurl.com/2cvtlq -- Cheers, Simon B. [EMAIL PROTECTED] http://www.brunningonline.net/simon/blog/ GTalk: simon.brunning | MSN: small_values | Yahoo: smallvalues -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation:

London Python Meetup, Tuesday May the 6th

2008-04-15 Thread Simon Brunning
It's doubly good time for a Python meet-up. Firstly, Django's Jacob Kaplan-Moss is in town. If I can coax him into speaking, I will. Secondly, what with the release of the Google App Engine, I expect a big increase in interest in Python in general. Details here: http://tinyurl.com/3snu66 --

Pre-Pycon London Python meetup, September the 2nd.

2008-08-21 Thread Simon Brunning
Details here: http://tinyurl.com/5btwsd -- Cheers, Simon B. -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations.html

Correction: London Python Meetup, Wednesday, October the 8th

2008-09-26 Thread Simon Brunning
2008/9/25 Simon Brunning [EMAIL PROTECTED]: Details here: http://tinyurl.com/44zvc4 Sorry - that's *Wednesday* the 8th. I shouldn't be allowed out on my own, I really shouldn't. -- Cheers, Simon B. [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-announce-list

Re: Python Installation

2005-01-12 Thread Simon Brunning
On Tue, 11 Jan 2005 21:00:40 +0100, Fredrik Lundh [EMAIL PROTECTED] wrote: Steve Holden wrote: Hmm, effbot.org seems to be down just now. Sure it'll be back soon, though. http://news.bbc.co.uk/2/hi/europe/4158809.stm Good to see that it was effbot.org that was down, rather that the effbot

Re: Excel module for Python

2005-01-12 Thread Simon Brunning
On Wed, 12 Jan 2005 15:18:09 +0800, sam [EMAIL PROTECTED] wrote: I m wondering which Excel module is good to be used by Python? If you are on Windows, and you have Excel, then the Python for Windows extensions[1] are all you need to drive Excel via COM. O'Reilly's Python Programming on Win32

Re: Excel module for Python

2005-01-12 Thread Simon Brunning
On Wed, 12 Jan 2005 23:19:44 +0800, sam [EMAIL PROTECTED] wrote: No, I don't use MS windows. I need to generate Excel file by printing data to it, just like Perl module Spreadsheet::WriteExcel. If it's just data that needs to go into your spreadsheet, then I'd just build a CSV file if I were

Re: Unclear On Class Variables

2005-01-13 Thread Simon Brunning
On 13 Jan 2005 07:18:26 EST, Tim Daneliuk [EMAIL PROTECTED] wrote: I am a bit confused. I was under the impression that: class foo(object): x = 0 y = 1 means that x and y are variables shared by all instances of a class. But when I run this against two instances of foo,

Re: module on files directories

2005-01-13 Thread Simon Brunning
On Thu, 13 Jan 2005 04:51:22 -0800 (PST), Sara Fwd [EMAIL PROTECTED] wrote: Hi all Can anybody help me find a module or a function that looks in a directory and defines whether the objects in there are files or directories? See os.path.isfile() and os.path.isdir() -

Re: Unclear On Class Variables

2005-01-13 Thread Simon Brunning
On Thu, 13 Jan 2005 08:56:10 -0500, Peter Hansen [EMAIL PROTECTED] wrote: Simon, it's really not about mutability at all. You've changed the example, Err, there *wasn't* an example, not really. The OP just mentioned 'setting the values' of instance members. That *can* mean name binding, but

Re: Octal notation: severe deprecation

2005-01-14 Thread Simon Brunning
On Thu, 13 Jan 2005 16:50:56 -0500, Leif K-Brooks [EMAIL PROTECTED] wrote: Tim Roberts wrote: Stephen Thorne [EMAIL PROTECTED] wrote: I would actually like to see pychecker pick up conceptual errors like this: import datetime datetime.datetime(2005, 04,04) Why is that a conceptual

Re: Fuzzy matching of postal addresses

2005-01-18 Thread Simon Brunning
You might find these at least periperally useful: http://www.brunningonline.net/simon/blog/archives/001291.html http://www.brunningonline.net/simon/blog/archives/001292.html They refer to address formatting rather than de-duping - but normalising soulds like a useful first step to me. --

Re: lambda

2005-01-18 Thread Simon Brunning
On 18 Jan 2005 07:51:00 GMT, Antoon Pardon [EMAIL PROTECTED] wrote: 3 mutating an item in a sorted list *does* *always* cause problems No, it doesn't. It might cause the list no longer to be sorted, but that might or might no be a problem. More specific the Decimal class is mutable and usable

Re: map in Python

2005-01-21 Thread Simon Brunning
On 21 Jan 2005 04:25:27 -0800, Stu [EMAIL PROTECTED] wrote: I have recently switched over to Python from Perl. I want to do something like this in Python: @test = (a1, a2, a3); map {s/[a-z]//g} @test; print @test; However, I take it there is no equivalent to $_ in Python. But in that

Re: map in Python

2005-01-21 Thread Simon Brunning
On Fri, 21 Jan 2005 12:37:46 +, Simon Brunning [EMAIL PROTECTED] wrote: This what you want? import re test = [a1, a2, a3] test = [re.sub([a-z], , item) for item in test] test ['1', '2', '3'] Or, if you *must* use map, you can do: test = map(lambda item: re.sub([a-z], , item

Re: circular iteration

2005-01-21 Thread Simon Brunning
On 21 Jan 2005 08:31:02 -0800, Flavio codeco coelho [EMAIL PROTECTED] wrote: hi, is there a faster way to build a circular iterator in python that by doing this: c=['r','g','b','c','m','y','k'] for i in range(30): print c[i%len(c)] I don''t know if it's faster, but: import

Re: Python 2.1 - 2.4 differences

2005-01-24 Thread Simon Brunning
On Mon, 24 Jan 2005 17:13:44 +0100, BOOGIEMAN [EMAIL PROTECTED] wrote: I found some e-book about Python 2.1, I want to print it but just to check first if sintax of Python 2.1 is same as 2.4 ? Pretty musch the same, but naturally, some things have changed. See these documents for the major

Re: private variables a.k.a. name mangling (WAS: What is print? A function?)

2005-01-25 Thread Simon Brunning
On Mon, 24 Jan 2005 12:17:13 -0600, Philippe C. Martin [EMAIL PROTECTED] wrote: I use __for private variables because I must have read on net it was the way to do so - yet this seems to have changed - thanks: http://www.network-theory.co.uk/docs/pytut/tut_77.html Nope, that's still the

Re: Question: loading a shared object in python

2005-01-26 Thread Simon Brunning
On Tue, 25 Jan 2005 23:19:01 +0200, Pro Grammer [EMAIL PROTECTED] wrote: Hello, all, I am not sure if this is the right place to ask, but could you kindly tell me how to load a shared object (like libx.so) into python, so that the methods in the .so can be used? That too, given that the shared

Re: fast list lookup

2005-01-26 Thread Simon Brunning
On Wed, 26 Jan 2005 06:45:29 -0800 (PST), Klaus Neuner [EMAIL PROTECTED] wrote: what is the fastest way to determine whether list l (with len(l)3) contains a certain element? If the list isn't sorted, I doubt you'll do better than if an_element in my_list: # do whatever If the list is

Re: Help With Python

2005-01-26 Thread Simon Brunning
On Wed, 26 Jan 2005 15:55:28 -, Judi Keplar [EMAIL PROTECTED] wrote: I am currently taking a course to learn Python and was looking for some help. I need to write a Python statement to print a comma- separated repetition of the word, Spam, written 511 times (Spam, Spam, Spam). Can

Re: Loop in list.

2005-02-08 Thread Simon Brunning
On Tue, 08 Feb 2005 06:50:31 -0800 (PST), Jim [EMAIL PROTECTED] wrote: Where did this type of structure come from: mat = ['a' for i in range(3)]? This will produce a list of three elements but I don't see reference for it in any of the books. It's called a List Comprehension. There's

Re: Effbot's SimpleXMLWriter fails when py2exe'd

2005-02-08 Thread Simon Brunning
On Tue, 08 Feb 2005 08:35:51 -0800 (PST), Erik Bethke [EMAIL PROTECTED] wrote: I am getting this strange error log when writing XML files with his XML writer. It appears to be fouling up on the encoding, ONLY in the exe version. Runs fine and great as a python script.

Re: [N00B] What's %?

2005-02-10 Thread Simon Brunning
On Thu, 10 Feb 2005 09:41:07 -0800 (PST), administrata [EMAIL PROTECTED] wrote: Hi! it's been about a week learning python! I've read 'python programming for the absolute begginer' I hope you are enjoying it. ;-_ I don't understand about % like... 107 % 4 = 3 7 % 3 = 1 It;'s modular

Re: Python and version control

2005-02-11 Thread Simon Brunning
On Thu, 10 Feb 2005 23:03:43 +, Alan Kennedy [EMAIL PROTECTED] wrote: In my circles, VSS is most often referred to as Visual Source Unsafe. I always find it amusing that VSS's icon is a safe - with the door wide open. -- Cheers, Simon B, [EMAIL PROTECTED],

Re: Alternative to raw_input ?

2005-02-11 Thread Simon Brunning
On Fri, 11 Feb 2005 17:26:04 +0100, BOOGIEMAN [EMAIL PROTECTED] wrote: I need something like Press any key to continue code for my program. Currently I use : raw_input(Press Enter to continue ) but it's lame. Err, why? -- Cheers, Simon B, [EMAIL PROTECTED],

Re: Alternative to raw_input ?

2005-02-14 Thread Simon Brunning
On Fri, 11 Feb 2005 17:37:19 +0100, BOOGIEMAN [EMAIL PROTECTED] wrote: It looks to ugly this way. I want to press any key without ENTER to continue You'll only got your users complaining that they haven't got an 'any' key... -- Cheers, Simon B, [EMAIL PROTECTED],

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-14 Thread Simon Brunning
On Mon, 14 Feb 2005 14:23:08 +0200, Ilias Lazaridis [EMAIL PROTECTED] wrote: (snip) But if those answers above were of official nature, I must seriously rethink if I can rely on _any_ system which is based on python, as the foundation and the community do not care about essential needs and

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-14 Thread Simon Brunning
On Mon, 14 Feb 2005 14:12:57 +0100, bruno modulix [EMAIL PROTECTED] wrote: Why do you hate Perl and Ruby community that much ? Oh, I don't. But fair's fair - we've carried our share of the burden, surely? But-don't-get-me-started-on-those-Groovy-bastards-ly Y'rs, Simon B, [EMAIL PROTECTED],

Re: Variables.

2005-02-15 Thread Simon Brunning
On Tue, 15 Feb 2005 04:30:30 -0800 (PST), administrata [EMAIL PROTECTED] wrote: I wrote this, It's a bit lame though I = Allen me = Allen my = Allen's print \ %s woke up early in the morning. But, it was unusal by %s. %s pillow was with %s. %s didn't want to wake up But, %s tried my

Re: Test for structure

2005-02-16 Thread Simon Brunning
On Wed, 16 Feb 2005 07:11:08 -0800 (PST), alex [EMAIL PROTECTED] wrote: how can I check if a variable is a structure (i.e. a list)? For my special problem the variable is either a character string OR a list of character strings line ['word1', 'word2',...] So how can I test if a variable 'a'

Re: Accessing a dll from Python

2005-10-21 Thread Simon Brunning
On 21/10/05, Grant Edwards [EMAIL PROTECTED] wrote: Sorry, I've no clue about anything VB-related unless it's Victoria Bitter. +1 QOTW. -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: syntax question - if 1:print 'a';else:print 'b'

2005-10-27 Thread Simon Brunning
On 27/10/05, Gregory Piñero [EMAIL PROTECTED] wrote: So much for writing my whole program on one line :-( http://www.unixuser.org/~euske/pyone/ But you didn't hear it from me, OK? ;-) -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ --

Re: Python and DevTrack?

2005-11-02 Thread Simon Brunning
On 1 Nov 2005 10:57:29 -0800, warpcat [EMAIL PROTECTED] wrote: I'm a python nubie, so be gental. I've been setting up functionality by managing my Perforce clientspec with python (since it seems all of P4's commands are avaliable at the prompt), and I'd love to get access to DevTrack in the

Re: Python's website does a great disservice to the language

2005-11-02 Thread Simon Brunning
On 02/11/05, Fredrik Lundh [EMAIL PROTECTED] wrote: a version of Paint that works on a Mac, an obstreperous mentality, and a sense of humour. what else do you need? Biscuits. You need biscuits. Treating-this-thread-as-seriously-as-it-deserves-ly y'rs, Simon B. --

Re: Pythonwin - Word automation - Removing watermark not working

2005-11-05 Thread Simon Brunning
On 04/11/05, Gregory Piñero [EMAIL PROTECTED] wrote: Is there a different group/mailing list I should try? Does anyone know if there is a pythonwin group/list for example? There is: http://mail.python.org/mailman/listinfo/python-win32. -- Cheers, Simon B, [EMAIL PROTECTED],

Re: Addressing the last element of a list

2005-11-08 Thread Simon Brunning
On 8 Nov 2005 01:43:43 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: But if lst[42][pos] happens to hold an integer value, then a = lst[42][pos] will _copy_ that integer value into 'a', right? Nope. It will bind the name 'a' to the integer object. Changing 'a' will not change the

Re: what the %?....

2005-11-08 Thread Simon Brunning
On 07/11/05, john boy [EMAIL PROTECTED] wrote: Hey can somebody tell me what the % function does...I am not math illiterate...its just a new symbol for meis it a divisor? remainder something another?? For numeric values, it's the modulo operator - see http://docs.python.org/ref/binary.html

Re: Pywin32: How to import data into Excel?

2005-11-08 Thread Simon Brunning
On 08/11/05, Dmytro Lesnyak [EMAIL PROTECTED] wrote: I need to import some big data into Excel from my Python script. I have TXT file (~7,5 Mb). Have you considered converting your text data to CSV format? Excel opens CSV files happily enough, and you could always automate save-as-workbook and

Re: any python module to calculate sin, cos, arctan?

2005-11-08 Thread Simon Brunning
On 08/11/05, Shi Mu [EMAIL PROTECTED] wrote: any python module to calculate sin, cos, arctan? http://docs.python.org/lib/module-math.html I seem to be posting loads of links to the docs today... -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ --

Re: Sorting Documentation

2005-11-08 Thread Simon Brunning
On 8 Nov 2005 02:27:29 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I want to read a little bit about sorting in Python (sorted() and method sort()). But I can't seem to find anything in the documentation at the homepage? Sorted() is documented here -

Re: Sorting Documentation

2005-11-08 Thread Simon Brunning
On 8 Nov 2005 02:32:44 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: For example, where can I find the official documentation on the list.sort() method? http://docs.python.org/lib/typesseq-mutable.html -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ --

Re: output question 1

2005-11-10 Thread Simon Brunning
On 10/11/05, leewang kim [EMAIL PROTECTED] wrote: I wrote the following code and got the output: a 13 0 None b 81 3 (snip) where are those 'none' from? and how can I remove them? class Point: def __init__(self,x,y,name): self.x = x self.y = y self.name =

Re: Is there a built-in method for transforming (1, None, Hello!) to 1, None, Hello!?

2005-11-11 Thread Simon Brunning
On 11 Nov 2005 07:21:46 -0800, Daniel Crespo [EMAIL PROTECTED] wrote: Is there a built-in method for transforming (1,None,Hello!) to 1,None,Hello!? There's no conversion to do: (1,None,Hello!) (1, None, 'Hello!') 1,None,Hello! (1, None, 'Hello!') They are both tuples contining identicle

Re: Python Countdown

2005-11-11 Thread Simon Brunning
On 11/11/05, john boy [EMAIL PROTECTED] wrote: I am running the following program from the example in how to think like a computer scientist def countdown(n): if n ==0: print Blastoff! else: print n countdown (n-1) countdown (1000) When I set

Re: Python Countdown

2005-11-11 Thread Simon Brunning
On 11/11/05, john boy [EMAIL PROTECTED] wrote: I have adjusted the program to: import sys. sys. getrecursionlimit() sys.setrecursionlimit(2000) def countdown (n): if n ==0: print blastoff else: print n countdown (n-1) countdown (1200) this

Re: string help

2005-11-15 Thread Simon Brunning
On 14/11/05, john boy [EMAIL PROTECTED] wrote: using the following program: prefixes = JKLMNOPQ suffix = ack for letter in prefixes: print letter + suffix if prefixes == O or Q Here you need: if prefixes == O or prefixes == Q print letter + u + suffix For this program

Re: Is Python worth it??

2005-11-15 Thread Simon Brunning
On 14/11/05, john boy [EMAIL PROTECTED] wrote: I have started out trying to learn Python for my first programming language. I am starting off with the book how to think like a computer scientist. I spend about 4-5 hrs a day trying to learn this stuff. It is certainly no easy task. I've been

Re: how to think like a computer scientist

2005-11-15 Thread Simon Brunning
On 14/11/05, john boy [EMAIL PROTECTED] wrote: Does anyone know if there is an answer key to all of the exercises in how to think like a computer scientistsure would be a lot easier to refer to that instead of tying up this forum with questions about exercises I'm sure that have been asked

Re: compare list

2005-11-15 Thread Simon Brunning
On 15/11/05, Shi Mu [EMAIL PROTECTED] wrote: it does not work. len(set(lisA).intersection(set(lisB))) == 2 Traceback (most recent call last): File interactive input, line 1, in ? NameError: name 'set' is not defined 'set' is introduced as a built-in at Python 2.4. If you have 2.3, there's

Re: compare list

2005-11-15 Thread Simon Brunning
On 15/11/05, Shi Mu [EMAIL PROTECTED] wrote: Yes, i am using python 2.3, I have used from sets import * but still report the same error: Traceback (most recent call last): File interactive input, line 1, in ? NameError: name 'set' is not defined I said analogous, not identical. try

Re: compare list

2005-11-15 Thread Simon Brunning
On 15/11/05, Ben Bush [EMAIL PROTECTED] wrote: an error reported: Traceback (most recent call last): File C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py, line 310, in RunScript exec codeObject in __main__.__dict__ File C:\temp\try.py, line 8, in ? from

Re: compare list

2005-11-15 Thread Simon Brunning
On 15/11/05, Ben Bush [EMAIL PROTECTED] wrote: I found I named the following python file as sets.py, which brought the problem (is that right?). i changed it to other name and it works. But the logic output is wrong. from sets import Set as set lisA=[1,2,5,9] lisB=[9,5,0,2] lisC=[9,5,0,1]

Re: Can anyone tell me if pygame and Tkinter can work together?

2005-11-16 Thread Simon Brunning
On 16/11/05, Nathan Pinno [EMAIL PROTECTED] wrote: It worked, but unfornately I can't use this line as it brings up errors: from Tkinter (or pygame) import * Anyway around this little bug? What's the error? -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ --

Re: the PHP ternary operator equivalent on Python

2005-11-18 Thread Simon Brunning
On 18 Nov 2005 10:53:04 -0800, Daniel Crespo [EMAIL PROTECTED] wrote: I would like to know how can I do the PHP ternary operator/statement (... ? ... : ...) in Python... Wait for Python 2.5 - http://www.python.org/peps/pep-0308.html. -- Cheers, Simon B, [EMAIL PROTECTED],

Re: Controlling windows gui applications from python

2005-11-18 Thread Simon Brunning
On 18/11/05, tim [EMAIL PROTECTED] wrote: Hi all, I'm almost as new to this list as to python so I hope I don't get a this has been answered a 100 times before or anything... Currently I am using a program named 'Macro Scheduler' for automating programs that don't have a command line version.

Re: Is Python weak on the web side?

2005-11-20 Thread Simon Brunning
On 19/11/05, Michael Goettsche [EMAIL PROTECTED] wrote: On Sunday 20 November 2005 00:24, Tony wrote: If I'd like to learn Python for web-development, what are the options available? A nice framework is CherryPy: http://www.cherrypy.org or Turbogears, which is based on CherryPy:

Re: Controlling windows gui applications from python

2005-11-22 Thread Simon Brunning
On 21/11/05, tim [EMAIL PROTECTED] wrote: Thanks for this tip, this looks like exactly what I need. Is there a more extended documentation for watsup somewhere ? Err, not a lot, no. I didn't find info on: how to send keystrokes to a program. You don't do that. WATSUP uses WinGuiAuto, which

Re: user-defined operators: a very modest proposal

2005-11-23 Thread Simon Brunning
On 23/11/05, Joseph Garvin [EMAIL PROTECTED] wrote: What do you mean by unicode operators? Link? http://fishbowl.pastiche.org/2003/03/19/jsr666_extended_operator_set -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ --

Re: Converting a flat list to a list of tuples

2005-11-23 Thread Simon Brunning
On 22/11/05, Bengt Richter [EMAIL PROTECTED] wrote: That would be a counter-intuitive thing to do. Most things go left-right in order as the default assumption. +1 -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ --

Re: SelfExtract with zipfile

2005-11-23 Thread Simon Brunning
On 23/11/05, Catalin Lungu [EMAIL PROTECTED] wrote: Hi, I need to compress files in self-extract archive. I use the zipfile module. Is there an option or parameter to do that? No, AFAIK. If you have a command line tool, perhaps you could try driving that. -- Cheers, Simon B, [EMAIL

Re: user-defined operators: a very modest proposal

2005-11-23 Thread Simon Brunning
On 23/11/05, Fredrik Lundh [EMAIL PROTECTED] wrote: see also: http://www.brunningonline.net/simon/blog/archives/000666.html http://www.python.org/peps/pep-0666.html PEP 666 should have been left open. There are a number of ideas that come up here that should be added to it - and i'm

Re: Python as Guido Intended

2005-11-24 Thread Simon Brunning
On 24 Nov 2005 10:21:51 GMT, Antoon Pardon [EMAIL PROTECTED] wrote: But only Guido, thinks like Guido and then even Guido may now think differently than he thought before. And what if Guido had a bad day when he came up with something, should we just adopt to what he had in mind without

Re: Python as Guido Intended

2005-11-24 Thread Simon Brunning
On 24 Nov 2005 11:30:04 GMT, Antoon Pardon [EMAIL PROTECTED] wrote: But he's consistently a better judge of language design than I am, and in all likelihood better than you, too. If you like Python, it's 'cos you like the decisions he's made over many years. So, that makes that about a

Re: Understanding Python Documentation

2005-11-24 Thread Simon Brunning
On 24/11/05, Josh Cronemeyer [EMAIL PROTECTED] wrote: I have very little experience programming in python but considerable experience with java. One thing that is frustrating me is the differences in the documentation style. Javadocs, at the top level are just a list of packages. Drilling

Re: Python as Guido Intended

2005-11-24 Thread Simon Brunning
On 24/11/05, Bengt Richter [EMAIL PROTECTED] wrote: Where my first impulse is to think that one of decisions is wrong, nine times out of ten in time I'll come to find that I was wrong and he was right. You have a reservation about that other 10% ? ;-) The other 10%, I've just not worked it

Python book for a non-programmer

2005-11-25 Thread Simon Brunning
I have a non-programming friend who wants to learn Python. It's been so long since I've been in her shoes that I don't feel qualified to judge the books aimed at people in her situation. I know of two such books: http://www.freenetpages.co.uk/hp/alan.gauld/ http://www.ibiblio.org/obp/thinkCSpy/

Re: Python book for a non-programmer

2005-11-25 Thread Simon Brunning
On 25 Nov 2005 03:23:33 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: http://www.python.org/doc/Intros.html and two great texts when she has covered the basics are: http://diveintopython.org/ http://www.mindview.net/Books/TIPython I wouldn't have thought either of those was suitable

Re: How to stop a linux process

2005-11-28 Thread Simon Brunning
On 11/28/05, Glen [EMAIL PROTECTED] wrote: When I used the following line to play a midi file in linux, return_value = os.system('timidity test.mid') I have encountered two problems. 1. The python script halts until timidity has finished. 2. If I had control of the script, I can't think how

Re: Syntax for extracting multiple items from a dictionary

2004-12-01 Thread Simon Brunning
On Wed, 1 Dec 2004 10:23:28 -0500, Dave Merrill [EMAIL PROTECTED] wrote: anton muhin wrote: Or dict((key, row[key]) for key in cols). I'm on Py 2.3.3, and neither of these appear to work. Can someone confirm? I can't see anything in the 2.4 release notes that point to where this would have

Re: decorators ?

2004-12-03 Thread Simon Brunning
On Fri, 03 Dec 2004 02:43:22 GMT, Jp Calderone [EMAIL PROTECTED] wrote: Bob Ippolito, you mean. And, no offense to Bob, but woopidy freaking doo. Now the vast hordes of PyObjC developers get to use their editor's name completion feature a little bit less. What an awesome justification

Re: Newbie alert !

2004-12-03 Thread Simon Brunning
On Fri, 03 Dec 2004 06:38:54 -0500, Jean Montambeault [EMAIL PROTECTED] wrote: I am not only learning Python but programming itself ; reading your posts makes me believe that nobody is that much of a beginner here. Is there a newgroup or list for my type somewhere I can't find it ? The tutor

Re: win32 extensions for Python 2.4

2004-12-07 Thread Simon Brunning
On Tue, 7 Dec 2004 21:25:03 +1030, Ishwor [EMAIL PROTECTED] wrote: Hello all, I was looking through Mark Hammond's website for win32 extensions for Python 2.4 but couldn't find it. If i am not wrong has anyone any idea when it will be available or is it being worked on? The activestate's

Re: gather information from various files efficiently

2004-12-14 Thread Simon Brunning
On Tue, 14 Dec 2004 10:40:56 -0500, Peter Hansen [EMAIL PROTECTED] wrote: Keith Dart wrote: Sigh, this reminds me of a discussion I had at my work once... It seems to write optimal Python code one must understand various probabilites of your data, and code according to the likely scenario.

Re: Module question

2004-12-16 Thread Simon Brunning
On Wed, 15 Dec 2004 18:10:40 -0800, Jeff Shannon [EMAIL PROTECTED] wrote: The difference being that when Excel opens up a *.CSV, it goes through the import wizard. Are you sure that's true? When I open a *.csv file, Excel *appears* to open it without running any kind of wizard. Certainly I

Re: Email filters in python

2004-12-17 Thread Simon Brunning
On Fri, 17 Dec 2004 15:07:26 GMT, sf [EMAIL PROTECTED] wrote: Would someome like to post their email filters code. Its so common that probably some standard library supports it or many would have written it already. If I have basic structure, I can take from there.

Re: extract news article from web

2004-12-29 Thread Simon Brunning
On 22 Dec 2004 09:22:15 -0800, Zhang Le [EMAIL PROTECTED] wrote: Hello, I'm writing a little Tkinter application to retrieve news from various news websites such as http://news.bbc.co.uk/, and display them in a TK listbox. All I want are news title and url information. Well, the BBC

Re: help - problem installing pywin32

2004-12-30 Thread Simon Brunning
On 27 Dec 2004 10:18:18 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello, I was trying to install pywin32 on one computer which has Python 2.4 installed and it failed. The error message I got was Can't load Python for pre-install script. I'm not sure what the problem actually is,

Re: OT: spacing of code in Google Groups

2005-01-06 Thread Simon Brunning
On Wed, 05 Jan 2005 22:57:33 GMT, JanC [EMAIL PROTECTED] wrote: Rectangular selection only works with the mouse in SciTE/Scintilla: alt-click-drag. Nope - hold down alt-shift, and select with the cursor keys. -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ --

Re: python reading/writing ms-project files?

2005-01-07 Thread Simon Brunning
On 6 Jan 2005 16:05:07 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: any existing or pointers on how to do this? If you are running on Windows and have a copy of Project, then COM automation is probably your best bet. See http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/279003 for a

Re: countint words from an input string

2005-01-07 Thread Simon Brunning
On Fri, 7 Jan 2005 15:58:06 +0100, Øystein Western [EMAIL PROTECTED] wrote: Try to write som code that will get an input string from the user. Futher more, I'd like to have the program to count all the word the user has written. Startet out like this: /- s = raw_input(Write a

Re: Getting rid of self.

2005-01-07 Thread Simon Brunning
On 7 Jan 2005 08:10:14 -0800, Luis M. Gonzalez [EMAIL PROTECTED] wrote: The word self is not mandatory. You can type anything you want instead of self, as long as you supply a keyword in its place (it can be self, s or whatever you want). You *can*, yes, but please don't, not if there's any

Re: ANN: Dao Language v.0.9.6-beta is release!

2005-12-02 Thread Simon Brunning
On 12/2/05, Dave Hansen [EMAIL PROTECTED] wrote: FWIW, indentation scoping one one of the features that _attracted_ me to Python. +1 QOTW OK, it's a bit of a cliche. But it's a cliche because it's *true*. -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ --

Re: Bitching about the documentation...

2005-12-07 Thread Simon Brunning
On 12/7/05, Steven D'Aprano [EMAIL PROTECTED] wrote: But none of them are the cost of Python, which is free. It really isn't a scam, nobody is going to come knocking at your door with a surprise bill for using Python. Well, there is the PSU's Spanish Inquisition division. Last week they barged

Re: first post: new to pythong. some questions.

2005-12-08 Thread Simon Brunning
On 12/8/05, shawn a [EMAIL PROTECTED] wrote: Hello. Im brand new to this list and to python. Ive recently started reading about it and am now in the tinkering stage. Welcome to Python! I have a script im working on that i need some asistance debugging. Its super small and should be a

Re: Self-awareness of imported modules? Do they know where they live?

2005-12-15 Thread Simon Brunning
The only self aware Python scripts that I'm aware are the timbot and the effbot. Their sources are available from the PSU website at -- http://mail.python.org/mailman/listinfo/python-list

Re: Why and how there is only one way to do something?

2005-12-15 Thread Simon Brunning
On 12/15/05, Steve Holden [EMAIL PROTECTED] wrote: Aahz wrote: python -c 'import this' Faster: python -m this So, there's two ways to do it. ;-) -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Overlapping Regular Expression Matches With findall()

2005-12-15 Thread Simon Brunning
On 15 Dec 2005 12:26:07 -0800, Mystilleef [EMAIL PROTECTED] wrote: I want a pattern that scans the entire string but avoids returning duplicate matches. For example cat, cate, cater may all well be valid matches, but I don't want duplicate matches of any of them. I know I can filter the list

  1   2   3   4   5   6   >