Sohail Ahmad writes:
> kindly please help me about issues
> SyntaxError: multiple statements found while compiling a single statement
> how to solve this issues
Please post the code that got the error. Preferably several lines
before the actual error, and the line with the err
ser did something
> if event.type == pygame.QUIT: # If user clicked close
> done = True # Flag that we are done so we exit this loop
>
> SyntaxError: multiple statements found while compiling a single statement
>
> Thanks ...
--
https://mail.python.org/mailman/listinfo/python-list
On Sunday, October 9, 2016 at 12:12:06 PM UTC+5:30, Steve D'Aprano wrote:
> On Sun, 9 Oct 2016 02:51 pm, Cai Gengyang wrote:
>
> > I defined both done and pygame in this piece of code, but now i get a new
> > error that i have never seen before, an AttributeError
>
> AttributeError usually means
On Sun, 9 Oct 2016 02:51 pm, Cai Gengyang wrote:
> I defined both done and pygame in this piece of code, but now i get a new
> error that i have never seen before, an AttributeError
AttributeError usually means you have the wrong kind of object:
py> mylist = {} # oops, a dict not a list
py> myl
On 10/8/2016 11:51 PM, Cai Gengyang wrote:
pygame = True
while not done:
for event in pygame.event.get():
Traceback (most recent call last):
File "", line 2, in
for event in pygame.event.get():
AttributeError: 'bool' object has no attribute 'event'
pygame == True and True ha
I defined both done and pygame in this piece of code, but now i get a new error
that i have never seen before, an AttributeError
>>> rect_x = 50
>>> rect_y = 50
>>> done = False
>>> pygame = True
>>> while not done:
for event in pygame.event.get():
if event.type == pygame.QUI
On Sun, 9 Oct 2016 01:51 pm, Cai Gengyang wrote:
> This is my latest result : I copy and pasted one line at a time into the
> IDLE and used ONLY the "enter-return" button to move on to the next line
> and this time I didnt get an indentation error but instead a traceback
> error:
> Traceback (mos
This is my latest result : I copy and pasted one line at a time into the IDLE
and used ONLY the "enter-return" button to move on to the next line and this
time I didnt get an indentation error but instead a traceback error
>>> rect_x = 50
>>> rect_y = 50
>>> while not done:
for event in
Cai Gengyang wrote:
Somehow it still doesnt work --- it keeps giving the syntaxerror,
inconsistent use of tabs and indentation message EVEN though i use only the
enter and space buttons and never touched the tab button a single time.
There was another thread about this a short time ago.
It turn
55, 255)
SyntaxError: multiple statements found while compiling a single statement
Here you pasted multiple *statements* (on separate lines). This is a
known difference between console and IDLE Shell. It is partly related
to being line versus statement oriented, partly due to window past
On Saturday, October 8, 2016 at 12:07:47 PM UTC+1, Rustom Mody wrote:
> On Saturday, October 8, 2016 at 1:21:50 PM UTC+5:30, Cai Gengyang wrote:
> > This is the result when I copy and paste it one line at a time :
> >
> > >>> rect_x = 50
> > >>> rect_y = 50
> > >>> while not done:
Somehow it still doesnt work --- it keeps giving the syntaxerror, inconsistent
use of tabs and indentation message EVEN though i use only the enter and space
buttons and never touched the tab button a single time. Im pretty sure there is
something wrong with the program itself. Gonna download py
On Saturday, October 8, 2016 at 1:21:50 PM UTC+5:30, Cai Gengyang wrote:
> This is the result when I copy and paste it one line at a time :
>
> >>> rect_x = 50
> >>> rect_y = 50
> >>> while not done:
> >>>
> for event in ...
Th
t; I don't normally use IDLE, and you shouldn't assume that everyone does.
> *That* is the extra information we need to solve the problem:
>
> The IDLE interactive interpreter in Python 3 does not seem to allow you to
> paste multiple lines at once. If you do, it highlights
Define some colors
BLACK = (0, 0, 0)
WHITE = (255, 255, 255)
GREEN = (0, 255, 0)
RED = (255, 0, 0)
SyntaxError: multiple statements found while compiling a single statement
>>>
I can't show the colour highlighting, but the line BLACK = ... is
highlighted in red.
You can ei
> The only way I can reproduce the error message you give is by using the
> compile() function:
>
> py> compile("a=1\nb=2", "", "single")
> Traceback (most recent call last):
> File "", line 1, in
> File "", line 1
> a
re code that you haven't
shown us, and that the error is there.
The only way I can reproduce the error message you give is by using the
compile() function:
py> compile("a=1\nb=2", "", "single")
Traceback (most recent call last):
File "", line 1, i
at we are done so we exit this loop
SyntaxError: multiple statements found while compiling a single statement
Thanks ...
--
https://mail.python.org/mailman/listinfo/python-list
18 matches
Mail list logo