如果我想对未加密的某些.py文件进行加密验证,则可以执行以下操作:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Created on Sun Dec 16 18:54:40 2018
@author: Stipe G
"""
print ("awesome program not to be tempered with")
"""
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQR
0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQR
0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQR
0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQR
0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQR
0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQ=
=0123
-----END PGP SIGNATURE-----
"""
并针对它运行GPG,但是我对文档字符串处理保持警惕-是否有一种通用的方法可以让所有文档字符串引擎在处理时跳过这些特定的多行注释?