您好,我怎么能用os.path lib获取文件名?例如:
C:\Users\filippo\Desktop\K.java
Run Code Online (Sandbox Code Playgroud)
我想要K没有扩展文件
你好我有这个代码
import win32api
from tkinter import *
def Cursor():
win32api.SetCursorPos(10,10)
root = Tk()
root.geometry("500x500")
root.title("")
root.configure(background="#262626")
PlayButton = Button(root, text="Cursor", command=Cursor ).pack()
root.mainloop()
Run Code Online (Sandbox Code Playgroud)
他给了我这个错误
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Python34\lib\tkinter\__init__.py", line 1533, in __call__
return self.func(*args)
File "C:\Users\filippo\Desktop\Win32.py", line 5, in Cursor
win32api.SetCursorPos(10,10)
TypeError: SetCursorPos() takes exactly 1 argument (2 given)
Run Code Online (Sandbox Code Playgroud)
为什么?他告诉我我必须输入 1 个参数,但 x 轴和 y 轴应该是 2 个参数