"Alex Hall" wrote
I had this working back in the summer, but have since had to
restructure some things in the code. Now, my program is hanging
while
it waits for the human player to take his/her turn, and I am not
sure
how to free it;
I don't really understand this concept in a GUI?
Why wo
Hi Kushal,
First of all, thanks a lot for your help.
>
> Your current code adds the marker line to the original files. Is that
> intended?
Well, no, this wasn't intended. The part of the code that did that was
introduced in one of the many attempts to solve the problem. I knew
that this was an
Hi Evert,
Again, thanks a lot. Too bad you and Kushal don't live close. I would
like to invite you to a beer or a coffe or something.
>>
>> - code
>> import os
>> path = '/Volumes/DATA/MyPath'
>> os.chdir(path)
>> file_names = glob.glob('*.txt')
>
> You don't use file_nam
> Again, thanks a lot. Too bad you and Kushal don't live close. I would
> like to invite you to a beer or a coffe or something.
Thanks for the offer. Some time ever in the far, far future perhaps ;-).
>
>> So close ;-).
>> What you're missing is the next write statement:
>> f.write(data)
>>
>>
"Josep M. Fontana" wrote
OK, I ask you (or anybody reading this) the same question I asked
Kushal: why is it better to open the output file outside the entire
loop.
Because you only need to open it once and leave it open.
You are opening it each and every time which is wasteful.
It could on
Thanks Alan,
why is it better to open the output file outside the entire
>> loop.
>
> Because you only need to open it once and leave it open.
> You are opening it each and every time which is wasteful.
> It could on some OSDS also lead to problems. And if you
> were writing a new file rather tha
On 11/14/10, Alan Gauld wrote:
> "Alex Hall" wrote
>
>> I had this working back in the summer, but have since had to
>> restructure some things in the code. Now, my program is hanging
>> while
>> it waits for the human player to take his/her turn, and I am not
>> sure
>> how to free it;
>
> I don
>> Again, thanks a lot. Too bad you and Kushal don't live close. I would
>> like to invite you to a beer or a coffe or something.
>
> Thanks for the offer. Some time ever in the far, far future perhaps ;-).
Well, if you or the other people who have been so helpful to me in
this list ever happen to
While processing weather data from the http://www.knmi.nl/ and
building a small domotica system I ran into the following
'shortcomming'
from the python doc:
"class datetime.datetime(year, month, day[, hour[, minute[, second[,
microsecond[, tzinfo])
The year, month and day arguments are requir
I've been web programming for 15 years now. 8 of it using python.
Lately I have been 'studying' PHP via the CodeIgnitor Framework.
Since python remains my first choice, but since I am also
impressed with the concept of CodeIgnitor, I would welcome
recommendations on a python MVC framework.
One r
> I've been web programming for 15 years now. 8 of it using python.
>
> Lately I have been 'studying' PHP via the CodeIgnitor Framework.
>
> Since python remains my first choice, but since I am also
> impressed with the concept of CodeIgnitor, I would welcome
> recommendations on a python MVC fra
take a look at web2py.
[1] http://www.web2py.com/
On Sun, Nov 14, 2010 at 5:26 PM, Tim Johnson wrote:
> I've been web programming for 15 years now. 8 of it using python.
>
> Lately I have been 'studying' PHP via the CodeIgnitor Framework.
>
> Since python remains my first choice, but since I a
"Tim Johnson" wrote
Since python remains my first choice, but since I am also
impressed with the concept of CodeIgnitor, I would welcome
recommendations on a python MVC framework.
Don;t know CodeIgnitor but almost every web framework is MVC
based from Struts in Jave through Rails on Ruby t
Additionally to what's already been said, you may also want to have a look
at the Pyjamas project (which can work in conjunction with Django as a
back-end), there's a short article about implementing an MVC architecture in
Pyjamas here:
http://pyjs.org/wiki/modelviewcontroller/
Also you may want t
Greetings,
I'm a Python beginner and working my way through Michael Dawson's Python
Programming for the Absolute Beginner. I'm stuck in a particular challenge that
asks me to write a program that "flips a coin 100 times and then tells you the
number of heads and tails." I've been trying to work
"Alex Hall" wrote
The problem is that I want to go until there is a winner. You are
right about just letting the mainloop of the gui handle input (I
forgot the gui is already looping and waiting for input) but I would
like to make the user pause while the computer goes, this way the
user
cann
* Alan Gauld [101114 13:12]:
> Not quite sure how you defione your terms there.
> But all of the above can be used with Apache.
Hi Alan. See my reply to Evert where I refer to situations where I
would have neither SSH nor root access.
thanks
--
Tim
tim at johnsons-web.com or akwebsoft.com
* Evert Rol [101114 12:12]:
> Django can run be run through mod_wsgi (or mod_python if you
> really want). And other web servers than Apache will also work.
> Don't know what you mean with "shared server", but if you mean
> multiple accounts running their web apps through one Apache
> server, t
Hello all.
Quick question. I know some of you are with Python since started,
some other maybe later.
I was wondering if you can share what was the strategy you followed
to master Python (Yes I know I have to work hard study and practice a
lot). I mean did you use special books, special sites,
>> Django can run be run through mod_wsgi (or mod_python if you
>> really want). And other web servers than Apache will also work.
>
>> Don't know what you mean with "shared server", but if you mean
>> multiple accounts running their web apps through one Apache
>> server, that can work (provided
On Sun, Nov 14, 2010 at 11:16 PM, Dawn Samson wrote:
> Greetings,
> I'm a Python beginner and working my way through Michael Dawson's Python
> Programming for the Absolute Beginner. I'm stuck in a particular challenge
> that asks me to write a program that "flips a coin 100 times and then tells
>
* Tim Johnson [101114 11:45]:
>
> One restriction: must *not* need an application server, I.E. works
> thru Apache and is adaptable to a shared server.
>
thanks for all of who responded. I should clarify: I have been
considering django as a first choice for most of the deployment
environments I
ingo wrote:
[...]
Questions,
Is there a date time library that accepts the 24:00? mxDateTime doesn't.
I don't know of any.
Is there a way to set the limit 'from the outside' (subclassing???) or
a simple way around?
Write a wrapper function:
#Untested
def datetime24(*args):
try:
Dawn Samson wrote:
I've been trying to work on this challenge for a while now and can't
get it to work (either it has 100 heads or 100 tails).
Unfortunately your code has been mangled in the email, but I can guess
your problem: you need to set
coin = random.randrange(2)
each time through
Thanks everyone!
I should be using algorithms for even such programs at my level. The solution
to reiterate the coin flip every time in the loop works. Thanks a lot!
Dawn
___
Tutor maillist - Tutor@python.
On 14/11/10 22:16, Dawn Samson wrote:
Greetings,
I'm a Python beginner and working my way through Michael Dawson's
Python Programming for the Absolute Beginner. I'm stuck in a
particular challenge that asks me to write a program that "flips a
coin 100 times and then tells you the number of he
Jorge Biquez wrote:
I was wondering if you can share what was the strategy you followed to
master Python (Yes I know I have to work hard study and practice a lot).
I started by working through the book "Learning Python" by Mark Lutz and
David Ascher.
I wrote lots and lots of little Python
From: tutor-bounces+bermanrl=cfl.rr@python.org
[mailto:tutor-bounces+bermanrl=cfl.rr@python.org] On Behalf Of Dawn Samson
Sent: Sunday, November 14, 2010 5:17 PM
To: tutor@python.org
Subject: [Tutor] While Loops: Coin Flip Game
Greetings,
I'm a Python beginner and working my way throu
On 11/14/10, Alan Gauld wrote:
> "Alex Hall" wrote
>
>> The problem is that I want to go until there is a winner. You are
>> right about just letting the mainloop of the gui handle input (I
>> forgot the gui is already looping and waiting for input) but I would
>> like to make the user pause whil
"Jorge Biquez" wrote
I was wondering if you can share what was the strategy you followed
to master Python
I started with Python 1.3 around early 1998 but switched to 1.5 very
soon after.
I started with the standard tutorial (I was already a pro programmer
so
it was easy to follow) then im
On Sun, 14 Nov 2010 17:16:36 -0500
Dawn Samson wrote:
> Greetings,
>
> I'm a Python beginner and working my way through Michael Dawson's
> Python Programming for the Absolute Beginner. I'm stuck in a
> particular challenge that asks me to write a program that "flips a
> coin 100 times and then t
On 15 November 2010 00:12, Alex Hall wrote:
> Again: is there a basic tutorial that would explain how control works
> when dealing with a gui, especially one that is meant to last a long
> time but occasionally block input?
>
Normally the way is for the GUI controls (e.g. widgets, grids, objects
> Any suggestions for a newbie to program while learning python? I am new to
> programming and python.
Port one of the old games from
http://www.atariarchives.org/basicgames/ or similar antique books.
Alan
___
Tutor maillist - Tutor@python.org
To u
On Sun, Nov 14, 2010 at 11:48 PM, Steven D'Aprano wrote:
>
> Write a wrapper function:
>
Thanks Steve, with this in hand I think I can solve the main problems for now
i.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription opt
34 matches
Mail list logo