Re: [gedit-list] External Tools
- From: Steve Frécinaux <nudrema gmail com>
- To: Nando Vieira <fnando vieira gmail com>
- Cc: gedit-list gnome org
- Subject: Re: [gedit-list] External Tools
- Date: Thu, 29 Mar 2007 17:48:09 +0200
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]