Ask coding questions

← Back to all posts
save file in folder
p3artschool

I create a folder named motif.
plt.savefig('motif\file01.png', format="png", dpi=72)
or
plt.savefig('.\motif\file01.png', format="png", dpi=72)

Will not work.
Can you help me?

Answered by mat1 [earned 5 cycles]
View Answer
Voters
IanMuithi
AshtonJones2
p3artschool
Comments
hotnewtop
mat1

For some reason folders aren't registered until you put a file in them. Simply creating an empty _.py file inside that folder should resolve this.

Please upvote this comment if it was helpful or useful in any way

p3artschool

Thank you mat