Re: [Tutor] ctypes wintypes

2017-10-06 Thread eryk sun
On Fri, Oct 6, 2017 at 11:05 PM, Michael C wrote: > For this read process memory, if I am trying compose a LPCVOID > lpBaseAddress, am I not making a variable that equals to mbi.BaseAddress, > and then making a pointer pointing to it? > > start_address =

Re: [Tutor] ctypes wintypes

2017-10-06 Thread eryk sun
On Fri, Oct 6, 2017 at 10:26 PM, Michael C wrote: > > base = mbi.BaseAddress > buffer = ctypes.c_int32() > buffer_pointer = ctypes.byref(buffer) > ReadProcessMemory = Kernel32.ReadProcessMemory > > if ReadProcessMemory(Process, base, buffer_pointer, mbi.RegionSize,

Re: [Tutor] ctypes wintypes

2017-10-06 Thread eryk sun
On Fri, Oct 6, 2017 at 10:06 PM, Michael C wrote: > like this? > > buffer = ctypes.byref(ctypes.create_string_buffer(4)) No, the buffer is the array created by create_string_buffer, which you pass byref(). In the following example I create a `test` buffer that

Re: [Tutor] ctypes wintypes

2017-10-06 Thread eryk sun
On Fri, Oct 6, 2017 at 9:12 PM, Michael C wrote: > > How do I create a buffer, or rather, is a buffer just a variable? A buffer is a block of memory for an I/O operation. For example, if you need to read a 4-byte (32-bit) integer at an address in another process,

Re: [Tutor] ctypes wintypes

2017-10-06 Thread Michael C
Hi all: How do I create a buffer, or rather, is a buffer just a variable? How do I create a pointer to it? This code ran fine (thanks to you, Eryk, I now know about how to work VirtualQueryEx work) until when I ran the read process memory part. I think I am not feeding the function properly.

Re: [Tutor] ctypes wintypes

2017-10-06 Thread Michael C
Hi Eryk Sun: I started out with what you gave me: >code starts class SYSTEM_INFO(ctypes.Structure): """https://msdn.microsoft.com/en-us/library/ms724958""; class _U(ctypes.Union): class _S(ctypes.Structure): _fields_ = (('wProcessorArchitecture', WORD),

Re: [Tutor] ctypes wintypes

2017-10-06 Thread Michael C
Sorry but I dont understand this line: mbi = MEMORY_BASIC_INFORMATION() This creates a instance of the class? Also, I thought with VirtualQueryEx, what you need for it is a handle, which I acquire from this Process = Kernel32.OpenProcess(PROCESS_QUERY_INFORMATION|PROCESS_VM_READ, False, PID)

Re: [Tutor] Tkinter's Documentation

2017-10-06 Thread adil gourinda
Thanks, Now it is more clear, So I have to wait for the next version of tkinter if I want someone to listen to me. From: Alan Gauld Sent: Friday, October 6, 2017 1:39:14 PM To: adil gourinda Cc: tutor@python.org Subject: Re: [Tutor]

Re: [Tutor] Tkinter's Documentation

2017-10-06 Thread Alan Gauld via Tutor
On 6 Oct 2017 7:41 pm, adil gourinda wrote: Thanks, Now it is more clear, So I have to wait for the next version of tkinter if I want someone to listen to me. Not at all, as I said, there is an active developers list. They will listen and advise

Re: [Tutor] ctypes wintypes

2017-10-06 Thread eryk sun
On Fri, Oct 6, 2017 at 7:43 PM, Michael C wrote: > Sorry but I dont understand this line: > > mbi = MEMORY_BASIC_INFORMATION() > > This creates a instance of the class? Yes, and this allocates sizeof(MEMORY_BASIC_INFORMATION) bytes at addressof(mbi), which you

Re: [Tutor] ctypes wintypes

2017-10-06 Thread eryk sun
On Fri, Oct 6, 2017 at 7:26 PM, Michael C wrote: > > I started out with what you gave me: > [...] > > I am trying to acquire "lpMinimumApplicationAddress" and > "lpMaximumApplicationAddress" from system_info, so I did this, > >>code > Kernel32 =

Re: [Tutor] Tkinter's Documentation

2017-10-06 Thread adil gourinda
This link exists in "python library reference under the name "Tkinter reference: a GUI for Python", but after sending an email to them (I wanted to participate with some suggestions) I didn't get any response, So I thought that it is like a dead project, for this reason why I asked for an

Re: [Tutor] Tkinter's Documentation

2017-10-06 Thread Alan Gauld via Tutor
Tkinter is very much alive and has an active developers list. However Tkinter is just a wrapper around Tcl/Tk so there is only activity in Tkinter when there is something new in Tk. But both projects are going strong. On 6 Oct 2017 12:45 pm, adil gourinda

Re: [Tutor] script guidelines

2017-10-06 Thread Steven D'Aprano
On Fri, Oct 06, 2017 at 03:37:36PM +0530, renukesh nk wrote: > currently m using pycharm , interpreter = python 3.6 > i am getting th error as below, what might be the reason for this. > > UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 159: > character maps to When you

Re: [Tutor] script guidelines

2017-10-06 Thread Alan Gauld via Tutor
On 06/10/17 11:07, renukesh nk wrote: > currently m using pycharm , interpreter = python 3.6 > i am getting th error as below, what might be the reason for this. > > UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 159: > character maps to It looks like you have a

Re: [Tutor] script guidelines

2017-10-06 Thread renukesh nk
currently m using pycharm , interpreter = python 3.6 i am getting th error as below, what might be the reason for this. UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 159: character maps to On Tue, Oct 3, 2017 at 2:18 PM, renukesh nk wrote: >

Re: [Tutor] Tkinter's Documentation

2017-10-06 Thread Alan Gauld via Tutor
On 05/10/17 17:38, adil gourinda wrote: > Where can i find the reference documentation of "Tkinter" Tkinter is a module, not part of the language, so it is documented in the modules section. But the documentation is not 100% complete and for details you often need to look at the Tk/Tcl

[Tutor] Tkinter's Documentation

2017-10-06 Thread adil gourinda
Where can i find the reference documentation of "Tkinter" and if possible in PDF forme? Because there is no documentation on the widgets in "python library reference". Thanks ___ Tutor maillist - Tutor@python.org To unsubscribe or change