Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > de.comp.lang.python > #5114 > unrolled thread
| Started by | Maurice Kemmann <muckisg@googlemail.com> |
|---|---|
| First post | 2018-02-06 00:23 -0800 |
| Last post | 2018-02-07 06:36 +0100 |
| Articles | 5 — 3 participants |
Back to article view | Back to de.comp.lang.python
Python3 - pathlib - python-gnupg Problem Maurice Kemmann <muckisg@googlemail.com> - 2018-02-06 00:23 -0800
Re: Python3 - pathlib - python-gnupg Problem Maurice Kemmann <muckisg@googlemail.com> - 2018-02-06 04:00 -0800
Re: [Python-de] Python3 - pathlib - python-gnupg Problem Reimar Bauer <rb.proj@gmail.com> - 2018-02-06 13:08 +0100
Re: [Python-de] Python3 - pathlib - python-gnupg Problem Maurice Kemmann <muckisg@googlemail.com> - 2018-02-06 20:25 +0100
Re: [Python-de] Python3 - pathlib - python-gnupg Problem Stefan Schwarzer <sschwarzer@sschwarzer.net> - 2018-02-07 06:36 +0100
| From | Maurice Kemmann <muckisg@googlemail.com> |
|---|---|
| Date | 2018-02-06 00:23 -0800 |
| Subject | Python3 - pathlib - python-gnupg Problem |
| Message-ID | <98cfc895-06a7-495e-93b5-182f4cc367fd@googlegroups.com> |
Hallo,
ich nutze pathlib um OS unabhängige Scripte zu schreiben. Im Moment spiele ich ein wenig mit python-gnupg herrum und laufe in folgendes Problem:
<code>
import gnupg
from pathlib import Path
from pprint import pprint
gpg = gnupg.GPG(gnupghome=Path("/home/mucki/.gnupg/"))
<\code>
Das führt zu folgenden Fehler unter Linux:
>> python3 gpg-test.py
Traceback (most recent call last):
File "gpg-test.py", line 5, in <module>
gpg = gnupg.GPG(gnupghome=Path("/home/mucki/.gnupg/"))
File "/usr/local/lib/python3.6/site-packages/gnupg.py", line 755, in __init__
p = self._open_subprocess(["--version"])
File "/usr/local/lib/python3.6/site-packages/gnupg.py", line 832, in _open_subprocess
logger.debug("%s: %s", result.pid, debug_print(cmd))
File "/usr/lib64/python3.6/subprocess.py", line 461, in list2cmdline
needquote = (" " in arg) or ("\t" in arg) or not arg
TypeError: argument of type 'PosixPath' is not iterable
Unter Windows 10 gibt es eine passende Fehlermeldung mit "type WindowsPath not iterable".
Es scheint ja mit dem subprocess module zusammenzuhängen, aber hier hört mein Wissen leider auf. Kann mir jemand helfen? Liegt der Fehler bei mir? Wenn ja, warum?
Danke,
Maurice
[toc] | [next] | [standalone]
| From | Maurice Kemmann <muckisg@googlemail.com> |
|---|---|
| Date | 2018-02-06 04:00 -0800 |
| Message-ID | <d65ba20c-5a43-4682-8d40-f1e4c93141ea@googlegroups.com> |
| In reply to | #5114 |
Hi Zusammen,
Am Dienstag, 6. Februar 2018 09:23:07 UTC+1 schrieb Maurice Kemmann:
> Hallo,
>
> ich nutze pathlib um OS unabhängige Scripte zu schreiben. Im Moment spiele ich ein wenig mit python-gnupg herrum und laufe in folgendes Problem:
>
> <code>
> import gnupg
> from pathlib import Path
> from pprint import pprint
>
> gpg = gnupg.GPG(gnupghome=Path("/home/mucki/.gnupg/"))
> <\code>
>
> Das führt zu folgenden Fehler unter Linux:
>
Problem gelöst.
gpg = gnupg.GPG(gnupghome=str(Path("/home/mucki/.gnupg/")))
Path liefert in diesem Fall wohl keinen String zuück, da habe ich wohl die Doku nicht richtig gelesen. Danke an Uwe!
Maurice
[toc] | [prev] | [next] | [standalone]
| From | Reimar Bauer <rb.proj@gmail.com> |
|---|---|
| Date | 2018-02-06 13:08 +0100 |
| Subject | Re: [Python-de] Python3 - pathlib - python-gnupg Problem |
| Message-ID | <mailman.40.1517918902.27157.python-de@python.org> |
| In reply to | #5115 |
Hi Zusammen,
evtl. magst dich auch mal damit befassen, das löst einige OS Probleme für
mich, abgesehen davon das man auch entfernte Dateisysteme einheitlich
erreicht.
http://pyfilesystem2.readthedocs.io/en/latest/
Grüße
Reimar
2018-02-06 13:00 GMT+01:00 Maurice Kemmann via python-de <
python-de@python.org>:
> Hi Zusammen,
>
> Am Dienstag, 6. Februar 2018 09:23:07 UTC+1 schrieb Maurice Kemmann:
> > Hallo,
> >
> > ich nutze pathlib um OS unabhängige Scripte zu schreiben. Im Moment
> spiele ich ein wenig mit python-gnupg herrum und laufe in folgendes Problem:
> >
> > <code>
> > import gnupg
> > from pathlib import Path
> > from pprint import pprint
> >
> > gpg = gnupg.GPG(gnupghome=Path("/home/mucki/.gnupg/"))
> > <\code>
> >
> > Das führt zu folgenden Fehler unter Linux:
> >
>
> Problem gelöst.
>
> gpg = gnupg.GPG(gnupghome=str(Path("/home/mucki/.gnupg/")))
>
> Path liefert in diesem Fall wohl keinen String zuück, da habe ich wohl die
> Doku nicht richtig gelesen. Danke an Uwe!
>
> Maurice
> _______________________________________________
> python-de maillist - python-de@python.org
> https://mail.python.org/mailman/listinfo/python-de
>
[toc] | [prev] | [next] | [standalone]
| From | Maurice Kemmann <muckisg@googlemail.com> |
|---|---|
| Date | 2018-02-06 20:25 +0100 |
| Subject | Re: [Python-de] Python3 - pathlib - python-gnupg Problem |
| Message-ID | <mailman.51.1517955853.27157.python-de@python.org> |
| In reply to | #5115 |
Hallo Reimar, Am 06.02.2018 um 13:08 schrieb Reimar Bauer: > Hi Zusammen, > > evtl. magst dich auch mal damit befassen, das löst einige OS Probleme > für mich, abgesehen davon das man auch entfernte Dateisysteme > einheitlich erreicht. > > http://pyfilesystem2.readthedocs.io/en/latest/ danke, bin sehr dankbar für solche Hinweise. Have fun, Maurice
[toc] | [prev] | [next] | [standalone]
| From | Stefan Schwarzer <sschwarzer@sschwarzer.net> |
|---|---|
| Date | 2018-02-07 06:36 +0100 |
| Subject | Re: [Python-de] Python3 - pathlib - python-gnupg Problem |
| Message-ID | <mailman.53.1517981816.27157.python-de@python.org> |
| In reply to | #5115 |
On 2018-02-06 13:08, Reimar Bauer wrote:
> evtl. magst dich auch mal damit befassen, das löst einige OS Probleme für
> mich, abgesehen davon das man auch entfernte Dateisysteme einheitlich
> erreicht.
>
> http://pyfilesystem2.readthedocs.io/en/latest/
An sich finde ich das eine sehr gute Idee. Es gab früher ja
schon Anläufe für eine Dateisystem-übergreifende API, aber
die mir bekannten Projekte sind wieder eingeschlafen. Ich
würde mir sehr wünschen, dass es bei Pyfilesystem2 besser
läuft. Bisher sieht es ziemlich vielversprechend aus.
Speziell zu FTP habe ich noch die (zum allergrößten Teil
von mir entwickelte) Bibliothek ftputil [1, 2] anzubieten,
die es schon seit 2002 gibt. ftputil orientiert sich von der
API sehr stark an der von `os` und `os.path` (siehe auch das
Beispiel auf der Homepage [2], aber es geht noch viel mehr.)
Nach dem Überfliegen des Pyfilesystem-Codes ist meine
Einschätzung, dass dieser ein paar Sachen unterstützt, die
ftputil bisher nicht unterstützt (insbesondere seek und MLST).
Andererseits vermute ich, dass ftputil einige
Server-Merkwürdigkeiten besser abfängt und in einigen Fällen
besser mit hoher Last auf Server- und Client-Seite zurechtkommt.
Da kommt dem Projekt das Alter zugute; in der Zeit habe ich
schon einiges gesehen. :-)
Langfristig wäre es natürlich toll, die Features und Robustheit
von ftputil in Pyfilesystem zu haben. Ich habe durchaus daran
gedacht, entsprechend bei Pyfilesystem mitzumachen, aber ich
bin schon froh, wenn ich hin und wieder dazu komme, etwas für
ftputil zu machen. Ich möchte das gern weiter unterstützen
und nicht die Entwicklung von ftputil einstellen, denn es gibt
natürlich auch da einige bis jede Menge Nutzer. (Ich kann die
Anzahl der Nutzer nicht einschätzen.)
[1] http://ftputil.sschwarzer.net
[2] https://pypi.python.org/pypi/ftputil/3.4
Viele Grüße
Stefan
> 2018-02-06 13:00 GMT+01:00 Maurice Kemmann via python-de <
> python-de@python.org>:
>
>> Hi Zusammen,
>>
>> Am Dienstag, 6. Februar 2018 09:23:07 UTC+1 schrieb Maurice Kemmann:
>>> Hallo,
>>>
>>> ich nutze pathlib um OS unabhängige Scripte zu schreiben. Im Moment
>> spiele ich ein wenig mit python-gnupg herrum und laufe in folgendes Problem:
>>>
>>> <code>
>>> import gnupg
>>> from pathlib import Path
>>> from pprint import pprint
>>>
>>> gpg = gnupg.GPG(gnupghome=Path("/home/mucki/.gnupg/"))
>>> <\code>
>>>
>>> Das führt zu folgenden Fehler unter Linux:
>>>
>>
>> Problem gelöst.
>>
>> gpg = gnupg.GPG(gnupghome=str(Path("/home/mucki/.gnupg/")))
>>
>> Path liefert in diesem Fall wohl keinen String zuück, da habe ich wohl die
>> Doku nicht richtig gelesen. Danke an Uwe!
>>
>> Maurice
>> _______________________________________________
>> python-de maillist - python-de@python.org
>> https://mail.python.org/mailman/listinfo/python-de
>>
> _______________________________________________
> python-de maillist - python-de@python.org
> https://mail.python.org/mailman/listinfo/python-de
>
[toc] | [prev] | [standalone]
Back to top | Article view | de.comp.lang.python
csiph-web