æ±ãã·ã§ã«ã¹ã¯ãªãããä¿å®ããä½æ¥ã«å«æ°ãããã¦ããã®ã§ãPython3ã«ä¹ãæããã ãã£ãããªã®ã§å¿ è¦ã«ãªã£ãç¥èãæ´çãã¦ããã åãããã«ã·ã§ã«ã¹ã¯ãªããããä¹ãæãã人ã®å½¹ã«ç«ã¤ã¨æãã ã¨ãããã IO é¢é£ã¨ãã¡ã¤ã«åã®æä½ãéè¦ãªæ°ãããã®ã§ããã®ã¸ãããæ¸ãå§ããã ç°å¢å¤æ°ã®åå¾ # Python import os home = os.environ.get('HOME', "") ã«ã¬ã³ããã£ã¬ã¯ããªã®ãã¹ãåå¾ # Bash ... ãã¨ã㨠$PWDã«å ¥ã£ã¦ããã current_path=`pwd` # Python import os current_path = os.getcwd() # ã¹ã¯ãªããã®ãããã£ã¬ã¯ããªã®çµ¶å¯¾ãã¹ã¯ script_path = os.path.abspath(os.path.dirname(__file__)) ãã¡ã¤ã«åã¨
{{#tags}}- {{label}}
{{/tags}}