title: AttributeError: module 'os' has no attribute 'getcwd'?
body: <p>i am trying to run a python program which takes input from the users like,directory name,file name and its content and then i try to create the directory in the current path with the file and then write the data into it but i get an error that "os has no attribute mkdir". </p>
  
  <pre><code>   //Code
  
       import os
  
          print(os.getcwd())
  
          class createfile:
              __name=''
              __file_name=''
              __input_text=''
              def read_and_create(self):
                  name = input("Enter the directory name, you want to create: ")
                  os.mkdir(self.__name)
                  #sdos.mkdir(self.__name)
                  self.__file_name=input("Enter the file name, you want to create: ")
                  f=open(self.___file_name,'w')
                  self.__input_text=input("Enter the text : ")
                  f.write(self.__input_text)
                  f.close()
  
              def read_file_content(self):
                  x=open(self.__file_name,'r')
                  print(x.read())
  
  
          o=createfile()
          o.read_and_create()
          o.read_file_content()
  </code></pre>
  
  <p>this is the error i got using Pycharm.</p>
  
  <pre><code>    &gt; "C:\Users\Aryan
      &gt; Kumar\AppData\Local\Programs\Python\Python37-32\python.exe"
      &gt; "C:/Users/Aryan Kumar/Desktop/0/os.py"
      &gt;     Fatal Python error: initsite: Failed to import the site module
      &gt;     Traceback (most recent call last):
      &gt;       File "C:\Users\Aryan Kumar\AppData\Local\Programs\Python\Python37-32\lib\site.py", line 73,
      &gt; in &lt;module&gt;
      &gt;         import os
      &gt;       File "C:\Users\Aryan Kumar\Desktop\0\os.py", line 2, in &lt;module&gt;
      &gt;         print(os.getcwd())
      &gt;     AttributeError: module 'os' has no attribute 'getcwd'
      &gt;     
      &gt;     Process finished with exit code 1
  
  
  this is the error i got using Spyder ide in anaconda environment
  
  runfile('C:/Users/Aryan Kumar/Desktop/0/untitled0.py', wdir='C:/Users/Aryan Kumar/Desktop/0')
      C:\Users\Aryan Kumar\Desktop\0
  
      Enter the directory name, you want to create: aac
      Traceback (most recent call last):
  
        File "&lt;ipython-input-4-fb1c179833e1&gt;", line 1, in &lt;module&gt;
          runfile('C:/Users/Aryan Kumar/Desktop/0/untitled0.py', wdir='C:/Users/Aryan Kumar/Desktop/0')
  
        File "C:\Users\Aryan Kumar\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 709, in runfile
          execfile(filename, namespace)
  
        File "C:\Users\Aryan Kumar\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 108, in execfile
          exec(compile(f.read(), filename, 'exec'), namespace)
  
        File "C:/Users/Aryan Kumar/Desktop/0/untitled0.py", line 32, in &lt;module&gt;
          o.read_and_create()
  
        File "C:/Users/Aryan Kumar/Desktop/0/untitled0.py", line 18, in read_and_create
          os.mkdir(self.__name)
  
      FileNotFoundError: [WinError 3] The system cannot find the path specified: ''
  </code></pre>