Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
How to create folder in Pythonista
-
Plz help me out how to make folder in pythonista and use open function to read and write
-
@yash
I’m not 100% sure what you mean by how to create a folder, but here’s how to use the open() function, which includes a file-creating thingy:Replace the “mode” with one of these modes, as needed; also, the mode must be in quotation marks, or else it returns an error:
t — open in text (default)
b — open in binaryr — read (default)
w — write - for editing a file - will create a file if one does not exist with the given name
r+ — read and write - for updating a file
x — exclusively creates a file - fails if the file exists#Assign a variable to opening the file:
file = open(“file.extension”, “mode“)
#where you change “mode” to one of the above modes
Let me know if you need some extra help understanding it!
-
A Google search on make a directory in Python returns 113 million (literary) hits in < 1 second. Please try a few of those.