srounet / Pymem

A python library for windows, providing the needed functions to start working on your own with memory editing.
MIT License
303 stars 45 forks source link

allow initing Pymem objects with process id #94

Closed StarrFox closed 1 year ago

StarrFox commented 1 year ago

This pull request allows you to pass a process id to Pymem as in:

process = pymem.Pymem(123)

this is a lot more concise than the previous method of doing:

process = pymem.Pymem()
process.open_process_from_id(123)
process.check_wow64()

I kept the argument name as process_name in case someone was using it as a keyword arg like in:

pymem.Pymem(process_name="process.exe")
StarrFox commented 1 year ago

issues fixed and version bumped

StarrFox commented 1 year ago

it would seem that none check is actually still needed because the default is None

srounet commented 1 year ago

it would seem that none check is actually still needed because the default is None

👍

srounet commented 1 year ago

@StarrFox you Can merge. I ll keep an eye on ci and see if it releases on pypi