]> Cypherpunks.ru repositories - pyderasn.git/commitdiff
It is better to invoke pyderasn through -m
authorSergey Matveev <stargrave@stargrave.org>
Mon, 2 Oct 2017 14:23:47 +0000 (17:23 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Tue, 3 Oct 2017 10:05:49 +0000 (13:05 +0300)
doc/examples.rst
doc/features.rst

index 16a1d54754fe9c3f118ba4d9b1ae849fa429d693..5f76200f7af150f6bc28d2e0f3300cf50afeea8a 100644 (file)
@@ -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::
 
 You can decode DER files using command line abilities and get the same
 picture as above by executing::
 
-    % pyderasn.py --schema tests.test_crts:Certificate path/to/file
+    % python -mpyderasn --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::
 
 
 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::
 
-    % pyderasn.py path/to/file
+    % python -mpyderasn path/to/file
         0   [1,3,1604]  . >: SEQUENCE OF
         4   [1,3,1453]  . . >: SEQUENCE OF
         8   [0,0,   5]  . . . . >: [0] ANY
         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::
 
 
 then you can pass it to pretty printer to see human readable OIDs::
 
-    % pyderasn.py --oids tests.test_crts:some_oids path/to/file
+    % python -mpyderasn --oids tests.test_crts:some_oids path/to/file
     [...]
        37   [1,1,  11]  . . . . . . >: SET OF
        39   [1,1,   9]  . . . . . . . . >: SEQUENCE OF
     [...]
        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::
 
 
 If you have bad DER, then errors will show you where error occurred::
 
-    % pyderasn.py --schema tests.test_crts:Certificate path/to/bad/file
+    % python -mpyderasn --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
 
 ::
 
     Traceback (most recent call last):
     [...]
     pyderasn.DecodeError: UTCTime (tbsCertificate.validity.notAfter.utcTime) (at 328) invalid UTCTime format
 
 ::
 
-    % pyderasn.py path/to/bad/file
+    % python -mpyderasn path/to/bad/file
     [...]
     pyderasn.DecodeError: UTCTime (0.SequenceOf.4.SequenceOf.1.UTCTime) (at 328) invalid UTCTime format
 
     [...]
     pyderasn.DecodeError: UTCTime (0.SequenceOf.4.SequenceOf.1.UTCTime) (at 328) invalid UTCTime format
 
index 4d94324aedfb6a5e03d9628e0c1bacea3111db9a..afe10447abf4b37b9c642077b08ddc90d57a07b7 100644 (file)
@@ -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:
 
 * Could be significantly faster. For example parsing of CACert.org's CRL
   under Python 3.5.2:
 
-    :``pyderasn.py revoke.crl``:
+    :``python -mpyderasn revoke.crl``:
      ~2 min
      ~2 min
-    :``pyderasn.py --schema path.to.CertificateList revoke.crl``:
+    :``python -mpyderasn --schema path.to.CertificateList revoke.crl``:
      ~38 sec
     :``pyasn1.decode(asn1Spec=pyasn1.CertificateList())``:
      ~22 min (``pyasn1 == 0.2.3``)
      ~38 sec
     :``pyasn1.decode(asn1Spec=pyasn1.CertificateList())``:
      ~22 min (``pyasn1 == 0.2.3``)