-
Notifications
You must be signed in to change notification settings - Fork 500
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
in windows,how to use? search anywhere,nothing. #122
Comments
It's just a python script. You can run with |
I face a similar issue.Running However |
Easiest is to install cygwin and use its terminal. |
I solved this issue by using a different version of python. However the windows terminal renders this without colored text and line wrapping.Is there anyway to overcome that? |
Same here, how to setup colored text output for Windows without cygwin? |
Windows 10 solves this with Bash.And i think even the default terminal application supports colors now .You could also try other terminal apps for windows. But the default one will not support colours |
@droidekas Which version of python did you try? I tried with 2.7 and 3.2, it doesn't work. |
@castrojr913 ,I used 3.4.4 |
i run python pidcat.py in windows but it doesn't work |
For some reason, if I write in cmd
But if I write |
As @jsbeckr suggested, only |
Using cmder |
i tried cmder/cygwin/powershell |
I dug into the script and found two changes that made it work for me. I'm using python 3.6 To get the script to recognize package change this line: catchall_package = filter(lambda package: package.find(":") == -1, package) to catchall_package = list(filter(lambda package: package.find(":") == -1, package)) because of this: https://stackoverflow.com/questions/21715268/list-returned-by-map-function-disappears-after-one-use To get the formatting to look right in my command prompt I took out the encode command on the last line: print(linebuf) |
i run python pidcat.py com.oprah.bees.android in windows but it doesn't work |
I'm using in cygwin, but I needed to revert this change: 6b6034a From: print(linebuf.encode('utf-8')) To: print(linebuf) It'll print colorized string instead of printing the bytes: P.S.: I'm using python 3.6.4 |
Before start trying with "Bash On Ubuntu On Windows", please check if it was added support to USB devices: https://askubuntu.com/a/826642 |
I added this to the script to enable native VT100 support on Windows 10: from ctypes import *
def enableVT100():
STD_OUTPUT_HANDLE = -11
ENABLE_VIRTUAL_TERMINAL_PROCESSING = 4
stdout = windll.kernel32.GetStdHandle(STD_OUTPUT_HANDLE)
if stdout == -1:
raise WinError()
mode = c_uint()
if windll.kernel32.GetConsoleMode(stdout, byref(mode)) == 0:
raise WinError()
mode.value = mode.value | ENABLE_VIRTUAL_TERMINAL_PROCESSING
if windll.kernel32.SetConsoleMode(stdout, mode) == 0:
raise WinError()
enableVT100() Tested on Window 10 v1709, worked like a charm. No Bash or Cygwin required. |
I forked this repo and included the above VT100 enabling code: https://github.com/Torvin/pidcat-win10 @JakeWharton will a pull request with my changes be accepted? |
@Torvin your fork works great but I am not able to use the package filtering. if I run python.exe .\pidcat.py in both Powershell and git bash I can see all the logs with colors and format but all the logcat output. If i want to see my package only i cannot see any log at all for example: python.exe .\pidcat.py com.my.package Do you know if something has changed with latest android 10 release? Thanks in advance! |
I just wanted to say that the above-mentioned change made the script (downloaded just now) work for me on Windows 10, Python 3.7.6 in a plain (
|
No description provided.
The text was updated successfully, but these errors were encountered: