Re: PyQt Python Bindings for Qt v3.14 Released

2005-02-20 Thread Simon John
All looks like good news, especially PyQt4 - one question, if it's statically linked with Qt4, will it still work with things like py2exe? I guess it just won't need qt-mt4.dll? I'm getting a 404 on the new SIP: http://www.river-bank.demon.co.uk/download/QScintilla/qscintilla-1.61-gpl-1.5.tar.gz

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

2005-02-20 Thread Simon John
Ah yes, that Informit article helped endlessly - I'm all done now - got the backend to fetch the info from the server every 2secs using a QThread, then it pass the data back to the GUI frontend by raising a custom event! Thanks for all the help folks, now I'm off to compile the new PyQt 3.14 ;-)

Re: gui scripting

2005-02-21 Thread Simon Brunning
on this as well ;) WATSUP uses winguiauto.py. -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

pyrex just in time compilation

2005-02-21 Thread Simon Wittber
It occured to me that an import hook could be written for pyrex '.pyx' files, so that compilation can occur at runtime, if the source file has changed since the last compile. Before I try this myself, has anyone else already written any code to do this? Sw. -- http://mail.python.org/mailman/lis

Re: pyrex just in time compilation

2005-02-21 Thread Simon Wittber
> Before I try this myself, has anyone else already written any code to do this? Yes, someone has. http://www.prescod.net/pyximport/ I should have googled more thoroughly before posting. :-) sw. -- http://mail.python.org/mailman/listinfo/python-list

Re: Considering python - have a few questions.

2005-02-21 Thread Simon John
I'd go with a MySQL / Python / Apache route, but if it's Windows, maybe not. Also, you shouldn't store images in a database - images should be on the filesystem with their paths stored in the database. I'd definitely say going the web application route would be easier (and more portable) than the

Re: Threading and consuming output from processes

2005-02-24 Thread Simon Wittber
> 1) How should I solve this problem? I'm an experienced Java programmer > but new to Python, so my solution looks very Java-like (hence the use of > the threading module). Any advice on the right way to approach the > problem in Python would be useful. In the past, I have used the select module t

Re: web status display for long running program

2005-02-25 Thread Simon Wittber
> I was inspired to enhance your code, and perform a critical bug-fix. > Your code would not have sent large files out to dialup users, because > it assumed all data was sent on the 'send' command. I added code to > check for the number of bytes sent, and loop until it's all gone. Another solutio

Re: accessor/mutator functions

2005-02-25 Thread Simon Wittber
> My questions are: > a) Are the three things above considered pythonic? Python uses a function called 'property to achieve the same effect. This example is taken from the documentation: class C(object): def __init__(self): self.__x = 0 def getx(self):

Re: Pyallegro status (is it dead?). What about pygame.

2005-02-27 Thread Simon Wittber
> How does pygame compare to pyallegro - both in maturity and convenience > of usage in python? I have not used pyallegro, and therefore cannot compare it to pygame. However, I can tell you that the pygame community is quite active and friendly. They're currently testing the pygame 1.7 release.

Re: Stuck on Jythonc --all w/ ZipException PyMethod

2005-03-02 Thread Simon Brunning
uestions here, but you might get more response on the Jython users list: http://lists.sourceforge.net/lists/listinfo/jython-users -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: rearrange text

2005-03-02 Thread Simon Brunning
2', '3', '4'] > and rearrange the > fields to read > > '1,3,2,4' I don't really understand this rearrangement, but I'll do it the dumb way: >>> rearranged_var = split_var[0], split_var[2], split_var[1], split_var[3] >>> rearranged_va

Re: Gordon McMillan installer and Python 2.4

2005-03-02 Thread Simon John
Seriously, if you're only interested in Windows, just use py2exe, or if you want Linux+Windows, try cx_Freeze. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to write python plug-ins for your own python program?

2005-03-03 Thread Simon Wittber
> You mean like 'import'? :) That's how I would do it. It's the simplest thing, that works. exec("import %s as plugin" % pluginName) plugin.someMethod() where pluginName is the name of the python file, minus the ".py" extension. Sw. -- http://mail.python.org/mailman/listinfo/python-list

Re: programmatically calling a function

2005-03-05 Thread Simon Percivall
You might also want to take a peek at the getattr() function: http://docs.python.org/lib/built-in-funcs.html#l2h-31 -- http://mail.python.org/mailman/listinfo/python-list

Re: function expression with 2 arguments

2005-03-06 Thread Simon Percivall
Actually, lambda forms are quite precisely documented at http://docs.python.org/ref/lambdas.html if you feel than reading the tutorial (specifically http://docs.python.org/tut/node6.html section 4.7.5) is too base for you. -- http://mail.python.org/mailman/listinfo/python-list

Re: determine directories with wildcard

2005-03-08 Thread Simon Brunning
fnmatch import os root = 'd:\\' filter = r'*\*python*\*' for dirpath, dirnames, filenames in os.walk(root): if fnmatch.fnmatch(dirpath, filter): print 'matched', dirpath -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: shuffle the lines of a large file

2005-03-08 Thread Simon Brunning
t do the trick: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/59865 -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: shuffle the lines of a large file

2005-03-08 Thread Simon Brunning
On Tue, 8 Mar 2005 14:13:01 +, Simon Brunning <[EMAIL PROTECTED]> wrote: > On 7 Mar 2005 06:38:49 -0800, gry@ll.mit.edu wrote: > > As far as I can tell, what you ultimately want is to be able to extract > > a random ("representative?") subset of sentences. >

Re: shuffle the lines of a large file

2005-03-08 Thread Simon Brunning
;) Ah, but that's the clever bit; it *doesn't* store the whole list - only the selected lines. -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: quick question

2005-03-08 Thread Simon Brunning
] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> my_string = '"8023 "' >>> my_string '"8023 "' >>> my_string.strip('"') '8023 ' -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: shuffle the lines of a large file

2005-03-10 Thread Simon Brunning
loops, best of 3: 245 usec per loop C:\>python -m timeit -s "from itertools import repeat" "[None] * 1" 1 loops, best of 3: 160 usec per loop ;-) BTW, I've posted a more general version here: http://www.brunningonline.net/simon/blog/archives/001784.html -- C

Re: shuffle the lines of a large file

2005-03-11 Thread Simon Brunning
On Fri, 11 Mar 2005 06:59:33 +0100, Heiko Wundram <[EMAIL PROTECTED]> wrote: > On Tuesday 08 March 2005 15:55, Simon Brunning wrote: > > Ah, but that's the clever bit; it *doesn't* store the whole list - > > only the selected lines. > > But that means that i

Re: os.walk(entire filesystem)

2005-03-11 Thread Simon Brunning
http://groups-beta.google.com/group/comp.lang.python/msg/49fc9210007a -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: executing non-Python conde

2005-03-11 Thread Simon Brunning
On Fri, 11 Mar 2005 07:36:03 -0700, Earl Eiland <[EMAIL PROTECTED]> wrote: > I need to repeatedly execute an .exe program, changing the command line > arguments, and log the output. http://docs.python.org/lib/module-subprocess.html -- Cheers, Simon B, [EMAIL PROT

Re: About Databases...

2005-03-11 Thread Simon John
Tom Willis wrote: [snip] > Whoa, you are asking alot. Without knowing anything about your > requirements except what was mentioned in your post. I would say you > would quite possibly want the functionality of a relational database. I'm not sure I agree with that. If the data is likely to be lar

Re: Adapting code to multiple platforms

2005-03-11 Thread Simon John
If you're using a GUI, then that may help you decode the platform too - for example wxPython has wx.Platform, there's also platform.platform() , sys.platform and os.name You could try import win32api and checking for an exception ;-) -- http://mail.python.org/mailman/listinfo/python-list

Re: issues installing readine-1.12 on WinXP

2005-03-13 Thread Simon Percivall
That shouldn't happen AFAICT. Check line 108 in keysyms.py and make sure it says "vk = VkKeyScan(ord(char))". -- http://mail.python.org/mailman/listinfo/python-list

Re: issues installing readine-1.12 on WinXP

2005-03-13 Thread Simon Percivall
Possibly. Is the ` sign available as an unmodified key? -- http://mail.python.org/mailman/listinfo/python-list

Re: issues installing readine-1.12 on WinXP

2005-03-13 Thread Simon Percivall
Well, just modify the source in that case. -- http://mail.python.org/mailman/listinfo/python-list

Re: __getitem__ method on (meta)classes

2005-03-14 Thread Simon Percivall
Well, they're not synonymous. At least not in that context. If you haven't already tried it, what you're doing will fail for instances as well. Look in typeobject.c to see why. The gist of it is that the special methods are looked up on the type rather than the instance (on the metaclass rather tha

Re: Python info

2005-03-14 Thread Simon Percivall
Well, the source code is pretty well documented if you want to get to know the implementation. Read the "Extending and Embedding" tutorial and the "Python/C API" reference, then start digging through the code. Performance comparisons are broadly available, and always suspect. -- http://mail.pyth

Re: decorating classes with metaclass

2005-03-14 Thread Simon Percivall
Class decoration was discussed back when (you can search for the thread in python-dev); not as an alias to metaclasses but discussed as having exactly the same semantics as function decoration. Maybe the idea has more merit as being another way of setting the __metaclass__ attribute; on the other h

Re: python reading excel thru ADO ?

2005-03-15 Thread Simon Brunning
tried it. ;-) But in any case this might help: http://www.connectionstrings.com/ -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: python version anachronism

2005-03-15 Thread Simon Brunning
the doc or the doc and the > software? The docs and the software - both are released together. -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: readonly class attribute ?

2005-03-15 Thread Simon Percivall
Start the attribute name with "_" and don't document it. If clients mess with it, they're to blame. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to create stuffit files on Linux?

2005-03-15 Thread Simon Percivall
Stuffit Expander can handle zip, rar, tar, gz, etc, etc, etc. Don't worry. -- http://mail.python.org/mailman/listinfo/python-list

Re: wxPython vs. pyQt

2005-03-16 Thread Simon John
I used to be a wxPython lover, but it was mainly due to the crappy PyQt licensing terms, rather than any merits of wx (although I like the native LnF). After trying to do a large-ish project using wxPython, I found that I was limited by the lack of widgets and the layout system. My latest project

Re: wxPython vs. pyQt

2005-03-17 Thread Simon John
"so is there already a binary for qt/pyqt/eric3 available or when can i excpect qt4 to be released? " I think that pyqt4 is going to be a long way off, obviously further away than qt4. i have compiled qt 3.3.3/pyqt 3.1.3 using mingw/vcc6 for windows using the instructions i linked to in my previo

Re: please help on installation process

2005-03-18 Thread Simon Brunning
installation package > could not be opened..." I am a newsier in python, I would be grateful if you > please advise me what to do. Chances are it's an incomplete download. My python-2.4.msi is 10.3 MB (10,887,168 bytes) - how big is yours? If it's smaller, try downloadi

Re: Database connection caching

2005-03-18 Thread Simon Brunning
and keep using that. I usually find that I need a pool of open connections, though. -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Syntax for extracting multiple items from a dictionary

2004-12-01 Thread Simon Brunning
e 2.4 release notes that point to where this would > have changed. They use generator expressions, which were introduced by Python 2.4. See <http://www.python.org/dev/doc/devel/whatsnew/node4.html>. -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: PIL for Python 2.4 ?

2004-12-01 Thread Simon John
Michel Claveau - abstraction méta-galactique non triviale en fuite perpétuelle. wrote: > Hi ! > > I can't install PIL on Python 2.4 ; the soft search Python 2.3 ; gh > ! > Do you know if the great F.L. want to make, soon, a P24 version ? Yes, this kind of thing is stopping me trying 2.4 fo

Re: installing wxPython on Linux and Windows

2004-12-02 Thread Simon John
I have used the Fedora2 RPM's of wxPython 2.5.3.1 successfully on SUSE 9.1 Pro, 9.2 Pro and SLES 9 (and Fedora 3 for that matter) so you don't need to get a specific RPM for SUSE. I even built wxPython 2.5.3.1 with Python 2.4 on Fedora 2 today, it was not that hard - just followed http://wxpython.

Re: decorators ?

2004-12-03 Thread Simon Brunning
ty. The danger is that when wne instance of the fiunction name is changed, other won't be, leading to breakage. -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ [1] http://pragmaticprogrammer.com/ppbook/extracts/rule_list.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Versioning Libraries

2004-12-03 Thread Simon Brunning
; anyway. Which languages go around breaking backwards > conmpatibility in a cavalier way? VB, for a start. <http://www.mvps.org/vb/index2.html?rants/vfred.htm> -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie alert !

2004-12-03 Thread Simon Brunning
x27;t find it ? The tutor mailing list might be just the place - <http://mail.python.org/mailman/listinfo/tutor>. > To illustrate my case this script : (Snip) Sorry, I'm not much of a GUI programmer... -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/

Re: exec size

2004-12-03 Thread Simon John
yeah i noticed that when i built it - and strip/upx etc. don't help much. i made sure i disabled debugging too. -- http://mail.python.org/mailman/listinfo/python-list

Re: win32 extensions for Python 2.4

2004-12-07 Thread Simon Brunning
r is it being worked on? The > activestate's version of Python has win32 extension but i won't be > bothered to download it. :) They are at Sourceforge these days - <https://sourceforge.net/projects/pywin32/>. -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon

creating generators from function

2004-12-08 Thread Simon Wittber
I use a coroutine/generator framework for simulating concurrent processes. To do this, I write all my functions using the general form: while True: do stuff yield None To make these generator functions compatible with a standard thread interface, I attempted to write a decorator which co

Re: creating generators from function

2004-12-08 Thread Simon Wittber
> I'm a little confused as to what you're trying to do here. The f() > function, in particular, doesn't make much sense I see I am misunderstood. The example was contrived, and it seems, incorrect. I simulate threads, using generator functions and a scheduler. My implementation lives here: http

Re: creating generators from function

2004-12-08 Thread Simon Wittber
> A function containing an infinite loop will never return, so it is bugged > and useless unless it does has an external effect with something like > 'print xxx' within the loop. I thought the idiom: while True: #code which iterates my simulation if condition: break wat quite normal. T

Re: Wrapper objects

2004-12-09 Thread Simon Brunning
On 9 Dec 2004 06:11:41 -0800, Egil M?ller <[EMAIL PROTECTED]> wrote: > Is there any way to create transparent wrapper objects in Python? This work - <http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52295>? -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline

Re: results of division

2004-12-09 Thread Simon Brunning
I need to be and normally, 1.70 will do. Use the new decimal type - <http://www.python.org/doc/2.4/whatsnew/node9.html>. -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: PIL for Windows for Python 2.4

2004-12-09 Thread Simon Brunning
figure distutils to use it. Also useful: <http://rubygarden.org/ruby?WindowsCompiler>. > Hefty downloads though, do not attempt this without broadband ! 380 Mb approximately. -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Performance (pystone) of python 2.4 lower then python 2.3 ???

2004-12-13 Thread Simon Wittber
> Which shows a decrease in performance. Could this have anything to do with the > fact that is is a dual processor box? Doubtful. I'm running dual Pentium 4 2.8 Ghz (Win XP) and get the following results: C:\>python23\python Python23\lib\test\pystone.py Pystone(1.1) time for 5 passes = 1.430

Re: gather information from various files efficiently

2004-12-14 Thread Simon Brunning
ode according to the likely scenario. > > And this is different from optimizing in *any* other language > in what way? In other languages, by the time you get the bloody thing working it's time to ship, and you don't have to bother worrying about making it optimal.

Re: Module question

2004-12-16 Thread Simon Brunning
zard. Certainly I don't see any wizard dialogues. -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Accessing DB2 with Python

2004-12-17 Thread Simon Brunning
On Thu, 16 Dec 2004 20:20:09 -0500, Grumman <[EMAIL PROTECTED]> wrote: > I'm sure there's a pretty complete python ADO wrapper out there as well. http://adodbapi.sourceforge.net/ -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail

Re: Email filters in python

2004-12-17 Thread Simon Brunning
from there. http://spambayes.sourceforge.net/ -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: atmosphere on c.l.py (WAS: How about "pure virtual methods"?)

2004-12-19 Thread Simon Wittber
> I do understand the feeling though; Fredrik Lundh jumped at me only a > few days ago when I said that I personally found list comprehensions > more readable than map. I certainly don't mind being advised or > corrected if I've written incorrect or even just suboptimal code, but > attacking a per

sql server support from linux

2004-12-20 Thread Simon Wittber
I am currently tasked with connecting Python CGI programs, under Apache2 / Linux, to SQL Server on Windows 2000. The latest MSSQL module from http://www.object-craft.com.au/projects/mssql/ (0.09) will not (for me, at least) compile on Debian. The next version of the module (0.08) will compile, but

Re: sql server support from linux

2004-12-21 Thread Simon Wittber
> If you can get the DB-API wrappers running on Win2k, how about doing that > locally and then > writing a quickie socket server which your linux client can connect to? That is, essentially, exactly what I have done. I've exposed the DB API using Pyro. I had to turn multithreading off, as the se

Re: sql server support from linux

2004-12-23 Thread Simon Wittber
> I considered doing exactly the same thing a while ago, but was worried > about running into an annoyance like that. FWIW, The synchronous Pyro server performed much faster than the multithreaded version, even under heavy use from 3 machines. It appeared that while the database queries were se

Re: Jython & IronPython Under Active Development?

2004-12-25 Thread Simon John
Haibao Tang wrote: > This question may be a bit weird but I really want to know if these two > hybrid projects are still active. they're both by the same guy, and i think jython just had a new release, although i expect ironpython will turn into microsoft visual python.net instead of reaching v1.

Re: extract news article from web

2004-12-29 Thread Simon Brunning
feed is a *far* better idea than trying to parse the HTML. -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ [1] http://news.bbc.co.uk/2/hi/help/3223484.stm [2] http://feedparser.org/ -- http://mail.python.org/mailman/listinfo/python-list

Re: help - problem installing pywin32

2004-12-30 Thread Simon Brunning
ript". I'm not sure what the problem actually is, but as a workaround, I found that adding Python's root directory to my path fixed it. -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: (noob alert) why doesn't this work?

2005-03-22 Thread Simon Brunning
ugh line 51? Might one of your flac files not have a title line? > I don't understand why this isn't assigned. I suspect that self.wav2mp3 > doesn't wait for the first part to finish, but how to force it to wait? Nope. Looks asynchronous to me. -- Cheers, Simon B, [EMAIL PROT

Re: Python for a 10-14 years old?

2005-03-24 Thread Simon Brunning
turtle.left(90) square() Then add arguments to your functions: def square(size): for i in range(4): turtle.forward(size) turtle.left(90) square(100) square(50) And so on. At each stage, you can see what's happening. -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: McMillan Installer vs. Python 2.4

2005-03-30 Thread Simon John
[EMAIL PROTECTED] wrote: > 1. Does anyone know why McMillan Installer 5b5 does not work with > Python 2.4 under Linux (works with Python 2.3 just fine), and how to > fix it? I expect so. > 2. Will anyone be picking up the maintenance and development ball for > McMillan Installer? There was a 6a

Re: McMillan Installer vs. Python 2.4

2005-03-30 Thread Simon John
[EMAIL PROTECTED] wrote: [snip] > First, I got the latest Installer, 6a2, from the Vaults of Parnassus. > This version is listed as the 'Windows' version. This means two > things: The .py files are sprinkled with DOS-style line endings > (CR/LF) and file endings (^Z), and the runtime support fil

Re: Raise Error in a Module and Try/Except in a different Module

2005-04-04 Thread Simon Brunning
is wrong? You're not *calling* FUNC1 here, you're just assigning a reference to it to the name 'a'. Try FUNC1() instead. -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Sending keytrokes to Windows app

2005-04-04 Thread Simon Brunning
On Apr 4, 2005 12:04 PM, Marten Hedman <[EMAIL PROTECTED]> wrote: > I am trying to control a Windows application from a python script with > SendKeys and Python 2.3. WATSUP might be worth a look, instead... http://www.tizmoi.net/watsup/intro.html -- Cheers, Simon B, [EMAIL PROT

Re: Testing for EOF ?

2005-04-04 Thread Simon Brunning
On Apr 4, 2005 12:21 PM, Pete Moscatt <[EMAIL PROTECTED]> wrote: > I am reasonably new to python and am trying to read several lines of text > from an open file. my_file = open('whatever.txt', 'r') for line in my_file: print line # Or whatever -- Cheers,

Re: Testing for EOF ?

2005-04-04 Thread Simon Brunning
On Apr 4, 2005 12:36 PM, Peter Moscatt <[EMAIL PROTECTED]> wrote: > Thanks Simon, > > So the code should look like: > > f=open(myfile,"r") > > for some_var in f: > text=f.readline() > print text > > Do I have this correct ? Nearly - you do

Re: (win32) speedfan api control

2005-04-04 Thread Simon Brunning
d for this kind of thing. http://www.brunningonline.net/simon/blog/archives/001320.html -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: (win32) speedfan api control

2005-04-04 Thread Simon Brunning
-- 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 (Apr 4)

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

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

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

Re: StopIteration in the if clause of a generator expression

2005-04-05 Thread Simon Brunning
reason - I just can't figure out what it is.) The generator expression has the advantage of not leaking references into the enclosing namespace. What's advantage of the list comp? -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: os.path query functions behavior incorrect?

2005-04-05 Thread Simon Percivall
> These to me are I/O errors that should result in an exception. > Doing a command line dir a:\ reports "The system cannot find > the path specified." The functions use the underlying C library, and in this case, the result is not guaranteed by the standard. -- http://mail.python.org/mailman/lis

Re: Installing Python 2.4 on Linux

2005-04-05 Thread Simon John
Marcin Stepnicki wrote: > It's rather Fedora related, I have Python 2.2, 2.3 and 2.4 on my Ubuntu > box and they seem to coexist without problems. It's not a Fedora problem at all. The 2.4.1 RPM's just move the default /usr/bin/python symlink to point to the new Python24 instead of Python23 that

Re: Does IronPython indicate MS interest in dynamic languages?

2005-04-06 Thread Simon Brunning
On Apr 6, 2005 5:25 AM, Mike Rovner <[EMAIL PROTECTED]> wrote: > Sun abandoned dynamic approach (Tcl) in favor of Java. Sun appear to be very interested in dynamic languages these days: http://www.tbray.org/ongoing/When/200x/2004/12/08/DynamicJava -- Cheers, Simon B, [EMAIL PROTECT

Re: shebang in cross platform scripts

2005-04-06 Thread Simon Brunning
On Apr 6, 2005 2:37 PM, rbt <[EMAIL PROTECTED]> wrote: > Does the line below have any negative impact on Windows machines? I > develop and test mostly on Unix, but my scripts are often used on Win > systems too. > > #!/usr/bin/env python Nope. On Windows it's just a c

Re: Lambda: the Ultimate Design Flaw

2005-04-06 Thread Simon Brunning
On Apr 6, 2005 4:42 PM, Scott David Daniels <[EMAIL PROTECTED]> wrote: > I've always wondered about this turn of phrase. I seldom > eat a cake at one sitting. Clearly you're just not trying. ;-) -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.ne

Re: PyWin32 COM mailing list / web forum?

2005-04-11 Thread Simon Brunning
is there such a > thing anywhere? I couldn't find links to it from the pywin32 homepage > or sourceforge-page. Try http://mail.python.org/mailman/listinfo/python-win32 -- 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 (Apr 11)

2005-04-11 Thread Simon Brunning
QOTW: "I think my code is clearer, but I wouldn't go so far as to say I'm violently opposed to your code. I save violent opposition for really important matters like which text editor you use." - Roy Smith "You need to recursively subdivide the cake until you have a piece small enough to fit in y

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

2005-04-11 Thread Simon Brunning
QOTW: "I think my code is clearer, but I wouldn't go so far as to say I'm violently opposed to your code. I save violent opposition for really important matters like which text editor you use." - Roy Smith "You need to recursively subdivide the cake until you have a piece small enough to fit in y

Re: Better access to database search results

2005-04-12 Thread Simon Brunning
/greg/python/dtuple.py>). It's really easy to use - <http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/81252>. -- 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 (Apr 11)

2005-04-14 Thread Simon Brunning
and think of something else witty to say over the next day or two - I'm sure I can squeeze you into next week's. ;-) -- 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 (Apr 11)

2005-04-14 Thread Simon Brunning
h, but to whom do I attribute it? ;-) -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: MS SQL Server/ODBC package for Python

2005-04-15 Thread Simon Brunning
t;http://adodbapi.sourceforge.net/>) works a treat. -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Determine ip address

2005-04-15 Thread Simon Brunning
ows displays). On Windows, this works: socket.gethostbyname(socket.gethostname()) Is that OK on real operating systems too? -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: MS SQL Server/ODBC package for Python

2005-04-15 Thread Simon Brunning
On 4/15/05, Graham <[EMAIL PROTECTED]> wrote: > Thanks Simon > I have just installed mxODBC and tried one of their samples. > Am getting an error on trying to import mx.ODBC > > ImportError: No module named mx.ODBC > > After the install the mx folder has been p

Re: py2exe - create one EXE

2005-04-15 Thread Simon John
yeah, the question does come up once a month at least, but you could try mcmillan installer with it's --onefile option. i have mirrors at http://www.the-jedi.co.uk/downloads/installer -- http://mail.python.org/mailman/listinfo/python-list

Re: def a((b,c,d),e):

2005-04-18 Thread Simon Percivall
You can always unpack a tuple that way, like in: .>>> import sys .>>> for (index, (key, value)) in enumerate(sys.modules.iteritems()): pass -- http://mail.python.org/mailman/listinfo/python-list

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

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

Re: Why does python class have not private methods? Will this never changed?

2005-04-19 Thread Simon Brunning
On 4/19/05, could ildg <[EMAIL PROTECTED]> wrote: > Python is an oop language, Yes. > Private stuff always makes programming much easier. That contention is, at best, debatable. See http://groups-beta.google.com/group/comp.lang.python/msg/b977ed1312e10b21. -- Cheers, Simon B, [EMA

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

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

Re: [Python-Dev] How do you get yesterday from a time object

2005-04-19 Thread Simon Brunning
y # <-- generates an error > print yday.strftime("%Y-%m-%d") today = datetime.date.today() previous_working = today - datetime.timedelta(days=1) -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

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