Home Download Buy Blog Forum Support

Problem creating a new build system (SOLVED)

Problem creating a new build system (SOLVED)

Postby panofish on Wed Apr 24, 2013 4:21 pm

I am trying to create a build for my .ui files generated from qt-designer.
I want to run the python command that generates the python code for the ui files which is normally run like this:

C:\Python27\Lib\site-packages\PyQt4\pyuic4.bat MainProducts.ui > MainProducts.py

I have created a new sublime build like this:

Code: Select all
{
   "cmd": ["C:/Python27/Lib/site-packages/PyQt4/pyuic4.bat","$file"],
   "selector": ["source.ui"]
}

This works but I can't redirect the output to a file like this:

Code: Select all
{
   "cmd": ["C:/Python27/Lib/site-packages/PyQt4/pyuic4.bat","$file > $file_base_name.py"],
   "selector": ["source.ui"]
}

The problem is that the pyuic4.bat command directs the data to standard output and not a file... so you must redirect the standard output to a filename.
How can I redirect the output to a file using the build cmd statement?
Last edited by panofish on Wed Apr 24, 2013 4:33 pm, edited 1 time in total.
panofish
 
Posts: 3
Joined: Wed Apr 24, 2013 4:15 pm

Re: Problem creating a new build system

Postby panofish on Wed Apr 24, 2013 4:33 pm

Solved!

This is the correct build which can redirect the output.
This is the build system for pyuic4.bat to convert .ui to .py

Code: Select all
{
   "cmd": ["C:/Python27/Lib/site-packages/PyQt4/pyuic4.bat","$file", ">","$file_base_name.py"],
   "selector": ["source.ui"]
}
panofish
 
Posts: 3
Joined: Wed Apr 24, 2013 4:15 pm


Return to Technical Support

Who is online

Users browsing this forum: No registered users and 19 guests