2008/11/6 Brian Lane <[EMAIL PROTECTED]>:
> But you could also compare it to a known type:
>
> if not type(price) is type(decimal.Decimal(0)):
> print "Not Decimal"
Easier to just compare with decimal.Decimal:
>>> import decimal
>>> d = decimal.Decimal(13)
>>> type(d) == decimal.Decimal
True
--
2008/11/6 Christopher Spears <[EMAIL PROTECTED]>:
> I inserted this code snippet into the Spaceship class:
>
> self.rect = self.image.get_rect()
> print self.rect
> self.rect = self.rect.inflate(-50, -50)
> print self.rect
>
> The following was printed to my console:
> >
> >
>
> I'm assuming that t
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
[EMAIL PROTECTED] wrote:
> hello
> silly question, but i can't seem to figure it it.
>
> I have an object which is:
>
type(price)
>
>
> but i can't figure how to validate against it.
>
if not isinstance(price, decimal.Decimal):
>
On Wed, Nov 5, 2008 at 7:09 PM, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> I have an object which is:
>
type(price)
>
>
> but i can't figure how to validate against it.
>
if not isinstance(price, decimal.Decimal):
> do something...
This should work, what problem are you havi
I'm modifying a game for an assignment in "Game Programming" by Andy Harris.
I'm not reading this book as part of a class.
Basically, I turned one of the example games into an Asteroid rip off.
However, I didn't like the collisions between the spaceship and the asteroids,
so I decided to shri
hello
silly question, but i can't seem to figure it it.
I have an object which is:
>>> type(price)
but i can't figure how to validate against it.
>>>if not isinstance(price, decimal.Decimal):
do something...
how do i ensure that the object 'price' is a decimal?
thanks
On Wed, Nov 5, 2008 at 3:36 PM, <[EMAIL PROTECTED]> wrote:
> Might look at rss2email, it works very well for those of us that like
> to read email instead of yet another website to read rss feeds.
>
> It won't solve your "search for the address of rss feeds on the site"
> but it will give you an i
On Wed, Nov 5, 2008 at 3:26 PM, <[EMAIL PROTECTED]> wrote:
> Hi everyone,
>
> I'm new to programming and am building a very basic rss reader for my first
> major project with python and GUI. As it is, I have it set up so that if I
> input an exact rss feed address (ex http://news.google.com/?outpu
On Wed, Nov 5, 2008 at 3:26 PM, <[EMAIL PROTECTED]> wrote:
> Hi everyone,
>
> I'm new to programming and am building a very basic rss reader for my first
> major project with python and GUI. As it is, I have it set up so that if I
> input an exact rss feed address (ex http://news.google.com/?outpu
Might look at rss2email, it works very well for those of us that like
to read email instead of yet another website to read rss feeds.
It won't solve your "search for the address of rss feeds on the site"
but it will give you an idea about rss parsing.
rss2email - http://rss2email.infogami.com/
Hi everyone,
I'm new to programming and am building a very basic rss reader for my
first major project with python and GUI. As it is, I have it set up so
that if I input an exact rss feed address (ex
http://news.google.com/?output=rss) I can retrieve stories. Id like to
make it so that I can
shawn bright wrote:
Hey all,
I am back again with the serial port stuff, i have verified that all
the baud rate and settings are ok,
had my unit talk directly to a serial port reader and it is looking
good, however, i still am not seeming to be able to read this.
I had a question that might mak
Hey all,
I am back again with the serial port stuff, i have verified that all
the baud rate and settings are ok,
had my unit talk directly to a serial port reader and it is looking
good, however, i still am not seeming to be able to read this.
I had a question that might make me a clue.
if i do t
13 matches
Mail list logo