If anyone has the time, please have a look at the attached text file
and let me know any comments on how to improve it.
Thanks a lot
Col
#!usr/bin/env python
# title - baccarat2.py
import random
class Player(object):
"""simple Player object that
keeps tabs on bets and kitty"""
def
Robert Sjoblom wrote:
So, it turns out that my ISP blocked Project Euler, so instead of
working on my next problem, I polished Problem 4 a bit:
Your ISP blocked Project Euler
More likely the site is just temporarily down, but if you're right, what on
earth would they block Project Euler f
rail shafigulin wrote:
i writing some code to do device testing at my work. testing is related to
date and time, so naturally i decided to create a class that inherits from
datetime.datetime. main reason is that i need to add, subtract and compare
datetime objects and datetime.datetime allows me
Message: 1
Date: Thu, 15 Dec 2011 23:37:49 +0100
From: "Calle"
To: "Robert Sjoblom"
Cc: tutor@python.org
Subject: Re: [Tutor] [TUTOR]Code Deciphering
Message-ID:
Content-Type: text/plain; format=flowed; charset="iso-8859-1";
reply-type=original
-Ursprungligt meddelande-
From: Robert S
On Fri, Dec 16, 2011 at 5:26 AM, Steven D'Aprano wrote:
> rail shafigulin wrote:
>
>> i writing some code to do device testing at my work. testing is related to
>> date and time, so naturally i decided to create a class that inherits from
>> datetime.datetime. main reason is that i need to add, su
Calle wrote:
Message: 1
Date: Thu, 15 Dec 2011 23:37:49 +0100
From: "Calle"
[...]
I'm sorry, it is too hard for me to work out which parts are your comments,
and which are quotations from older emails in the Digest.
Please do not reply to multiple messages in a digest at once: each reply t
> If anyone has the time, please have a look at the attached text file and let
> me know any comments on how to improve it.
Not everyone on this list gets attachments. You are usually better off
including short code in the email or a pastebin link.
Ramit
Ramit Prasad | JPMorgan Chase Investme
I'm setting up an sqlite3 database to use as a base for some programming stuff I
want to work on. Currently using python 2.7, which appears to have a new enough
version of sqlite (just barely) to support foreign keys.
As I understand things, sqlite by default has foreign keys turned off, unless
s
>> How do I tell if it succeeded (short of trying an operation that should be
>> blocked by foreign keys)? How do I use that cursor object returned by the
>> pragma query to tell if its a '1' (on) or a '0' (off) and verify the state?
The cursor object contains the result set. It's a python gener
That helped immensely... I was trying some different things trying to get
at the results, but it never occurred to me to try iterating over it. The
bit about some objects being iterable and some not is good to know!
Thanks,
Monte
On Fri, Dec 16, 2011 at 11:43 AM, Modulok wrote:
> >> How do I
On 15 December 2011 23:37, Calle wrote:
I was wondering, how do you use Python to decipher codes? It feels like
it should be pretty simple, but I haven't found any tutorials about it
yet.
What kind of codes? Or do you mean ciphers? Generally speaking, a code
represent letters or numbers in
Hi guys,
i created a program that allows users to login using a password that i set at
the top of the program.
Among other things users are given the option to change their password. My
questions is;
Is it possible for me to make this new password stick, in other words when they
shut down
On 12/16/2011 05:02 PM, ADRIAN KELLY wrote:
Hi guys,
i created a program that allows users to login using a password that i set at
the top of the program.
Among other things users are given the option to change their password. My
questions is;
Is it possible for me to make this new password s
thanks dave,
just tried writing to file for the first time
def main():
outfile.write('Hello this is a test')
outfile.close()
main()
error, globalname outfile is not defined, do i need to import function to get
this working?
> Date: Fri, 16 Dec 2011 17:13:04 -0500
> From: d...@davea.name
On 12/16/2011 2:49 PM ADRIAN KELLY said...
thanks dave,
just tried writing to file for the first time
def main():
outfile.write('Hello this is a test')
outfile.close()
main()
*error, globalname outfile is not defined, do i need to import function
to get this working?*
No, but you do need to i
> thanks dave,
> just tried writing to file for the first time
>
> def main():
> outfile.write('Hello this is a test')
> outfile.close()
> main()
>
> error, globalname outfile is not defined, do i need to import function to
get this working?
>
>
Fyi, you should check the python docs. They have a
ADRIAN KELLY wrote:
Hi guys,
i created a program that allows users to login using a password that i set at the top of the program.
Among other things users are given the option to change their password. My questions is;
Is it possible for me to make this new password stick, in other words wh
On Fri, Dec 16, 2011 at 11:49 PM, ADRIAN KELLY wrote:
> thanks dave,
> just tried writing to file for the first time
>
> def main():
> outfile.write('Hello this is a test')
> outfile.close()
> main()
>
> error, globalname outfile is not defined, do i need to import function to
> get this working
> Some improvements to think about, in order of least secure (easiest) to most
> secure (hardest).
>
> (1) "my secret password.txt" is a crappy name. Is there a better name?
I'm going to go with "EULA.txt"; the reasons should be obvious.
--
best regards,
Robert S.
___
19 matches
Mail list logo