d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Python And Pathing To Process
Prev12
Add Reply New Topic New Poll
Member
Posts: 10,812
Joined: Oct 15 2009
Gold: Locked
Warn: 20%
Jul 23 2016 04:24pm
It has been a long time since I 'Pythoned' on windows, but I believe you can just use / instead of \ and avoid the problem of escapes. So if your local file is C:\windowssucks\text.txt then python should be able to access as C:/windowssucks/text.txt

Quote (AbDuCt @ Jul 23 2016 11:42am)
Or just stop using retarded directory names.
Or this
Member
Posts: 10,812
Joined: Oct 15 2009
Gold: Locked
Warn: 20%
Jul 23 2016 04:36pm
Might want to consider using the os.path.join to deal with these headaches
https://docs.python.org/2/library/os.path.html
Member
Posts: 3,939
Joined: Feb 1 2013
Gold: 2,749.09
Warn: 20%
Jul 23 2016 04:40pm
retarded directory names exist in the wild, might as well learn to cope with them


Quote (Azrad @ Jul 23 2016 03:24pm)
It has been a long time since I 'Pythoned' on windows, but I believe you can just use / instead of \ and avoid the problem of escapes. So if your local file is C:\windowssucks\text.txt then python should be able to access as C:/windowssucks/text.txt


this does work


Quote (CyberGod @ Jul 23 2016 02:33pm)
oo i did this at like 3am last night, just googling code, very new to python x.x

so test.exe will already be running, and it will be sending a json strinify obj to it with copydata.


have test.exe create a hidden window. the wndproc for that window will handle the WM_COPYDATA message

find the window from python using FindWindow

ditch the get_hwnds_for_pid() stuff


there are a lot of ways to skin this cat btw
Member
Posts: 1,739
Joined: Jun 18 2016
Gold: 575.00
Jul 30 2016 12:16am
i see what you are doing here cybergod.

veeeeeery sneaky... i like it. =D lol.

GL!
Member
Posts: 791
Joined: Mar 16 2016
Gold: Locked
Trader: Scammer
Aug 1 2016 03:35pm
Quote (fiwillis1985 @ Jul 30 2016 02:16am)
i see what you are doing here cybergod.

veeeeeery sneaky... i like it. =D lol.

GL!


What is he/she trying to do?
Go Back To Programming & Development Topic List
Prev12
Add Reply New Topic New Poll