Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
• 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
ldaley committed May 21, 2008
1 parent e2a3999 commit a63f046
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Support/PyMate/pymate.rb
Expand Up @@ -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
Expand All @@ -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

Expand Down

0 comments on commit a63f046

Please sign in to comment.