From: Sergey Matveev Date: Sun, 15 Oct 2017 13:23:54 +0000 (+0300) Subject: Python's -m option can have space before the argument X-Git-Tag: 1.4~5 X-Git-Url: http://www.git.cypherpunks.ru/?p=pyderasn.git;a=commitdiff_plain;h=cb4322b285fd82acf587bf9d902d758475b38339;hp=eb9768b4e6862f29f870cb928e9a922dfec3a684;ds=sidebyside Python's -m option can have space before the argument --- diff --git a/doc/examples.rst b/doc/examples.rst index 5f76200..108048e 100644 --- a/doc/examples.rst +++ b/doc/examples.rst @@ -272,13 +272,13 @@ As command line utility You can decode DER files using command line abilities and get the same picture as above by executing:: - % python -mpyderasn --schema tests.test_crts:Certificate path/to/file + % python -m pyderasn --schema tests.test_crts:Certificate path/to/file If there is no schema for you file, then you can try parsing it without, but of course IMPLICIT tags will often make it impossible. But result is good enough for the certificate above:: - % python -mpyderasn path/to/file + % python -m pyderasn path/to/file 0 [1,3,1604] . >: SEQUENCE OF 4 [1,3,1453] . . >: SEQUENCE OF 8 [0,0, 5] . . . . >: [0] ANY @@ -320,7 +320,7 @@ from ``tests/test_crts.py``:: then you can pass it to pretty printer to see human readable OIDs:: - % python -mpyderasn --oids tests.test_crts:some_oids path/to/file + % python -m pyderasn --oids tests.test_crts:some_oids path/to/file [...] 37 [1,1, 11] . . . . . . >: SET OF 39 [1,1, 9] . . . . . . . . >: SEQUENCE OF @@ -341,14 +341,14 @@ Descriptive errors If you have bad DER, then errors will show you where error occurred:: - % python -mpyderasn --schema tests.test_crts:Certificate path/to/bad/file + % python -m pyderasn --schema tests.test_crts:Certificate path/to/bad/file Traceback (most recent call last): [...] pyderasn.DecodeError: UTCTime (tbsCertificate.validity.notAfter.utcTime) (at 328) invalid UTCTime format :: - % python -mpyderasn path/to/bad/file + % python -m pyderasn path/to/bad/file [...] pyderasn.DecodeError: UTCTime (0.SequenceOf.4.SequenceOf.1.UTCTime) (at 328) invalid UTCTime format diff --git a/doc/features.rst b/doc/features.rst index afe1044..e6afdd3 100644 --- a/doc/features.rst +++ b/doc/features.rst @@ -26,9 +26,9 @@ practice it should be relatively easy to convert ``pyasn1``'s code to * Could be significantly faster. For example parsing of CACert.org's CRL under Python 3.5.2: - :``python -mpyderasn revoke.crl``: + :``python -m pyderasn revoke.crl``: ~2 min - :``python -mpyderasn --schema path.to.CertificateList revoke.crl``: + :``python -m pyderasn --schema path.to.CertificateList revoke.crl``: ~38 sec :``pyasn1.decode(asn1Spec=pyasn1.CertificateList())``: ~22 min (``pyasn1 == 0.2.3``)