小编War*_*ert的帖子

在Ubuntu上找不到Tkinter模块

Python 2.7.1+ (r271:86832, Apr 11 2011, 18:05:24) 
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import Tkinter
>>> 
Run Code Online (Sandbox Code Playgroud)

另一方面...

Python 3.2 (r32:88445, Mar 25 2011, 19:28:28) 
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import Tkinter
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named Tkinter 
Run Code Online (Sandbox Code Playgroud)

我检查了突触,安装了Tkinter.然后我发现了 -

如果失败并显示"No module named _tkinter",则需要修改Python配置以包含此模块(这是在C中实现的扩展模块).不要编辑模块/设置(它已过期).您可能必须安装Tcl和Tk(使用RPM时,也要安装-devel RPMs)和/或编辑setup.py脚本以指向安装Tcl/Tk的正确位置.如果您在默认位置安装Tcl/Tk,只需重新运行"make"即可构建_tkinter扩展名.

我猜测tkinter仍然与我的电脑中的旧python相关联.我如何更改,以便python3可以使用tkinter?

tkinter python-3.x

76
推荐指数
8
解决办法
17万
查看次数

未找到操作的端点引用(EPR)是

我一直在努力应对以下错误,过去几天你可以帮忙!

我使用wsdl 2.0文件中的wsdl2java工具生成了我的服务器和客户端代码.在调用webservice时,我收到以下错误:

org.apache.axis2.AxisFault: The endpoint reference (EPR) for the
Operation not found is
/axis2/services/MyService/authentication/?username=Denise345&password=xxxxx
and the WSA Action = null
Run Code Online (Sandbox Code Playgroud)

我的服务显示在axis2网页上,包含所有可用方法.这是TcpMon的输出

==============
Listen Port: 8090
Target Host: 127.0.0.1
Target Port: 8080
==== Request ====
GET /axis2/services/MyService/authentication/?username=Denise345&password=xxxxx
HTTP/1.1
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
SOAPAction: ""
User-Agent: Axis2
Host: 127.0.0.1:8090

==== Response ====
HTTP/1.1 500 Internal Server Error
Server: Apache-Coyote/1.1
Content-Type: application/xml;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 12 May 2011 15:53:20 GMT
Connection: close

12b
<soapenv:Reason xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
  <soapenv:Text xml:lang="en-US">The endpoint reference (EPR) for the …
Run Code Online (Sandbox Code Playgroud)

wsdl axis2

13
推荐指数
5
解决办法
11万
查看次数

使用Python Etree解析XML并返回指定的标记,无论命名空间如何

我正在处理一些XML数据,这些数据在每个文件的某些位置重新定义了命名空间.我试图从文档中提取特定类型的所有标记,而不管标记位于XML中的活动名称空间是什么.

我正在findall('.//{namespace}Tag')寻找我正在寻找的元素.但是永远不知道{namespace}文件中任何给定点的内容是什么,会让它命中或遗漏我是否会返回所有请求的标签.

有没有办法返回所有Tag元素,无论{namespace}它们属于什么?有什么东西沿着findall('.//{wildcard}Tag')

elementtree xml-namespaces xml-parsing python-3.x

7
推荐指数
1
解决办法
881
查看次数

无法在控制台中保存记录

因此,要在我运行的用户模型中获取记录

 @user = User.find(1)
Run Code Online (Sandbox Code Playgroud)

然后更改属性:

 @user.active = false
Run Code Online (Sandbox Code Playgroud)

然后它返回false

我跑的时候

 @user.save
Run Code Online (Sandbox Code Playgroud)

我明白了

(0.2ms)  BEGIN
(0.3ms)  SELECT 1 FROM `users` WHERE (LOWER(`users`.`username`) = LOWER('sean') AND `users`.`id` != 1) LIMIT 1
(0.3ms)  SELECT 1 FROM `users` WHERE (LOWER(`users`.`email`) = LOWER('sean@gmail.com') AND `users`.`id` != 1) LIMIT 1
(0.6ms)  ROLLBACK
 => false 
Run Code Online (Sandbox Code Playgroud)

ruby-on-rails

4
推荐指数
1
解决办法
6308
查看次数