Re: Opening existing memory mapped files with pywin32

Tim Roberts <[email protected]>
Newsgroups gmane.comp.python.windows
Message-ID <[email protected]>
On Feb 16, 2021, at 5:49 PM, rhyslloyd1 <[email protected]> wrote:
> 
> Thanks for the quick response! I've made some progress since reading. My goal is to be able to talk to the NVIDIA Share API using Python. I found this <https://github.com/cm-pony/Experienceless/issues/1#issuecomment-763496808> post on GitHub the other day and I wanted to implement it myself. I've obviously bitten off more than I could chew.

I was wrong.  What you have there is the name of a mapping object, not the name of a file.


> Also the "read_line" method doesn't exist apparently. This <https://pastebin.com/JjrA4jEJ> is the output now.

Your snippet is private; we can’t read it.  No, “read_line” isn’t going to work.  This is not a file, it’s just a chunk of memory — a string of bytes.  The implication from your link is that this is a JSON string.  If so, you should be able to read() the whole thing, do .decode(‘utf-8’) and pass the result to a JSON decoder.
— 
Tim Roberts, [email protected]
Providenza & Boekelheide, Inc.

_______________________________________________
python-win32 mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-win32
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.