English 中文(简体)
python home32api.LoadKey ATLayout(), dont change Language in IDLE shell?
原标题:python win32api.LoadKeyboardLayout(), doesnt change language in IDLE shell?

任何人能否帮助我看一看。 我试图启动我的第一个方案拟订项目。 将在下午实施。

我需要一个文本箱(正使用轮椅)。 如果用户将任何案文输入到该文本箱中,那么我想把它作为阿拉伯文本。 我想通过自动改变用户的方式来做到这一点。 在特定案文箱中 cur泥土地时,阿拉伯布局的关键板。

So i found this pywin32 module, which has a function LoadKeyboardLayout() So i am trying to test this in IDLE, to see if I can make it accept arabic text into IDLE, to see if it works. So I enter, into IDLE:

win32api.LoadKeyboardLayout( 00000401 ,1)

之后,回到了第67175425号,相当于海x:4010401 whcih I 我认为是阿拉伯文的当地身份证。 SO! 我这样做了,但在我尝试打字之后,在IDLE窗上,它继续打造正常的官邸。

Can someone please explain my errors and guide me towards a good solution.


UPDATE

Okay, I ve been trying to solve this problem ever since posting the damn question. No luck. Then, I thought, "ok, screw it, instead of testing it quicly in IDLE, I will just try it out, in situ, in my source code for the project." WTF - it worked first time, giving exact behaviour that I wanted. Then I tried it in a different IDE, in the interpreted window, and again, IT WORKED straight away!

So clearly my issue is with IDLE, in its interpreting mode. Can anyone explain why it doesn t work in the IDLE shell???

最佳回答
  1. Keyboard layout setting in Windows is per-process (and inherited from the parent process)
  2. IDLE runs your Python script in a background process separate from its GUI

因此,你成功地改变了管理你的手稿而不是IDLE s GUI的背景粉进程的关键布局。

问题回答

暂无回答




相关问题
Can Django models use MySQL functions?

Is there a way to force Django models to pass a field to a MySQL function every time the model data is read or loaded? To clarify what I mean in SQL, I want the Django model to produce something like ...

An enterprise scheduler for python (like quartz)

I am looking for an enterprise tasks scheduler for python, like quartz is for Java. Requirements: Persistent: if the process restarts or the machine restarts, then all the jobs must stay there and ...

How to remove unique, then duplicate dictionaries in a list?

Given the following list that contains some duplicate and some unique dictionaries, what is the best method to remove unique dictionaries first, then reduce the duplicate dictionaries to single ...

What is suggested seed value to use with random.seed()?

Simple enough question: I m using python random module to generate random integers. I want to know what is the suggested value to use with the random.seed() function? Currently I am letting this ...

How can I make the PyDev editor selectively ignore errors?

I m using PyDev under Eclipse to write some Jython code. I ve got numerous instances where I need to do something like this: import com.work.project.component.client.Interface.ISubInterface as ...

How do I profile `paster serve` s startup time?

Python s paster serve app.ini is taking longer than I would like to be ready for the first request. I know how to profile requests with middleware, but how do I profile the initialization time? I ...

Pragmatically adding give-aways/freebies to an online store

Our business currently has an online store and recently we ve been offering free specials to our customers. Right now, we simply display the special and give the buyer a notice stating we will add the ...

Converting Dictionary to List? [duplicate]

I m trying to convert a Python dictionary into a Python list, in order to perform some calculations. #My dictionary dict = {} dict[ Capital ]="London" dict[ Food ]="Fish&Chips" dict[ 2012 ]="...

热门标签