stdlib_compile.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:oil 作者: oilshell 项目源码 文件源码
def getPycHeader(filename):
  # compile.c uses marshal to write a long directly, with
  # calling the interface that would also generate a 1-byte code
  # to indicate the type of the value.  simplest way to get the
  # same effect is to call marshal and then skip the code.
  #mtime = os.path.getmtime(filename)
  mtime = 0  # to make it deterministic for now
  mtime = struct.pack('<i', int(mtime))
  return imp.get_magic() + mtime
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号