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

网站和网店的区别wordpress网站go.php跳转

网站和网店的区别,wordpress网站go.php跳转,wordpress网站打开慢,红制作官网Cython不仅仅是一种编程语言。它的起源可以追溯到SAGE数学软件包#xff0c;它用于提高数学计算性能#xff0c;例如涉及矩阵的计算。更一般地说#xff0c;我倾向于将Cython视为SWIG的替代品#xff0c;为本机代码生成非常好的Python绑定。SWIG是最早和最好之一#xff0…Cython不仅仅是一种编程语言。它的起源可以追溯到SAGE数学软件包它用于提高数学计算性能例如涉及矩阵的计算。更一般地说我倾向于将Cython视为SWIG的替代品为本机代码生成非常好的Python绑定。SWIG是最早和最好之一用于生成多种语言的绑定的工具。 Cython仅限Python代码。通过生成语言绑定来处理遗留软件的很好方式对C / C 编写的遗留应用程序用Python添加新功能。第一章将专注于使用Cython的核心概念安装CythonHello World使用distutilsPython调用C函数类型转换安装Linux及Macpip install CythonLinux发行版本$ yum install cython# will work on Fedora and Centos$ apt-get install cython # will work on Debian based systems.Hello World!helloworld.pyx#!/usr/bin/env python3# -*- coding: utf-8 -*-# Author: xurongzhong#126.com# CreateDate: 2018-9-20# 技术支持qq群 144081101 591302926 567351477 钉钉免费群21745728print(Hello World from cython!)Makefileall:cython -3 -o helloworld.c helloworld.pyxgcc -g -O2 -fpic -c helloworld.c -o helloworld.o python3-config --cflagsgcc -g -O2 -shared -o helloworld.so helloworld.o python3-config --libsclean:rm -rf *.c *.o *.so build执行$ makecython -3 -o helloworld.c helloworld.pyxgcc -g -O2 -fpic -c helloworld.c -o helloworld.o python3-config --cflagsgcc -g -O2 -shared -o helloworld.so helloworld.o python3-config --libs$ pythonPython 3.6.5 |Anaconda, Inc.| (default, Apr 29 2018, 16:14:56)[GCC 7.2.0] on linuxType help, copyright, credits or license for more information. import helloworldHello World from cython!image.png使用distutils编译#!/usr/bin/env python3# -*- coding: utf-8 -*-# Author: xurongzhong#126.com# CreateDate: 2018-9-20# 技术支持qq群 144081101 591302926 567351477 钉钉免费群21745728from distutils.core import setupfrom Cython.Build import cythonizesetup(ext_modules cythonize(helloworld.pyx))执行$ python setup.py build_ext --inplacerunning build_extbuilding helloworld extensiongcc -pthread -B /usr/local/anaconda/compiler_compat -Wl,--sysroot/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/anaconda/include/python3.6m -c helloworld.c -o build/temp.linux-x86_64-3.6/helloworld.ogcc -pthread -shared -B /usr/local/anaconda/compiler_compat -L/usr/local/anaconda/lib -Wl,-rpath/usr/local/anaconda/lib -Wl,--no-as-needed -Wl,--sysroot/ build/temp.linux-x86_64-3.6/helloworld.o -o /home/andrew/code/cython-book/chapter1/helloworld/helloworld.cpython-36m-x86_64-linux-gnu.so$ pythonPython 3.6.5 |Anaconda, Inc.| (default, Apr 29 2018, 16:14:56)[GCC 7.2.0] on linuxType help, copyright, credits or license for more information. import helloworldHello World from cython!此处如果不添加 --inplace则编译在默认目录$ python setup.py build_extrunning build_extbuilding helloworld extensiongcc -pthread -B /usr/local/anaconda/compiler_compat -Wl,--sysroot/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/anaconda/include/python3.6m -c helloworld.c -o build/temp.linux-x86_64-3.6/helloworld.ogcc -pthread -shared -B /usr/local/anaconda/compiler_compat -L/usr/local/anaconda/lib -Wl,-rpath/usr/local/anaconda/lib -Wl,--no-as-needed -Wl,--sysroot/ build/temp.linux-x86_64-3.6/helloworld.o -o build/lib.linux-x86_64-3.6/helloworld.cpython-36m-x86_64-linux-gnu.so在root下面执行python3 setup.py install则会安装为系统库# python3 setup.py build_extrunning build_ext# python3 setup.py installrunning installrunning buildrunning build_extrunning install_libcopying build/lib.linux-x86_64-3.6/helloworld.cpython-36m-x86_64-linux-gnu.so - /usr/local/anaconda/lib/python3.6/site-packagesrunning install_egg_infoWriting /usr/local/anaconda/lib/python3.6/site-packages/UNKNOWN-0.0.0-py3.6.egg-infoPython调用C函数AddFunction.c#include int AddFunction(int x, int y) {printf(look we are within your c code!!\n);return x y;}AddFunction.h#ifndef __ADDFUNCTION_H__#define __ADDFUNCTION_H__extern int AddFunction(int, int);#endif //__ADDFUNCTION_H__PyAddFunction.pyx#!/usr/bin/env python3# -*- coding: utf-8 -*-# Author: xurongzhong#126.com# CreateDate: 2018-9-20# 技术支持qq群 144081101 591302926 567351477 钉钉免费群21745728cdef extern from AddFunction.h:cdef int AddFunction(int, int)def Add(a, b):return AddFunction(a, b)执行$ makecython -3 PyAddFunction.pyxgcc -g -O2 -fpic -c PyAddFunction.c -o PyAddFunction.o python3-config --includesgcc -g -O2 -fpic -c AddFunction.c -o AddFunction.ogcc -g -O2 -shared -o PyAddFunction.so AddFunction.o PyAddFunction.o python3-config --libs$ pythonPython 3.6.5 |Anaconda, Inc.| (default, Apr 29 2018, 16:14:56)[GCC 7.2.0] on linuxType help, copyright, credits or license for more information. from PyAddFunction import Add Add(1,2)look we are within your c code!!3参考资料
http://www.yutouwan.com/news/299767/

相关文章:

  • 企业网站备案审核需要多长时间php如何做网站
  • 怎么做企业销售网站广州优质网站排名公司
  • php网站开发技术是什么哪里有制作网站
  • 广州手机网站建设公司哪家好原型图网站
  • 北京建设集团网站飞狐小说网站建设
  • 免费注册网站网址建设银行网站为什么进不去
  • 网站建设课本东莞网站建设 兼职
  • vs2017html5网站开发关键词智能调词工具
  • 阿里云部署多个网站建筑培训网官网查询
  • 帝国cms 门户网站中学生在哪里学编程最好
  • 成都网站制作公司 dedecms普洱市住房城乡建设局网站
  • 网站开发费用会计分录和田地网站seo
  • 网站备案收费标准做网站的宽度为多少
  • 做网站合肥哪家公司好计算机类专业包括哪些
  • 欣赏艺术类的网站wordpress主题的使用教程
  • 苏州高新区建设局网站管网wordpress怎么重新初始化
  • 网站开发前段和后端楼盘网站开发报价
  • 人才网站怎么建设wordpress主题比较
  • 双语版网站引导页央企八大设计院
  • 网站建设的公司推荐优秀的国风网页设计欣赏
  • 网站开发好的公司推荐wordpress 建站很简单
  • 可以做家教的网站有哪些网站建设计划书
  • 网站开发说明文档深圳平湖网站建设公司
  • 四川学校网站建设公wordpress视频列表
  • 建筑网站大全免费河北建设厅网站登陆怎么找附件
  • 中天建设集团有限公司招聘网站seo需要用到哪些工具
  • 泉州洛江住房和城乡建设局网站怎么做贷款网站
  • 建设部网站下载佛山制作网站公司推荐
  • 公司网站建设分录网络技术推广服务
  • 建立企业网站的形式有政务网站建设存在的问题