|
@@ -0,0 +1,25 @@
|
|
|
+
|
|
|
+import sys,os
|
|
|
+
|
|
|
+print(os.path.dirname(os.path.dirname(__file__)))
|
|
|
+sys.path.append(os.path.dirname(os.path.dirname(__file__)))
|
|
|
+
|
|
|
+def getFileFromSysPath(filename):
|
|
|
+ print(sys.path)
|
|
|
+ for _path in sys.path:
|
|
|
+ if os.path.isdir(_path):
|
|
|
+ print(_path)
|
|
|
+ print(os.listdir(_path))
|
|
|
+ for _file in os.listdir(_path):
|
|
|
+ _abspath = os.path.join(_path,_file)
|
|
|
+ if os.path.isfile(_abspath):
|
|
|
+ print(_file)
|
|
|
+ if _file==filename:
|
|
|
+ return _abspath
|
|
|
+ return None
|
|
|
+# print(os.path.exists("1598545223446.jpg"))
|
|
|
+print(getFileFromSysPath("LEGAL_ENTERPRISE.txt"))
|
|
|
+# for _file in os.listdir("F:/Workspace2016/BiddingKG/BiddingKG/dl/test/t2/../"):
|
|
|
+# if os.path.isfile(_file):
|
|
|
+# print(_file)
|
|
|
+print(os.path.split("F:/Workspace2016/BiddingKG/BiddingKG/dl/test/t2"))
|