What is the best way to import when you need several modules from a package?
from PySide.QtGui import QGraphicsView, QAction, QKeySequence, QMenu, QCursor, QKeyEvent view = QGraphicsView() ... or
import PySide.QtGui view = QtGui.QGraphicsView() ... or even
import PySide view = PySide.QtGui.QGraphicsView() ... I understand that in most cases the second way has the best tradeoff between ambiguity and length in the code. But are there any other considerations like performance when importing larger packages?
pep8commandments.sudo apt-get install pep8pep8 yourpythonscript.pyWatch the output and edit, for sure it while yell for exceeding 80 characters.