当前位置: 首页 > news >正文

网站所需的主要功能wordpress数据库中文

网站所需的主要功能,wordpress数据库中文,免费的网站托管,外贸婚纱网站1.为什么要将python打包为.so文件#xff1f; 保护源码 2.实战例子 a.安装相应的包 pip install cython 验证安装是否成功 cython --version b.实战的文件目录和内容 hi.py # This is a sample Python script.# Press ShiftF10 to execute it or replace it with your…1.为什么要将python打包为.so文件 保护源码 2.实战例子 a.安装相应的包 pip install cython 验证安装是否成功 cython --version b.实战的文件目录和内容  hi.py # This is a sample Python script.# Press ShiftF10 to execute it or replace it with your code. # Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.def print_hi(name):# Use a breakpoint in the code line below to debug your script.print(fHi, {name}) # Press CtrlF8 to toggle the breakpoint.# Press the green button in the gutter to run the script. if __name__ __main__:print_hi(PyCharm)# See PyCharm help at https://www.jetbrains.com/help/pycharm/hello.py def hello(name):print(hello name) bye.py def bye(name):print(bye name)setup.py 把需要转换的py文件都放进去 from distutils.core import setup from Cython.Build import cythonize setup(ext_modules cythonize([hi.py, hello.py, bye.py]))terminal运行命令 python setup.py build_ext 运行log Compiling hi.py because it changed. Compiling hello.py because it changed. Compiling bye.py because it changed. [1/3] Cythonizing bye.py /home/huanglu/anaconda3/envs/segment-system/lib/python3.10/site-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive language_level not set, using 3str for now (Py3). This has changed from earlier releases! File: /home/huanglu/Desktop/liubin/so-test/bye.pytree Parsing.p_module(s, pxd, full_module_name) [2/3] Cythonizing hello.py /home/huanglu/anaconda3/envs/segment-system/lib/python3.10/site-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive language_level not set, using 3str for now (Py3). This has changed from earlier releases! File: /home/huanglu/Desktop/liubin/so-test/hello.pytree Parsing.p_module(s, pxd, full_module_name) [3/3] Cythonizing hi.py /home/huanglu/anaconda3/envs/segment-system/lib/python3.10/site-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive language_level not set, using 3str for now (Py3). This has changed from earlier releases! File: /home/huanglu/Desktop/liubin/so-test/hi.pytree Parsing.p_module(s, pxd, full_module_name)运行结果 可以发现多了几个.c文件和build文件夹 build文件夹中 复制到根目录 在根目录里 写一个demo.py from hi import print_hi from hello import hello from bye import byeprint_hi(K.D.) hello(LeBron) bye(Kobe) 运行 Hi, K.D. hello LeBron bye KobeProcess finished with exit code 0 把hi.py,hello.py,bye.py删除再执行demo.py可以得到同样的结果 即  此时已经使用到了.so文件而不是原来的.py文件 如果.py在不同文件夹中则在不同文件夹里面执行类似操作。 待续。。
http://www.w-s-a.com/news/395406/

相关文章:

  • 私人做网站要多少钱展芒设计网页
  • 怎样网站制作设计如何在网上推广农产品
  • 做关键词排名卖网站聚名网
  • 吉林省住房城乡建设厅网站首页体育器材网站建设方案
  • 网站建设及维护专业手机金融界网站
  • 常州网站建设工作室建立网站有怎么用途
  • 如何盗取网站推广策划书模板
  • 游戏网站建设计划书网络开发需要学什么
  • 手机网站维护费网站开发包括网站过程
  • 懂做游戏钓鱼网站的网站建设技术的发展
  • 网站被百度收录百度一下你就知道 官网
  • 雅客网站建设做网站用什么做
  • 做宣传海报网站专业网站设计速寻亿企邦
  • 秦皇岛市住房和城乡建设局网站有关网站开发的参考文献
  • 晋城城乡建设局网站深圳外贸业务员工资
  • 招聘网站开发的公司销售运营主要做什么
  • 徐州网站无障碍建设wordpress证书
  • c语言可以做网站吗请人做网站收费多少
  • 中英双语网站怎么做网站为什么做静态
  • 毕业设计做音乐网站可以吗网站运营方案
  • windos 下做网站工具网站右侧返回顶部
  • 点餐网站怎么做济源网站建设济源
  • 嘉兴公司网站制作文明网站的建设与管理几点思考
  • 扬州公司做网站徐州网站建设优化
  • 手机网站弹出层插件有哪些wordpress 文章标签
  • 网站建设详细合同范本长沙注册公司流程与费用
  • 搜索引擎网站录入wordpress怎么修改导航
  • 业务接单网站重庆网站制
  • 绿色农产品网站景区网站建设策划方案
  • 服务器做ssr后还可以做网站吗品牌形象设计公司