Having a problem printing to console

EDIT: Looks like I had an issue with tabs/whitespace in my editor.

 

I'm new to developing with python and doing a scanner, so I am trying to teach myself line by line, but I ran into a problem:

 

This works and prints to the screen the files inside [ ]

import os, os.path
import Media, VideoFiles, Stack

Scans through files, and add to the media list.

def Scan(path, files, mediaList, subdirs, language=None, root=None):
     
  # Just look for video files.
  VideoFiles.Scan(path, files, mediaList, subdirs, root)
  print “Scanned For Files”
  print files
  # Add them all.
  for i in files:
    name, year = VideoFiles.CleanName(os.path.basename(i))

but when I put 'print name' at the end, the python script doesn't compile and run. Doesn't matter if I put 'print "anything"' there either. What is going wrong here?

import os, os.path
import Media, VideoFiles, Stack

Scans through files, and add to the media list.

def Scan(path, files, mediaList, subdirs, language=None, root=None):
     
  # Just look for video files.
  VideoFiles.Scan(path, files, mediaList, subdirs, root)
  print “Scanned For Files”
  print files
  # Add them all.
  for i in files:
    name, year = VideoFiles.CleanName(os.path.basename(i))
print name

 

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.