Update of /cvsroot/freevo/freevo/WIP/Ruelle
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27086

Added Files:
      Tag: rel-1-5
        create_command_fxd.py 
Log Message:
a helper to create commands from the command line.

--- NEW FILE: create_command_fxd.py ---
#!/usr/bin/python

import sys;
if (sys.argv[1] == 'create_command_fxd'):
    sys.argv.pop();
if len(sys.argv) < 2:
    print 'please provide a filename to write too.';
    sys.exit(0);

print "Enter command you would like to run:";
command = sys.stdin.readline();
command = command.rstrip();
command = command.replace("&", "&amp;");
print "Enter the name freevo should use for the command:";
name = sys.stdin.readline();
name = name.rstrip();
name = name.replace("&", "&amp;");
spawnwm = '0';
while (spawnwm != 'Y' and spawnwm != 'y' and spawnwm != 'N' and spawnwm != 'n'):
    print "Do you want to run the window manager while running the 
program(y/n):";
    spawnwm = sys.stdin.readline();
    spawnwm = spawnwm.rstrip();
stoposd = '0';
while (stoposd != 'Y' and stoposd != 'y' and stoposd != 'N' and stoposd != 'n'):
    print "Do you want freevo to minimize while the command runs(y/n):";
    stoposd = sys.stdin.readline();
    stoposd = stoposd.rstrip();

f = open(sys.argv[1], 'w');
f.write("<?xml version=\"1.0\" ?>\n");
f.write("<freevo>\n");
f.write("<command title=\"%s\">\n" % name);
f.write("<cmd>%s</cmd>\n" % command);
if (stoposd == 'Y' or stoposd == 'y'):
    f.write("<stoposd />\n");
if (spawnwm == 'Y' or spawnwm == 'y'):
    f.write("<spawnwm />\n");
f.write("<info>\n");
f.write("<content>Command generated by create command fxd helper.</content>\n");
f.write("</info>\n");
f.write("</command>\n");
f.write("</freevo>\n");




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to