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 edited the two parts accordingly (which kind of messed up the diff that is shown here when typing this request) and made a commit. Seems like now GitHub wants to make two commits to your code – which wasn't what I intended.. This is all I was wishing to add to your repo:

<pre>	PY_CMD_TEMPLATE = textwrap.dedent('''
		import traceback
		import __main__
		g = __main__.__dict__.copy()	# added
		g['__file__'] = '{2}'			# added
		try:
			{0}({1!r}, g, g)			# changed
		except:
			traceback.print_exc() 
	''')</pre>

and...

<pre>mCmd = self.PY_CMD_TEMPLATE.format(execType, mCmd, file_path)	#changed</pre>

I'll close the issue I made regarding this.