bash:
mdls filename | grep FinderComment
AppleScript:
tell application "Finder"
comment of file
end tell
python:
#!/usr/bin/pythonw
from appscript import *
path = '/Users/NAME/your/path/here'
comment = app('Finder').items[path.replace('/', ':')].comment.get()