activepython

如何在Python中创建GUID / UUID

假装没事ソ 提交于 2020-10-05 04:02:25
问题: How do I create a GUID in Python that is platform independent? 如何在Python中创建独立于平台的GUID? I hear there is a method using ActivePython on Windows but it's Windows only because it uses COM. 我听说有一种方法在Windows上使用ActivePython,但它只是Windows,因为它使用COM。 Is there a method using plain Python? 有没有使用普通Python的方法? 解决方案: 参考一: https://stackoom.com/question/2F8R/如何在Python中创建GUID-UUID 参考二: https://oldbug.net/q/2F8R/How-to-create-a-GUID-UUID-in-Python 来源: oschina 链接: https://my.oschina.net/u/4438370/blog/4404750

Python 融于ASP框架

拥有回忆 提交于 2020-08-13 17:11:52
一、ASP的平反   想到ASP 很多人会说 “asp语言很蛋疼,不能面向对象,功能单一,很多东西实现不了” 等等诸如此类。 以上说法都是错误的,其一ASp不是一种语言是 微软用来代替CGI的一种web框架,只不过我们一直被扭曲在 vbs就是asp的默认语言,把ASP 和 vbs 之间划了等号。 其二 Asp 功能其实并不单一 此web 提供5个对象 (request、 response、 server、 session、 appliaction)这就是asp与生俱来的东西,除了这些东西都是Asp 所用的脚本级的东西。 而ASP 借助了 Asp.dll动态链接库,理论上可以试用一切脚本语言包括(vbscript 、jsscript、 actionscript、 perl 、python),所以说ASP是非常丰富的灵活的 web框架 二、为什么要用python写Asp   python 最近如火如荼,非常之火,他在各大领域都占有自己举足轻重的地位,web方面自然也少不了他。 Echosong 已经用过django 、web.py 等等python自己的web框架。由于工作需要 Echosong 很大一部分时间是在写ASP。 而vbs的Asp实在让人写得有种 想死感觉,很多功能借助各种 c 或者其他语言写的dll 稳定性难以考量,而echosong又是一个Python 的 十足迷

没有名为MySQLdb的模块

六眼飞鱼酱① 提交于 2020-02-26 00:17:13
我正在使用Python 2.5.4版并安装MySQL 5.0版和Django。 Django在Python上运行良好,但在MySQL上运行良好。 我在Windows Vista中使用它。 #1楼 感谢derevo,但我认为还有另一种好方法: 下载并安装 ActivePython 打开命令提示符 键入 pypm install mysql-python 阅读特定于此软件包的说明。 我认为 pypm 比 easy_install 更强大和可靠。 #2楼 ...并且记住 没有针对python3.x的MySQLdb (我知道问题是关于python2.x的,但是谷歌对这篇文章的评价很高) 编辑: 如评论中所述,有一个MySQLdb的fork添加了Python 3支持: github.com/PyMySQL/mysqlclient-python #3楼 使用 cd 转到您的项目目录。 源/ bin /激活(如果以前没有激活过,请激活环境)。 运行命令 easy_install MySQL-python #4楼 尝试这个。 pip install MySQL-python #5楼 请注意,这并未针对python 3.x进行测试 在CMD中 pip install wheel pip install pymysql 在settings.py中 import pymysql pymysql

Getting ActivePython to work with WSH

断了今生、忘了曾经 提交于 2019-12-30 04:33:30
问题 I've installed ActivePython 2.7.2 and I'm trying to execute a .pys script via the console with wscript/cscript, [i.e. ActivePython (PythonScript with .pys extension) in Microsoft's WSH(Windows Scripting Host)] and when trying with wscript I get two errors. "The program cannot start because MSVCR90.dll is missing from your computer try reinstalling the program to fix this problem" "Can't find script engine Python for script I did some googling and have also downloaded and installed the

How to use SHGetFileInfo with SHGFI_PIDL in python

家住魔仙堡 提交于 2019-12-22 00:07:14
问题 I'm trying to retrieve file information (specifically info about the icon) using SHGetFileInfo. In reality, I don't have the full path of the file, I only have the pidl. The following code returns (0L, (0, 0, 0, '', '')) and my question is why. from win32com.shell import shell, shellcon def get_info(): desktop = shell.SHGetDesktopFolder() eaten, desktop_pidl, attr = desktop.ParseDisplayName(None, None, r"C:\Users\Ella\Desktop") return shell.SHGetFileInfo(desktop_pidl, 0, shellcon.SHGFI_PIDL |

easy_install launches as a terminal and closes on its own, how to avoid that

孤人 提交于 2019-12-20 03:09:48
问题 Trying to install various packages on a Windows 7 64 bit and learned that ActivePython helps (as it includes easy_install among others). It surely seems pretty robust. However I'm trying to easy_install a few packages and its failing. The problem is that the easy_install.exe actually launches in a new terminal and closes on its own, even when there is a problem, how do I avoid that ? Anyone faced this issue ? 回答1: Perhaps easy_install is trying to relaunch itself as Administrator in a

easy_install launches as a terminal and closes on its own, how to avoid that

不羁岁月 提交于 2019-12-17 20:29:20
问题 Trying to install various packages on a Windows 7 64 bit and learned that ActivePython helps (as it includes easy_install among others). It surely seems pretty robust. However I'm trying to easy_install a few packages and its failing. The problem is that the easy_install.exe actually launches in a new terminal and closes on its own, even when there is a problem, how do I avoid that ? Anyone faced this issue ? 回答1: Perhaps easy_install is trying to relaunch itself as Administrator in a

Python 3.2 doesn't work with python 2.7

一世执手 提交于 2019-12-13 03:42:55
问题 I already have python 2.7 (installed using activepython). I'm trying to use python 3.2 just to learn more about it so i downloaded it from python.org python 2.7 still works perfectly, but python 3.2 gives me this error when i try to open the ide. and then I see the send error window, if i install python 3.2 using activepython i see the same error. I'm using windows xp pro sp3 32 bit and i had the same error on sp2... How do I fix it? EDIT @Zuljin This is the first time that i use dependancy

How to disable Windows Firewall using python

时光怂恿深爱的人放手 提交于 2019-12-12 05:32:17
问题 I am trying to write automation to a little project that I'm doing in work. In the proccess I need to disable Windows Firewall (for every Windows version) using python (I prefer activepython because it already installed). I looked for many answers but I didn't found any answer that suits my needs. I found this site: https://mail.python.org/pipermail/python-win32/2012-July/012434.html But the problem is that when I check from the control panel the actual disabling of Firewall is not happening.

If django is installed using pypm, would pydev detect it?

痴心易碎 提交于 2019-12-11 05:27:14
问题 i have recently asked a question I rechecked and it seems that pydev does not detect django either, but i can import django in activepython interpreter. so if i installed django using pypm would pydev detect it? 回答1: PyDev currently doesn't pick additions to the PYTHONPATH automatically, so, you have to re-configure your interpreter within PyDev (even if only the PYTHONPATH changed). See: http://pydev.org/manual_101_interpreter.html 来源: https://stackoverflow.com/questions/7221154/if-django-is