Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > de.comp.lang.python > #5243
| From | Christopher Arndt <chris@chrisarndt.de> |
|---|---|
| Newsgroups | de.comp.lang.python |
| Subject | Re: [Python-de] probleme mit python 3 popen |
| Date | 2018-09-23 16:21 +0200 |
| Message-ID | <mailman.79.1537712531.2746.python-de@python.org> (permalink) |
| References | <33920c93-417b-ef60-4f54-cdfb878ed21c@redcor.ch> <13c9f810-37b6-2bb5-0fa0-f7eb9ea0c897@chrisarndt.de> |
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
Back to de.comp.lang.python | Previous | Next | Find similar
Re: [Python-de] probleme mit python 3 popen Christopher Arndt <chris@chrisarndt.de> - 2018-09-23 16:21 +0200
csiph-web