Starting out

Post new topic   Reply to topic

View previous topic View next topic Go down

Starting out

Post by looseether on Thu Dec 18, 2008 6:45 pm

Starting out with Python.


Last edited by looseether on Thu Dec 18, 2008 9:41 pm; edited 1 time in total

_________________

looseether
Central Scrutiniser
Central Scrutiniser

Male
Number of posts: 97
Age: 42
Location: Australia
Job/hobbies: tea and cigarettes
Sim: GTL & GTR2
Registration date: 2008-11-25

View user profile http://simbintools.forumotion.net

Back to top Go down

Re: Starting out

Post by dave on Thu Dec 18, 2008 9:03 pm

Here is an old python script of mine to startup a QT window.

Of course, this wont run unless you have all the rest of the code.

Very Happy Very Happy Very Happy

Code:

#!/usr/bin/env python
#
#

import sys
import os.path

from qt import *

import WStartupDialog

def main(args):

    print "------------------------------------------------------------"

    app = QApplication(args)
    app.connect(app, SIGNAL("lastWindowClosed()"), app, SLOT("quit()"))

    mainWindow = WStartupDialog.WStartupDialog()
    app.setMainWidget(mainWindow)

    mainWindow.move(400, 400)
    mainWindow.setFixedSize(320, 240)
    mainWindow.show()

    app.exec_loop()

    mainWindow.stop()
    print "Application complete."

if __name__ == "__main__":
    main(sys.argv)


dave
The Coding God
The Coding God

Male
Number of posts: 1
Location: Australia
Language: Everything
Registration date: 2008-12-18

View user profile

Back to top Go down

Re: Starting out

Post by looseether on Thu Dec 18, 2008 9:26 pm

Thanks for the post and welcome. Very Happy

I've downloaded and installed python 2.6.1 and run a few scripts briefly.
Their google.py - which I immediately changed to point to scroogle Wink

Looks ok.

It'll be slow going for while as I mainly concentrate on GTLTool and the re-write, SimbinTool, but with your guiding hand,
I might just get there flower lol!


cheers

_________________

looseether
Central Scrutiniser
Central Scrutiniser

Male
Number of posts: 97
Age: 42
Location: Australia
Job/hobbies: tea and cigarettes
Sim: GTL & GTR2
Registration date: 2008-11-25

View user profile http://simbintools.forumotion.net

Back to top Go down

View previous topic View next topic Back to top


Permissions of this forum:
You cannot reply to topics in this forum