Hi Rafael,
Do you need to use Python 3.x? If you can use Python 2.6, the Python Imaging
Library is a great image manipulation module.
http://www.pythonware.com/products/pil/
Regards,
Liam Clarke
2011/2/21 Rafael Durán Castañeda
> Hi all,
>
> I'm using Python 3.1 and I have an image of an anim
Your signature is obscenely large David.
> But, the tutorials I have encountered all mentioned that it is supposed to
be a good idea to put one's GUI stuff in a class, then create an instance of
the class (which I don't entirely understand, since I thought the whole
"class" thing was for stuff tha
Hi,
time.sleep() takes an argument as seconds.
Regards,
Liam Clarke
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of bob
Sent: Wednesday, 7 December 2005 3:59 p.m.
To: Joseph Quigley; tutor@python.org
Subject: Re: [Tutor] Timer
At 06:57 AM 12/6/2005
ss is that the spam agent is checking that from_addr, and getting
an invalid email address and spitting the dummy.
Most ISPs won't allow an invalid from_addr, although mine does..
Regards,
Liam Clarke-Hutchinson
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On B
Hi Dave,
IIRC The first argument to sendmail() is the name of the account that's
sending... So when you include your subject there, it seems your ISP is
somewhat forgiving.
Liam Clarke-Hutchinson| Contact Centre Advisor| Ministry of Economic
Development
DDI +64 3 962 2639 | Fax +64 3 962
Title: Message
IDLE
uses localhost (a loopback port 127.0.0.1) to communicate with running scripts
(so interrupt keys and debugging calls get passed etc.) It's a nice cross
platform method of interprocess communication.
So
yeah, 127.0.0.1 is the one.
Regards,
Liam
Clarke-Hutch
__ method, then
you'll need to call it specifically, or otherwise you'll get a
UnboundLocalError, because self.__val/val won't exist.
Liam Clarke-Hutchinson
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Tim Johnson
Sent: Thursday, 1 Dec
Actually, and I'm surprising myself here, but COM would be the easiest way
to go about this if you're not able to convert to CSV. If you want to avoid
COM, why don't you use it to save each page of the spreadsheet as a CSV file
and then go from there?
The close tie-in between Excel and COM is desi
4\Python
%1 %2 %3 %4 %5 %6 %7 %8 %9
pause
or
similar...
Regards,
Liam
Clarke-Hutchinsonwww.med.govt.nz
-Original Message-From: bob
[mailto:[EMAIL PROTECTED] Sent: Wednesday, 23 November 2005
10:44 a.m.To: Liam Clarke-Hutchinson; 'Douglass, Erik';
'tutor
.
It's
not trivial when you're starting. :-)
Regards,
Liam
Clarke-Hutchinson
-Original Message-From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Douglass, ErikSent: Wednesday, 23 November 2005 3:03
a.m.To: tutor@python.orgSubject: [Tutor] Newbie
question
>Generally smtp servers are only configured to send to or from domains in
which they belong.
Hmmm... several ISP's I've used allow any value in the "From" header field.
I'd also like to mention that while many SMTP servers will only allow a
valid domain address in the From field, there is usuall
Ah, this kind of programme would be so much simpler if Last-Modified and
ETag were commonly used *sigh*. Unfortunately, advertising kinda killed
it...
I recommend www.watchthispage.com if you just need a quick update without
killing your own bandwidth.
Regards,
Liam Clarke-Hutchinson
Erm, a dictionary of names to references?
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Vincent Wan
Sent: Friday, 18 November 2005 2:21 p.m.
To: tutor@python.org
Subject: [Tutor] building nonbinary trees
I would like to have a tree data structure w
ometimes to refactor some of the ones I come
up with, however. Good rule of thumb is when you're feeling impressed with
your own cleverness, you probably need to refactor.
(Thanks c2 wiki, for teaching me that.)
-Original Message-
From: Christian Wyglendowski [mailto:[EMAIL PR
Hehe,
Sounds like someone's license was designed for C/C++.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Fred Lionetti
Sent: Friday, 18 November 2005 8:29 a.m.
To: tutor@python.org
Subject: [Tutor] compiled images
Hi everyone,
Thanks everyone fo
How about -
print "\n\nWelcome to the Backwards Message Display."
print
message = raw_input("\nPlease Enter a Message.")
msgAsList = [ char for char in message]
msgAsList.reverse()
reversedMessage = ''.join(msgAsList)
I can't test that, but it should work.
But, with regard to -
> print "\n\nWel
Does this work? (I can't check)
listX = ['933\t957', '955\t979', '969\t993', '1025\t1049', '1052\t1076',
'1098\t1122', '1136\t1160', '1298\t1322', '1406\t1430', '1422\t1446',
'1471\t1495&
Hmm,
Never thought of doing it that way.
try -
import struct
a = theByte
value = ord(a)
theByteReloaded = struct.pack("i",value)
You nmay want to check the docs for the struct module at python.org on that
pattern.
Liam Clarke-Hutchinson
-Original Message-
From: [EMAIL
Someone correct me if I'm wrong, but I believe there is no specific iterator
object, but rather objects that have a method for __iter___...
Liam Clarke-Hutchinson
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tim
Johnson
Sent: Monday, 14 November
Title: Message
Hi
Terry,
Python
is great, very much so if the last you used was Basic.
I
highly recommend Alan Gauld's tutorial, but I look forward to your queries here.
:-)
Liam
Clarke-Hutchinson
-Original Message-From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Beha
Perl seems to be written in a foreign language. ;)
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of John
Fouhy
Sent: Thursday, 10 November 2005 2:04 p.m.
To: Tutor
Subject: Re: [Tutor] [OT] triangulation
On 10/11/05, Gregor Lingl <[EMAIL PROTECTED]> wrot
Eek.
-Original Message-
From: Alan Gauld [mailto:[EMAIL PROTECTED]
Sent: Thursday, 10 November 2005 12:07 p.m.
To: Liam Clarke-Hutchinson; 'Shi Mu'
Cc: tutor@python.org
Subject: Re: [Tutor] triangulation
> As in Pythagoras?
> Or as in triangulation on a 2D surface
Oh dear, I missed that query. Nevermind google, try docs.python.org...
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Alex Hunsley
Sent: Thursday, 10 November 2005 12:08 p.m.
To: Shi Mu
Cc: tutor@python.org
Subject: Re: [Tutor] image
Shi Mu wrote:
>any
As in Pythagoras?
from math import *
c = sqrt(a^2 + b^2)
Or as in triangulation on a 2D surface, navigation etc.?
from math import *
o = tan(theta) * a
o = sin(theta) * h
h = o/sin(theta)
Noting of course that theta defaults to radians.
Or, do you mean radio triangulation by directional sign
Hmm, no x-server. If you're looking to detect running Python GUI packages,
you could check the namespaces for 'em, but beyond that, I'm stumped.
-Original Message-
From: Ken Stevens [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 9 November 2005 1:23 p.m.
To: Liam Clarke-Hut
Hi Ken,
How do you mean? I assume you're referring to a non-Windows environment? In
Linux, I'd imagine that using os.popen("ps") would do it.
Cheers,
Liam
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Ken Stevens
Sent: Wednesday, 9 November 2005 1
Oh dear.
Is Web 2.01 like that whole Web 2 I've heard so much about, but better? Is
it the semantic web, but not so pedantic?
Liam Clarke-Hutchinson
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of shenanigans
Sent: Wednesday, 9 November 2005
I believe only by explicitly passing a reference to the parent?
Liam Clarke-Hutchinson
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Bill Campbell
Sent: Wednesday, 9 November 2005 7:00 a.m.
To: Tutor
Subject: [Tutor] Who called me?
Is there a way in
if ballrect.top < 0 or ballrect.bottom > height:
speed[1] = -speed[1]
screen.blit(background, backgroundRect)
screen.blit(ball, ballrect)
pygame.display.flip()
Liam Clarke-Hutchinson
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PRO
Hi Nathan,
Just create a surface the same size as your screen, and have a loop like so
while True:
Here's some rough code to add a background for that ball one I posted
yesterday. Bear in mind that I can't check this at work. Lines with !! are
new-
import sys, pygame
pygame.i
fObj.RedirectStandardError = True
process.StartInfo = stInfObj
process.Start()
(procStdin, procStdOut, procStdErr) = (process.StandardInput,
process.StandardOutput, process.StandardError)
Liam Clarke-Hutchinson
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
For wxPython - Wax is alright, Pythoncard is great.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Kent Johnson
Sent: Tuesday, 8 November 2005 8:31 a.m.
Cc: Python Tutor
Subject: Re: [Tutor] Easier way to access wxPython
Matt Williams wrote:
> Dear All
Hi RC,
>I have a list (x_list) of class data.
So, a list of instances/classes then.
You'll have to pass a custom function.
def tSort(objA,objB):
#assuming that objA.x & objB.x are the items to sort by, and are
integers
if objA < objB:
result = -1
elif objA = objB:
r
Add another ball, and add collision
detection between it and the first ball. Make them double their speed when they
hit one wall and halve it when they hit another...
Good luck,
Liam Clarke-Hutchinson
-Original Message-From: Nathan Pinno
[mailto:[EMAIL PROTECTED] Sent: Monday, 7 N
Hi DS,
I'm not sure what language you've dealt with before, but if it was Java or
C++, then you've run into Python's variant of static members.
class X(object):
classMember = True
def __init__(self):
self.instanceMember = True
Does that make it any clearer? As to the why, I'd
n't. Especially with adding images to shapes on
screen.
Regards,
Liam
Clarke-Hutchinson| Contact Centre
Advisor| Ministry of Economic Development
DDI +64 3 962 2639 |
Fax +64 3 962 6220www.med.govt.nz
-Original Message-From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTE
bad enough, but adding implicitness in any form tends to
increase my time to debug.
I'm learning C at the moment, which has a degree of implicitness that could
bite me; ditto C#.
Regards,
Liam Clarke-Hutchinson
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Hi Mike,
Same file, eh?
>From the docs for split()
"If sep is not specified or is None, a different splitting algorithm is
applied. First, whitespace characters (spaces, tabs, newlines, returns, and
formfeeds) are stripped from both ends. Then, words are separated by
arbitrary length strings
Woah, that's way simpler than mine.
Liam Clarke-Hutchinson
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of bob
Sent: Friday, 4 November 2005 11:01 a.m.
To: [EMAIL PROTECTED]; tutor@python.org
Subject: Re: [Tutor] File IO
At 01:34 PM 11/3/2005, Mi
Title: Message
I
recommend using pyparsing or similar parser to parse it; if merely to ensure
that it's a valid algorithim.
Liam
Clarke-Hutchinson| Contact Centre Advisor| Ministry of Economic Development DDI +64 3 962 2639 | Fax +64
3 962 6220www.med.govt.nz
-Original Me
Title: Message
Oops,
I see I just doubled up on Danny's advice.
Liam
Clarke-Hutchinson| Contact Centre Advisor| Ministry of Economic Development DDI +64 3 962 2639 | Fax +64
3 962 6220www.med.govt.nz
-Original Message-From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTE
dMsg = nullString.join(msg)
noNewlinesMsg = joinedMsg.replace('\n', nullString)
Let me know how it goes.
Regards,
Liam Clarke-Hutchinson
________
From: Joseph Quigley [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 20 September 2005 2:19 a.m.
To: Liam Clarke-Hutch
>PS: do not forget to send your answers to Python Tutor also ... BTW,
>could it be possible de configure the list so that the "reply-to" field
>is set to the Python Tutor list instead of the sender ?
I believe our list administrator has decided that reply-to munging can be
considered harmful.
h
;""
That's another caveat when using urllib.
But yeah, digression aside, short answer is, I think your specified resource
is dead, and a url-camper has
taken all urls for that site and redirected them to a pop-up fest.
Regards,
Liam Clarke-Hutchinson
-Original Mess
44 matches
Mail list logo