CentOS 的GAE实验
来源:互联网 发布:网络购物的优点 编辑:程序博客网 时间:2024/06/06 11:05
1:ssl模块
报错:
module’ object has no attribute ‘HTTPSHandler’
原因:Python未安装ssl模块
加载ssl,重新编译python
./configure --enable--ssl
2:_sqlite 模块
报错:
Traceback (most recent call last): File "main.py", line 9, in <module> from com.qsee.db.DbUtil import getAttackTuple, getRunStatus, runOver, alterAttackStatus,filter File "/root/scanAttack/com/qsee/db/DbUtil.py", line 7, in <module> import sqlite3, sys File "/usr/local/lib/python2.7/sqlite3/__init__.py", line 24, in <module> from dbapi2 import * File "/usr/local/lib/python2.7/sqlite3/dbapi2.py", line 27, in <module> from _sqlite3 import *ImportError: No module named _sqlite3
上面错误说明没有安装sqlite-devel,所以要先安装sqlite-devel,再编译升级python,才可以使用sqlite3库
PS:如果安装sqlite-devel后,仍无法加载_sqlite3模块,常识如下方法:
编辑源码下的connection.c这个文件
#vi Python-2.7.3/Modules/_sqlite/connection.c
在
#include "cache.h"
#include "module.h"
#include "connection.h"
#include "statement.h"
#include "cursor.h"
#include "prepare_protocol.h"
#include "util.h"
#include "sqlitecompat.h"
#include "pythread.h"
#define ACTION_FINALIZE 1
#define ACTION_RESET 2
#if SQLITE_VERSION_NUMBER >= 3003008
#ifndef SQLITE_OMIT_LOAD_EXTENSION
#define HAVE_LOAD_EXTENSION
#endif
#endif
下面添加
#ifdef SQLITE_INT64_TYPE
typedef SQLITE_INT64_TYPE sqlite_int64;
typedef unsigned SQLITE_INT64_TYPE sqlite_uint64;
#elif defined(_MSC_VER) || defined(__BORLANDC__)
typedef __int64 sqlite_int64;
typedef unsigned __int64 sqlite_uint64;
#else
typedef long long int sqlite_int64;
typedef unsigned long long int sqlite_uint64;
#endif
typedef sqlite_int64 sqlite3_int64;
typedef sqlite_uint64 sqlite3_uint64;
再次make,没有报错。
- CentOS 的GAE实验
- GAE memcache 的限制
- GAE的http_proxy
- GAE的应用笔记
- GAE的使用
- GAE
- GAE
- GAE
- GAE
- gae
- GAE 的探索与总结
- GAE初次使用的阵痛
- GAE存储的数据的数据管理后台
- 用gae做的在线代理网站
- [Python]GAE、Django导出Excel的方法
- 有意思,封掉gae的国家列表
- 使用GAE的memcache实现Session
- GAE的HTTPS已经全部沦陷
- AndroidManifest.xml文件解析
- Yum 出现 Temporary failure in name resolution 解决方案
- uva 10624 Super Number 回溯
- JAVA PriorityQueue应用实例
- java为按扭加一个F1快捷键
- CentOS 的GAE实验
- How to Trace Qemu
- Java中的快捷键和右键属性添加实现
- opengl构造一个灵活的camera
- 怎样设置菜单项JMenuItem()的快捷键
- Java菜单条、菜单、菜单项
- java菜单
- 【远控编写06】客户端界面的设计和编写--添加菜单消息响应,从列表中删除条目
- Eclipse为action新增快捷键