1

I made a Python program which takes a string as input and outputs another string after performing some functions over it. I intend to distribute it to my friends on other computers. The following is the code:

    s=input("Enter the tileset data : ")

    def reverse(s,i):
     if len(s)==0:
      return ""
     else:
      return s[23*(30-i):23*(31-i)]+reverse(s[:23*(30-i)],i+1)

    p=reverse(s,0)

    print ((((((((((((((((((((((((((((((((((((((((((((p.replace('2','!')).replace('3','2')).replace('!','3')).replace('5','#')).replace('4','5')).replace('#','4')).replace('Q','$')).replace('O','Q')).replace('$','O')).replace('F','%')).replace('G','F')).replace('%','G')).replace('I','&')).replace('H','I')).replace('&','H')).replace('J','^')).replace('K','J')).replace('^','K')).replace('M','}')).replace('L','M')).replace('}','L')).replace('>','*')).replace('?','>')).replace('*','?')).replace('A','(')).replace('@','A')).replace('(','@')).replace('B',')')).replace('C','B')).replace(')','C')).replace('E','_')).replace('D','E')).replace('_','D')).replace('6','{')).replace('7','6')).replace('{','7')).replace('8','+')).replace('9','8')).replace('+','9')).replace('<','[')).replace('=','<')).replace('[','=')).replace(':',']')).replace(';',':')).replace(']',';')

I want to make a simple executable application using this python code, so that anyone who doesn't have Python installed on their computers may run it.

I don't know anything related to .exe programming. It would be great if someone could create the application for me.

tshepang
  • 12,111
  • 21
  • 91
  • 136
iamMG
  • 41
  • 1
  • 7

2 Answers2

1

For Windows there is py2exe

But I never used it. So I can not say anything about it.

Holger
  • 2,125
  • 2
  • 19
  • 30
0

Use cx_Freeze. It's great. And it works, unlike py2exe and pyinstall.

You can run it as an stand-alone script or import in your setup.py

Example :

from cx_Freeze import setup, Executable

copyDependentFiles=True

includes = ["lxml", "lxml._elementpath", "lxml.etree", "gzip",    
"encodings.cp949",    "encodings.utf_8", "encodings.ascii"]

setup(name='gearfacts',
      version = "1.1",
      options = {
          "build_exe" : {
               "includes": includes,
           },
      },
      executables=[Executable('app.py')],
)  
uhbif19
  • 3,139
  • 3
  • 26
  • 48