Showing errors in Eclipse but program is runing

1     '''
2     Created on Nov 19, 2013
4     @author: martins
5     '''
6     bif = "background.jpg"
7     mif = "ball.png"
9     import pygame, sys
10    from pygame.locals import *
12    pygame.init()
13    screen = pygame.display.set_mode((800,800),0,32) #izveido logu
15    background = pygame.image.load(bif).convert()#pārveido bildes
16    mouse_c = pygame.image.load(mif).convert_alpha()#pārveido bildes
18    while True:
19        for event in pygame.event.get():
20            if event.type == QUIT:#nodrošina, ka programma pilnīgi aizveras
21              pygame.quit()
22                sys.exit()
24      screen.blit(background,(0,0)) #nokopē backgroundu uz ekrāna(logā)
26      x,y = pygame.mouse.get_pos()# noskaidro peles koardinātas
27      x-=mouse_c.get_width()/2 #ieliek kursoru bildei vid
28      y-=mouse_c.get_height()/2
30      screen.blit(mouse_c,(x,y))#nokpē 
32      pygame.display.update()

I do not know why this is showing, but it is quite annoying because the code is running fine and doing what is supposed to do, i believe there are some trouble with interpreter, but i cannot figure out what it is. Thanks for help!

on line 10: Unused in wild import: Color, Rect, color on line 12: Undefined variable from import: init on line 20: Undefined variable: QUIT on line 21: Undefined variable from import: quit P.s. don't mind the coments they are for myself ;)


Those are warnings, not errors. For example, the first is telling you that although you have used a wild import (e.g. import *) from pygame.locals, you aren't using some of the methods and attributes that would provide. According to the Python style guide (PEP8) you shouldn't use wildcard imports, or import multiple libraries on one line (i.e. import pygame, sys).

Need Your Help

Confusion in Java Generics

java generics

I'm beginner in Java, I'm trying to compile some small program, can somebody explain me, what is my problem, thanks in advance:

getFilesDir() in a subclass to View

java android view getfiles

Can I use the method getFilesDir() in a .class that use extends View?

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.