Help start with Python - exceptions and errors galore

Hello,

I wanted to give Python a try. I have Eric and PyQt. I’m trying with the dumbest Hello World script like

print "Hello, World!"

and it says “The debugged program raised the exception unhandled IOError “(21, ‘Is a directory’)””. WTH?

I tried this:

import sys
from PyQt4 import QtGui

app = QtGui.QApplication(sys.argv)

widget = QtGui.QWidget()
widget.resize(250, 150)
widget.setWindowTitle('simple')
widget.show()

sys.exit(app.exec_())

and it spits the same error message. Plus Eric spits out tens of error messages, e.g. “kfilemodule(25295)/kio (KDirListerCache) KDirListerCache::listDir: Entry in cache: KUrl(“trash:/”)” every time I try to run or open anything. - ridiculous!!!

I have to say this is the first IDE in my life which does this to me on the first try. It’s just… >:) Does anyone know how to start? What to do? How can a newcomer stay for a second lomger if python does this from the very beginning? I used C/C++/C#, Java, MS VS, SharpDevelop, MonoDevelop, KDevelop, Qt Creator etc. - no IDE or language did this kind of stuff. What am I doing wrong? Please help. Thank you.

to check what is the problem of the ide an what is the problem (if any) of
python itself:

Did you try your code directly in the python interpreter?
I mean open a console, type python to start the interpreter and look what
happens when you copy your code into it.

I did exactly that with your code and it works like a charm.
Please check that also, if it works for you you have really a problem with
the eric ide itself and not with python (I only know eric from its name I do
not use it).