There are two versions of wxPython installed; the earlier one is required
for a couple of applications built against it while the latest version is
what is used for applications developed here.

   In local applications each *.py file starts with:

import wxversion
wxversion.select('3.0.2.0')
import os, time, wx

   The source code for one external application is updated weekly; it uses
any wxPython version but cannot select one itself. When any GUI file
is changed I need to re-insert the top two lines above so it will build
here.

   Seems that the most efficient approach is using a script that 1) checks
for wxversion.select and 2) adds the top two lines above the import wx line
if the version is not specified. The script can be run against all *.py
files in the subdirectories.

   Before writing such a script advice on a (or most) appropriate tool would
be helpful. Would awk be the appropriate tool for this? Should be a short
script so perhaps a linux utility would be a parsimonious working solution.

Rich

_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to