Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-30 Thread Simon Brunning
English has taken over its position as the working class accent these days, but with a much wider regional distribution. How off topic is this? Marvellous! -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Modules for inclusion in standard library?

2005-06-30 Thread Simon Brunning
s-beta.google.com/group/comp.lang.python/browse_thread/thread/fd150297c201f814 -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Modules for inclusion in standard library?

2005-06-30 Thread Simon Brunning
can crash Python. I don't know about you, but that's I interpret this - <http://mail.python.org/pipermail/python-dev/2004-January/041856.html>. I am prepared to be wrong, though. Only Tim can channel Guido! -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/si

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

2005-06-30 Thread Simon Brunning
QOTW: "And what defines a 'python activist' anyway? Blowing up Perl installations worldwide?" - Ivan Van Laningham "Floating point is about nothing if not being usefully wrong." - Robert Kern Sibylle Koczian needs to sort part of a list. His first attempt made the natural mistake - sort

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

2005-07-01 Thread Simon Brunning
On 7/1/05, Peter Maas <[EMAIL PROTECTED]> wrote: > Simon Brunning schrieb: > > Sibylle Koczian needs to sort part of a list. His first attempt made > > the natural mistake - sorting a *copy* of part of the list: > > I think it was _her_ first attempt. Ooops!

Re: f*cking re module

2005-07-04 Thread Simon Brunning
On 4 Jul 2005 01:04:47 -0700, jwaixs <[EMAIL PROTECTED]> wrote: > arg... I've lost 1.5 hours of my precious time to try letting re work > correcty. There's really not a single good re tutorial or documentation > I could found! http://www.amk.ca/python/howto/regex/ --

Re: Lost in a sea of documentation...can you point me in the right direction?

2005-07-04 Thread Simon Brunning
(use Windows' task scheduler or > *n*x's cron). I was playing about with the 1st problem a couple of years ago: http://www.brunningonline.net/simon/blog/archives/winDesktop.py.html -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Outlook COM: how to create a MailItem from a .msg file

2005-07-04 Thread Simon Brunning
now if this will work, but you might try win32com.client.CastTo(). Something like: my_MItem = win32com.client.CastTo(my_DItem, 'MItem') -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: What are __slots__ used for?

2005-07-05 Thread Simon Percivall
Most have already been said, but have a look at http://docs.python.org/ref/slots.html for authoritative documentation. -- http://mail.python.org/mailman/listinfo/python-list

Re: what is __init__.py used for?

2005-07-05 Thread Simon Brunning
ive the answer, it will be helpful for me. The __init__.py files make Python treat the directories as packages - see http://docs.python.org/tut/node8.html#SECTION00840. We have to do something about those URLs! -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonl

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

2005-07-05 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

Re: f*cking re module

2005-07-06 Thread Simon Brunning
owing his lack of regex nouce here. Clearly he wanted 'f.*cking': >>> print re.match('f.*cking', 'firetrucking') <_sre.SRE_Match object at 0x01196058> ;-) -- 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 (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

Re: Favorite non-python language trick?

2005-07-06 Thread Simon Brunning
t string and > warn user about it. http://wiki.python.org/moin/PythonDecoratorLibrary?#head-de01988728ccdec415708f10928cc6feb022e7bb -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

if not DEBUG: log = null_log

2005-07-12 Thread Simon Burton
uot; [2], but i don't quite see how i can use it while maintaining python source compatability. bye! Simon. [1]: http://occs.cs.oberlin.edu/~jwalker/nullObjPattern/ [2]: http://students.ceid.upatras.gr/~sxanth/pyc/ -- Simon Burton, B.Sc. Licensed PO Box 8066 ANU Canberra 2601 Australia Ph

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

2005-07-13 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

constructor list slice confusion

2005-07-13 Thread Simon Morgan
Hi, Can somebody please explain to me why: class SomeClass: def __init__(self, contents=[]): self.contents = contents[:] def add(self, element): self.contents.append(element) when called a second time (i.e. to create a new instance of a SomeClass object) results in self.c

Re: constructor list slice confusion

2005-07-14 Thread Simon Morgan
On Thu, 14 Jul 2005 08:38:36 +0200, Peter Otten wrote: > Maybe, after a little renaming you can see it yourself: > > class SomeClass: > def __init__(self, default_contents=[]): > # make a copy of default_contents that is # kept in a SomeClass > instance > self.contents

Re: Python Newbie

2005-07-14 Thread Simon Brunning
ches one to get > going. http://wiki.python.org/moin/BeginnersGuide -- 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 (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

Re: Python Programming Contest

2005-07-15 Thread Simon Dahlbacka
Are you aware of http://mathschallenge.net/index.php?section=project ? The "The focus will be on algorithms that require a bit of thought to design but not much code to implement." part seems common, although your problem domain probably is larger. /Simon -- http://mail.python.o

Re: Documenting extension modules?

2005-07-15 Thread Simon Dahlbacka
Re: assigning a PyStr object to __doc__, take a look at Py_InitModule3, which does that for you. Then you have the PyDoc_STRVAR macro in python.h that you might want to use (see definition below). But as Robert already told you, you'll need to provide the necessary information about i.e. parameter

Re: Efficiently Split A List of Tuples

2005-07-18 Thread Simon Dahlbacka
Oooh.. you make my eyes bleed. IMO that proposal is butt ugly (and looks like the C++.NET perversions.) -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with threads

2005-07-18 Thread Simon Dahlbacka
You cannot really do that*. Use a flag or something that the thread checks if it should shut down. /Simon * well actually you can, sort of by using int PyThreadState_SetAsyncExc( long id, PyObject *exc) from C API. However, if you do that you swap one problem for a sh*tload of others, because of

Re: goto

2005-07-18 Thread Simon Brunning
On 7/18/05, Hayri ERDENER <[EMAIL PROTECTED]> wrote: > hi, > what is the equivalent of C languages' goto statement in python? > best regards http://groups-beta.google.com/group/comp.lang.python/browse_thread/thread/832906c6122dc137 Let's not go through *that* agai

Re: re.IGNORECASE and re.VERBOSE

2005-07-18 Thread Simon Brunning
+) ''' > MatSearch = re.compile(matsearch, re.VERBOSE, re.IGNORECASE) MatSearch = re.compile(matsearch, re.IGNORECASE + re.VERBOSE) -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Image orientation and color information with PIL?

2005-07-18 Thread Simon Dahlbacka
if you mean that you want to figure out which way the image is depending on the actual data in the image, then you'll most likely get to do the image processing yourself, on the other hand, if you are talking jpegs from a relatively new camera then I suppose that you should be able to get that info

Re: Documentation bug: Python console behaviour changed

2005-07-19 Thread Simon Dahlbacka
My console follows documentation: C:\tmp\GspRegTestApp>c:\Python24\python ActivePython 2.4.1 Build 245 (ActiveState Corp.) based on Python 2.4.1 (#65, Mar 30 2005, 09:33:37) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> ^Z C:\tmp

Re: How to send a query to the browser from time to time?

2005-07-19 Thread Simon Dahlbacka
Short answer: Not using HTTP. However, you can use something like AJAX to just load new data from time to time and not the entire page. Or you might be able to keep the connection alive and occationally send stuff to the client using chunked transfer. I'd go for the ajax route if you don't need

Re: is this pythonic?

2005-07-20 Thread Simon Brunning
On 7/20/05, Mage <[EMAIL PROTECTED]> wrote: > Or is there better way? > > for (i, url) in [(i,links[i]) for i in range(len(links))]: for i, url in enumerate(links): -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/m

Re: Printing a variable's name not its value

2005-07-20 Thread Simon Dahlbacka
as you have been told, there is no way to get a variable's name, take a look at http://effbot.org/zone/python-objects.htm to find out why this is so. -- http://mail.python.org/mailman/listinfo/python-list

Re: wxPython && wxGlade

2005-07-20 Thread Simon Dahlbacka
basically, you can just stack an outer vertical box sizer with two items and in the upper "slot" you put a horizontal box sizer with your two buttons and in the bottom slot you put the big button hope this helps /Simon ps. as this is a wxpython related question, you might get better

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

2005-07-20 Thread Simon Brunning
ng tentacles and impossible angles.' - Robert Kern Highlight of the week; Jython 2.2a1: http://groups-beta.google.com/group/comp.lang.python/browse_thread/thread/9c3b6b2e10d8a490 Nearly-highlight of the week; Simon Willison introduces Django, the web framework for perfecti

spurious syntax error when updating to 2.4 ?

2005-07-21 Thread Simon Dahlbacka
ows what causes this? /Simon -- http://mail.python.org/mailman/listinfo/python-list

Re: Web-Forms

2005-07-21 Thread Simon Brunning
ourceforge.net/mechanize/> -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: spurious syntax error when updating to 2.4 ?

2005-07-21 Thread Simon Dahlbacka
g then I did not get any syntax error. /Simon -- http://mail.python.org/mailman/listinfo/python-list

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

2005-07-21 Thread Simon Brunning
ng tentacles and impossible angles.' - Robert Kern Highlight of the week; Jython 2.2a1: http://groups-beta.google.com/group/comp.lang.python/browse_thread/thread/9c3b6b2e10d8a490 Nearly-highlight of the week; Simon Willison introduces Django, the web framework for perfecti

Re: question about deleting records from mysql

2005-07-27 Thread Simon Brunning
lly go away. A fiver says you need to commit your changes. -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: easy float question just eludes me

2005-07-28 Thread Simon Brunning
to display the .00 even if it does not have a .00 value > like this > if Var is 50, i need to display .50 instead of just .5 >>> import decimal as dec >>> dec.Decimal('250.00')/100 Decimal("2.50") -- Cheers, Simon B, [EMAIL PROTECTED], http://www.b

Re: functions without parentheses

2005-07-28 Thread Simon Dahlbacka
If you actually want that kind of syntax, then why don't you use Visual Basic? ;) -- http://mail.python.org/mailman/listinfo/python-list

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

2005-07-29 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 "

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 "

Re: namespaces

2005-08-09 Thread Simon Burton
ict__["__all__"] = dir(master) def __getattr__(self, name): attr = getattr( self._master, name ) return attr # ... end of file: sys.modules["mymod"] = ModuleProxy("mymod",sys.modules["mymod"]) --Simon Burton -- http://mail.python.org/mailman/listinfo/python-list

Re: "Ordered" dicts

2005-08-10 Thread Simon Brunning
On 8/10/05, Chris Cioffi <[EMAIL PROTECTED]> wrote: > I have lots of code that looks like: > keys = mydict.keys() > keys.sort() keys = sorted(mydict.keys()) -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/m

Re: "Ordered" dicts

2005-08-10 Thread Simon Brunning
rks, but it feel like a kludge to me. To me, it's elegant. Want the keys? Call .keys(). Want them sorted? Call sorted(). Each tool does one job well. -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: bug in property?

2005-08-12 Thread Simon Brunning
x=x > def getx(self): return self._x > def delx(self): del(self._x) > x=property(getx,setx,delx,"XXX") > t=test_property() > t.x=1 > print t.x Properties only work with new style classes, so try: class test_property(object): -- Cheers, Simon B, [EMAIL PR

Re: Text/IDE Python Editor?

2005-08-12 Thread Simon Brunning
On 8/12/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Any recommendations on a editior/IDE for programming in python? http://wiki.python.org/moin/PythonEditors -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman

Re: tuple assign variables

2005-08-15 Thread Simon Brunning
sql_statement) descriptor = dtuple.TupleDescriptor(cursor.description) for row in (dtuple.DatabaseTuple(descriptor, row) for row in cursor.fetchall()): print row.name # Prints "Evelyn" # etc... If your result set will be large, see also ResultIter[2]. -- Cheers, Simon B, [EMAIL PROTECTED],

Re: Library vs Framework (was Dr. Dobb's Python-URL!)

2005-08-15 Thread Simon Brunning
On 8/15/05, Rocco Moretti <[EMAIL PROTECTED]> wrote: > Which lead me to the question - what's the difference between a library > and a framework? If you call its code, it's a library. If it calls yours, it's a framework. -- Cheers, Simon B, [EMAIL PROTECTED], http://w

Re: Library vs Framework (was Dr. Dobb's Python-URL!)

2005-08-16 Thread Simon Brunning
On 8/15/05, Terry Hancock <[EMAIL PROTECTED]> wrote: > On Monday 15 August 2005 09:54 am, Simon Brunning wrote: > > If you call its code, it's a library. If it calls yours, it's a framework. > > Such concision deserves applause. ;-) Thank you. ;-) As others have

Re: [Python-Dev] implementation of copy standard lib

2005-08-16 Thread Simon Brunning
scripts use the copy library, I think it > worthwhile to implement this lib in C. > > What are your opinions? I think that copy is very rarely used. I don't think I've ever imported it. Or is it just me? -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Embedding Python in C, undefined symbol: PyExc_FloatingPointError

2005-08-16 Thread Simon Newton
o machines, one Debian stable and the other Debian testing. Same results on both. It's like I'm missing a library or something, any ideas ? Cheers, Simon Newton -- http://mail.python.org/mailman/listinfo/python-list

Re: [Python-Dev] implementation of copy standard lib

2005-08-17 Thread Simon Brunning
lists are a little less rare, but you can make those without the copy module: new_list = list(old_list) # or old_list[:] new_dict = dict(old_dict) # or old_dict.copy() -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Need better way to unpack a list

2005-08-17 Thread Simon Brunning
gt; > How to do that ? Lift would be much easier if you held your 'linenn' lineedit fields in a list instead. Is that possible? If so, you could do something like (untested): for index, line in enumerate(mylinelist): self.lines[index].setText(line) -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Embedding Python in C, undefined symbol: PyExc_FloatingPointError

2005-08-17 Thread Simon Newton
On Wed, 2005-08-17 at 09:52 +0200, "Martin v. Löwis" wrote: > Simon Newton wrote: > > gcc main.c -c -I-I/usr/include -I/usr/include -I/usr/include/python2.4 > > -I/usr/include/python2.4 -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > > gcc main.o -L/usr/lib -lpthrea

Re: python classes taught

2005-08-19 Thread Simon Percivall
Yeha, sure. The Royal Institute of Technology in Stockholm, Sweden teaches Python for some of its introductory programming and algorithm courses. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python for Webscripting (like PHP)

2005-08-22 Thread Simon Brunning
e to demonstrate this, so far) > > hint: > > http://mail.google.com/support/bin/answer.py?answer=6554 > > I don't see anything about Python at that url. Don't look at the page the URL returns - look at the URL itself. ;-) -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Convert float to string ...

2005-08-23 Thread Simon Brunning
On 8/23/05, Konrad Mühler <[EMAIL PROTECTED]> wrote: > How can i convert a float value into a string value? > > string_value1 = string(float_value) + ' abc' string_value1 = str(float_value) + ' abc' -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brun

Re: What's the matter with this code section?

2005-08-24 Thread Simon Brunning
an instance of your WasRun class, and I don't see a wasSetUp attribute being set anywhere. -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Release of PyPy 0.7.0

2005-08-28 Thread Simon Percivall
That's great! Congratulations! -- http://mail.python.org/mailman/listinfo/python-list

Re: sizeof(long) from python

2005-09-04 Thread Simon Percivall
Take a look at the struct module (http://docs.python.org/lib/module-struct.html), it does what you want. -- http://mail.python.org/mailman/listinfo/python-list

Re: exceptions from logging on Windows

2005-09-12 Thread Simon Dahlbacka
I ended up monkey-patching doRollover to do a number of retries before giving up. (In our case the failures is due to our log browser happening to read the latest changes when logging wants to rollover) (Actually, I implemented a simple QueueHandler and do all file operations from a different logg

Re: Python Database Scripts

2005-09-14 Thread Simon Brunning
On 13 Sep 2005 11:32:05 -0700, Chuck <[EMAIL PROTECTED]> wrote: > BTW, where is the DB-API docs for python? Google is your friend - <http://www.google.co.uk/search?q=DB-API>, 1st hit. -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://

Re: MySQLdb UPDATE does nothing

2005-09-15 Thread Simon Brunning
the commit at the end of the loop. Otherwise, do one after each update. (What does a logical transaction consist of? Only you can answer that! It's a domain question. A transaction is a set of changes that should be applied atomically - i.e., you want them all to happen, or none of them.)

Re: MySQLdb UPDATE does nothing

2005-09-15 Thread Simon Brunning
I should have said connection.commit(). Posting before thinking again. -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Possible bug in "metaclass resolution order" ?

2005-09-17 Thread Simon Percivall
Have you read the "Metaclasses" part of "Unifying types and classes in Python 2.2"? (http://www.python.org/2.2.3/descrintro.html#metaclasses) It discusses and explains the issues you seem to have. -- http://mail.python.org/mailman/listinfo/python-list

Re: Possible bug in "metaclass resolution order" ?

2005-09-18 Thread Simon Percivall
If you have read the document I referred you to, did you also read the example where classes M1, M2, M3 and M4 were defined? A quote from the discussion of that example: "For class D, the explicit metaclass M1 is not a subclass of the base metaclasses (M2, M3), but choosing M3 satisfies the constr

Re: Possible bug in "metaclass resolution order" ?

2005-09-18 Thread Simon Percivall
I definitely think that it's the intended behaviour: the example shows how and why it works; and I definitely agree that it should be documented better. -- http://mail.python.org/mailman/listinfo/python-list

Re: threads/sockets quick question.

2005-09-19 Thread Simon Percivall
Why do you check if the module threading is less than 50? (this is why nothing happens, it's always false). >From where do you get port_counter in method run() of scanThread? (this would make every call to run() raise an exception. -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting tired with py2exe

2005-09-20 Thread Simon John
James Stroud wrote: [snip] > > http://pyinstaller.hpcf.upr.edu/pyinstaller > That's one short "indefinitely": > > Not Found > The requested URL /pyinstaller was not found on this server. > Apache/2.0.53 (Fedora) Server at pyinstaller.hpcf.upr.edu Port 80 It seems that the URL is http://pyinstall

Re: Looking for system/network monitoring tool written in Python

2005-09-22 Thread Simon Brunning
ie-tool.net/>. I've never used it myself, but I can confirm that its author, Chris, is a good bloke and can hold his ale, for what that's worth. ;-) -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: WYSIWYG wxPython "IDE"....?

2005-02-06 Thread Simon John
Tim Hoffman wrote: > Have you tried Boa Constructor ? > > http://boa-constructor.sourceforge.net/ Yeah, I was never very impressed with it either. The current version doesn't seem to work with wxPython 2.5.3.1 though I guess there isn't a GUI builder that does what I want, back to the manual

Re: WYSIWYG wxPython "IDE"....?

2005-02-07 Thread Simon John
With the news of a GPL Qt4 for Windows, I decided to go with PyQt: http://mats.imk.fraunhofer.de/pipermail/pykde/2005-February/009527.html I just knocked up my application (GUI, backend is still in progress) using QtDesigner in about 5 minutes, and it's layout is just how I want it! -- http://m

Re: python connect to server using SSH protocol

2005-02-08 Thread Simon Anders
ed result. However, reading from foe succeeds only if fin has been closed before. An fi.flush() seems to be not sufficient. But if one wants Python to interactivly communicate with some shell on a remote machine, it is inconvenient to have to close and reopen the connection all the

Re: Loop in list.

2005-02-08 Thread Simon Brunning
ioned in most books, provided that it's vaguely recent and covers Python 2.0 or later. List comps have a cool new little sister, generator expressions - see <http://www.brunningonline.net/simon/blog/archives/001025.html>. -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Effbot's SimpleXMLWriter fails when py2exe'd

2005-02-08 Thread Simon Brunning
script. <http://starship.python.net/crew/theller/moin.cgi/EncodingsAgain> -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

PyQt and Python 2.4 - also WinXP LnF?

2005-02-09 Thread Simon John
After quite a while of wxPython I'm getting back into PyQt, mainly due to the announcement by Trolltech that they will make a GPL version of Qt4 for Windows (and Phil-T said he will make a PyQt to go with it eventually!) I'm currently using PyQt 3.12 that comes with the BlackAdder demo, it seems t

Re: PyQt and Python 2.4 - also WinXP LnF?

2005-02-09 Thread Simon John
Yeah I had a look at the Qt Free/Win project, but I think it offers me less than the current official 3.12 from BlackAdder, which is only $80 without the hassle of following those convoluted build instructions (I did try yesterday). As far as XMMS/Gtk goes, it's a remote client for XMMS, designed

Re: [N00B] What's %?

2005-02-10 Thread Simon Brunning
e... > > 107 % 4 = 3 > 7 % 3 = 1 It;'s modular aritmetic. See <http://en.wikipedia.org/wiki/Modular_arithmetic> and <http://www.python.org/doc/2.3.4/ref/binary.html>. -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: PyQt and Python 2.4 - also WinXP LnF?

2005-02-10 Thread Simon John
I've just read the Qt4 GPL for Windows will only support gcc (and maybe MinGW) anyway, not BCC or VisualC++ (or it's free equivalents), so it looks like it would be a daunting task to actually build PyQt See http://osnews.com/comment.php?news_id=9675 I guess the Qt used in PyQt from BlackAdde

Re: PyQt and Python 2.4 - also WinXP LnF?

2005-02-10 Thread Simon John
I've just read the Qt4 GPL for Windows will only support gcc (and maybe MinGW) anyway, not BCC or VisualC++ (or it's free equivalents), so it looks like it would be a daunting task to actually build PyQt See http://osnews.com/comment.php?news_id=9675 I guess the Qt used in PyQt from BlackAdde

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], http://www.brun

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? -- Che

Re: Multi-Platform installer generator

2005-02-11 Thread Simon John
if you're referring to the installshield x/mp products, forget it, they are really bad. the last company i worked for who used x/mp actually went back to shell scripts for unix and installshield pro for windows, as the java thing was abismall, and even the ide was written in java, so horribly slow

Re: PyQt and Python 2.4 - also WinXP LnF?

2005-02-11 Thread Simon John
I've just got Qt 3.3.3 and PyQt 3.1.3 compiled for Python 2.4 using the instructions for MinGW here: http://kscraft.sourceforge.net/convert_xhtml.php?doc=pyqt-windows-install.xhtml It was a pretty nasty experience, hacking python24.dll and patching sip/PyQt, but i got it all working after about 4

Re: ANN: pyMinGW support for Python 2.3.5 (final) is available

2005-02-12 Thread Simon John
[snip] > Ha anyone tried cross compiling python with mingw? At work we compile > our software for lots of platforms (including windows) on a linux > build host. The windows builds are done with a mingw cross compiler. > It would be interesting if we could do this with python + extensions > also.

Re: PyQt and Python 2.4 - also WinXP LnF?

2005-02-13 Thread Simon John
After building with MSVC6 (Python 2.3.5 and 2.4 versions) I've noticed that the ToolTips don't seem to work in the GPL version. MSVC6 is about twice as fast to build as MinGW. -- http://mail.python.org/mailman/listinfo/python-list

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,

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

2005-02-14 Thread Simon Brunning
essential needs and > requirements. I couldn't agree more. You need to find a community that *does* care about essential needs. Might I recommend Perl or Ruby? -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

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

Re: Variables.

2005-02-15 Thread Simon Brunning
n the morning. But, it was unusal by %s. %s pillow > was with %s. %s didn't want to wake up But, %s tried my best and woke up. > it was so amazing!""" % (I,me,my,me,I,I) One thing that you might want to do is to use a dictionary to provide the values, like so: my_values =

Re: Test for structure

2005-02-16 Thread Simon Brunning
7;,...] > > So how can I test if a variable 'a' is either a single character string > or a list? I tried: > > if a is list: > > but that does not work. I also looked in the tutorial and used google > to find an answer, but I did not. > > Has anyone an idea

Re: Help with C extensions under VC6 / WinXP and Python 2.4

2005-02-16 Thread Simon John
What's the difference between ctypes, SWIG and SIP? I've used SWIG to "convert" C source to Python (as I believe SIP does?), so does ctypes wrap functions from binaries (e.g. DLL's)? -- http://mail.python.org/mailman/listinfo/python-list

Pausing a program - poll/sleep/threads?

2005-02-16 Thread Simon John
I'm writing a PyQt network client for XMMS, using the InetCtrl plugin, that on connection receives a track length. To save on bandwidth, I don't want to be continually querying the server for updates (e.g. has the current track finished yet?) so I figured the best thing to do is just update after

Re: Pausing a program - poll/sleep/threads?

2005-02-17 Thread Simon John
I don't think time.sleep() will work too well, I think it will cause the program to hang around in the foreground, and prevent the GUI updating. I'll give it a try just to make sure, as I can't figure out the signal/alarm thing (the alarm only seems to trigger when I click a button, not after n-se

Re: Pausing a program - poll/sleep/threads?

2005-02-17 Thread Simon John
Damn! signal is not supported on Windows. time.sleep() doesn't work, as I suspected:: def info(self): sleep(5) self.info() Basically causes the function to pause, then call itself again, all in the foreground :-( I'm thinking some sort of thread timer is the way to go, but really don't un

Re: Pausing a program - poll/sleep/threads?

2005-02-17 Thread Simon John
Hmm, yes I had thought of looking around PyQt for a timer, forgot about it though. As far as querying the server every few seconds, it does make sense (you don't miss events) and is the recommended way of doing things with InetCtrl, but I'd prefer to save the bandwidth/server load than have realti

Re: Pausing a program - poll/sleep/threads?

2005-02-17 Thread Simon John
Jeff Shannon wrote: [snip] > The amount of bandwidth and server load that will be used by a > once-a-second query is probably pretty trivial (unless you're > expecting this to run over internet or dialup networks -- and even > then, it's probably not going to be worth worrying about). Even on an

Re: Pausing a program - poll/sleep/threads?

2005-02-19 Thread Simon John
OK, I've implemented the 2sec threaded update, but I'm having some problems with it. Basically the thread will have to just run constantly, never exiting (just sleeping for 2secs), which seems to work OK except when I try to get the thread to do anything with the main program's window. As the thr

Re: Pausing a program - poll/sleep/threads?

2005-02-19 Thread Simon John
Damn, seems Qt GUI objects (windgets) aren't thread-safe: http://doc.trolltech.com/3.3/threads.html#11 So I'm going to have to find a way of using a thread to fetch the data, and then using the main program to update the GUI... Someone suggested using events: http://mail.python.org/pipermail/pyt

<    1   2   3   4   5   6   7   8   9   10   >