日韩久久久精品,亚洲精品久久久久久久久久久,亚洲欧美一区二区三区国产精品 ,一区二区福利

[Tutor] how to change the current working di

系統(tǒng) 2039 0

[Tutor] how to change the current working directory path in ipython.

[Tutor] how to change the current working directory path in ipython.

Joel Goldstick joel.goldstick at gmail.com
Wed Feb 8 15:33:01 CET 2012

?


      On Wed, Feb 8, 2012 at 9:24 AM, Debashish Saha <
      
        silideba at gmail.com
      
      > wrote:
>
      
         how to change ?the current working directory path in ipython.

      
      >
      
      
      >
      
         my current directory path is

      
      >
      
         ? ? ? ? ? ? ? ? ? ? ? pwd

      
      >
      
         ? ? ? ? ? ? ? Out[2]: u'C:\\Users\\as'

      
      >
      
      
      >
      
         now if i want to take the path to a subfolder of above

      
      >
      
         'C:\\Users\\as', what do i have to do?

      
      >
      
         _______________________________________________

      
      >
      
         Tutor maillist ?- ?
        
          Tutor at python.org
        
      
      >
      
         To unsubscribe or change subscription options:

      
      >
      
        
          http://mail.python.org/mailman/listinfo/tutor
        
      
      

Try looking here:

      
        http://docs.python.org/tutorial/stdlib.html#operating-system-interface
      
      

There is a module in python called os

Here is an example from the documentation

>>>
      
         import os

      
      >>>
      
         os.getcwd()      # Return the current working directory

      
      'C:\\Python26'
>>>
      
         os.chdir('/server/accesslogs')   # Change current working directory

      
      >>>
      
         os.system('mkdir today')   # Run the command mkdir in the system shell

      
      0

-- 
Joel Goldstick
    

[Tutor] how to change the current working directory path in ipython.


更多文章、技術(shù)交流、商務(wù)合作、聯(lián)系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯(lián)系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點(diǎn)擊下面給點(diǎn)支持吧,站長非常感激您!手機(jī)微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點(diǎn)擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發(fā)表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 江城| 定兴县| 高雄县| 镇沅| 南通市| 淮阳县| 烟台市| 浮梁县| 宁津县| 多伦县| 岫岩| 灵武市| 项城市| 尼木县| 南阳市| 苗栗县| 龙川县| 涞源县| 怀远县| 思茅市| 西青区| 双牌县| 昂仁县| 灵武市| 东乌| 巩留县| 体育| 明水县| 九江市| 临猗县| 常熟市| 彰化县| 赫章县| 井研县| 昂仁县| 灌南县| 安西县| 荥经县| 青岛市| 额尔古纳市| 故城县|