I have a file that uses the random
modules how do I include that module in my setup.py
file?
Here is my code:
import sys
from cx_Freeze import setup, Executable
build_exe_options = {'packages': ['sys'], 'excludes': ['tkinter'],
'includes': ['random']}
base = None
if sys.platform == 'win32':
base = 'Win32GUI'
setup(name = 'name',
verison = '0.1',
description = 'description',
options = {'build_exe': build_exe_options},
executables = [Executable('fileName.py', base = base)])
My Script
import random
choices = ['rock', 'paper', 'scissors']
i = randome.randint(0, 2)
title = input('Rock, Paper, Scissor\nPress Enter to continue...')
instructions = input('Please read the instructions carefully...')
end = input('Please type \'done\' to end the game...')
enjoy = input('Enjoy!')
done = False
while not done:
You = input('\nRock, paper, or scissors? \n')
Computer = choices[i]
if You == Computer:
print('Tie')
if You == 'rock' and Computer == 'paper':
print('Computer wins!')
if You == 'paper' and Computer == 'scissors':
print('Computer wins!')
if You == 'scissors' and Computer == 'rock':
print('Computer wins!')
if Computer == 'rock' and You == 'paper':
print('You win')
if Computer == 'paper' and You == 'scissors':
print('You win')
if Computer == 'scissors' and You = 'rock':
print('You win')
if You == 'done':
exit()