
Python
inv@1id
练习时长两年半的信安练习生,喜欢栈,树,队列,music
展开
-
[ Python ]详解 Python 中 self 的用法
面向对象是 Python 的特色,也是 Python 学习中的重点; 在OOP(面向对象)编程中,有两个重要的概念: 类( class ) 和 实例( instance ): #!/usr/bin/python3 #-*- coding: utf-8 -*- class Philosopher: def __init__(self, name, gender, sayings): ...原创 2019-07-08 15:23:23 · 491 阅读 · 1 评论 -
[ Python ] python3 调用 ctypes 中的 printf() 函数 && print() 函数详解
最近开始阅读 " Python灰帽子 " 一书, 书中使用的是 python2 , 而现在 python3 已经相当普及, 于是我觉定使用 python3 来尝试书中代码, 但是在第一章就遇到了困难: 使用 ctypes 调用 动态链接库 中的 printf() 函数时无法正常输出, 考虑到 python3 新增了 byte 类型, 便推断出与此有关: 书中代码: from ctypes impo...原创 2019-07-11 14:25:59 · 1396 阅读 · 2 评论