title: Python script not working in linux
body: <p>I have this python script</p>
  
  <pre><code>#!/usr/bin/env python
  import datetime, os
  from time import gmtime, strftime
  
  to_backup = "/home/vmware/tobackup"
  var1 = datetime.datetime.now().strftime('%b-%d-%I%p')
  for f in os.listdir(to_backup):
      if(os.path.isfile(f)):
          print f + " is a file"
      if(os.path.isdir(f)):
          print f + " is a directory"
  </code></pre>
  
  <p>It is giving me empty ouput. i don't know where is the problem</p>
  
  <p>OUTPUT FOR dr jimbob answer</p>
  
  <pre><code>total 36
  -rwxrwxr-x 1 vmware vmware  440 May  5 07:41 back.py
  -rwxrwxr-x 1 vmware vmware 2624 May  4 20:35 backup.sh
  drwxr-xr-x 2 vmware vmware 4096 Jun 22  2010 Desktop
  drwxrwxr-x 2 vmware vmware 4096 May  5 03:51 destination
  drwxr-xr-x 2 root   root   4096 May  4 18:49 public_html
  drwxrwxr-x 2 vmware vmware 4096 May  1 07:47 python
  -rwxrwxr-x 1 vmware vmware  560 May  1 13:20 regex.py
  drwxrwxrwx 7 vmware vmware 4096 May  5 03:50 tobackup
  total 20
  drwxrwxrwx 2 vmware vmware 4096 May  5 03:50 five
  drwxrwxrwx 2 vmware vmware 4096 May  5 03:50 four
  drwxrwxrwx 2 vmware vmware 4096 May  5 03:50 one
  drwxrwxrwx 2 vmware vmware 4096 May  5 03:50 three
  drwxrwxrwx 2 vmware vmware 4096 May  5 03:50 two
  </code></pre>