可以python做一些内核的东西吗? [英] can python do some kernel stuff?

查看:120
本文介绍了可以python做一些内核的东西吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好吧


python现在已经发展成为一种多功能的语言,可以为许多不同的目的完成任务。然而,

AFAIK,对它的内核编码能力知之甚少。


所以我想知道python是否可以做一些内核编码

曾经是C / C ++的私人花园。例如,python

拦截系统级别的键盘输入?有人告诉我

这是内核的事情,不是吗?

Hi to all

python now has grown to a versatile language that can
accomplish tasks for many different purposes. However,
AFAIK, little is known about its ability of kernel coding.

So I am wondering if python can do some kernel coding that
used to be the private garden of C/C++. For example, can python
intercept the input of keyboard on a system level? someone told me
it''s a kernel thing, isn''t it?

推荐答案

Jimmy写道:
Jimmy wrote:

大家好


python现已发展成为一种多功能的语言,可以完成任务
许多不同的目的。然而,

AFAIK,对它的内核编码能力知之甚少。


所以我想知道python是否可以做一些内核编码

曾经是C / C ++的私人花园。例如,python

拦截系统级别的键盘输入?有人告诉我

这是一个内核的东西,不是吗?
Hi to all

python now has grown to a versatile language that can
accomplish tasks for many different purposes. However,
AFAIK, little is known about its ability of kernel coding.

So I am wondering if python can do some kernel coding that
used to be the private garden of C/C++. For example, can python
intercept the input of keyboard on a system level? someone told me
it''s a kernel thing, isn''t it?


http://wiki.python。 org / moin / elmer


http://wiki.python.org/moin/elmer


5月23日下午3:05,Andrew Lee< fiacre.patr ... @ gmail。 comwrote:
On May 23, 3:05 pm, Andrew Lee <fiacre.patr...@gmail.comwrote:

Jimmy写道:
Jimmy wrote:

您好所有
Hi to all


python现在已经发展成为一种多功能的语言,可以为许多不同的目的完成任务。但是,对于AFAIK来说,很少有人知道它的内核编码能力。
python now has grown to a versatile language that can
accomplish tasks for many different purposes. However,
AFAIK, little is known about its ability of kernel coding.


所以我想知道python是否可以做一些内核编码

曾经是C / C ++的私有花园。例如,python

拦截系统级别的键盘输入?有人告诉我

这是一个内核的东西,不是吗?
So I am wondering if python can do some kernel coding that
used to be the private garden of C/C++. For example, can python
intercept the input of keyboard on a system level? someone told me
it''s a kernel thing, isn''t it?


http://wiki.python。 org / moin / elmer



好​​吧,直截了当地说,我怎么知道在系统上按下一个键 -

等级如果

使用python?

well, straightly speaking, how can I know a key is pressed on a system-
level if
using python?


Jimmy schrieb:
Jimmy schrieb:

5月23日,3:05下午,Andrew Lee< fiacre.patr ... @ gmail.comwrote:
On May 23, 3:05 pm, Andrew Lee <fiacre.patr...@gmail.comwrote:

> Jimmy写道:
>Jimmy wrote:

>>大家好。现在,python已发展成为一种多功能语言,可以完成许多不同目的的任务。然而,AFAIK,对其内核编码的能力知之甚少。
所以我想知道python是否可以做一些曾经是C / C ++私有花园的内核编码。例如,python可以拦截系统级别的键盘输入吗?有人告诉我这是一个内核的东西,不是吗?
>>Hi to all
python now has grown to a versatile language that can
accomplish tasks for many different purposes. However,
AFAIK, little is known about its ability of kernel coding.
So I am wondering if python can do some kernel coding that
used to be the private garden of C/C++. For example, can python
intercept the input of keyboard on a system level? someone told me
it''s a kernel thing, isn''t it?

http://wiki.python.org/moin/ elmer



好​​吧,直截了当地说,如果
$ b我怎么知道系统上的按键被按下了?
等级$ b使用python?


well, straightly speaking, how can I know a key is pressed on a system-
level if
using python?



内核编程有什么用途?你可以用例如pygame来

获得击键。或者在linux下,读取(如果你是root用户)键盘

输入文件 - 我这样做是为了支持连接到

机器的几个键盘。


原来的问题:不,python不能用作内核

编程语言。除了其他原因外,性能& GIL

可以防止这种情况发生。


Diez

What has that todo with kernel programming? You can use e.g. pygame to
get keystrokes. Or under linux, read (if you are root) the keyboard
input file - I''ve done that to support several keyboards attached to a
machine.

And the original question: no, python can''t be used as kernel
programming language. Amongst other reasons, performance & the GIL
prevent that.

Diez


这篇关于可以python做一些内核的东西吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆