subprocess problem

Andreas Paeffgen oegeeks at gmail.com
Wed Feb 8 19:56:19 EST 2017


The Problem with the subprocess code is: Using the sourcecode 
functioning as normal.
The frozen app with cx_freeze on every platform just returns an empty result

Here is the code in short:
def get_path_pandoc():




    settings = QSettings('Pandoc', 'PanConvert')

    path_pandoc = settings.value('path_pandoc','')




    if not os.path.isfile(path_pandoc):




        if platform.system() == 'Darwin' or os.name == 'posix':

            args = ['which', 'pandoc']

            p = subprocess.Popen(

                args,

                stdin=subprocess.PIPE,

                stdout=subprocess.PIPE)




            path_pandoc = 
str.rstrip(p.communicate(path_pandoc.encode('utf-8'))[0].decode('utf-8')) 



The whole problematic code can be checked on 
http://github.com/apaeffgen/panconvert
in source/converters/interface_pandoc.py

I debugged it with some QMessage-Boxes. I just know, that the returnd 
result is empty.
I tried some stderr on this code also. But also the error message is empty.

Any hints what could be changed in the code, so it also works in the 
frozen app?

At the moment i use python3.4 to 3.5 depending on the platform (Mac, 
Win, Linux)

P.S. Tried also some code with invoking the bash and afterwords the 
which pandoc code. To know avail also






More information about the Python-list mailing list