windows

Getting my phone directory in python

删除回忆录丶 提交于 2021-02-08 07:03:34
问题 I connect my android phone to my windows laptop. In windows explorer the directory where my photos are is: Computer\GT-I9100\Phone\DCIM\Camera\ In python I do: phone_dir="Computer\GT-I9100\Phone\DCIM\Camera" os.listdir(phone_dir) I get: FileNotFoundError: [WinError 3] The system cannot find the path specified: 'Computer\\GT-I9100\\Phone\\DCIM\\Camera\\*.*' Edit: The best I have got so far is to enable mass storage on the android device and then python can see it. But I'd prefer not to have to

Getting my phone directory in python

不问归期 提交于 2021-02-08 07:03:06
问题 I connect my android phone to my windows laptop. In windows explorer the directory where my photos are is: Computer\GT-I9100\Phone\DCIM\Camera\ In python I do: phone_dir="Computer\GT-I9100\Phone\DCIM\Camera" os.listdir(phone_dir) I get: FileNotFoundError: [WinError 3] The system cannot find the path specified: 'Computer\\GT-I9100\\Phone\\DCIM\\Camera\\*.*' Edit: The best I have got so far is to enable mass storage on the android device and then python can see it. But I'd prefer not to have to

How to schedule tasks when computer is off

一世执手 提交于 2021-02-08 06:51:09
问题 I have a very basic question. I have built with R a script than can send me reports by email. I then used task scheduler to send those emails on specific times. But now I would like to automate more frequently these scripts (let's say every 2 hours) and to only receive an email when the alert I created in my script (a flag) is on, and this even when my pc is off. As task scheduler won't work, does that mean I need a server or something ? Does it have a cost ? I am complete newbie in that area

Trying to use win32ui with pywin32 gives: A dynamic link library (DLL) initialization routine failed

自作多情 提交于 2021-02-08 06:39:55
问题 I am trying to use the win32ui module from pywin32 (yes i have the correct version). My win32gui module does work fine but the ui module give me and error. I have already tried: reinstalling python, adding PYTHON_PATH too system vars, running the after install pywin32 script, For the rest I am kinda of out thing i can try to do. Python version: 3.9 (64 bit) Pywin32 version: pywin32-228.win-amd64-py3.9 (is the .exe file name i don't know how to find the version) just to clear up my only code

Is there a way to find the path of an application with standard libraries?

牧云@^-^@ 提交于 2021-02-08 06:38:36
问题 I'd like to know if it is possible to find the installation directory of an application under Windows 7, such as MS Excel, with standard python 2.7 libraries. I mean, it shouldn't use any pywin32, or xlrd etc. Maybe it will look up registry to find the installation path? 回答1: It might be quite tricky, however one approach would be to search for the launcher exe location in HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\foo.exe Thusly something like this (I do not have Windows on

Why does the SetScrollInfo() function sends a WM_SIZE message to WndProc()?

谁都会走 提交于 2021-02-08 06:37:33
问题 Why does the SetScrollInfo() function sends a WM_SIZE message to WndProc() ? EDIT Apparently, this is a bug in the WinAPI. The WM_SIZE message was being sent because I forgot to include the WS_HSCROLL | WS_VSCROLL styles in the window creation. Once that was corrected, the WM_SIZE isn't being sent anymore. Thanks. 回答1: Since this is a documented feature, it's likely not a bug. From http://msdn.microsoft.com/en-us/library/windows/desktop/ms632646.aspx: Remarks If the SetScrollPos or MoveWindow

Utility to load .sys driver on Windows

巧了我就是萌 提交于 2021-02-08 06:21:33
问题 Is there any tool that I can use to load .sys driver. I just made hallo world driver from this tutorial http://www.rohitab.com/discuss/topic/24166-windows-driver-development-tutorial/ but I don't know how to load it. Cant find anything on google. 回答1: You have two choices - You have sc.exe as Harry said in his comment, or you have the OSR Loader, which is what I personally use. Keep in mind that, on Windows Vista/7 x64 you will need to use BCDEdit to enable TESTSIGNING ( bcdedit -set

Get bytes/char* from hIcon/hBitmap

▼魔方 西西 提交于 2021-02-08 06:10:24
问题 I'm working on a C/S application, Server in C++ and Client in C#, I need to send some information about current running processes and related icon. I get icon file thanks to EnumWindows with this code inside the callback... // Get the window icon HICON hIcon = (HICON)(::SendMessageW(hWnd, WM_GETICON, ICON_SMALL, 0)); if (hIcon == 0) { // Alternative method. Get from the window class hIcon = reinterpret_cast<HICON>(::GetClassLongPtrW(hWnd, GCLP_HICONSM)); } // Alternative: get the first icon

Running C++ executables compiled in Cygwin on Windows

风格不统一 提交于 2021-02-08 06:08:44
问题 The Idea I've compiled a C++ exe using G++ on Cygwin, and I want to be able to get the output of that exe into my HTML via PHP. That is, let's say I have a C++ executable "test.exe" which outputs "Hello, World!" when run. Then logically, I should be able to do <?=exec("./test.exe")?> To send the output of the test.exe file to the file. The Issue I'm testing this on a local WAMP server on Win7. Apparently, exec and system calls on Win7 WAMP go through the Windows command prompt, meaning it's

Running C++ executables compiled in Cygwin on Windows

旧城冷巷雨未停 提交于 2021-02-08 06:05:26
问题 The Idea I've compiled a C++ exe using G++ on Cygwin, and I want to be able to get the output of that exe into my HTML via PHP. That is, let's say I have a C++ executable "test.exe" which outputs "Hello, World!" when run. Then logically, I should be able to do <?=exec("./test.exe")?> To send the output of the test.exe file to the file. The Issue I'm testing this on a local WAMP server on Win7. Apparently, exec and system calls on Win7 WAMP go through the Windows command prompt, meaning it's