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

2005-05-24 Thread Simon Brunning
groups-beta.google.com/group/comp.lang.python/browse_thread/thread/7eba2d6efd271707 Simon Percivall and Jp Calderone show Michael Chermside how to process subprocess module output a line at a time: http://groups-beta.google.com/group/comp.lang.python/browse_thread/thread/df6854e

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

2005-05-25 Thread Simon Brunning
seldom wrong. That's a big part of the reason that I like it here. -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

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

2005-05-25 Thread Simon Brunning
groups-beta.google.com/group/comp.lang.python/browse_thread/thread/7eba2d6efd271707 Simon Percivall and Jp Calderone show Michael Chermside how to process subprocess module output a line at a time: http://groups-beta.google.com/group/comp.lang.python/browse_thread/thread/df6854e

Re: vim configuration for python

2005-05-25 Thread Simon Percivall
I don't know if the binary editions include the Misc directory, but if you download the Python source you'll find a directory called Misc. In it, there's a vimrc file. -- http://mail.python.org/mailman/listinfo/python-list

Re: using a com automation object (how do I avoid crash?)

2005-05-26 Thread Simon Brunning
e_string_buffer function for creating mutable memory blocks, so you might do somethign like: cams = list(ctypes.create_string_buffer(256) for _ in range(10)) 256 is a wild guess, obviously. ;-) -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: how to import a module from a arbitraty path?

2005-05-26 Thread Simon Brunning
import using __import__(). -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: how to convert string to list or tuple

2005-05-26 Thread Simon Brunning
ng answer - *don't* use eval unless you are in control of the source of the string that you are evaluating. -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Access from one class to methode of other class

2005-05-26 Thread Simon Brunning
On 5/26/05, VK <[EMAIL PROTECTED]> wrote: > That is not real code, only dummy describing the problem We realise that. The problem is that there are problems in your dummy in addition to the real problems, and we can't tell them apart. -- Cheers, Simon B, [EMAIL PR

CygWin ODBC

2005-05-27 Thread Simon Faulkner
Hi All, I am new to Cygwin and am hoping that someone here will be able to tell me how to get ODBC running in Python on Cygwin. Maximum gratefullness... Simon -- http://mail.python.org/mailman/listinfo/python-list

Re: __init__() not called automatically

2005-05-27 Thread Simon Brunning
elf. It takes me an hour or to reset my brain, and for a short while, there are bloody 'this'es, braces and semi-colons everywhere. Sanity soon returns, though. -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Incrementing letters

2005-05-27 Thread Simon Brunning
> but i can't work out how to do this this in python?? Here's one that works on multiple character strings, with carrying. Rather silly, really. <http://www.brunningonline.net/simon/blog/archives/001787.html> -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: CygWin ODBC

2005-05-27 Thread Simon Faulkner
Steve Holden wrote: > Simon Faulkner wrote: > >> Hi All, >> >> I am new to Cygwin and am hoping that someone here will be able to >> tell me how to get ODBC running in Python on Cygwin. >> >> Maximum gratefullness... >> >> >> Simon >

Re: __call__

2005-05-28 Thread Simon Percivall
Look at http://docs.python.org/ref/callable-types.html >>> class Test(object): ... def __call__(self): ... print "the instance was called" ... >>> t = Test() >>> t() the instance was called Is this what you wanted? -- http://mail.python.org/mailman/listinfo/python-list

Re: scripting browsers from Python

2005-05-31 Thread Simon Brunning
yukhbose.com/python/IEC/> for example - and other browsers should be able to be automated either via COM or by driving the GUI with WATSUP (<http://www.tizmoi.net/watsup/intro.html>). -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

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

2005-05-31 Thread Simon Brunning
QOTW: "Not tested but confident should be an oxymoron for a programmer." - Peter Otten (Asked "Is this unsurprising if I look at it right?") - "Yes; in general this is true across many domains for a very large number of referents of "it" :-)" - John Machin "Strong typing means there [are] a lot

Re: The need to put "self" in every method

2005-05-31 Thread Simon Brunning
be 'self'. You could use 'this', or 's', or whatever. Of course, if you *don't* use 'self', you should expect an angly mob with pitchforks and torches outside your castle. -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbee question : List of packages

2005-06-01 Thread Simon Brunning
re listed Try <http://www.python.org/pypi>, or the (older) <http://www.vex.net/parnassus/>. That said, these days I usually just google for whatever I'm looking for. -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

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

2005-06-01 Thread Simon Brunning
QOTW: "Not tested but confident should be an oxymoron for a programmer." - Peter Otten (Asked "Is this unsurprising if I look at it right?") - "Yes; in general this is true across many domains for a very large number of referents of "it" :-)" - John Machin "Strong typing means there [are] a lot

Re: how to retrieve info about print jobs

2005-06-02 Thread Simon Brunning
com/python/wmi.html>. Do let us know what you come up with! -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: PYTHONSTARTUP and the -i command line option

2005-06-03 Thread Simon Percivall
After entering the interpreter, you could do an execfile on the .pythonrc file. -- http://mail.python.org/mailman/listinfo/python-list

Re: Console Scripts

2005-06-03 Thread Simon Brunning
Bash then we just do a 'clear' statement but this does not seem to work > well in python. http://groups-beta.google.com/group/comp.lang.python/browse_thread/thread/3edf6589c533f78e -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.

Re: SMTP help please

2005-06-07 Thread Simon Brunning
<http://effbot.org/zone/librarybook/network-protocols.pdf> -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Dr. Dobb's Python-URL! - weekly Python news and links (Jun 7)

2005-06-07 Thread Simon Brunning
QOTW: "[expletives deleted]" - John Machin, snipping a section of Perl code. "What sort of programmer are you? If it works on your computer, it's done, ship it!" - Grant Edwards Guido invites us to comment on PEP 343. This Python Enhancement Proposal includes a 'with' statement, allowin

Dr. Dobb's Python-URL! - weekly Python news and links (Jun 7)

2005-06-07 Thread Simon Brunning
QOTW: "[expletives deleted]" - John Machin, snipping a section of Perl code. "What sort of programmer are you? If it works on your computer, it's done, ship it!" - Grant Edwards Guido invites us to comment on PEP 343. This Python Enhancement Proposal includes a 'with' statement, allowin

Re: test

2005-06-08 Thread Simon Brunning
result = self.testRunner.run(self.test) >File "/usr/lib/python2.3/unittest.py", line 657, in run > startTime = time.time() > AttributeError: 'module' object has no attribute 'time' > > I can't understand it! Would somebody tell me how I can s

Re: \r\n or \n notepad editor end line ???

2005-06-08 Thread Simon Brunning
text file, and all will be well: my_file = open('my_file.txt') for line in my_file: # whatever... -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Jun 7)

2005-06-09 Thread Simon Brunning
ewsagent, so I just use Google Groups. -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Using pyTTS with other languages.

2007-06-04 Thread simon kagwe
speaks my language? Can pyTTS do this? I need all the help I can get. Regards, Simon. -- http://mail.python.org/mailman/listinfo/python-list

Re: Using pyTTS with other languages.

2007-06-04 Thread simon kagwe
gmail.com> writes: > It describes how to use mis-spelled words to force correct > pronunciation as well as how to do it with XML. > > Mike > Thanks Mike. I had already read that article. I thought the mis-spelling and XML are meant to deal with pronunciation of English words. Will it really

Re: which "GUI module" you suggest me to use?

2007-06-05 Thread Simon Yau
ch GUI module do you suggest me to use at all? > > I'm acutally using Windows Xp but I also use Linux... > > I know that WxPython work only under Windows and PyGTK work only under > Linux... there's some other modules? Maybe you can try Tkhtml. It supports both Windows and Linux. Simon -- http://mail.python.org/mailman/listinfo/python-list

Help a C++ escapee!

2007-06-07 Thread Simon Pickles
hen run, I come unstuck here: self.clientSocket, self.clientAddress = network.accept() I get a nameError on 'network', yet it is one in the global namespace, defined in server.py before CServerThread.Listen() is called. In c++, I understood how to declare variables, here

get a list from a string

2007-06-07 Thread simon kagwe
Hi, I have a string "distances = [[1,1,1,1],[2,2,2,2]]". I want to create a variable called distances whose value is the list [[1,1,1,1],[2,2,2,2]]. How can I go about that? I know I can use setattr, but how do I create the list from the string? Regards, Simon -- http://mail.python.o

Re: get a list from a string

2007-06-07 Thread simon kagwe
> exec("distances = [[1,1,1,1],[2,2,2,2]]") Wow! So simple! Thanks a lot. :-) -- http://mail.python.org/mailman/listinfo/python-list

Re: recursion error using setattr and getattr

2007-06-07 Thread Simon Brunning
elf.__dict__['var1'] = k -- 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-list

Re: Case-Insensitive Sorting of Multi-Dimensional Lists

2007-06-08 Thread Simon Brunning
=operator.itemgetter(0)) > > But, unfortunately, this will be case sensitive (Apple will come before > airplane because the A is capital) and I need it to be insensitive. Try: list.sort(key=lambda el: el[0].lower()) BUT - it's not a good idea to use list as a name, 'cos list is

Re: Case-Insensitive Sorting of Multi-Dimensional Lists

2007-06-08 Thread Simon Brunning
On 6/8/07, Joe <[EMAIL PROTECTED]> wrote: > Now, I would like to be able to specify which index to sort by. I am not > able to pass in external variables like: > > List.sort(key=lambda el: el[indexNumber].lower()) Why ever not? -- Cheers, Simon B. [EMA

Re: Serialization across languages?

2007-06-15 Thread Simon Brunning
are of when sending arbitrary > data by a POST, and Second, is there a universally supported > version of what python can do with pickle? I mostly need > python and PHP, but perl would be nice too. JSON might be worth a look. There are libraries available for loads of languages, and it

Re: Serialization across languages?

2007-06-15 Thread Simon Brunning
On 15 Jun 2007 09:02:34 -0700, Paul Rubin <"http://phr.cx"@nospam.invalid> wrote: > Any idea if a C implementation is available? I mean Python-callable. There's a fairly in-detail comparison of a number of JSON translators here: http://tinyurl.com/39zgw4 Cheers, Simon B

Re: Want to learn Python

2007-06-15 Thread Simon Brunning
/listinfo/tutor 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-list

Changing sound volume

2007-06-23 Thread simon kagwe
Hi, I am playing sounds using the winsound module. Is there a way I can change the volume? -- http://mail.python.org/mailman/listinfo/python-list

Re: Changing sound volume

2007-06-25 Thread simon kagwe
4.4 and ctypes 1.0.1 ] Regards, Simon -- http://mail.python.org/mailman/listinfo/python-list

Re: getting the size of an object

2007-06-25 Thread Simon Brunning
27;m sure it does what it says on the tin. http://tinyurl.com/3ybdb3 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-list

Re: What is the most efficient way to test for False in a list?

2007-07-08 Thread Simon Forman
On Jul 8, 7:43 pm, lex <[EMAIL PROTECTED]> wrote: > Of course there is the always the iteration method: > > list = [1, True, True, False, False, True] > status = True > for each in list: > status = status and each > > but what is your best way to test for for False in a list? False in list

Re: socket programming related.

2007-07-11 Thread Simon Percivall
On Jul 12, 2:35 am, [EMAIL PROTECTED] wrote: > On Jul 11, 7:32 pm, [EMAIL PROTECTED] wrote: > > > I have just started working in network programming using python. > > written code for socket connection between client and server. Client > > sent data to server for server processing (also server echo

Re: pytz giving incorrect offset and timezone

2007-07-12 Thread Simon Percivall
On Jul 12, 11:47 am, Sanjay <[EMAIL PROTECTED]> wrote: > Hi All, > > Using pytz, I am facing a problem with Asia/Calcutta, described below. > > Asia/Calcutta is actually IST, which is GMT + 5:30. But while using > pytz, it was recognized as HMT (GMT + 5:53). While I digged into the > oslan database

Re: Can a low-level programmer learn OOP?

2007-07-13 Thread Simon Hibbs
ks, and how Python works. Learning OOp this way is easy and painless, and what you learn about the theory and principles of OOP in Python will be transferable to C++ if you end up going in that direction. I hope this was helpful. Simon Hibbs -- http://mail.python.org/mailman/listinfo/python-list

Re: Can a low-level programmer learn OOP?

2007-07-13 Thread Simon Hibbs
Sorry, here's the tutorial link: http://hetland.org/writing/instant-python.html Simon Hibbs -- http://mail.python.org/mailman/listinfo/python-list

Memory addressing

2007-04-27 Thread Simon Berube
Hi, I have a rather simple question for which I couldn't find an answer. I noticed how a significant number of objects in Python return a __repr__() string along the lines of : < Object at 0xXX> I find this notation quite convenient to avoid out of control strings when using large arra

Re: Memory addressing

2007-04-27 Thread Simon Berube
On Apr 27, 3:52 pm, Carsten Haese <[EMAIL PROTECTED]> wrote: > On Fri, 2007-04-27 at 12:41 -0700, Simon Berube wrote: > > Hi, > > >I have a rather simple question for which I couldn't find an > > answer. I noticed how a significant number of objects in Py

Re: Memory addressing

2007-04-27 Thread Simon Berube
Well what I was looking for is more along the lines of if it was possible to assign an object at a fixed memory address like C. But most importantly I was expecting it to be a bad habbit in python and was simply wondering what was the accepted manner of doing so. I did know everything was passed b

Re: problem with import in python 2.2.3

2007-05-17 Thread Simon Brunning
ng it. This might help - http://tinyurl.com/37677u - but I've not tried it myself. -- 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-list

Re: Sending a JavaScript array to Python script?

2007-05-17 Thread Simon Brunning
On 17 May 2007 05:34:55 -0700, placid <[EMAIL PROTECTED]> wrote: > Just wondering if there is any way of sending a JavaScript array to a > Python cgi script? A quick Google search didn't turn up anything > useful. JSON might be worth a look: http://www.json.org/ -- Che

Re: Parallel/distributed generator

2007-05-23 Thread Simon Brunning
t; way. Kamaelia? http://tinyurl.com/35fjbr -- 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-list

Re: Creating a distro of python... What would you include in it?

2007-05-30 Thread Simon Hibbs
ission statement and adds significant value of it's own. It also acts as an add-on to the standard distro rather than an alternative and I recommend you consider that strategy. Simon Hibbs -- http://mail.python.org/mailman/listinfo/python-list

Re: <> vs !=

2007-07-27 Thread Simon Brunning
On 7/26/07, James Matthews <[EMAIL PROTECTED]> wrote: > What is the difference between <> and != <> is deprecated, != isn't. Other than that, nothing AFAIK. -- Cheers, Simon B. [EMAIL PROTECTED] http://www.brunningonline.net/simon/blog/ GTalk: simon.brunning |

Re: Any Good Book To Start ?

2007-08-06 Thread Simon Brunning
On 8/6/07, Katie Tam <[EMAIL PROTECTED]> wrote: > Please let me know any good book to start ? Thank You http://wiki.python.org/moin/PythonBooks -- Cheers, Simon B. [EMAIL PROTECTED] http://www.brunningonline.net/simon/blog/ GTalk: simon.brunning | MSN: small_values | Yahoo: smallvalues

One Python in a Pub, with 100 Rails Developers...

2007-08-16 Thread Simon Wittber
Python helped deliver the goods last Wednesday evening in front of a one hundred strong crowd of Rails hecklers... Video footage here: http://blog.scouta.com/2007/08/16/iccarus/ ...just kidding, they were all great chaps, and only a few were Rails devs, and only a few of them were hecklers :-) I

Re: Retrieving a variable's name.

2007-08-21 Thread Simon Brunning
On 8/21/07, rodrigo <[EMAIL PROTECTED]> wrote: > How would I go about retrieving a variable's name (not its value)? http://effbot.org/pyfaq/how-can-my-code-discover-the-name-of-an-object.htm -- Cheers, Simon B. [EMAIL PROTECTED] http://www.brunningonline.net/simon/blog/ GTalk:

Re: Regular expression use

2007-08-24 Thread Simon Brunning
On 24 Aug 2007 10:58:46 GMT, Nick Maclaren <[EMAIL PROTECTED]> wrote: > > For reasons that I won't explain, as they are too complicated > and not terribly relevant, I am interested in discovering what > people actually use regular expressions for. http://xkcd.com/208/ --

Re: Image.open( "C:\test.jpg") is this wrong ?

2007-08-27 Thread Simon Brunning
On 8/27/07, Carnell, James E <[EMAIL PROTECTED]> wrote: > Image.open("C:\test.jpg") Try: Image.open(r"C:\test.jpg") See http://docs.python.org/ref/strings.html -- Cheers, Simon B. [EMAIL PROTECTED] http://www.brunningonline.net/simon/blog/ GTalk: simon.brunnin

Re: Question involving a Python app...

2007-08-31 Thread Simon Brunning
On 8/31/07, sberry <[EMAIL PROTECTED]> wrote: > So, how do I create an executable (on Windows) > to install the program so it will run without the aforementioned > framework being installed? Check out py2exe. -- Cheers, Simon B. [EMAIL PROTECTED] -- http://mail.python.org/m

Re: Multi Heritage with slots

2007-09-05 Thread Simon Brunning
it's not going to be pretty. Slots are not intended for this purpose, and they aren't very good for it. -- 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-list

Tkinter pack difficulty

2007-09-12 Thread Simon Forman
the size of the actual Frame widgets. In any event, my head's sore and I'm just about ready to take out some graph paper and use the grid() layout manager instead. But I really want the automatic resizing that the pack() manager will do, rather than the static layout grid() will give me. A

Re: Is this right? Multiple imports of same module.

2007-03-09 Thread Simon Brunning
gh the module name (mod1 and mod2) and the alias MM (mod3). Is > that right? Yup, and occasionally it's useful to do stuff like this... > I was concerned about multiple imports and efficiency. ... but not for this reason. Subsequent imports of an already loaded modu

Re: Is this right? Multiple imports of same module.

2007-03-09 Thread Simon Brunning
On 3/9/07, Lou Pecora <[EMAIL PROTECTED]> wrote: > I have noticed that using from xxx import * can lead to problems when > trying to access variables in the xxx module. Don't do it, then. ;-) -- Cheers, Simon B [EMAIL PROTECTED] http://www.brunningonline.net/sim

Re: Setting Up SOAPpy for Python v2.5 on Windows?

2007-03-14 Thread Simon Brunning
to look at other SOAP handling packages like ZSI or elementsoap. Unless, that is, you need functionality that only SOAPpy provides, in which case you are stuck with it. -- Cheers, Simon B [EMAIL PROTECTED] http://www.brunningonline.net/simon/blog/ GTalk: simon.brunning MSN: small_values -- http://m

Re: Attribute monitoring in a class

2007-03-14 Thread Simon Brunning
t; Is there a function construct inside a python class that is > automatically called when an attr is changed You want __setttr__(). See <http://docs.python.org/ref/attribute-access.html>. -- Cheers, Simon B [EMAIL PROTECTED] http://www.brunningonline.net/simon/blog/ GTalk: si

image sequence to Quicktime movie

2007-04-18 Thread Simon Cassels
did u ever find anything out about this ? if so can you help me with some leads i am trying to figure an action that can convert image files to quicktime automatically. cheers simon -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter pack difficulty

2007-09-16 Thread Simon Forman
Thanks everyone for the incredibly helpful replies! I got the effect I wanted, no problem. I don't know why I didn't think to remove the expand option. I thought the sticky option would constrain the expansion. Thanks again, ~Simon -- http://mail.python.org/mailman/listinfo/python-list

Re: Using python to create windows apps that everyone can use?

2007-09-19 Thread Simon Hibbs
ercial or the express version, to create the GUI in VB or C# and from that call Python code that does all the heavy lifting. I'd second the recommendation for QtDesigner if you want cross- platform capability. Simon Hibbs -- http://mail.python.org/mailman/listinfo/python-list

Matplotlib TkAgg WindowsXP ImportError

2007-09-26 Thread Simon Forman
t it. FWIW, I installed using matplotlib-0.90.1.win32-py2.5.exe and numpy-1.0.3.1.win32-py2.5.exe. Thanks in advance for any help. Sincerely, ~Simon -- http://mail.python.org/mailman/listinfo/python-list

Re: An Editor that Skips to the End of a Def

2007-09-26 Thread Simon Brunning
On 9/26/07, Bjoern Schliessmann <[EMAIL PROTECTED]> > You definitely used the wrong languages :) > > http://worsethanfailure.com/Articles/The-Other-Kind-of-RPG.aspx Ah, but one edits RPG with SEU[1], Undo - who needs it? -- Cheers, Simon B. [EMAIL PROTECTED] [1] http://tin

Re: Matplotlib TkAgg WindowsXP ImportError

2007-09-26 Thread Simon Forman
On 9/26/07, Simon Forman <[EMAIL PROTECTED]> wrote: > Hello, > > I just installed Matplotlib (and NumPy) on a windows XP machine, and > I'm getting the following traceback when I try to use the TkAgg > backend. > > Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08)

Re: Matplotlib TkAgg WindowsXP ImportError

2007-09-26 Thread Simon Forman
On Sep 26, 1:19 pm, Simon Forman <[EMAIL PROTECTED]> wrote: > Hello, > > I just installed Matplotlib (and NumPy) on a windows XP machine, and > I'm getting the following traceback when I try to use the TkAgg > backend. > > Python 2.5.1 (r251:54863, Apr 18 20

Re: True of False

2007-09-27 Thread Simon Brunning
;, "c", "d", "e", "f"] > > if "c" in a == True: > Print "Yes" > > When I run this, it runs, but nothing prints. What am I doing wrong? Just use if "c" in a: and all will be well. The True object isn't the only

cute use of lambda

2007-09-27 Thread Simon Forman
class FakeQueue(list): put = list.append get = lambda self: self.pop(0) ;] -- http://mail.python.org/mailman/listinfo/python-list

Re: Emailing the attachment created with the Quick Screenshots Script(Python + PIL)

2007-09-28 Thread Simon Brunning
ke access > denied errors and not defined errors. Could you show us the code you are running, and the exact error messages that you get? This might be worth a look: <http://tinyurl.com/anel> . -- Cheers, Simon B. [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter text widget

2007-10-07 Thread Simon Forman
sor which isn't there in disabled mode. I'm guessing and I'm not sure which is right, or if it's something else entirely. Try adding a scrollbar widget and tying it to the Text (there are webpages out there that describe how to do this), I think this widget would still get focus

Re: EasyMock for python ?

2007-10-11 Thread Simon Brunning
an before does feel a bit odd. But it does indeed check against the defined expectations, so that makes it a mock library in my book. A record-playback EasyMock style mock library would be nice, it's true... -- Cheers, Simon B. [EMAIL PROTECTED] http://www.brunningonline.net/simon/blog/ GTalk:

Re: EasyMock for python ?

2007-10-12 Thread Simon Brunning
eed it with anything you *don't* > want returned as a Mock. Now *that* is what the OP was talking about - that's not a Mock, that's a Stub. See <http://tinyurl.com/26hfjd>. . -- Cheers, Simon B. [EMAIL PROTECTED] http://www.brunningonline.net/simon/blog/ GTalk: simon.b

Re: Newbi Q: What is a rational for strings not being lists in Python?

2007-10-15 Thread Simon Brunning
orks both on list and string > types? Both are sequences, right? Why string is not a subtype of a list > then? Lists are mutable, strings are not, so so strings can't support all a list's methods. -- Cheers, Simon B. [EMAIL PROTECTED] http://www.brunningonline.net/simon

Re: Newbi Q: What is a rational for strings not being lists in Python?

2007-10-16 Thread Simon Brunning
On 10/16/07, Benjamin <[EMAIL PROTECTED]> wrote: > Good explanation, but basically strings are immutable so they can be > used in dicts. Nope. Value types should always be immutable. <http://c2.com/cgi/wiki?ValueObjectsShouldBeImmutable> -- Cheers, Simon B. [EMA

Running another python interpreter

2007-10-18 Thread Simon Pickles
Hello, I have several servers which link to each other (and of course, to clients). At present, I am starting them in turn manually. Is there a way with python to say, "open gateway.py in a new interpreter window"? I looked at execv, etc, but they seem to replace the current process. Ah, maybe

Re: Running another python interpreter

2007-10-18 Thread Simon Pickles
Well, I tried: os.spawnv(os.P_NOWAIT, "gateway.py", ()) and got: OSError: [Errno 8] Exec format Simon Pickles wrote: > Hello, > > I have several servers which link to each other (and of course, to clients). > > At present, I am starting them in turn manu

Re: Running another python interpreter

2007-10-20 Thread Simon Pickles
This is very nearly perfect. I have a second console window. Unfortunately, the first is waiting for the second to close. Is there anyway to specify the equivalent of os.P_NOWAIT? Gabriel Genellina wrote: > --- Simon Pickles <[EMAIL PROTECTED]> escribió: > > >>

Re: Monitoring external processes

2007-10-23 Thread Simon Brunning
hofx.com/psi/ -- 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-list

Re: New module for method level access modifiers

2007-10-23 Thread Simon Brunning
On 10/23/07, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > > Specifically, I have created 3 decorators named public, private and > > protected. > > Lord have mercy. +1 QOTW. -- Cheers, Simon B. [EMAIL PROTECTED] http://www.brunningonline.net/simon/blog/ GTa

Re: shouldn't 'string'.find('ugh') return 0, not -1 ?

2007-10-31 Thread Simon Brunning
thing'): > do(somethingElse) print 'ughughugh'.find('ugh') ;-) -- 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-list

Re: I need to consume a .NET web service in a Python client

2007-01-12 Thread Simon Brunning
y more. I'd take a look at ZSI, instead. <http://tinyurl.com/ylas4k> -- Cheers, Simon B [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Rational Numbers

2007-01-12 Thread Simon Brunning
x27;s not start that one again. Decimals are good for holding financial values. There's a whole lot of software out there that deals with money. -- Cheers, Simon B [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Rational Numbers

2007-01-12 Thread Simon Brunning
licit - the number of subtle rounding bugs that I've had to fix 'cos someone didn't realise where rounding was occurring is, uh, well, it happens from time to time. ;-) What am I missing? -- Cheers, Simon B [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Rational Numbers

2007-01-12 Thread Simon Brunning
On 1/12/07, Thomas Ploch <[EMAIL PROTECTED]> wrote: > Do not forget: > > - Time > - Personal Data (like birthdays, age) The datetime module has perfectly good classes for holding date and time values, and age sounds like an integer to me. -- Cheers, Simon B [EMAIL P

Re: dynamic argument name for functions

2007-01-12 Thread Simon Brunning
ex: > def function(arg1='None', arg2='None', arg3='None'): >print arg1 >print arg2 >print arg3 > > > arg_name = 'arg1' > arg_value = 'i am passing a value to argument 1' > function(???) Unt

compile your python programs with rpython

2007-01-15 Thread Simon Burton
The pypy'ers have written a brief description on using rpython to create standalone executables: http://codespeak.net/pypy/dist/pypy/doc/standalone-howto.html This is definately worth playing around with, it's very nice writing (r)python code that gets executed as if it were c co

Re: Python and Soap protocol

2007-01-17 Thread Simon Brunning
ich is > better to use? IFAICT, SOAPpy isn't maintained any longer, so on that basis I'd recommend ZSI. -- Cheers, Simon B [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Python for amd64 and x86 on Windows

2007-01-26 Thread Hengel, Simon
Hello List, I need the amd64 and the x86 version of Python installed on one Windows machine. Is there a way to do this? (I think I read about it somewhere, but now I can't find it anymore) Cheers, Simon Hengel Siemens AG Medical Solutions CO CHS CS 2 Mozartstr. 57 91052 Erlangen, German

Re: ZSI and WSDL schema

2007-02-01 Thread Simon Brunning
ic. -- Cheers, Simon B [EMAIL PROTECTED] http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python module for the IPod shuffle ...

2007-02-01 Thread Simon Brunning
s any good? <http://superduper.net/?page=pypod> -- Cheers, Simon B [EMAIL PROTECTED] http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Question

2007-02-05 Thread Simon Brunning
h - <https://www.ita.uni-heidelberg.de/internal/wiki/index.php/Scientific:Gadget>, so you might be able to write your own using the struct module. Good luck! -- Cheers, Simon B [EMAIL PROTECTED] http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: list of range of floats

2007-02-14 Thread Simon Brunning
ger values as floats? fits = list(float(a) for a in range(0, 10)) -- Cheers, Simon B [EMAIL PROTECTED] http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

<    6   7   8   9   10   11   12   13   14   15   >