Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python os.mknod in windows

I was trying to use the os.mknod function in Python 3.5.0 in Windows 7, however I find the error:

Traceback (most recent call last):
  File "<pyshell#1>", line 1, in <module>
    os.mknod
AttributeError: module 'os' has no attribute 'mknod'

I guess it's supposed to be there, since https://docs.python.org/3/library/os.html doesn't say anything about limited availability. Is there another option to use for a similar function in Windows? I'm just looking to create an empty file in a specific path, and I was thinking calling open(path, 'w') is kinda ugly for this.

I don't know if this might be a version specific problem since I've never used Python in Windows before.

like image 589
spalac24 Avatar asked Nov 09 '22 02:11

spalac24


1 Answers

Since commit in 2016, this is now documented:

Availability: Unix.

like image 159
Zombo Avatar answered Nov 14 '22 21:11

Zombo