Ubuntu Pastebin

Paste from Tiago Galvão (Slaveworx) at Thu, 22 Jan 2015 21:55:28 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#######################################################################
#                    SHORTCUT CREATOR FOR LUBUNTU    v1.0             #
#         Copyright 2015 - Tiago Galvão - doit@slaveworx.esy.es       #
#######################################################################

print "############### Lubuntu Shortcut Creator v1.0 ###############"
ficheiro = str(raw_input("#  Insert the desired filename > "))

atalho = open(ficheiro + ".desktop", "a+")

atalho.write("[Desktop Entry]\nEncoding=UTF-8\n");
print "###############################################################\n"
versao = str(raw_input("\nInsert the program version > "))

atalho.write("Version=" + versao + "\n");
atalho.write("Type=Application" + "\n");

terminal = raw_input("Use terminal to launch? (True ou False)> ")
atalho.write("Terminal=" + terminal + "\n");

comando = str(raw_input("Insert the command to execute > "))
atalho.write("Exec=" + comando + "\n");

nome = str(raw_input("Insert the shortcut name > "))
atalho.write("Name=" + nome + "\n");

print "\nShortcut created successfully!!!\n\n"


atalho.close()
Download as text