1、 methodologies
# -*- coding: utf-8 -*- # !/usr/bin/python import os import sys current_directory = ((__file__)) print(current_directory)
Output:
2、 methodologies
# -*- coding: utf-8 -*- # !/usr/bin/python import os import sys root_path = ((current_directory) + + ".") (root_path) print([0])
Output:
3、 methodologies
currentPath = ().replace('\\','/') # Get current path print(currentPath)
Output:
to this article on Python to get the current path of the three ways to this article, more related to Python to get the current path of content please search my previous posts or continue to browse the following related articles I hope you will support me in the future more!