This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import subprocess | |
if __name__ == '__main__': | |
fp = open('imports.txt', 'w+') | |
imports = subprocess.Popen('sfood-checker', | |
shell=True, | |
stdin=subprocess.PIPE, | |
stdout=subprocess.PIPE, | |
stderr=subprocess.STDOUT) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import sys | |
import modulefinder | |
from glob import glob | |
from distutils.core import setup | |
import py2exe | |
data_files = [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import win32serviceutil | |
import win32service | |
import win32event | |
import servicemanager | |
import socket | |
class AppServerSvc (win32serviceutil.ServiceFramework): | |
_svc_name_ = "ShortAndTogetherName" | |
_svc_display_name_ = "Full name of your service" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
import sys | |
from glob import glob # glob will help us search for files based on their extension or filename. | |
from distutils.core import setup # distutils sends the data py2exe uses to know which file compile | |
import py2exe | |
data_files = [ | |
# All the files that are not .py, .pyd or .pyc should be invoked so py2exe adds them to the compilation | |
("Microsoft.VC90.CRT", | |
glob(r'C:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT\*.*')), # Adds the file to the compilation folder because it may broke inside the compilation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from glob import glob | |
from distutils.core import setup | |
import py2exe | |
sys.path.append("C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\redist\\x86\\Microsoft.VC90.CRT") | |
data_files = [ | |
("Microsoft.VC90.CRT", glob(r'C:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT\*.*'))] | |
setup( | |
windows=['../main.py'], | |
includes=['sys', 'glob', 'os', 'datetime', 'webbrowser', 'PySide.QtGui', 'PySide.QtCore'], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
from __future__ import print_function | |
def fibonacci(num1, num2, loop): | |
""" | |
Arguments: | |
num1 (int) = first number | |
num2 (int) = second number | |
loop (int) = the amount of times it iterates | |
""" |