From e2283c664b674554ceb0b8a50b77c293c5babff0 Mon Sep 17 00:00:00 2001 From: Brian Crowell Date: Tue, 16 Oct 2012 22:07:08 -0500 Subject: [PATCH] py3k: Integer long literals are no longer valid syntax --- PIL/EpsImagePlugin.py | 4 ++-- PIL/GbrImagePlugin.py | 2 +- PIL/MpegImagePlugin.py | 2 +- PIL/OleFileIO.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/PIL/EpsImagePlugin.py b/PIL/EpsImagePlugin.py index 9910f382a..032a51baf 100644 --- a/PIL/EpsImagePlugin.py +++ b/PIL/EpsImagePlugin.py @@ -116,7 +116,7 @@ class PSFile: def _accept(prefix): - return prefix[:4] == "%!PS" or i32(prefix) == 0xC6D3D0C5L + return prefix[:4] == "%!PS" or i32(prefix) == 0xC6D3D0C5 ## # Image plugin for Encapsulated Postscript. This plugin supports only @@ -141,7 +141,7 @@ class EpsImageFile(ImageFile.ImageFile): offset = 0 fp.seek(0, 2) length = fp.tell() - elif i32(s) == 0xC6D3D0C5L: + elif i32(s) == 0xC6D3D0C5: offset = i32(s[4:]) length = i32(s[8:]) fp.seek(offset) diff --git a/PIL/GbrImagePlugin.py b/PIL/GbrImagePlugin.py index 3efcb730c..fb96ac9b4 100644 --- a/PIL/GbrImagePlugin.py +++ b/PIL/GbrImagePlugin.py @@ -16,7 +16,7 @@ from . import Image, ImageFile def i32(c): - return ord(c[3]) + (ord(c[2])<<8) + (ord(c[1])<<16) + (ord(c[0])<<24L) + return ord(c[3]) + (ord(c[2])<<8) + (ord(c[1])<<16) + (ord(c[0])<<24) def _accept(prefix): return i32(prefix) >= 20 and i32(prefix[4:8]) == 1 diff --git a/PIL/MpegImagePlugin.py b/PIL/MpegImagePlugin.py index 310cd2363..39155d9f9 100644 --- a/PIL/MpegImagePlugin.py +++ b/PIL/MpegImagePlugin.py @@ -38,7 +38,7 @@ class BitStream: continue self.bitbuffer = (self.bitbuffer << 8) + c self.bits = self.bits + 8 - return self.bitbuffer >> (self.bits - bits) & (1L << bits) - 1 + return self.bitbuffer >> (self.bits - bits) & (1 << bits) - 1 def skip(self, bits): while self.bits < bits: diff --git a/PIL/OleFileIO.py b/PIL/OleFileIO.py index f8399eac4..c399b0286 100644 --- a/PIL/OleFileIO.py +++ b/PIL/OleFileIO.py @@ -485,7 +485,7 @@ class OleFileIO: value = long(i32(s, offset+4)) + (long(i32(s, offset+8))<<32) # FIXME: this is a 64-bit int: "number of 100ns periods # since Jan 1,1601". Should map this to Python time - value = value / 10000000L # seconds + value = value / 10000000 # seconds elif type == VT_UI1: value = ord(s[offset+4]) elif type == VT_CLSID: