From: normanwinn <nor...@on...> - 2005-07-25 12:18:41
|
Hi, I'm glad there was a further response to this thread as I think I was a little harsh in adding the comment 'life's too short' to my last response. I really appreciate the time and effort put in for no remuneration. I did persist and re-installed python 2.4, got rid of 2.3 and then uninstalled and loaded up the most recent PythonCard. Apart from a detour with the Windows XP 'Open With' cock-up (does anyone else suffer from that one) which lost the file assocations for python, all became functional. However, I did have to read up about the new version of wxPython (2.6.1u) as one now has to run something to tell the python shell which version of wxPython to use. Again, I do think they should make the default behaviour in the installer do this. I also got complaints from the PIL library saying I had the wrong version even though it was the one that came with 2.4. This was solved with a further download. I was re-motivated to get PythonCard working as I saw an example I liked - the RanchBiz application shown at: http://members.shaw.ca/wexsessa/RanchBiz/ Unfortunately I got more trouble here. I saved the code pages as .py files but they had html markup in them. Then I cut and pasted the code and now am trying to solve indentation errors (thank you Code Editor for telling me about these). Here is an example (actually, this one is 'Invalid syntx'): > if dateISO2 and within<(self.self.colWidth-2): # ignore clicks near col boundaries > return periodDates[clickCol].strftime(ISODATE) > else: > return None > else: > return self.periodDates[clickCol].strftime(ISODATE) This seems wrong. I commented out the last two lines which could never get executed anyway, solved another indentation problem and TabNanny reported OK. Then got into trouble with this section: > if __name__ == '__main__': > app = model.PythonCardApp(Occupancy) > app.MainLoop() Seems there is no 'model.PythonCardApp' attribute. Using dir(PythonCard.model) I found an attribute 'Application' and tried that. Then remembered the wonderful 'Find Files' which appeared to confirm my guess. Got further but now had error messages I could not decipher. I tried mailing the author of RanchBiz but he seems to no longer be at that address. I had to change 'import from PythonCardPrototype' to 'import from PythonCard' so maybe this stuff is quite old. I do wish web pages had an obligatory time stamp. I then had a look at Stani's editor, SPE. This came with wxGlade so I gave this a whirl. Quite impressive. Trouble is that, after getting through a nice design phase, to actually do anthing you have to get into the guts of wxPython. IMO, the PythonCard route, while initially less visually stimulating, is easier. What I did notice on my wxGlade tour is that they seem to have their sizers sorted out. Has this become possible with the recent wx changes? I realise that much of what I say should be on either the wx or python lists. I can't face the mail flood that subscribing to those leads to. Thanks once again to all those who develop PythonCard and so kindly reply to our problems, Norman -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.338 / Virus Database: 267.9.4/57 - Release Date: 22/07/2005 |