Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
Is there a way to define what window is being used in python? Such as, if I have three separate Firefox windows open, how would i get a python program to know which one I am looking at/scrolling through/clicking on/typing in? I am having a really hard time trying to find a good way of describing this so if you don't understand please tell me so i can elaborate. I cant really decide what to type into Google to solve this so anything would help. i am using Windows 7.
Here is a simple example:
import win32gui
win = win32gui
while True:
print(win.GetWindowText(win.GetActiveWindow()))
If the module is documented well enough try help(win32gui) after it is imported.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 days ago.
Improve this question
I just want to ask that can we create a chatbot which doesn't work on give statement or command.
I am interested in creating a bot. that can know what a user is really saying or what does he need to execute. straight forward an AI powered bot.
I don't know from where to start and were to focus.
And I ask this question because google also has some limitations.
I was expecting that i need to just make a program using if else and cover the whole english dictionary and use some modules like
import bs4
import wikipedia
import pytube
and many more. I was thinking that I should scap data from these platfroms. I am not able to do that.
Now Thank You!
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I am creating a python tkinter application which always stays on the desktop. To do this, I need to check whether any other window is maximized or not, similar to WS_MAXIMIZE in Visual Basic .NET, or GetWindowPlacement API. Is there any way to do this?
Looking forward to your replies!
You can use pip install pygetwindow to get pygetwindow
import pygetwindow as gw
notepadWindow = gw.getWindowsWithTitle('Untitled')[0]
notepadWindow.isMaximized
Here I have a notepad open and am checking if it is maximised or minimsed!
Documentation for help: https://pypi.org/project/PyGetWindow/
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I am trying to access a module I have written in Python from C? Is this at all possible?
I have tried:
Module = PyImport_ImportModule("<modulename>");
But it doesn't seem to work
please try to add more information of what are you trying to do.
Anyway, I know it is possible. It isn't easy though..
Have you tried looking for any tutorials? I think this was already asked:
Call a Python function from within a C program
https://www.codeproject.com/Articles/11805/Embedding-Python-in-C-C-Part-I
https://www.linuxjournal.com/article/8497
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am beginner of Python, does anyone knows how to make a different shapes of message windows in python? i want to design a better look and friendly GUI.
Thank you
I think Qt is what may be useful to you. Take a look at the documentation on QtProject homepage. Lots of tutorials can be found on the Internet. For your specific problem take a look at this SO question.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
Can I know this information across python?, for example, the name of the card graphic, processor, audio, mother board ....
There isn't anything in Python itself. You can detect what OS you're on via the platform module. Otherwise
See also:
How can I return system information in Python?
If you're on Windows, you can probably use PyWin32 to get some of this information. See the following recipe to get an idea of some of the stuff you can get:
http://code.activestate.com/recipes/511491-getting-system-information-under-windows/
I also wrote a little about this regarding getting Windows system information here:
http://www.blog.pythonlibrary.org/2010/01/27/getting-windows-system-information-with-python/
You might be able to use HAL:
http://www.daniweb.com/software-development/python/threads/300786/how-to-get-graphics-card-details-in-python
I have also found the psutil project very helpful. I also came across PyCPU, although I'm unsure what its status is.
For Linux (and probably Mac), you'll probably have to use system commands called via Python's subprocess module and parse the result(s).