获取当前目录

吴旖萱 / 2023-05-26 / 原文

Java:

// 获取当前工作目录
String basePath = System.getProperty("user.dir");

Python:

curr_dir = os.path.dirname(__file__)

os.path.join(curr_dir,“...”)