Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はPythonのテキストアシスタントを作っています。execfile() を使用して質問を実行しようとしています。質問に使用するファイルとコマンドファイルは別のディレクトリにあるため、インポート(ファイル名)を使用できません。
私の質問は、私のexecfileで変数を含む複数の部分をどのように実行できるかです
これは私が持っているものです: execfile ('C:/hidden/assistant/AnsData/', variable, '.py')