On 2021-07-31 20:46, Dennis Lee Bieber wrote:
On Sat, 31 Jul 2021 14:07:05 +0530, 37_VA_VEER CHAKRABORTY
declaimed the following:
pygame.image.load('assets/Flappy Bird.png')
However, when I ran the script it was showing an error message - File not
found
Please advise me on how to upload the sp
On Sat, 31 Jul 2021 14:07:05 +0530, 37_VA_VEER CHAKRABORTY
declaimed the following:
>pygame.image.load('assets/Flappy Bird.png')
>However, when I ran the script it was showing an error message - File not
>found
>Please advise me on how to upload the sprites and where I was going wrong.
F
On 31/07/2021 03.37, 37_VA_VEER CHAKRABORTY wrote:
Hi,
I am a beginner in Python and I have started with the 'Pygame' module. I
was making a 'Flappy Bird' game with the module with the help of Youtube
videos. I was able to create a blank window. I had downloaded the game
assets in my computer in
You need to initialize the font system with this line before you attempt to
load a font:
pygame.font.init()
Irv
> On Mar 13, 2021, at 8:11 AM, MRAB wrote:
>
> On 2021-03-13 15:20, Quentin Bock wrote:
>> Code that contains the problem:
>> score_value = 0
>> font = pygame.font.SysFont('
On 2021-03-13 15:20, Quentin Bock wrote:
Code that contains the problem:
score_value = 0
font = pygame.font.SysFont('freesansbold.ttf', 32)
error:
in font_constructor font = Font(fontpath, size)
pygame.error: font not initialized
Can someone explain why it's saying font not initialized and pro
On 2021-03-12 at 17:27:36 -0500,
Quentin Bock wrote:
> my code is almost identical to this so I hope it's okay that I don't
> include all of my code
> error message:
> font = pygame.font.Font('freesansbold.ttf', 32)
> pygame.error: font not initialized
>
> Tutorial Link: https://www.youtube.com/
On 2021-03-07 03:01, Quentin Bock wrote:
#Space Invaders!
#Title and Icon
pygame.display.set_caption("Space Invaders")
icon = pygame.image.load('space-invaders.png')
pygame.display.set_icon(icon)
#Player
player_Image = pygame.image.load('player.png')
player_X = 370
player_Y = 480
def player():
On Tuesday, May 10, 2016 at 10:51:58 AM UTC+5:30, hariram...@gmail.com wrote:
> On Monday, May 9, 2016 at 11:12:47 PM UTC+5:30, sohca...@gmail.com wrote:
> > On Monday, May 9, 2016 at 3:15:45 AM UTC-7, hariram...@gmail.com wrote:
> > > On Monday, May 9, 2016 at 10:50:47 AM UTC+5:30, hariram...@gmai
On Monday, May 9, 2016 at 11:12:47 PM UTC+5:30, sohca...@gmail.com wrote:
> On Monday, May 9, 2016 at 3:15:45 AM UTC-7, hariram...@gmail.com wrote:
> > On Monday, May 9, 2016 at 10:50:47 AM UTC+5:30, hariram...@gmail.com wrote:
> > > is there anyway (IDE/package) that allows me to create graphics/g
On Monday, May 9, 2016 at 11:12:47 PM UTC+5:30, sohca...@gmail.com wrote:
> On Monday, May 9, 2016 at 3:15:45 AM UTC-7, hariram...@gmail.com wrote:
> > On Monday, May 9, 2016 at 10:50:47 AM UTC+5:30, hariram...@gmail.com wrote:
> > > is there anyway (IDE/package) that allows me to create graphics/g
On Monday, May 9, 2016 at 3:15:45 AM UTC-7, hariram...@gmail.com wrote:
> On Monday, May 9, 2016 at 10:50:47 AM UTC+5:30, hariram...@gmail.com wrote:
> > is there anyway (IDE/package) that allows me to create graphics/game just
> > like that (by instructing..., if i say create hills on the screen,
On Monday, May 9, 2016 at 10:50:47 AM UTC+5:30, hariram...@gmail.com wrote:
> is there anyway (IDE/package) that allows me to create graphics/game just
> like that (by instructing..., if i say create hills on the screen, it should
> generate pygame code)Anyway :) :)
is there any way to c
On Monday, May 9, 2016 at 10:50:47 AM UTC+5:30, hariram...@gmail.com wrote:
> is there anyway (IDE/package) that allows me to create graphics/game just
> like that (by instructing..., if i say create hills on the screen, it should
> generate pygame code)Anyway :) :)
Atleast i tried with
On Tue, Sep 8, 2015 at 8:01 AM, Dave Farrance wrote:
> "ast" wrote:
>
>>DISPLAYSURF = pygame.display.set_mode((400, 300))
>>pygame.display.set_caption('Hello World!')
>>
>>The first line opens a 400x300 pygame window.
>>The second one writes "Hello World" on top of it.
>>
>>I am just wondering ho
"ast" wrote:
>DISPLAYSURF = pygame.display.set_mode((400, 300))
>pygame.display.set_caption('Hello World!')
>
>The first line opens a 400x300 pygame window.
>The second one writes "Hello World" on top of it.
>
>I am just wondering how function set_caption finds the windows
>since the window's nam
On 08/09/2015 11:14, Laura Creighton wrote:
Try the pygame mailing list for that one.
http://www.pygame.org/wiki/info?action=view&id=4890
Laura
Or https://www.reddit.com/r/pygame
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark L
Try the pygame mailing list for that one.
http://www.pygame.org/wiki/info?action=view&id=4890
Laura
--
https://mail.python.org/mailman/listinfo/python-list
On 12/21/2013 08:24 PM, Downright Trows wrote:
I'm trying to pass a vector for the pygame function pygame.transform.rotate The
only issue is that this doesn't work and I'm in grade 10 and haven't done the
trig unit yet :L
Does anyone know a workaround? here is my code if it will help
http://p
On 09/10/2013 08:03, markot...@gmail.com wrote:
From pygame tutorials i copied this example:
import pygame
class spritesheet(object):
def __init__(self, filename):
try:
self.sheet = pygame.image.load(filename).convert()
except pygame.error, message:
On 06/11/2013 08:47 AM, Eam onn wrote:
Is there a PyGame tutorial out there? I've seen TheNewBoston's tuts, but he
didn't finish his. MetalX100 did a VERY good tutorial. I've been having trouble
with some player movement because he isn't moving smoothly, he jumps. If I add
5 pixels to his X po
On Tue, Jun 11, 2013 at 10:57 AM, Eam onn wrote:
> On Tuesday, June 11, 2013 5:31:22 PM UTC+1, Mark Lawrence wrote:
>> Try typing "pygame tutorial" into your favourite search and see what
>> comes back, you might be pleasantly surprised.
>
> Typed it in several times over the past 2 years and noth
On Tue, 11 Jun 2013 09:57:17 -0700, Eam onn wrote:
> On Tuesday, June 11, 2013 5:31:22 PM UTC+1, Mark Lawrence wrote:
>> On 11/06/2013 16:47, Eam onn wrote:
>>
>> > Is there a PyGame tutorial out there? I've seen TheNewBoston's tuts,
>> > but he didn't finish his. MetalX100 did a VERY good tutori
On Tue, Jun 11, 2013 at 10:56 AM, Eam onn wrote:
> Also, is there a specific forum for PyGame or is here fine?
Go to pygame.org and click the link "Help (irc, lists)" in the
navigation menu. I could give you the direct link, but I want to
point out that this stuff is readily available on the pyg
On Tuesday, June 11, 2013 5:00:13 PM UTC+1, Ian wrote:
> On Tue, Jun 11, 2013 at 9:47 AM, Eam onn wrote:
>
> > Is there a PyGame tutorial out there? I've seen TheNewBoston's tuts, but he
> > didn't finish his. MetalX100 did a VERY good tutorial. I've been having
> > trouble with some player mov
On Tuesday, June 11, 2013 5:31:22 PM UTC+1, Mark Lawrence wrote:
> On 11/06/2013 16:47, Eam onn wrote:
>
> > Is there a PyGame tutorial out there? I've seen TheNewBoston's tuts, but he
> > didn't finish his. MetalX100 did a VERY good tutorial. I've been having
> > trouble with some player moveme
On 11/06/2013 16:47, Eam onn wrote:
Is there a PyGame tutorial out there? I've seen TheNewBoston's tuts, but he
didn't finish his. MetalX100 did a VERY good tutorial. I've been having trouble
with some player movement because he isn't moving smoothly, he jumps. If I add
5 pixels to his X posit
On Tue, Jun 11, 2013 at 9:47 AM, Eam onn wrote:
> Is there a PyGame tutorial out there? I've seen TheNewBoston's tuts, but he
> didn't finish his. MetalX100 did a VERY good tutorial. I've been having
> trouble with some player movement because he isn't moving smoothly, he jumps.
> If I add 5 pi
On Monday, March 18, 2013 3:24:57 PM UTC-5, Alex Gardner wrote:
> On Saturday, March 2, 2013 7:56:31 PM UTC-6, Alex Gardner wrote:
>
> > I am in the process of making a pong game in python using the pygame
> > library. My current problem is that when I move the mouse, it turns off as
> > soon a
On Saturday, March 2, 2013 7:56:31 PM UTC-6, Alex Gardner wrote:
> I am in the process of making a pong game in python using the pygame library.
> My current problem is that when I move the mouse, it turns off as soon as
> the mouse stops moving. The way I am doing this is by making the default
On Saturday, March 2, 2013 7:56:31 PM UTC-6, Alex Gardner wrote:
> I am in the process of making a pong game in python using the pygame library.
> My current problem is that when I move the mouse, it turns off as soon as
> the mouse stops moving. The way I am doing this is by making the default
On Thu, Mar 14, 2013 at 4:16 PM, Alex Gardner wrote:
> It's all working now with one exception. I just want to arrange the paddle
> to the right side. I managed to do just that, but it won't move freely
> vertically. I am not fully aware of the arguments of pygame.Rect().
I recommend you rea
On Saturday, March 2, 2013 7:56:31 PM UTC-6, Alex Gardner wrote:
> I am in the process of making a pong game in python using the pygame library.
> My current problem is that when I move the mouse, it turns off as soon as
> the mouse stops moving. The way I am doing this is by making the default
On Tue, Mar 12, 2013 at 5:33 PM, Alex Gardner wrote:
> Sorry but im back to square one. My paddle isn't showing up at all!
> http://pastebin.com/PB5L8Th0
paddle_rect.center = pygame.mouse.get_pos()
This updates the paddle position.
screen.blit(beeper, paddle_rect)
This draws the padd
On Saturday, March 2, 2013 7:56:31 PM UTC-6, Alex Gardner wrote:
> I am in the process of making a pong game in python using the pygame library.
> My current problem is that when I move the mouse, it turns off as soon as
> the mouse stops moving. The way I am doing this is by making the default
On Mon, Mar 11, 2013 at 2:43 PM, Alex Gardner wrote:
> I tried to append what you told me to. Now it appears that I have a syntax
> error! I checked my indentations and they look fine to me, but I get this
> error:
>
> paddle_pos = pygame.mouse.get_pos()
>
On 11/03/2013 20:43, Alex Gardner wrote:
On Saturday, March 2, 2013 7:56:31 PM UTC-6, Alex Gardner wrote:
I am in the process of making a pong game in python using the pygame library.
My current problem is that when I move the mouse, it turns off as soon as the
mouse stops moving. The way I
On Saturday, March 2, 2013 7:56:31 PM UTC-6, Alex Gardner wrote:
> I am in the process of making a pong game in python using the pygame library.
> My current problem is that when I move the mouse, it turns off as soon as
> the mouse stops moving. The way I am doing this is by making the default
On Mon, Mar 11, 2013 at 11:33 AM, Alex Gardner wrote:
> My bad! http://pastebin.com/yuvpT7bH
You're still drawing the blank paddle in two different places. One of
those places is immediately after you draw the paddle, which undoes
the work you just did in drawing it. That's why you're not seei
On Saturday, March 2, 2013 7:56:31 PM UTC-6, Alex Gardner wrote:
> I am in the process of making a pong game in python using the pygame library.
> My current problem is that when I move the mouse, it turns off as soon as
> the mouse stops moving. The way I am doing this is by making the default
On Mon, Mar 11, 2013 at 11:00 AM, Alex Gardner wrote:
> I added the blank paddle and now the green one is just gone. I feel like
> such a newbie ><
>
>
> screen.blit(bpaddle, paddle_rect)
We're not psychic, so you'll need to post the current code if you want
any suggestions on how to fix it.
On Monday, March 11, 2013 12:00:37 PM UTC-5, Alex Gardner wrote:
> On Monday, March 11, 2013 11:57:49 AM UTC-5, Alex Gardner wrote:
>
> > On Saturday, March 2, 2013 7:56:31 PM UTC-6, Alex Gardner wrote:
>
> >
>
> > > I am in the process of making a pong game in python using the pygame
> > > li
On Monday, March 11, 2013 11:57:49 AM UTC-5, Alex Gardner wrote:
> On Saturday, March 2, 2013 7:56:31 PM UTC-6, Alex Gardner wrote:
>
> > I am in the process of making a pong game in python using the pygame
> > library. My current problem is that when I move the mouse, it turns off as
> > soon
On Saturday, March 2, 2013 7:56:31 PM UTC-6, Alex Gardner wrote:
> I am in the process of making a pong game in python using the pygame library.
> My current problem is that when I move the mouse, it turns off as soon as
> the mouse stops moving. The way I am doing this is by making the default
On Sun, Mar 10, 2013 at 4:25 PM, Alex Gardner wrote:
> Now the cursor isn't moving at all!
>
> while True:
> for event in pygame.event.get():
> if event.type == QUIT:
> sys.exit()
>
> screen.blit(bpaddle, paddle_rect)
> # Draw the net
On Saturday, March 2, 2013 7:56:31 PM UTC-6, Alex Gardner wrote:
> I am in the process of making a pong game in python using the pygame library.
> My current problem is that when I move the mouse, it turns off as soon as
> the mouse stops moving. The way I am doing this is by making the default
On Sat, Mar 9, 2013 at 5:25 PM, Alex Gardner wrote:
> On Saturday, March 2, 2013 7:56:31 PM UTC-6, Alex Gardner wrote:
>> I am in the process of making a pong game in python using the pygame
>> library. My current problem is that when I move the mouse, it turns off as
>> soon as the mouse stops
On Saturday, March 2, 2013 7:56:31 PM UTC-6, Alex Gardner wrote:
> I am in the process of making a pong game in python using the pygame library.
> My current problem is that when I move the mouse, it turns off as soon as
> the mouse stops moving. The way I am doing this is by making the default
On Saturday, March 2, 2013 7:56:31 PM UTC-6, Alex Gardner wrote:
> I am in the process of making a pong game in python using the pygame library.
> My current problem is that when I move the mouse, it turns off as soon as
> the mouse stops moving. The way I am doing this is by making the default
On Sun, Mar 3, 2013 at 3:09 PM, Alex Gardner wrote:
> if (0,0) <= paddle_pos <= (300,300):
This doesn't do what you think it does. Tuples are compared
lexicographically, not element-wise. So (250, 350) < (300, 300), but
(350, 250) > (300, 300).
> paddle_pos = pygame.mouse.get_pos(
On Saturday, March 2, 2013 7:56:31 PM UTC-6, Alex Gardner wrote:
> I am in the process of making a pong game in python using the pygame library.
> My current problem is that when I move the mouse, it turns off as soon as
> the mouse stops moving. The way I am doing this is by making the default
On Saturday, March 2, 2013 7:56:31 PM UTC-6, Alex Gardner wrote:
> I am in the process of making a pong game in python using the pygame library.
> My current problem is that when I move the mouse, it turns off as soon as
> the mouse stops moving. The way I am doing this is by making the default
On Saturday, March 2, 2013 9:08:18 PM UTC-6, Ian wrote:
> On Sat, Mar 2, 2013 at 6:56 PM, Alex Gardner wrote:
>
> > I am in the process of making a pong game in python using the pygame
> > library. My current problem is that when I move the mouse, it turns off as
> > soon as the mouse stops mo
On Sat, Mar 2, 2013 at 6:56 PM, Alex Gardner wrote:
> I am in the process of making a pong game in python using the pygame library.
> My current problem is that when I move the mouse, it turns off as soon as
> the mouse stops moving. The way I am doing this is by making the default
> cursor i
On 01/06/2013 12:37 PM, alex23 wrote:
On Jan 6, 5:49 am, someone wrote:
I thought that python also used "true" pass-by-reference, although I
haven't figured out exactly when I have this problem. I can just see
that sometimes I get this problem and then I need to copy the variable,
if I don't wa
On Jan 6, 5:49 am, someone wrote:
> I thought that python also used "true" pass-by-reference, although I
> haven't figured out exactly when I have this problem. I can just see
> that sometimes I get this problem and then I need to copy the variable,
> if I don't want the original data of the varia
On 01/05/2013 02:27 PM, Chris Angelico wrote:
On Sun, Jan 6, 2013 at 12:06 AM, someone wrote:
In any case I think we understand each other.
That's one of the links I just posted :) It's not just a naming
difference, though. With Pascal's pass-by-reference semantics, this
code would act diff
On Sun, Jan 6, 2013 at 12:06 AM, someone wrote:
> On 01/05/2013 12:47 PM, Chris Angelico wrote:
>> You can find good references on the subject in various
>> places, but call-by-reference as implemented in Pascal simply doesn't
>> exist in most modern languages, because its semantics are way
>> con
On 01/05/2013 01:49 PM, Jan Riechers wrote:
On 05.01.2013 03:11, someone wrote:
But about the regular expressions (a bit deeper look into that):
Like said of Chris:
[a-z]
defines a "catching group", in this case all ascii lowercase letters
ranging from "a" to "z". If noting else is provided, the
On 01/05/2013 12:47 PM, Chris Angelico wrote:
C has typed variables, so it's a compile-time error to try to put any
other type into that variable. Python doesn't. That flexibility comes
at the cost of error-catching. There are hybrid systems, but in
general, type declarations imply variable decla
On 05.01.2013 03:11, someone wrote:
On 01/03/2013 12:27 PM, Chris Angelico wrote:
On Thu, Jan 3, 2013 at 10:19 PM, someone wrote:
Doesn't this "[ ... ]" mean something optional?
What does {2,30}$ mean?
I think $ means that the {2,30} is something in the end of the
sentence...
You can find
On Sat, Jan 5, 2013 at 9:49 PM, someone wrote:
> Ok, I think you're right. At least I find that C-compilers catches many
> errors/warnings which python don't say anything about. But also C require me
> to define/declarer the types of variables before I use them... OTOH I guess
> I like that python
On 01/05/2013 05:49 AM, someone wrote:
> On 01/05/2013 02:30 AM, Dave Angel wrote:
>
>>
>> Function objects are enormously useful, as you get more adept at using
>> Python.
>
> Ok, I'll look forward to that. Recently I had some problems with
> pass-by-value vs pass-by-reference. I googled the prob
On 01/05/2013 02:30 AM, Dave Angel wrote:
from opengl import gl, glu, glut
gl.rotate(...)
gl.clear(gl.COLOR_BUFFER_BIT)
Erhm, that's the same as above. Is that what you meant to write?
No, it's not the same; here he did not capitalize the function names.
Previously they look like class ins
On 01/04/2013 08:10 PM, someone wrote:
> On 01/03/2013 03:09 PM, Mike C. Fletcher wrote:
>>
>
>> PyOpenGL's current approach is mostly attempting to maintain backward
>> compatibility with the older revisions. wxPython actually rewrote its
>> whole interface to go from * imports into namespaced l
On 01/03/2013 03:56 AM, Dave Angel wrote:
The first lint program I recall hearing of was available in the early
1980's, and was for the C language. At the time, the C language was
extremely flexible (in other words, lots of ways to shoot yourself in
the foot) and the compiler was mostly of the p
On 01/03/2013 12:39 PM, Peter Otten wrote:
someone wrote:
On 01/03/2013 10:00 AM, Peter Otten wrote:
Terry Reedy wrote:
[a-z_][a-z0-9_]{2,30}$) - so I suppose it wants this name to end with
[an
underscore ?
No, it allows underscores. As I read that re, 'rx', etc, do match. They
No, it's
On 01/03/2013 12:27 PM, Chris Angelico wrote:
On Thu, Jan 3, 2013 at 10:19 PM, someone wrote:
Doesn't this "[ ... ]" mean something optional?
What does {2,30}$ mean?
I think $ means that the {2,30} is something in the end of the sentence...
You can find regular expression primers all over t
On 01/03/2013 03:09 PM, Mike C. Fletcher wrote:
On 13-01-02 08:53 PM, someone wrote:
So this solution is not something I like too... But I can see some
other
people came up with good solutions, which I didn't knew about..
Why is this solution not to your liking? Python has namespaces for a
On 01/03/2013 05:52 PM, Terry Reedy wrote:
That seems like a improper error message from the tool. "Invalid name"
does *not* properly describe that situation. The name is *not*
"Invalid" in any sense of the word, and a "checker" that tells you it is
is creating needless false-positives. An er
On 1/3/2013 9:19 AM, Mike C. Fletcher wrote:
On 13-01-02 09:48 PM, Terry Reedy wrote:
...
2) self.lightDone: Invalid name "lightDone" (should match
[a-z_][a-z0-9_]{2,30}$)
So I can now understand that pylint doesn't like my naming convention
with a capital letter in the middle of the variable
On 13-01-02 09:48 PM, Terry Reedy wrote:
...
2) self.lightDone: Invalid name "lightDone" (should match
[a-z_][a-z0-9_]{2,30}$)
So I can now understand that pylint doesn't like my naming convention
with a capital letter in the middle of the variable name, like:
"lightDone" = a boolean value. I s
On 13-01-02 08:53 PM, someone wrote:
On 01/02/2013 10:57 PM, Michael Torrie wrote:
On 01/01/2013 04:49 PM, someone wrote:
On 01/01/2013 12:13 PM, Chris Angelico wrote:
> You could simply
>
> import OpenGL.GL as GL
You're right - but I forgot to write that even though this maybe
should/is
someone wrote:
> On 01/03/2013 10:00 AM, Peter Otten wrote:
>> Terry Reedy wrote:
>>
[a-z_][a-z0-9_]{2,30}$) - so I suppose it wants this name to end with
[an
underscore ?
>>>
>>> No, it allows underscores. As I read that re, 'rx', etc, do match. They
>>
>> No, it's one leading lett
On Thu, Jan 3, 2013 at 10:19 PM, someone wrote:
> Doesn't this "[ ... ]" mean something optional?
>
> What does {2,30}$ mean?
>
> I think $ means that the {2,30} is something in the end of the sentence...
You can find regular expression primers all over the internet, but to
answer these specific
On 01/03/2013 10:00 AM, Peter Otten wrote:
Terry Reedy wrote:
[a-z_][a-z0-9_]{2,30}$) - so I suppose it wants this name to end with an
underscore ?
No, it allows underscores. As I read that re, 'rx', etc, do match. They
No, it's one leading letter or underscore [a-z_] plus at least two lett
On 01/03/2013 03:55 AM, Ian Kelly wrote:
On Wed, Jan 2, 2013 at 7:24 PM, someone wrote:
3) self.rx / rself.ry / self.rz: Invalid name "rx" (should match
[a-z_][a-z0-9_]{2,30}$) - so I suppose it wants this name to end with an
underscore ?
It wants the name to be at least 3 characters long.
Terry Reedy wrote:
>> [a-z_][a-z0-9_]{2,30}$) - so I suppose it wants this name to end with an
>> underscore ?
>
> No, it allows underscores. As I read that re, 'rx', etc, do match. They
No, it's one leading letter or underscore [a-z_] plus at least two letters,
underscores or digits [a-z0-9_]{
On Wed, Jan 2, 2013 at 10:01 PM, Ben Finney wrote:
> Ian Kelly writes:
>
>> On Wed, Jan 2, 2013 at 7:24 PM, someone wrote:
>> > 1) class somethingWork: Invalid name "somethingWork" (should match
>> > [A-Z_][a-zA-Z0-9]+$), I'm not that good at regular exps, but I
>> > suppose it wants my class na
Ian Kelly writes:
> On Wed, Jan 2, 2013 at 7:24 PM, someone wrote:
> > 1) class somethingWork: Invalid name "somethingWork" (should match
> > [A-Z_][a-zA-Z0-9]+$), I'm not that good at regular exps, but I
> > suppose it wants my class name to start with a capital letter ?
>
> Yes, PEP-8 recommen
On 01/02/2013 09:31 PM, someone wrote:
> On 01/02/2013 08:31 PM, Ian Kelly wrote:
>> On Wed, Jan 2, 2013 at 10:57 AM, Chris Angelico
>> wrote:
>>> Yeah, same applies to most linters I think. You end up disagreeing
>>> with the author on half the points. Oh well. Doesn't make the tool
>>> useless,
On Wed, Jan 2, 2013 at 7:24 PM, someone wrote:
> 1) class somethingWork: Invalid name "somethingWork" (should match
> [A-Z_][a-zA-Z0-9]+$), I'm not that good at regular exps, but I suppose it
> wants my class name to start with a capital letter ?
Yes, PEP-8 recommends CamelCase for class names.
On 1/2/2013 9:24 PM, someone wrote:
What pylint says is:
1) class somethingWork: Invalid name "somethingWork" (should match
[A-Z_][a-zA-Z0-9]+$), I'm not that good at regular exps, but I suppose
it wants my class name to start with a capital letter ?
Yes
2) self.lightDone: Invalid name "lig
On 01/02/2013 08:31 PM, Ian Kelly wrote:
On Wed, Jan 2, 2013 at 10:57 AM, Chris Angelico wrote:
Yeah, same applies to most linters I think. You end up disagreeing
with the author on half the points. Oh well. Doesn't make the tool
useless, just means you need to fiddle with it to get it how you
On 01/03/2013 12:52 AM, Steven D'Aprano wrote:
On Wed, 02 Jan 2013 09:26:32 -0500, Dave Angel wrote:
Global const values should be ALL_CAPS, so it's obvious that nobody
intends to modify them.
Like math.pi I suppose? *wink*
:-)
It's the non-const global attributes that expect to be under
On 01/02/2013 03:26 PM, Dave Angel wrote:
On 01/02/2013 09:09 AM, someone wrote:
On 01/02/2013 01:07 PM, Peter Otten wrote:
OMG... I don't want to type those underscores everywhere... Anyway,
thank you very much for explaining the meaning of what it wants...
Global const values should be AL
On 01/02/2013 11:30 PM, Andrew Berg wrote:
On 2013.01.02 15:57, Michael Torrie wrote:
*. The only place where I've seen an import * that actually belonged
was in an __init__.py that brought sub-module symbols into the main
package namespace, and even then I figure there's got to be a better w
On 01/02/2013 10:57 PM, Michael Torrie wrote:
On 01/01/2013 04:49 PM, someone wrote:
On 01/01/2013 12:13 PM, Chris Angelico wrote:
> You could simply
>
> import OpenGL.GL as GL
You're right - but I forgot to write that even though this maybe
should/is recommended many places then I've seen
On Wed, Jan 2, 2013 at 4:52 PM, Steven D'Aprano
wrote:
> If pylint says that global variables should be named like "__variable__",
> that is explicitly going against PEP 8.
It doesn't say that anywhere. It includes dunder names in the regex
so that you don't get spurious warnings from pylint abo
On Wed, 02 Jan 2013 09:26:32 -0500, Dave Angel wrote:
> On 01/02/2013 09:09 AM, someone wrote:
>> On 01/02/2013 01:07 PM, Peter Otten wrote:
>>> pylint wants global names to be uppercase (what PEP 8 recommends for
>>> constants) or "special" (two leading and two trailing underscores):
>>>
>>> THA
On 2013.01.02 15:57, Michael Torrie wrote:
> Why is this solution not to your liking? Python has namespaces for a
> reason. They both keep code separated and modular. Use them. At most
> you should import the most commonly-used symbols only, and refer to the
> rest through their respective name
On 01/01/2013 04:49 PM, someone wrote:
> On 01/01/2013 12:13 PM, Chris Angelico wrote:
> > You could simply
> >
> > import OpenGL.GL as GL
> You're right - but I forgot to write that even though this maybe
> should/is recommended many places then I've seen a lot of opengl code on
> the interne
On Wed, Jan 2, 2013 at 10:57 AM, Chris Angelico wrote:
> Yeah, same applies to most linters I think. You end up disagreeing
> with the author on half the points. Oh well. Doesn't make the tool
> useless, just means you need to fiddle with it to get it how you want
> it.
It's a lot less work to di
On Thu, Jan 3, 2013 at 4:52 AM, Ian Kelly wrote:
> On Wed, Jan 2, 2013 at 7:32 AM, Chris Angelico wrote:
>> Okay, I have to ask... why? Does it have an exception for names of classes?
>
> Yes, and for module-level functions.
Oh, okay. So the check's a lot more specific than the message implies
-
On Wed, Jan 2, 2013 at 7:32 AM, Chris Angelico wrote:
> Okay, I have to ask... why? Does it have an exception for names of classes?
Yes, and for module-level functions.
> I don't like linters that enforce too much style. Catch things that
> might be mis-coded (like C's classic "if (x = 1)"), but
On Wed, Jan 2, 2013 at 11:07 PM, Peter Otten <__pete...@web.de> wrote:
> someone wrote:
>> Another thing is that I don't understand this warning:
>>
>> Invalid name "original_format" (should match (([A-Z_][A-Z0-9_]*)|
>> > (__.*__))$)
>>
>> I get it everywhere... I don't understand how it wants me
On 01/02/2013 09:09 AM, someone wrote:
> On 01/02/2013 01:07 PM, Peter Otten wrote:
>> someone wrote:
>>
>>> On 01/01/2013 01:56 PM, Peter Otten wrote:
>>
from module import * # pylint: disable=W0622
>>>
>>> Oh, I just learned something new now... How come I cannot type
>>> "#pylint:
>>> enabl
On 01/02/2013 01:07 PM, Peter Otten wrote:
someone wrote:
On 01/01/2013 01:56 PM, Peter Otten wrote:
from module import * # pylint: disable=W0622
Oh, I just learned something new now... How come I cannot type "#pylint:
enable=W0622" in the line just below the import ?
With what intended
On 01/02/2013 08:39 AM, Steven D'Aprano wrote:
On Wed, 02 Jan 2013 00:49:36 +0100, someone wrote:
What does this mean? Why does it say 'format" cannot be deleted after I
did the wildcard import ?
It means that there is no "format" in the current scope, which implies
that pygame no longer has
On 01/02/2013 10:52 AM, alex23 wrote:
On Jan 2, 1:01 pm, Nobody wrote:
You can't delete built-in names.
Actually, you can. If you ever need to shoot yourself in the foot in
this particular way, you can always do:
del __builtins__.format
Not saying you _should_, just that you _can_ :)
someone wrote:
> On 01/01/2013 01:56 PM, Peter Otten wrote:
>> from module import * # pylint: disable=W0622
>
> Oh, I just learned something new now... How come I cannot type "#pylint:
> enable=W0622" in the line just below the import ?
With what intended effect?
> Another thing is that I don'
1 - 100 of 254 matches
Mail list logo