Passing on __file__ with the __main__.__dict__

When sending a file to execfile() I also pass on __file__ which is great. Now my scripts can import or link to other files which locations are defined relative to the script file's file path (__file__).

I wasn't sure on how to pull the latest file from your repo and go from there, so I copy-pasted the contents of your current MayaSublime.py and changed the following:

<pre>	PY_CMD_TEMPLATE = textwrap.dedent('''
		import traceback
		import __main__
		g = __main__.__dict__.copy()
		g['__file__'] = '{2}'
		try:
			{0}({1!r}, g, g)
		except:
			traceback.print_exc() 
	''')</pre>

and...

<pre>mCmd = self.PY_CMD_TEMPLATE.format(execType, mCmd, file_path)</pre>

I'll close the issue I made regarding this.