Re: [Tutor] Efficiency and speed

2010-03-22 Thread Alan Gauld


James Reynolds eire1...@gmail.com wrote


On that end, I'm almost done readying beginning Python: From Novice to
Professional Can anyone recommend anything else for me to read after 
that?


I'm not familiar with that book but I'd say consider what area of
programming you are interested in and get a specialist title on that.

For example a GUI Framework, Networking, Text processing,
XML, Web frameworks, Win32, all have specialist titles to
choose from. There are probably more too, those are just a
few I have looked at.

And finally, read code. Find a real-world project (try Source Forge)
and grab the source code and read it, understand it and modify it.

You could even try the standard library modules as a starter.

HTH,


--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/ 



___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


[Tutor] Python help please

2010-03-22 Thread laura castañeda

Hi my name is Laura and im currently trying to solve one of the
challenges in the book: Python Programming, second edition by Michael
Dawson... I'm stuck in the 5 chapter because of this challenge, im the
kinda person who dont give up so i have to solve this challenge or else
i cant move on its just getting really frustrating and i was wondering
if u can help me with it. Right now im trying to teach my self
programming and i found the book really useful but this challenge is
messing with me haha well is the second challenge at the end of the 5
chapter i hope its not to much problem for u and i'd really appreciated if u 
help me.

The challenge: Write a character creator program for a role-playing game. the 
player should be given a pool of 30 point to spend on four attributes: 
Strength, wisdom, health and  Dexterity. The player 
should be able to spend points from the pool on any attribute and should also 
be able to take points from an attribute and put them back into 
 the pool. 
Thank you so much and please please help me.. this is what im thinking to do so 
far maybe we can work with it

in the interface i want to print Welcome to C.C.
so print character, be able to change the name, change the strength (something 
like Strength:___ would you like to add/sub [+/-]), change health, change 
wisdom, change dex, and points remaining.. and in the code i was thinking 
to start with a while loop .this is what i have so far and honestly im 
stuck i dont now how to start please help me thank you.

Laura
  
_
Connect to the next generation of MSN Messenger 
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-ussource=wlmailtagline___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Python help please

2010-03-22 Thread Alan Gauld

laura castañeda laura_cast...@hotmail.com wrote


Hi my name is Laura and im currently trying to solve one of the
challenges in the book: Python Programming, ...
if u can help me with it. Right now im trying to teach my self
programming and i found the book really useful


Hi feel free to sitgn up to the tutor list, that way your posts will
go through a lot quicker  - and the answers will therefore
come back quicker too :-)


...in the code i was thinking to start with a while loop


Your ideas are all good.
Get the data structures/variable set up, then iterate in a while loop
adding and subtracting points from the pool to the character.
Its a little like double entry book-keeping - for every addition
there must be a corresponding subtraction and vice versa

If you have a list of characters you will need a corresponding
list of pools - or associate the pools with the characters - a
dictionary maybe?

Start with one character and try getting the most basic version
running. If you get stuck show us the code plus any error
messages and ask...

--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/ 



___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


[Tutor] parsing pyc files

2010-03-22 Thread Jojo Mwebaze
Hello Tutor

I have two problems, any help will be highly appreciated.

How is possible to trace the all method calls, object instantiations,
variables used in running an experiment dynamically,  without putting print
- or log statements in my code?  - some sort of provenance!

I would like to create a tool that can look into pyc files to find
classes/methods that was executed without looking the the source code. Is
this possible in python.

Kind Regards

Jojo.
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor