2018年1月9日 星期二

Python: Get an absolute file path

Python: Get an absolute file path

Python Basic: Exercise-63 with Solution

Write a Python program to get an absolute file path.
Sample Solution:-
def absolute_file_path(path_fname):
        import os
        return os.path.abspath('path_fname')        
print("Absolute file path: ",absolute_file_path("test.txt"))

========== RESTART: F:/Python_APSC/py-ex-basic-63.py ===========
Absolute file path:  F:\Python_APSC\path_fname
>>> 

沒有留言:

張貼留言

RFID 系統的Stream Cipher(串流加密)

  RFID 系統的Stream Cipher(串流加密) 在 RFID 系統中,由於標籤(Tag)的運算資源有限,通常會採用 Stream Cipher(串流加密) 。其原理是利用一個「金鑰(Key)」與「初始向量(IV)」生成一段無限長的偽隨機位元流(Key Stream),...