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.
IPythonでコマンドを実行します
cd $cs<TAB>
しかし、それは私が道を拡大することを可能にしません。
シェル変数を読み取るようにIPythonを作成するにはどうすればよいですか?
「シェル変数」の意味を正しく理解していれば。シェルで設定された変数 (「環境変数」) を意味する場合: os.environ でそれらを読み取ることができます...
import os cs = os.environ.get('cs') runstring = "cd %s" (cs) ...