简体   繁体   English

RedHat上的Python2.4和Python2.7之间的键盘映射有所不同

[英]Keymapping different between Python2.4 and Python2.7 on RedHat

I am running SLC5 (RedHat 4 Linux). 我正在运行SLC5(RedHat 4 Linux)。 The distributed Python version is 2.4. 分布式Python版本是2.4。 I have installed Python 2.7 in addition manually (altinstall). 我还手动安装了Python 2.7(altinstall)。

Running in terminal mode (Runlevel 3), the key mapping in bash and the Python 2.4 interpreter are correct (backspace, key arrows, etc. are working fine). 在终端模式(运行级别3)下运行,bash和Python 2.4解释器中的键映射是正确的(退格键,键箭头等都可以正常工作)。 When running the Python 2.7 interpreter, the key mappings are wrong (Backspace = ^? instead of ^H; Ctrl-H is working fine) 运行Python 2.7解释器时,键映射错误(Backspace = ^?而不是^ H; Ctrl-H正常工作)

When running under gnome (Runlevel 5) in the gnome-terminal, the mapping is correct for Python 2.7. 在gnome终端中的gnome(运行级别5)下运行时,该映射对于Python 2.7是正确的。

Any idea what I need to set/configure that the key mapping is correct for Python 2.7 in the terminal mode (RL3) ? 任何想法我需要设置/配置键映射对于终端模式(RL3)中的Python 2.7都是正确的吗?

Thanks very much ! 非常感谢 !

Markus 马库斯

This page describes the main key differences between Python 2.4 and Python 2.7: 本页介绍了Python 2.4和2.7的主要区别:

  • Multithreading 多线程

Python 2.4 : Not available. Python 2.4:不可用。

Python 2.7: You can use the Python 2.7 threading library. Python 2.7:您可以使用Python 2.7线程库。 All threads in a request must finish before the request deadline (60 seconds for online requests and 10 minutes for offline). 请求中的所有线程必须在请求截止日期之前完成(在线请求60秒,离线10分钟)。

  • Concurrent requests 并发请求

Python 2.4 : Not supported. Python 2.4:不支持。

Python 2.7 :Can use concurrent requests as long as you specify the threadsafe directive in app.yaml. Python 2.7:只要您在app.yaml中指定threadsafe指令,就可以使用并发请求。 Script handlers must use the Python WSGI interface in order to be threadsafe. 脚本处理程序必须使用Python WSGI接口才能确保线程安全。 In backends, raising an exception from a shutdown hook copies that exception to all threads. 在后端,从关闭挂接引发异常时,会将异常复制到所有线程。

  • Bytecode upload 字节码上传

Python 2.4: Not available. Python 2.4:不可用。

Python 2.7: Can upload .pyc files, but not in combination with .py files. Python 2.7:可以上传.pyc文件,但不能与.py文件结合使用。 However, you can upload .zip files containing .py or .pyc files (or a combination). 但是,您可以上传包含.py或.pyc文件(或组合文件)的.zip文件。

  • Preferred interface (WSGI vs. CGI) Python 2.4: CGI is the only supported interface. 首选接口(WSGI与CGI)Python 2.4:CGI是唯一受支持的接口。

Python 2.7: WSGI is the preferred interface, and is required for multithreading. Python 2.7:WSGI是首选接口,并且是多线程必需的。 For more information about converting CGI handlers to WSGI, see Migrating to Python 2.7. 有关将CGI处理程序转换为WSGI的更多信息,请参见迁移到Python 2.7。

  • Support for C modules 支持C模块

Python 2.4: Some C modules are not available. Python 2.4:某些C模块不可用。 See the libraries knowledge base for more information. 有关更多信息,请参见库知识库。

Python 2.7: The following C modules are not available: ctypes, sqlite, ssl, _ssl, fcntl, spwd, pwd, grp, syslog, select, _socket Python 2.7:以下C模块不可用:ctypes,sqlite,ssl,_ssl,fcntl,spwd,pwd,grp,syslog,select,_socket

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM