Re: [Tutor] String formatting expression "g" conversion type case.

2013-01-24 Thread Barnaby Scott
On 24/01/2013 13:29, Krupkina Lesya Olegovna wrote: Hello! I’m newcomer to Python and I’m on documentation reading stage and trying some of examples. I’m using Win7 x64 OS and Python 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)]. I try to understand how string format expres

Re: [Tutor] miniwiki 1.3 BETA bugs

2007-02-26 Thread Barnaby Scott
Kirk Z Bailey wrote: > RE leaves me totally confuzzzeddded. Yep, so confuised I'm having > trouble spelling it. Sp this one line will replace both words and give a > reliable result? > > Barnaby Scott wrote: > [snip] >> No idea if it has anything to do with y

Re: [Tutor] miniwiki 1.3 BETA bugs

2007-02-23 Thread Barnaby Scott
return bool(re.match('^([A-Z][a-z]+){2,}$', word)) Of course you need to import re, but that seems a small price to pay! HTH Barnaby Scott ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] string.uppercase: too many for locale

2007-01-11 Thread Barnaby Scott
Kent Johnson wrote: > Barnaby Scott wrote: >> Can anyone explain the following: I was getting string.uppercase >> returning an unexpected number of characters, given that the Python >> Help says that it should normally be A-Z. Being locale-dependent, I >> checked th

[Tutor] string.uppercase: too many for locale

2007-01-10 Thread Barnaby Scott
ËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ >>> print string.lowercase abcdefghijklmnopqrstuvwxyzƒšœžßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ >>> What am I missing here? Surely for UK English, I really should just be getting A-Z and a-z. In case it is relevant, the platform is Windows 2000. Thanks Barnaby Scott ___

Re: [Tutor] Communicating with Win2000 runas.exe

2006-08-17 Thread Barnaby Scott
Tim Golden wrote: > [Barnaby Scott] > > | So I'm thinking along these lines: > | > | import subprocess > | sp = subprocess.Popen(r'C:\WINNT\SYSTEM32\runas.exe > | /user:administrator > | C:\Program Files\Microsoft Games\Age of Mythology\aom.exe') > | #s

[Tutor] Communicating with Win2000 runas.exe

2006-08-17 Thread Barnaby Scott
's password, but I can't get anything to work in terms of getting the script to provide the password. Am I barking up the wrong tree here? Any clues would be gratefully received. (Even if I do get this to work, my next trick is to hide the password from any prying eye

[Tutor] database applications with Python - where to start

2005-05-05 Thread Barnaby Scott
Hi, this is one of those difficult questions about where to start! I want to create a book-keeping/accounting application for my own use 1. because I can't find any that suits me, and 2. because I want to improve and extend my knowledge of Python. Clearly this is going to be a database applicatio

[Tutor] Is self.__init__() call bad style?

2005-04-22 Thread Barnaby Scott
I am working on a script at the moment, in which I seem to need to re-initialise a class instance from within some of its methods. Before I go too much further down this route - could anyone comment on whether the call self.__init__() is in itself considered bad style or 'unpythonic'? For instance

[Tutor] Code review

2005-01-25 Thread Barnaby Scott
If anyone has the time to look through an entire script, I would would be very grateful for any comments, tips or suggestions on a wiki-engine script I am working on. http://www.waywood.co.uk/cgi-bin/monkeywiki.py (this will download rather than execute) It does work, but I have not been using Py

RE: [Tutor] Re: glob or filter help

2005-01-22 Thread Barnaby Scott
For anyone who doesn't like lambda, how about import os def get_fles(exts, upd_dir): return [i for i in os.listdir(upd_dir) if i.split('.')[-1] in exts] > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > Behalf Of Javier > Ruere > Sent: 22

RE: [Tutor] class instance with identity crisis

2005-01-12 Thread Barnaby Scott
rning lots! Thanks > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Behalf Of Alan Gauld > Sent: 12 January 2005 20:13 > To: Alan Gauld; Barnaby Scott; 'Tutor' > Subject: Re: [Tutor] class instance with identity crisis > &

[Tutor] class instance with identity crisis

2005-01-12 Thread Barnaby Scott
This is probably a very easy question, and one that I was shocked to find I was stuck on, having thought I understood classes! I was wondering how you can get an instance of a class to change itself into something else (given certain circumstances), but doing so from within a method. So: class Da

RE: [Tutor] Hi I made a mistake

2004-12-21 Thread Barnaby Scott
You *have* signed up to get help, it's just that you see all the mail to the mailing list. The requests for help go to all subscribers, not just a select group of 'tutors' - obviously you won't be offering solutions just yet, but maybe one day you will! This behaviour is the whole point of a mailin