1
cx_freezeのテンプレートで新しいスクリプトを作成しました。次に、python setup.py build
を実行してexeファイルを作成します。 main.exe
をルートフォルダcx_freeze test
に移動すると、実行に失敗します。cx_freezeを使ってexeを作成しますが、exeを展開してルートディレクトリに移動します
私が望むのは、.exeを1つまたは2つのディレクトリに移動することです。 は、ここに私のコードです:
main.py
foo = input("Complete")
setup.py:
from cx_Freeze import setup, Executable
# Dependencies are automatically detected, but it might need
# fine tuning.
buildOptions = dict(
packages = [],
excludes = [],
includes = ["atexit"]
)
# include_files=[]
base = 'Console'
executables = [
Executable('main.py', base=base, targetName = 'main.exe')
]
setup(name='freeze test',
version = '1',
description = '.',
options = dict(build_exe = buildOptions),
executables = executables)
私はhttp://cx-freeze.readthedocs.org/en/latest/faq.html#using-data-filesはいくつかの助けを持っているかもしれないと思ったが、ファイルがでているので、サブディレクトリ、私は
os
モジュールを使用することはできません?