linux - Python script won't run on keyboard shortcut -


So I have a lot of scripts that I run with keyboard shortcuts, to upload screenshots and to insert links in the clipboard, Luggage, etc. for plots etc.

I have this existing script which runs only from the terminal, and when I do not try to run it as a keyboard shortcut.

I call it system & gt; Preferences & gt; Keyboard shortcut on Scientific Linux 6.4 .

I have included the script given below, if there is something special that will stop it from work.

#! / Usr / bin / python import file input, os to import highlighted Upprkriya, pygments.lexers import import get_lexer_by_name, guess_lexer import pygments.formatters formatters # Stdin = "\ n". (( "Aksklip", "-step", "primary", "-o"], stdout = subprocess (line to line Failinput. Input () []) = p = Upprkriya. Kpeepii) code, err = p.communicate () does not melt that: lexer = guess_lexer (code) print lexer.name imageformatter = formatters.ImageFormatter (linenos = true, cssclass = "source", font_name = "liberation mono") formatter = Formatters.HtmlFormatter (linenos = True, cssclass = "source") HTMLresult = Highlights (code Leksr, Formetr) Jpgresult = Highlights (code Leksr, Imejformr, Autfail = open ( "syntax page", "w")) open ( "syntax HTM L" "W") as f : F.write ("& lt; html> gt; gt; style media = 'screen' type = 'text / css' & gt;") f.write (formatters.HtmlFormatter) Get_stail_defs (. 'source')) Fkwrite ( "& lt; / style> gt; & lt; / head & gt; & lt; body & gt;") Fkwrite (Htmlrsult) Fkwrite ( "& lt; / body & gt; & lt; / html & gt; "# Osksistm (" Pdflteks Sinteksktaks ") Osksistm (" Firefox Sintekskhtml ") Osksistm (" Uploadimageks Sintekskpang ") Other: Print er

The way it works, by removing the clipboard selection using xclip on the text, pygments By using , and then creating both an HTML document and opening it Hayrfoks, and is an image I am using Imgur (I have a script for uploading, which makes me 100%), and then put the clipboard back to the URL.

bin This is the folder located in my path.

I have tried everything:

Comments

Popular posts from this blog

HTML/CSS - Automatically set height width from background image? -

php - Mysql Show Process - Sleep Commands and what to do -

c - What is the address of buf (the local variable in the main function)? -