Hello,
I am trying to code a very basic plugin for ST3. Right from the start, with the following (dummy) code:[code]import sublime, sublime_plugin
from subprocess import Popen, PIPE, STDOUT
class RunPhpCommand(sublime_plugin.TextCommand):
def run(self, edit):
php = Popen(’/usr/bin/php’], stdout=PIPE, stdin=PIPE)
php.stdin.write(“test”)[/code]… I get this error:
Error: Traceback (most recent call last):
File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 549, in run_
return self.run(edit)
File "/Volumes/Utilisateurs/kofkof/Library/Application Support/Sublime Text 3/Packages/User/RunPhpCommand.py", line 7, in run
php.stdin.write("test")
TypeError: 'str' does not support the buffer interface
I don’t understand this error message. My code doesn’t even have a ‘str’ variable. Does anyone have an idea that could help me?
Thanks.