Originally Posted by
wojox
You could add
to the end of your func.
When you close the script the object should be destroyed automatically.
Ok I tried this but it doesn't seem to work.
Code:
import webbrowser
webbrowser.open("http://www.google.co.uk")
webbrowser.close()
It comes up like this when I run it from terminal:
Code:
user@pc:~/Programming$ python test.py
Traceback (most recent call last):
File "test.py", line 4, in <module>
webbrowser.close()
AttributeError: 'module' object has no attribute 'close'
user@pc:~/Programming$ QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
I also had to press the return key before it would finish executing the program.
Bookmarks