A place for SGML and XML application developers.

September 9, 2021

OS Module

Filed under: — cangione @ 8:48 am

OS Module

Comes with the anaconda install.

import os

name of operating system

We can get the operating system we're working on

1. **nt** is windows
2. **posix** is all unix based systems (Mac, Linux, ect)

Thrid would be java but not very common


Working directory

NOTE if working on windows need to store strings as \ for escape.


Contents of Directory

 'Object Orient Programming Theory.ipynb',
 'Flow Control.ipynb',
 'My First Notebook.ipynb',
 'User Defined Functions.ipynb']

make and rename directory


create and edit

Note OS directory not needed. Can be done in base python.
#file = open('somefile','w')

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress