Commits

illume committed 52f9958

Fixed some SyntaxErrors and 1 NameError with Python 3.
Thanks Arfrever Frehtes Taifersar Arahesis!

  • Participants
  • Parent commits 296a8ae

Comments (0)

Files changed (5)

File lib/_vlcbackend.py

 class Communicator:
     def __init__(self, player, remote, extra, port, hostname):
         self.socket = socket.socket()
-        #print (hostname, port)
         while 1:
             try:
                 self.socket.connect((hostname, port))
             except socket.error:
                 port+=1
         self.commands =  ' '.join([player, remote, extra%(hostname, port)])
-        print self.commands
         self.patterns = {
             'size'  : re.compile("Resolution: \d{1,4}x\d{1,4}"), 
             'width' : re.compile("Resolution: \d{1,4}(?=\d{1,4})"), 
             if("status change: ( stop state: 0 )" in s): 
                 if("nothing to play" in s):
                     self.comm.add(self.filename)
-                    
+                    

File lib/nmovie.py

                 from pygame._vlcbackend import Movie, MovieWatcher
             except ImportError:
                 #you're really hooped now...
-                print "Unable to find a working movie backend. Loading the dummy movie class..."
+                print("Unable to find a working movie backend. Loading the dummy movie class...")
                 from pygame._dummybackend import Movie
         else:
-            print "Unable to find a working movie backend. Loading the dummy movie class..."
+            print("Unable to find a working movie backend. Loading the dummy movie class...")
             from pygame._dummybackend import Movie
     else:
         #POSIX
                 from pygame._vlcbackend import Movie, MovieWatcher
             except ImportError:
                 #oh man, I didn't mean for this to happen so badly...
-                print "Unable to find a working movie backend. Loading the dummy movie class..."
+                print("Unable to find a working movie backend. Loading the dummy movie class...")
                 from pygame._dummybackend import Movie
         else:
-            print "Unable to find a working movie backend. Loading the dummy movie class..."
+            print("Unable to find a working movie backend. Loading the dummy movie class...")
             from pygame._dummybackend import Movie
             

File test/_dummymovietest.py

         pygame.mixer.quit()
         movie_file = trunk_relative_path('examples/data/blue.mpg')
         movie = gmovie.Movie(movie_file)
-        print movie.width
         self.assertEqual(movie.width, 200)
         
         del movie
         pygame.mixer.quit()
         movie_file = trunk_relative_path('examples/data/blue.mpg')
         movie = gmovie.Movie(movie_file)
-        print movie.height
         self.assertEqual(movie.height, 200)
         
         del movie

File test/_vlcmovietest.py

         pygame.mixer.quit()
         movie_file = trunk_relative_path('examples/data/blue.mpg')
         movie = gmovie.Movie(movie_file)
-        print movie.width
         self.assertEqual(movie.width, 200)
         
         del movie
         pygame.mixer.quit()
         movie_file = trunk_relative_path('examples/data/blue.mpg')
         movie = gmovie.Movie(movie_file)
-        print movie.height
         self.assertEqual(movie.height, 200)
         
         del movie

File trackmod/importer.py

 from trackmod import module, namereg
 
 try:
+    from imp import reload
+except ImportError:
+    pass
+
+try:
     collect_data
 except NameError:
     pass
         try:
             try:
                 reload(m)
-            except ImportError, e:
-                return None;
+            except ImportError:
+                return None
         finally:
             del sys.modules[fullname]