![]() ![]() ![]() Enter the following into the interactive shell: If you pass it the string values of individual file and folder names in your path, os.path.join() will return a string with a file path using the correct path separators. If you want your programs to work on all operating systems, you will have to write your Python scripts to handle both cases.įortunately, this is simple to do with the os.path.join() function. OS X and Linux, however, use the forward slash ( /) as their path separator. On Windows, paths are written using backslashes ( \) as the separator between folder names. Backslash on Windows and Forward Slash on OS X and Linux
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |