很基础很重要的一课,虽然很简单,但是防止以后忘了,还是记下来 这个笔记里说的都是import本地的,自己创建的,或者复制粘贴的别人的,总之“不是安装到library”的module or package, 所以标题里有个大写的LOCAL module what’s a module ?It’s just a python file why do we need?Because we wanna re-use code, your own code or someone others’ dir()…
最近很多脚本工作都需要脱离nuke的gui环境运行,没有了script editor就必须要尝试Nuke Python module功能了.该模式可以执行大部分在GUI环境中的命令,在自动生成或者批量处理nuke工程时非常高效. 下面简单介绍该模式: 从8.0版本开始Nuke就可以被当作一个python模块来使用了. 这意味着你现在可以在VFX流程中使用Python来做很多复杂的事,对于大部分的2DPython模块,3DPython模块以及视频编辑Python模块,这是一个易用的,产品级的,不可…
原文出处: koala bear    Direct use of __import__() is rare, except in cases where you want to import a module whose name is only known at runtime. 本文介绍 python module 的动态加载,我们有时希望从配置文件等地获取要被动态加载的 module,但是所读取的配置项通常为字符串类型,无法用 import 加载,例如:   >>> import…
在使用pip安装pymongo的过程中报错,提示如下: $ pip3 install pymongo pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. Collecting pymongo Could not fetch URL https://pypi.python.org/simple/pymongo/: There was a p…
C:\Python27\pywin32-214>setup.py -q install Building pywin32 2.7.214.0 Traceback (most recent call last): File "C:\Python27\pywin32-214\setup.py", line 2152, in <module> ('', ('pywin32.pth',)), File "C:\Python27\lib\distutils\core.…
Dive into RE in Python Standard re module in python is powerful to handle text manipulation,such as searching,matching,splitting etc, and it is necessary to learn about it when tasks above appears.Since official document of re is a bit obscure, I ref…
Python module all in one Python Modules https://docs.python.org/3/tutorial/modules.html Fibonacc # Fibonacci numbers module def fib(n): # write Fibonacci series up to n a, b = 0, 1 while a < n: print(a, end=' ') a, b = b, a+b print() def fib2(n): # r…
[install python module] 参考:http://docs.python.org/2.7/install/index.html…
在使用Python队列服务 Python RQ 时候的报错: Functions from the __main__ module cannot be processed by workers. 原因: work 不能和job放在同一模块中,否则程序会报错 解决: 把使用rq的代码文件job.py中的 task_queue.enqueue(count_words_at_url,"http://messense.me/redis-queue-python-rq-usage.html")…
装一台新服务器环境的时候,装uwsgi报错: plugins/python/uwsgi_python.h:2:20: fatal error: Python.h: No such file or directory #include <Python.h> 查了一下解决办法: yum install python-devel.x86_64   之后再运行安装,问题解决.…