Re: [Tutor] help on raw_input()

2007-04-14 Thread ammar azif
Thanks the encode method really helps. Alan Gauld <[EMAIL PROTECTED]> wrote: "ammar azif" wrote > Actually i wanted to write a http client using just he low level > socket module. I won;t ask why! But the httplib module probably does what you want just in case you dodn't realize it existed...

Re: [Tutor] help on raw_input()

2007-04-14 Thread Alan Gauld
"ammar azif" <[EMAIL PROTECTED]> wrote > Actually i wanted to write a http client using just he low level > socket module. I won;t ask why! But the httplib module probably does what you want just in case you dodn't realize it existed... > The program will prompt the user asking for input and th

Re: [Tutor] help on raw_input()

2007-04-14 Thread Kent Johnson
ammar azif wrote: > Hi, > > i wanted to get a string from raw_input like this > > raw_input('>') > > \n\nsomestring > > but the problem is raw input will return the string > '\\n\\nsomestring' This is a bit confusing to talk about because the actual contents of the string differ from what is

Re: [Tutor] help on raw_input()

2007-04-14 Thread ammar azif
Actually i wanted to write a http client using just he low level socket module. The program will prompt the user asking for input and the use will type http commands like 'GET /index.html HTTP/1.0\r\nHost: somehost\r\n\r\n' when i use the raw_input function , the string that i get is 'GET /index.

Re: [Tutor] help on raw_input()

2007-04-14 Thread Alan Gauld
"ammar azif" <[EMAIL PROTECTED]> wrote > i wanted to get a string from raw_input like this > > raw_input('>') >> \n\nsomestring OK, Can you explain precisely what you want the string to contain. \n is the string representation of a newline. Do you want to enter something that starts with two ne

[Tutor] help on raw_input()

2007-04-14 Thread ammar azif
Hi, i wanted to get a string from raw_input like this raw_input('>') > \n\nsomestring but the problem is raw input will return the string '\\n\\nsomestring' My question is Are there any function to convert back those string to '\n\nsomestring' ? Thanks --