Other Python tips

Older Python programs will sometimes give you an error like:

./PyInstallShield:212: DeprecationWarning: use gtk.UIManager itemf=ItemFactory(MenuBar,"<main>",ag) ./PyInstallShield:247: Warning: unsupported arithmetic operation for flags type table1.attach( Label(_("Installation Directory:")),0,1,0,1,(EXPAND+FILL),(EXPAND+FILL),0,0) Traceback (most recent call last): File "./PyInstallShield", line 1466, in <module> runbabel() File "./PyInstallShield", line 1462, in runbabel mybabel=installwin() File "./PyInstallShield", line 247, in __init__ table1.attach( Label(_("Installation Directory:")),0,1,0,1,(EXPAND+FILL),(EXPAND+FILL),0,0) TypeError: flag values must be strings, ints, longs, or tuples

To fix, edit the offending file, in the above instance PyInstallShield, and change the offending statements like this:

in the above instance
(EXPAND+FILL)
to

EXPAND FILL

The Python program will now run.


.