[wingide-users] Re: performing external actions when restarting
debugger
Mitchell L Model
MLMConsulting at Comcast.net
Thu Jan 14 10:25:36 MST 2010
On Jan 7, 2010, at 11:59 AM, John Ehresman wrote:
> On 1/7/10 11:40 AM, Mitchell L Model wrote:
>> I am using PyQt with Qt Designer. Every time I save from Qt
>> Designer I
>> have to go to a terminal window (or the equivalent in Wing) and
>> execute
>> a command to translate the Designer file into a Python file, and I
>> invariably forget. Is there some kind of minimal "make" like hook
>> that
>> allows specifying command-line commands to be run automatically every
>> time debugging starts?
>
> I think you're looking for the Build Command on the Debug page of
> Project Properties.
>
Thanks. That worked. But things started to get complicated -- I needed
two different PyQt actions, one to regenerate the Python file for the
Qt Designer's .ui file and one to regenerate the Python file for an
icons file. Then, I began to design more windows for my application in
Qt Designer, and each one of them will have a .ui file (and maybe an
icons file) too. So I decided to put all of this in a shell script,
including testing modification dates to skip unneeded steps. The
script works outside of Wing, but I am having trouble getting it to
work from within Wing.
I have changed the configuration for the build command to run the file
instead of a command. I have noted the comments in the documentation
about the file running without a shell environment -- if I start the
file with #!/bin/csh won't it run in its own shell environment? I have
tried the Test from within the configuration and also the various
execute icons and drop-down commands from the OS Commands window. I
also tried changing the configuration back to a command 'csh
myfilename'. And so on. It seems that either the file does not execute
at all or it executes and does its work but never terminates, with the
OS Command window showing "Running..." and a Terminate command added
to its drop-down menu. If I put echo statements in the script there is
no output until I kill the script, at which point the output appears.
(I guess that's due to stdout buffering in the shell and I would have
to send the output to stderr.)
So, how do I configure things so the build command executes a script
for a particular shell? (I wanted conditionals, etc.)d
More information about the wingide-users
mailing list