Author Topic: Okay Got It Up & Running  (Read 5053 times)

siggy

  • Newbie
  • *
  • Posts: 20
    • View Profile
Okay Got It Up & Running
« on: December 14, 2004, 07:47:05 am »
Hi All

first, thanks to kopsis for replying to my query in the java forum about development tools for the Z.
I've installed his python image and tested it's working okay.  
All is fine, so now I'll begin reading the book link he again kindly provided in a previous mail.

Now that I've installed python no doubt I'll be hammering this forum for info / help

As a start, I read in earlier mail the suggestion that gui dev was quite simple if you grab the framework from a simple example.  
Don't supose anyone has a link to such a simple / hello world type example?
Or any suggested links to get started with python?

Now to write that python based GO / sgf reader - player
did I hear someone say "See you in a few years"  

Cheers

Siggy

siggy

  • Newbie
  • *
  • Posts: 20
    • View Profile
Okay Got It Up & Running
« Reply #1 on: December 14, 2004, 11:36:30 am »
Hi Guys

hope someone might be able to help me with a small problem.

I started in on the 'GUI Programming with Python: QT Edition' book.

I installed python2.3.4, qt for windows, and pyqt. Didn't install BlackAdder!
Anyway, all seemed to go okay here.

So I tried the first few code samples and all was well until I tried the first qt based Hello World program.  

The line 'from qt import *' in Hello1.py seems to be causing the problem, as I assume python cann't find the module 'qt' to import all the functions / classes.

I tried copying all the .pyd files (including qt.pyd) from the 'lib/site-packages' in the qtwin install dir to the 'site-packages' dir in my python install dir.  I then ran site.py in the python idle to make sure that the paths were okay, which they seemed to be. (not sure if these .pyd files are the qt for windows python modules, but it seemed likely whilst I was grabbing at straws  ).
Alas, the Hello World prog is still stuck at the same import line, so this didn't work.

So can anyone offer any advice in getting this up and running?

Cheers

Siggy

siggy

  • Newbie
  • *
  • Posts: 20
    • View Profile
Okay Got It Up & Running
« Reply #2 on: December 14, 2004, 12:57:44 pm »
Hi All

okay I've got it working now.  
Seems the path env setting wasn't quite correct for the qt for win dll.  
Just removed the quotes from around the path & BINGO.

All now seems to work

Cheers

Pete

kopsis

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • http://kopsisengineering.com
Okay Got It Up & Running
« Reply #3 on: December 14, 2004, 01:44:17 pm »
Quote
As a start, I read in earlier mail the suggestion that gui dev was quite simple if you grab the framework from a simple example.  
Don't supose anyone has a link to such a simple / hello world type example?
Or any suggested links to get started with python?
If you grab the "source" package for PyQt from Riverbank's PyQt page and extract the contents you'll find it includes a number of example programs. For the most part, making them work on the Zaurus is as simple as:
  • Add a "from qtpe import *" line right after your qt import line
  • Search for "QApplication" and replace it with "QPEAppliction"
The only other thing to beware of is that there are a number of Qt classes that were left out of the Zaurus version of Qtopia. Some pretty fundamental things like QSplitter and the file dialog are missing from the Sharp ROMs. Somewhere I have a C header file that shows what was excluded. I'll see if I can dig it up but a quick search of ZUG will probably turn up the same info.

shula

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
Okay Got It Up & Running
« Reply #4 on: December 14, 2004, 02:13:06 pm »
i had similiar problems (missing libraries) both on windows and on zaurus.
quickly (and in a very DIRTY manner), i copied all the libraries <dll;so;pyd;py> to where the qt.py is.

but i reinstalled several times since, and the problem didnt seem to recur.
C860, pdaxrom rc8,
with Gnumeric as the perfect PIM :-)

slapout

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
Okay Got It Up & Running
« Reply #5 on: December 14, 2004, 02:21:55 pm »
Quote
Or any suggested links to get started with python?
I currently reading Dive Into Python by Mark Pilgrim at http://www.diveintopython.org
This is the author's website and he has made the whole book available for download. It assumes that you know how to program but that you don't know any python. It doesn't cover pyqt, just python.
SL-5600
Watapon 1.2 Rom

kopsis

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • http://kopsisengineering.com
Okay Got It Up & Running
« Reply #6 on: December 14, 2004, 04:54:32 pm »
Quote
I currently reading Dive Into Python by Mark Pilgrim ...
Great suggestion! Thanks for the link. I found chapters 3 - 7 do an especially good job of documenting Python fundamentals in a concise and easy to follow manner. Even if you think you've mastered the basics, you may want to give this a read (my understanding of introspection is much better after reading chapter 4).