Re: Modules... paths... newbie confusion

2006-08-23 Thread MrBlueSky
Well thank you all... that's all very helpful (apart from the brief diversion into MySQL, but even that was instructive!). Your comments about "setup.py" prompted me to read the pytz README.txt a bit more carefully and there it says to run "python setup.py install". And this copies stuff into sit

Re: Modules... paths... newbie confusion

2006-08-22 Thread MrBlueSky
Thanks for the suggestions, folks.. site-packages ~~ OK, I'm been trying to get MSSQL into c:\Python24\lib\site-packages. MSSQL comes (as a tar'd, zip'd file) with a folder hierarchy with MSSQL.py at the top level and then bin\python2.3\mssqldb.pyd. If I try and copy this folder hierarch

Modules... paths... newbie confusion

2006-08-21 Thread MrBlueSky
I wonder if someone could clarify how Python "knows" where modules are - or at least point to some documentation that might help me? Here's what I've been trying: I've installed Python 2.4 Windows, and have also installed tkinter, pmw, cx_Oracle, mssql and pytz (phew!) all under my c:\python24 fo

Re: timezones and time_t

2006-08-19 Thread MrBlueSky
Thanks for the reply. Unfortunately, a simple "+offset" type solution isn't really accurate enough for the kind of scenario I'm looking at. I'm often dealing with different timezones with DST changeovers on different dates or even different times of day! So I need industrial-strength timezone han

timezones and time_t

2006-08-18 Thread MrBlueSky
Hi, I've got a Python application that (as well as lots of other stuff!) has to translate time_t values into strings in the TZ of the users choice. Looking at the Python Library Reference, I can see no platform independent way of setting the TZ that time.localtime() returns - tzset() is marked as

Re: What technologies should I use for my application manager?

2006-06-27 Thread MrBlueSky
Thanks for the advice, Adam! Turbogears sounds like it does everything I want and looks like a great... except you've made me nervous with your comment on the instability of the Oracle API! Stability, good documentation and a wide user base are priorities. I was delighted by the quality of Tkin

What technologies should I use for my application manager?

2006-06-25 Thread MrBlueSky
Hello! I've just finished working on my first Python app (a Tkinter-based program that displays the content of our application log files in graphical format). It was a great experience that's had a very positive response from my colleagues. So I'd like to try something different for my second P

Re: Pmw ScrolledCanvas: How to scroll to specific item?

2006-06-05 Thread MrBlueSky
MrBlueSky wrote: > Hi, I've got a ScrolledCanvas object (sc) and have identified an item > on the canvas to which I wish to scroll. I've been reading around and > experimenting but with not much success. > > So far I've managed to get the item's bbox using sc.

Pmw ScrolledCanvas: How to scroll to specific item?

2006-06-05 Thread MrBlueSky
Hi, I've got a ScrolledCanvas object (sc) and have identified an item on the canvas to which I wish to scroll. I've been reading around and experimenting but with not much success. So far I've managed to get the item's bbox using sc.bbox(item) And got the proportion of the canvas that's visible u

IDLE confusion

2006-05-16 Thread MrBlueSky
Hi, I'm trying to use IDLE to develop My First Python App and my head hurts... I've a file called spalvi.py with this in it: from Test import * firstTest("Mike") And a file called Test.py with this in it: def firstTest(name): print "Yo",name I open spalvi.py with IDLE and Run

Redirecting unittest output to a Text widget

2006-05-10 Thread MrBlueSky
Morning! I'm writing my first Python program, so please have patience! I'd like to redirect the output from my application's unit tests ("import unittest") to a Tkinter Text object. I found the magic to redirect stdout and stderr: sys.stdout = myTextWindow sys.stderr = myTextWindow where

Re: Redirecting unittest output to a Text widget

2006-05-10 Thread MrBlueSky
Excellent, that seems to have done the trick! FWIW: I should admit that I haven't really taken the time to properly understand unittest... I'm too eager to get my tests written :-) So for reasons I do not as yet understand Peter's suggestion above didn't quite work for me but the following did