I'm still a beginner when it comes to programming, and I'm especially new when it comes GUI programming. I'm using python with PyQt4 and im following a tutorial guide. The following code block is relatively easy to follow:
import sys
from PyQt4 import QtGui
def window():
app = QtGui.QApplication(sys.argv)
w = QtGui.QWidget()
b= QtGui.QLabel(w)
b.setText("Hello World!")
w.setGeometry(100,100,200,50)
b.move(50,20)
w.setWindowTitle(“PyQt”)
w.show()
sys.exit(app.exec_())
if __name__ == '__main__':
window()
I can follow whats going on here quite well, but could someone explain to me what the sys.argv is actually doing? I don't want to just blindly put this in every time in the hope that it will make my code work!