
September 2nd, 2003, 01:24 PM
|
|
Registered User
|
|
Join Date: Sep 2003
Posts: 11
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
Python Pointers ?
After my crash course in Python syntax I started learning PyQt, where I encountered something that wasn't covered in my crash course tutorial:
Code:
#
# hello.py
#
import sys
from qt import *
class HelloButton(QPushButton):
def __init__(self, *args):
QPushButton.__init__(self, *args)
self.setText("Hello World")
class HelloWindow(QMainWindow):
def __init__(self, *args):
QMainWindow.__init__(self, *args)
self.button = HelloButton(self)
self.setCentralWidget(self.button)
def main(args):
app = QApplication(args)
win = HelloWindow()
win.show()
app.connect(app, SIGNAL("lastWindowClosed()"), app, SLOT("quit()"))
app.exec_loop()
if __name__ == "__main__":
main(sys.argv)
In the following line:
Quote: | def __init__(self, *args): |
There is a * before args, and I dont' have a clue what that means 
|