Re: [Tutor] string to integer

2006-01-05 Thread Boyan R.
Thank you both
I think I'll manage to continue with my program :)

___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] string to integer

2006-01-05 Thread Boyan R.
I need program to convert my string in integer.
I remember in BASIC I used  val(string) command 
Is there a Python equivalent ?

Here is how it should work:
val(7) = 7
val(bbab7) = 7
val(aa7aa) = 7
val(   7) = 7  

This last is most important, currently I don't know how to
convert string "   7" to integer value 7 in my program
(those empty spaces are nasty)
btw, I'm working with random numbers, I took 7 just for example :)

Also, what are chr() values for enter and (empty) space ?
If anybody have a table with chr() values, I'd appreciate
if he upload it somewhere. Thanks in advance !

___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] using help

2005-11-28 Thread Boyan R.
On Mon, 28 Nov 2005 14:56:38 -0600, Jason Massey wrote:

> Boyan,
> 
> A listing of all the built-in exceptions can be found at:
> 
> http://docs.python.org/lib/module-exceptions.html
> 
> 
> A description of this, and the other built-in functions, is at:
> 
> http://docs.python.org/lib/built-in-funcs.html#built-in-funcs

Thanks, that will help. 

___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] using help

2005-11-28 Thread Boyan R.
How can I see all error keywords for using Try..Except,
like EOFError, ValueError etc by typing help('something') ?
Also, what to type to see string handling commands ?
like "int" [number = int(raw_input("Enter a number: "))]
What's python equivalent for basic "val" command ?

___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor