Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: robert Newsgroups: de.comp.lang.python Subject: Re: [Python-de] probleme mit python 3 popen Date: Sun, 23 Sep 2018 19:38:51 +0200 Lines: 25 Message-ID: References: <33920c93-417b-ef60-4f54-cdfb878ed21c@redcor.ch> <13c9f810-37b6-2bb5-0fa0-f7eb9ea0c897@chrisarndt.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: news.uni-berlin.de yVqH+dr3FomE9bnd2oQgVgZZnj4VUHxeVUmiKuqS/5DQ== Return-Path: X-Original-To: python-de@python.org Delivered-To: python-de@mail.python.org User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 In-Reply-To: <13c9f810-37b6-2bb5-0fa0-f7eb9ea0c897@chrisarndt.de> Content-Language: en-US X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: python-de@python.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Die Deutsche Python Mailingliste List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: X-Mailman-Original-References: <33920c93-417b-ef60-4f54-cdfb878ed21c@redcor.ch> <13c9f810-37b6-2bb5-0fa0-f7eb9ea0c897@chrisarndt.de> Xref: csiph.com de.comp.lang.python:5245 danke beide Methoden haben geklappt robert On 23.09.2018 16:21, Christopher Arndt wrote: > Du müsstest wahrscheinlich einfach das hier: > > Am 23.09.18 um 16:08 schrieb robert: >> virtualenvwrapper =p.communicate()[0].strip() > um ein .decode(sys.getfilesystemencoding()) am Ende ergänzen. > > Ich würde aber statt dem ersten Popen einfach shutil.which() verwenden > (ab Python 3.3 verfügbar): > >>>> import shutil >>>> shutil.which('virtualenvwrapper.sh') > '/usr/bin/virtualenvwrapper.sh' > > > Chris > _______________________________________________ > python-de maillist -python-de@python.org > https://mail.python.org/mailman/listinfo/python-de