Re: Simple and safe evaluator

2008-06-11 Thread Simon Forman
you're interested in and if a string parsers w/o errors then you know it's safe to eval(). I probably won't get to writing this myself for a few days or a week, but if you do will you post it here (or send me a copy)? I'll do the same if I get to it sooner. Regards, ~Simon -- http

[issue2517] Error when printing an exception containing a Unicode string

2008-06-11 Thread Simon Cross
Simon Cross [EMAIL PROTECTED] added the comment: Attached a patch which implements Nick Coghlan's suggestion. All existing tests in test_exceptions.py and test_unicode.py pass as does the new unicode(Exception(u\xe1)) test. Added file: http://bugs.python.org/file10580/exception-unicode

[issue2517] Error when printing an exception containing a Unicode string

2008-06-11 Thread Simon Cross
Simon Cross [EMAIL PROTECTED] added the comment: Re msg67974: Minor cleanup of Simon's patch attached - aside from a couple of unneeded whitespace changes, it all looks good to me. Not checking it in yet, since it isn't critical for this week's beta release - I'd prefer to leave it until

[issue2517] Error when printing an exception containing a Unicode string

2008-06-09 Thread Simon Cross
Simon Cross [EMAIL PROTECTED] added the comment: One of the examples Christoph tried was unicode(Exception(u'\xe1')) which fails quite oddly with: UnicodeEncodeError: 'ascii' codec can't encode character u'\xe1' in position 0: ordinal not in range(128) The reason for this is Exception

[issue2517] Error when printing an exception containing a Unicode string

2008-06-09 Thread Simon Cross
Simon Cross [EMAIL PROTECTED] added the comment: Concerning http://bugs.python.org/issue1551432: I'd much rather have working unicode(e) than working unicode(Exception). Calling unicode(C) on any class C which overrides __unicode__ is broken without tp_unicode anyway

[issue2517] Error when printing an exception containing a Unicode string

2008-06-09 Thread Simon Cross
Simon Cross [EMAIL PROTECTED] added the comment: Benjamin Peterson wrote: What version are you using? In Py3k, str is unicode so __str__ can return a unicode string. I'm sorry it wasn't clear. I'm aware that this issue doesn't apply to Python 3.0. I'm testing on both Python 2.5 and Python 2.6

Re: Books for learning how to write big programs

2008-05-23 Thread Simon Brunning
. -- Cheers, Simon B. [EMAIL PROTECTED] http://www.brunningonline.net/simon/blog/ GTalk: simon.brunning | MSN: small_values | Yahoo: smallvalues | Twitter: brunns -- http://mail.python.org/mailman/listinfo/python-list

Re: Misuse of list comprehensions?

2008-05-21 Thread Simon Forman
On May 21, 4:36 am, Bruno Desthuilliers bruno. [EMAIL PROTECTED] wrote: Simon Forman a écrit : On May 20, 8:58 am, Paul McGuire [EMAIL PROTECTED] wrote: On May 20, 10:50 am, [EMAIL PROTECTED] wrote: You don't need all those conditionals. A set differs from a list precisely in the fact

Re: Misuse of list comprehensions?

2008-05-20 Thread Simon Forman
if this is important (I just assumed that it was because of the use of list comps). -- Paul If order is important, you can use sorted() instead of list() like so: def compress(s): new = sorted(set(s), key=s.index) return return ''.join(new) ~Simon -- http://mail.python.org/mailman/listinfo

Re: feature proposal, debug on exception

2008-05-20 Thread Simon Forman
On May 20, 5:59 pm, Paul Rubin http://[EMAIL PROTECTED] wrote: There's an occasional question here about how to get python to launch pdb on encountering an uncaught exception. The answer is to look in some ASPN recipe and do some weird magic. I guess that works, but it's another thing to

[issue2844] int() lies about base parameter

2008-05-13 Thread Simon Cross
Simon Cross [EMAIL PROTECTED] added the comment: Some quick digging in the code on trunk has revealed that by the time the base reaches PyInt_FromString in intobject.c, -909 has become 10. Surrounding numbers seem to come through fine. -- nosy: +hodgestar

[issue2844] int() lies about base parameter

2008-05-13 Thread Simon Cross
Simon Cross [EMAIL PROTECTED] added the comment: In int_new in intobject.c the base -909 is used to indicate that no base has been passed through (presumably because NULL / 0 is a more common pitfall that -909). Thus -909 is equivalent to base 10. __ Tracker

[issue1491] BaseHTTPServer incorrectly implements response code 100

2008-05-11 Thread Simon Cross
Changes by Simon Cross [EMAIL PROTECTED]: -- nosy: +hodgestar __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1491 __ ___ Python-bugs-list mailing list Unsubscribe

[issue2742] example code does not work

2008-05-10 Thread Simon Cross
Simon Cross [EMAIL PROTECTED] added the comment: This also affects Python 2.4 and 2.6 on Linux systems. Bug http://bugs.python.org/issue2763 is a duplicate of this one. The issue is that socketmodule.c doesn't convert empty strings to NULLs before passing hptr through to the underlying system

[issue2742] example code does not work

2008-05-10 Thread Simon Cross
Simon Cross [EMAIL PROTECTED] added the comment: Attached a patch to correct the getaddrinfo(...) documentation and the code example in socket.rst. -- keywords: +patch Added file: http://bugs.python.org/file10237/getaddrinfo-doesnt-treat-empty-string-as-none.diff

[issue2746] ElementTree ProcessingInstruction uses character entities in content

2008-05-10 Thread Simon Cross
Simon Cross [EMAIL PROTECTED] added the comment: cElementTree.ElementTree is a copy of ElementTree.ElementTree with the .parse(...) method replaced, so the original patch for ElementTree should fix cElementTree too. The copying of the ElementTree class into cElementTree happens in the call

[issue2736] datetime needs and epoch method

2008-05-10 Thread Simon Cross
Simon Cross [EMAIL PROTECTED] added the comment: Attached a patch which adds a .totimetuple(...) method to datetime.datetime and tests for it. The intention is that the dt.totimetuple(...) method is equivalent to: mktime(dt.timetuple()) + (dt.microsecond / 100.0) -- keywords

[issue2736] datetime needs and epoch method

2008-05-10 Thread Simon Cross
Simon Cross [EMAIL PROTECTED] added the comment: Patch adding documentation for datetime.totimestamp(...). Added file: http://bugs.python.org/file10256/add-datetime-totimestamp-method-docs.diff __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2736

How to convert unicode string to unsigned char *

2008-05-05 Thread Simon Posnjak
Simon -- http://mail.python.org/mailman/listinfo/python-list

Re: How to convert unicode string to unsigned char *

2008-05-05 Thread Simon Posnjak
On Mon, May 5, 2008 at 4:16 PM, Jean-Paul Calderone [EMAIL PROTECTED] wrote: On Mon, 5 May 2008 16:05:08 +0200, Simon Posnjak [EMAIL PROTECTED] wrote: On Mon, May 5, 2008 at 3:48 PM, Jean-Paul Calderone [EMAIL PROTECTED] wrote: On Mon, 5 May 2008 15:41:08 +0200, Simon Posnjak [EMAIL

Writing elapsed time as a string

2008-05-05 Thread Simon Pickles
elapsed between accesses of certain data. These are in seconds since the epoch, as produced by time.time() It is probable right in front of me in the docs but I am spinning off into outer space (mentally!) Thanks for the temporary loan of your clarity and experience. Simon -- http

Writing elapsed time as a string

2008-05-05 Thread Simon Pickles
elapsed between accesses of certain data. These are in seconds since the epoch, as produced by time.time() It is probable right in front of me in the docs but I am spinning off into outer space (mentally!) Thanks for the temporary loan of your clarity and experience. Simon -- http

problem with dictionaries

2008-04-23 Thread Simon Strobl
] is different from the value that key has in the file 'my_frqlist.txt'. I am using Python 2.5.1 Any hints? Simon #!/usr/bin/python import sys frqlist = open('my_frqlist.txt', 'r') # my_frqlist looks like this: # 787560608|the # 434879575

Re: problem with dictionaries

2008-04-23 Thread Simon Strobl
switching too fast between too many and too seldom saved emacs buffers. Thanks to all for your hints. Simon -- http://mail.python.org/mailman/listinfo/python-list

London Python Meetup, Tuesday May the 6th

2008-04-15 Thread Simon Brunning
-- 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: http://www.python.org/psf/donations.html

python-gammu for Python 2.4 on Windows

2008-04-15 Thread Simon Kagwi
Hi everyone, I am looking for binaries (.exe) of python-gammu (any version) for Python 2.4. What I'm getting from the download website is only for Python 2.5. Does anyone know where I can get what I'm looking for? Google isn't really helping :-C Regards, Simon

Re: Looking for Conferences/Events on Django, Python, MySQL, etc in Europe 2008?

2008-04-08 Thread Simon Brunning
2008 - 12th to 14th September 2008 - http://www.pyconuk.org/. -- Cheers, Simon B. [EMAIL PROTECTED] http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Learning curve for new database program with Python?

2008-04-08 Thread Simon Brunning
on underneath. When you need to hand craft a performance critical query, or when you are chasing down a bug, you need to know SQL, and know it well. C.F. The Law of Leaky Abstractions - http://tinyurl.com/bmvn. It's not either SQL or ORM. It's both. But SQL should come first. -- Cheers, Simon B. [EMAIL

Re: Learning curve for new database program with Python?

2008-04-07 Thread Simon Brunning
in IT.. No matter what language and platform you find yourself working on, you'll find an SQL driven relational database somewhere in the mix. Learning SQL isn't a waste of time, I guarantee it. -- Cheers, Simon B. [EMAIL PROTECTED] http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman

Re: Dynamic code problem

2008-03-28 Thread Simon Brunning
On Thu, Mar 27, 2008 at 4:13 PM, [EMAIL PROTECTED] wrote: My dynamic code failed at this site http://playwide1.extra.hu/, need some help thank you. http://catb.org/~esr/faqs/smart-questions.html -- Cheers, Simon B. [EMAIL PROTECTED] http://www.brunningonline.net/simon/blog/ GTalk

Re: Do any of you recommend Python as a first programming language?

2008-03-26 Thread Simon Brunning
room. +1 QOTW. -- Cheers, Simon B. [EMAIL PROTECTED] http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: if __name__ == '__main__':

2008-03-20 Thread Simon Brunning
On Thu, Mar 20, 2008 at 4:12 PM, Bhagwat Kolde [EMAIL PROTECTED] wrote: Hi, I am new to the python and not getting meaning of following line, if __name__ == '__main__': main() http://www.python.org/doc/faq/programming/#how-do-i-find-the-current-module-name -- Cheers, Simon B. [EMAIL

Re: Removal of tkinter from python 3.0? [was: Fate of the repr module in Py3.0]

2008-03-20 Thread Simon Forman
visually customized) fancy applications. ~Simon -- http://mail.python.org/mailman/listinfo/python-list

Re: PODCasts

2008-03-19 Thread Simon Brunning
recommended net casts on Python, or programming in general? Whats everyone listening to? Python411: http://www.awaretek.com/python/index.xml This Week in Django: http://media.djangonetcasts.com/twid_mp3.xml Plus a bunch of non-Python related stuff. -- Cheers, Simon B. [EMAIL PROTECTED] http

Re: Using threads in python is safe ?

2008-03-19 Thread Simon Brunning
On Wed, Mar 19, 2008 at 7:43 AM, Deepak Rokade [EMAIL PROTECTED] wrote: If jobs to be processed by threds is I/O bound would multithreading help python to improve speed of application ? Probably, yes. -- Cheers, Simon B. [EMAIL PROTECTED] http://www.brunningonline.net/simon/blog/ -- http

Re: changing names of items in a list

2008-03-19 Thread Simon Brunning
, extn): self.origlist = list((x + . + extn) for x in self.origlist) or def renamefiles(self, extn): self.origlist = list((%s.%s % (z, extn)) for x in self.origlist) Better still, take a look at the os.path module... -- Cheers, Simon B. [EMAIL PROTECTED] http

finding items that occur more than once in a list

2008-03-18 Thread Simon Forman
Is there a more efficient way to do this? def f(L): '''Return a set of the items that occur more than once in L.''' L = list(L) for item in set(L): L.remove(item) return set(L) | f([0, 0, 1, 1, 2, 2, 3]) set([0, 1, 2]) --

Re: finding items that occur more than once in a list

2008-03-18 Thread Simon Forman
I love you guys, thanks! ;-) ~Simon -- http://mail.python.org/mailman/listinfo/python-list

[issue2074] pprint._safe_repr() unsafe on ordering differently types objects with same str represenation

2008-03-18 Thread Simon Percivall
Simon Percivall [EMAIL PROTECTED] added the comment: It's still a problem, as the test case demonstrates. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2074 __ ___ Python-bugs

Re: Big file

2008-03-12 Thread Simon Forman
, Amsterdam.\nAll Rights Reserved.' HTH, ~Simon -- http://mail.python.org/mailman/listinfo/python-list

Re: Check For SELF Variable Existance

2008-03-11 Thread Simon Brunning
!' ... spam = Spam() spam.egg() spam.chips = 'beans' spam.egg() got chips! -- Cheers, Simon B. [EMAIL PROTECTED] http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: lowercase u before string in python for windows

2008-03-10 Thread Simon Brunning
On Mon, Mar 10, 2008 at 5:20 PM, davidj411 [EMAIL PROTECTED] wrote: why does this occur when using the python windows extensions? There's nothing Windows specific about this - it just means that you have unicode strings. See http://effbot.org/zone/unicode-objects.htm, -- Cheers, Simon B

Re: Regarding coding style

2008-03-07 Thread Simon Brunning
On Fri, Mar 7, 2008 at 4:31 PM, K Viltersten [EMAIL PROTECTED] wrote: 1. When writing English, Strunk and White apply. I apply Fowler, PEP 8 be damned. ;-) -- Cheers, Simon B. [EMAIL PROTECTED] http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python

Re: List all files using FTP

2008-03-06 Thread Simon Brunning
this? Not offhand, but you can look at the ftpmirror.py script for inspiration. It should be in your Tools/scripts/ subdirectory of your Python installation. This might be of use: http://ftputil.sschwarzer.net/trac -- Cheers, Simon B. [EMAIL PROTECTED] http://www.brunningonline.net/simon

How to make rainbow RGB values?

2008-02-24 Thread Simon Forman
red and blue, and no indigo/violet. Any suggestions? I'm searching on the web now but not coming up with much, so I thought I'd ask here. TIA, ~Simon Here's the sinecode I tried: def g(n): ''' map sine [-1.0 .. 1.0] = color byte [0 .. 255] ''' return 255 * (n + 1) / 2.0 def f

Re: How to make rainbow RGB values?

2008-02-24 Thread Simon Forman
://www.object-craft.com.au/ Hey thank you very much, that worked like a charm! :] There's even a library function in the colorsys module (http:// docs.python.org/lib/module-colorsys.html) Cheers, ~Simon -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter: Missing the last piece of the puzzle

2008-02-23 Thread Simon Forman
those options. Can I ask the text to notify me when the modified flag changes? yes! check out http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/464635 HTH, ~Simon Can I set the statuses when the user clicks File, before the options are displayed? Do I need to create a checker

Re: Sending key-presses to other programs on Windows, and settings of controls?

2008-02-22 Thread Simon Brunning
On Thu, Feb 21, 2008 at 1:20 PM, Tim van der Leeuw [EMAIL PROTECTED] wrote: I'm looking for ways to send keypresses to another application on Windows XP, and to set values of Windows Controls (all of them text-boxes). Try http://pywinauto.openqa.org/. -- Cheers, Simon B. [EMAIL PROTECTED

Re: Garbage collection

2008-02-19 Thread Simon Pickles
Ken wrote: What is your __del__ method doing? Actually, nothing but printing a message when the object is deleted, just morbid curiosity. I've yet to see one of the destructor messages, tho from sys import getrefcount print getrefcount(x) Perfect, thanks Simon -- http

Re: Fate of itertools.dropwhile() and itertools.takewhile()

2008-02-18 Thread Simon Brunning
that ugly counts as a reason for keeping them around, though! -- 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

Garbage collection

2008-02-18 Thread Simon Pickles
to perform the delete. However, this doesn't trigger my overloaded __del__ destructor. Can I simply rely on the python garbage collector to take it from here? Is there a way to find how many references exist for an object? Thanks Simon -- Linux user #458601 - http://counter.li.org. -- http

[issue2074] pprint._safe_repr() unsafe on ordering differently types objects with same str represenation

2008-02-11 Thread Simon Percivall
New submission from Simon Percivall: _safe_repr() tries to handle the case where two objects are unorderable by ordering on (str(type(key)), key, value), but this fails when str(type(key)) is equal for two objects, but key is different and unorderable. Easy fix: order just on the string

Sudden pyexpat error with ElementTree

2008-02-09 Thread Simon Pickles
. Thanks for your advice. Simon -- http://mail.python.org/mailman/listinfo/python-list

Events in Python

2008-01-30 Thread Simon Pickles
Hi, I have a stackless python app, using twisted in parts (.internet and .adbapi). I need a little help getting pythonic after years of c++ hell. I'd like to use a system of events and observers, like c++ boost.signal. I'd like to be able to subscribe multiple callbacks to a single function

refcount

2008-01-29 Thread Simon Pickles
Hi, Is is possible to access the refcount for an object? Ideally, I am looking to see if I have a refcount of 1 before calling del Thanks Simon -- Linux Counter: User# 424693 -- http://mail.python.org/mailman/listinfo/python-list

REALLY simple xml reader

2008-01-27 Thread Simon Pickles
Hi Can anyone suggest a really simple XML reader for python? I just want to be able to do something like this: xmlDoc = xml.open(file.xml) element = xmlDoc.GetElement(foo/bar) ... to read the value of: foo bar42/bar /foo Thanks Simon -- Linux user #458601 - http://counter.li.org

Hashable

2008-01-26 Thread Simon Pickles
Hi, The term 'hashable'. Am I right in thinking it means it can be indexed? like a string or a dict? Thanks Si -- Linux user #458601 - http://counter.li.org. -- http://mail.python.org/mailman/listinfo/python-list

del self?

2008-01-25 Thread Simon Pickles
Hi, Just curious... What are the implications of a class member calling: del self is that what the __del__ method calls anyway? Thanks Simon -- Linux user #458601 - http://counter.li.org. -- http://mail.python.org/mailman/listinfo/python-list

Pythonland documentation

2008-01-18 Thread Simon Pickles
Hi I am new to python (fairly) but can't stop pythonning. c++ seems so far away now from here it looks like a horrid scribble :) Anyway my question is really about doc tools. I've been used to doxygen in c++ land, and although it makes a reasonable stab with a python project in java

Treating a unicode string as latin-1

2008-01-03 Thread Simon Willison
? Thanks, Simon Willison -- http://mail.python.org/mailman/listinfo/python-list

Re: Odd behavior in Python/Tkinter?

2007-12-21 Thread Simon Forman
On Dec 21, 12:30 pm, Lie [EMAIL PROTECTED] wrote: Inspect the following code: --- start of code --- import Tkinter as Tk from Tkconstants import * root = Tk.Tk() e1 = Tk.Entry(root, text = 'Hello World') e2 = Tk.Entry(root, text = 'Hello World') e1.grid(row = 1, column = 1)

Re: Newbie edit/compile/run cycle question

2007-12-10 Thread Simon Forman
to), and I was wondering how to replicate that elsewhere. I don't know of a command line tool to do that, but I hasten to point out that you have the source code of IDLE available so you could just figure out what it's doing and encapsulate that in a script. Regards, ~Simon -- http

Re: Job Offer: Python Ninja or Pirate!

2007-12-10 Thread Simon Forman
On Dec 10, 6:10 am, Nikos Vergas [EMAIL PROTECTED] wrote: Challenge: A valid response will be either a solution to the problem below, or a link to some code of which you are particularly proud. Problem: In the dynamic language of your choice, write a short program that will: 1.

[issue1084] ''.find() gives wrong result in Python built with ICC

2007-12-04 Thread Simon Anders
Simon Anders added the comment: Update to the story: After I submitted the bug report to Intel, they investigated and quickly confirmed it to be a compiler bug, whcih they then managed to fix. I have just got an e-mail from Intel that the newest available version of ICC, namely version

Re: How to Teach Python Variables

2007-11-26 Thread Simon Brunning
-- 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 color gradients using PIL

2007-11-23 Thread Simon Hibbs
= numpy2pil(myarray) im.putpalette(palette_list) im.save('myimage.png') You'll need to import numpy and Image. You'll need to generate the palette (juust a list) and image array (a numpy array) of course. Simon Hibbs -- http://mail.python.org/mailman/listinfo/python-list

Re: python safe scripting

2007-11-23 Thread Simon Hibbs
easy though. import datetime, os filename = 'myfile.log' if (datetime.date.today().weekday() == 0) or (os.stat(filename)[6] 200): do.whatever() The individual tests would be better wrapped in utility functions of course. Simon Hibbs -- http://mail.python.org/mailman/listinfo/python-list

[issue1358] Compile error on OS X 10.5

2007-11-22 Thread Simon Percivall
Simon Percivall added the comment: It has to do with the MACOSX_DEPLOYMENT_TARGET. If it's set to 10.4, the legacy version of setpgrp is used (with args), it it's 10.5, setpgrp expects no arguments. It seems configure won't detect the difference. -- nosy: +percivall

Re: which Python ? asks beginner

2007-11-17 Thread Simon Brunning
be an exception to the just-works upgrade that we've been used to in the past, but plans are afoot to make upgrading possible. -- Cheers, Simon B. [EMAIL PROTECTED] http://www.brunningonline.net/simon/blog/ GTalk: simon.brunning | MSN: small_values | Yahoo: smallvalues -- http://mail.python.org/mailman

Re: Excellent sci-fi novel featuring Python

2007-11-17 Thread Simon Brunning
3000, then it's very plausible. I can see Python 3.7 or 3.8 being the latest version in 2018. -- 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: Looking for a good Python environment

2007-11-14 Thread Simon Pickles
Well, I am recent Windows escapee, and was dismayed by lack of Pyscripter for Linux. Hold on... there is hope! Pyscripter works great using WINE. search http://groups.google.com/group/PyScripter?hl=en for Linux Enjoy! Paul Rudin wrote: jwelby [EMAIL PROTECTED] writes: This is a

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

Re: Arrays

2007-11-13 Thread Simon Brunning
On Nov 13, 2007 6:58 AM, John Machin [EMAIL PROTECTED] wrote: Hey Bernard, read Gordon's message carefully; he's asking about arrays, not lists. Chances are a list is exactly what the OP wants. -- Cheers, Simon B. [EMAIL PROTECTED] http://www.brunningonline.net/simon/blog/ GTalk

Re: Rothschilds own half the worlds wealth directly and indirectly thru zionist proxies Re: Bill Gates was never the Richest man on earth

2007-11-12 Thread Simon Spiegel
until I read that part. It all makes sense now! You would learn a lot MORE if you listened to the videos whose links are provided. Ah, good, we don't have to actually *watch* them ... simon -- http://mail.python.org/mailman/listinfo/python-list

Re: 911 operation by evil JEWS and Mossad

2007-11-08 Thread Simon Spiegel
On 2007-11-08 04:21:48 +0100, [EMAIL PROTECTED] said: 911 carried out by evil jews and mossad http://www.guba.com/watch/2000991770 I'm glad it was carried out by evil jews and not by nice ones. That rules me out. simon -- http://mail.python.org/mailman/listinfo/python-list

Re: python equivalent to heckle

2007-11-06 Thread Simon Brunning
covered or it doesn't do anything. from http://glu.ttono.us/articles/2006/12/19/tormenting-your-tests-with-heckle Is there anything similar for python?? Pester - http://jester.sourceforge.net/. -- Cheers, Simon B. [EMAIL PROTECTED] http://www.brunningonline.net/simon/blog/ GTalk

Python IDE

2007-11-03 Thread Simon Pickles
Hi, I have recently moved from Windows XP to Ubuntu Gutsy. I need a Python IDE and debugger, but have yet to find one as good as Pyscripter for Windows. Can anyone recommend anything? What are you all using? Coming from a Visual Studio background, editing text files and using the terminal to

[issue1651995] sgmllib _convert_ref UnicodeDecodeError exception, new in 2.5

2007-11-01 Thread Simon
Simon added the comment: The 255 - 127 change works for me. Let me know if I can help with unit tests or whatever to get this patched. _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1651995

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

2007-10-31 Thread Simon Brunning
'.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

[issue1651995] sgmllib _convert_ref UnicodeDecodeError exception, new in 2.

2007-10-31 Thread Simon
Changes by Simon: -- nosy: +bind _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1651995 _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org

Re: Monitoring external processes

2007-10-23 Thread Simon Brunning
/ -- 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/ GTalk: simon.brunning | MSN: small_values

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ó: os.spawnl(os.P_NOWAIT, sys.executable

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 manually. Is there a way with python

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. [EMAIL PROTECTED] http

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

2007-10-15 Thread Simon Brunning
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/blog/ GTalk: simon.brunning | MSN: small_values

Re: EasyMock for python ?

2007-10-12 Thread Simon Brunning
* 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.brunning | MSN: small_values | Yahoo: smallvalues -- http

Re: EasyMock for python ?

2007-10-11 Thread Simon Brunning
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: simon.brunning | MSN: small_values | Yahoo

Re: Tkinter text widget

2007-10-07 Thread Simon Forman
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 (since it's NOT disabled) and therefore be able to scroll the Text. Or try explicitly binding the arrow keys to scroll commands. ~Simon -- http://mail.python.org/mailman

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

2007-09-28 Thread Simon Brunning
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: True of False

2007-09-27 Thread Simon Brunning
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 truthy value in Python - see http://docs.python.org/lib/truth.html. -- Cheers, Simon B. [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

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

Matplotlib TkAgg WindowsXP ImportError

2007-09-26 Thread Simon Forman
. 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://tinyurl.com/yvra7l -- http

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) [MSC v.1310 32 bit (Intel)] on win32

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 2007, 08:51:08) [MSC v.1310 32 bit (Intel

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

2007-09-19 Thread Simon Hibbs
, 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

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] -- http://mail.python.org

Re: Tkinter pack difficulty

2007-09-17 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

<    4   5   6   7   8   9   10   11   12   13   >