[Tutor] guess age programme (please help)
Steven D'Aprano
steve at pearwood.info
Sat Oct 1 06:13:43 CEST 2011
Hi Adrian,
ADRIAN KELLY wrote:
> Hi all,
> can anyone help me with the attached programme.
I'd love to, but I can't open it :(
If the truth be known, I could open it if I spent the time and effort.
But that actually is significant time and effort: in my email, your
attachment looks like this:
Content-Type: application/octet-stream
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="guess age_game(broken)"
DQpwcmludCgiXHRXZWxjb21lIHRvICdHdWVzcyBNeSBOdW1iZXInISIpDQpwcmludCgiSSdtIHRo
aW5raW5nIG9mIGEgbnVtYmVyIGJldHdlZW4gMSBhbmQgMTAwLiIpDQpwcmludCgiVHJ5IHRvIGd1
ZXNzIGl0IGluIGFzIGZldyBhdHRlbXB0cyBhcyBwb3NzaWJsZS5cbiIpDQoNCiMgc2V0IHRoZSBp
bml0aWFsIHZhbHVlcw0KYWdlID0gMzUNCmd1ZXNzID0gIiAiDQp0cmllcyA9IDUNCg0KIyBndWVz
c2luZyBsb29wDQp3aGlsZSBndWVzcyAhPSBhZ2U6DQogICAgDQogICAgZ3Vlc3MgPSBpbnB1dCgi
VGFrZSBhIGd1ZXNzOiAiKQ0KICAgIGlmIGd1ZXNzID4gYWdlOg0KICAgICAgICBwcmludCAiTG93
ZXIuLi4iLHRyaWVzLCJsZWZ0Ig0KICAgIGVsc2U6DQogICAgICAgIHByaW50ICJIaWdoZXIuLi4i
LHRyaWVzLCJsZWZ0Ig0KICAgICAgICAgICAgDQogICAgdHJpZXM9dHJpZXMtMQ0KICAgDQoNCnBy
aW50ICJcblxuWW91IGd1ZXNzZWQgaXQhICBUaGUgYWdlIHdhcyIsIGFnZSwiaXQgb25seSB0b29r
IHlvdSAiK2B0cmllc2ArIiBhdHRlbXB0cyB0byBnZXQgaXQiDQoNCiAgDQppbnB1dCAoIlxuXG5Q
cmVzcyB0aGUgZW50ZXIga2V5IHRvIGV4aXQuIikNCg==
I hope you understand why I don't care enough to go to the time and
effort of saving it to a file, decoding it, renaming it, and then
finally reading it.
You can make it easier for your readers (and therefore increase the
number of people able and willing to help) if you do this:
(1) For small amounts of code, just copy and paste it into your email.
Make sure you send ordinary plain text. No HTML email or "rich text", as
that will often break the formatting of the code.
(2) For larger amounts, say, more than 50 lines, attach it as a file.
Make sure the file has a file extension .txt or .py even if you are
using a computer system that doesn't need file extensions. If .py,
please make sure the file name is legal for Python: no spaces or
brackets or parentheses or dashes.
Thanks in advance,
--
Steven
More information about the Tutor
mailing list