You can use sys.argv[0] to get the path of the program and use that to read in the program file.. you could then parse the source as usual. But personally i'd be enclined to go with Juha's idea, it seems more elegant and requires less work on the part of the program and the programmer.. Have fun, Mark. -- Posted via http://dbforums.com