Re: [gedit-list] External Tools



On Thu, 2007-03-29 at 11:13 -0300, Nando Vieira wrote:
> Hi,
> 
> How can I run commands such below using external tools?
> 
> #!/usr/bin/env ruby
> puts $GEDIT_CURRENT_DOCUMENT_PATH
> 
> This returns nil. Is there any way to get the current file path inside
> a ruby/php/python script?

for ruby I don't know, but in python:

import os
path = os.getenv('GEDIT_CURRENT_DOCUMENT_PATH')

and in php:

<? echo $_ENV['GEDIT_CURRENT_DOCUMENT_PATH']; ?>




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]