Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jul 22, 2023. It is now read-only.
/pythonnetPublic archive
forked frompythonnet/pythonnet

Commitbc414e1

Browse files
committed
Merge pull requestpythonnet#199 from tonyroberts/develop
Use stream position instead of counting read bytes.
2 parentse85a255 +88b3d27 commitbc414e1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

‎demo/wordpad.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,11 +316,10 @@ def OpenDocument(self):
316316

317317
buff=System.Array.CreateInstance(System.Byte,1024)
318318
data= []
319-
read=-1
320319

321-
while(read!=0):
320+
whilestream.Position<stream.Length:
322321
buff.Initialize()
323-
read=stream.Read(buff,0,1024)
322+
stream.Read(buff,0,1024)
324323
temp=Encoding.ASCII.GetString(buff,0,1024)
325324
data.append(temp)
326325

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp