Permalink
Browse files

• Revert of r9642 and r9632.

Backing out the usage of TextMate::Process.run(). Not running the command through shell expansion before executing caused unforeseen problems. The scriptmate API needs a thorough revamp which is going to necessitate (maybe dramatically) changing the all of the clients. Stay tuned.


git-svn-id: http://svn.textmate.org/trunk/Bundles/Python.tmbundle@9643 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  • Loading branch information...
1 parent e2a3999 commit a63f04677788613aa900406c2ad38822b3a159f8 @ldaley ldaley committed May 21, 2008
Showing with 5 additions and 5 deletions.
  1. +5 −5 Support/PyMate/pymate.rb
View
@@ -9,12 +9,12 @@
class PythonScript < UserScript
def lang; "Python" end
- def executable; ENV['TM_PYTHON'] || 'python' end
+ def executable; @hashbang || ENV['TM_PYTHON'] || 'python' end
def args;
if @path != "-"
- ['-u', "-c", "import tmhooks, sys; del sys.argv[0]; __file__ = sys.argv[0]; del sys, tmhooks; execfile(__file__)"]
+ ['-u', "-c \"import tmhooks, sys; del sys.argv[0]; __file__ = sys.argv[0]; del sys, tmhooks; execfile(__file__)\""]
else
- ['-u', "-c", "import tmhooks, sys; del tmhooks,sys;\n#{@content}"]
+ ['-u', "-c #{e_sh "import tmhooks, sys; del tmhooks,sys;\n" + @content}"]
end
end
def version_string
@@ -25,10 +25,10 @@ def test_script?
@path =~ /(?:\b|_)(?:test)(?:\b|_)/ or
@content =~ /\bimport\b.+(?:unittest)/
end
- def env
+ def filter_cmd(cmd)
pymatepath = Pathname.new(ENV["TM_BUNDLE_SUPPORT"]) +\
Pathname.new("PyMate")
- { "PYTHONPATH" => "#{pymatepath}:#{ENV['PYTHONPATH']}" }
+ return ["export PYTHONPATH=\"#{pymatepath}:$PYTHONPATH\";"] + cmd
end
end

0 comments on commit a63f046

Please sign in to comment.