Re: Python equivalent to the "A" or "a" output conversions in C

2012-06-19 Thread Hemanth H.M
Are you looking for : >>> x=10 >>> hex(x) '0xa' >>> x=10.5 >>> float.hex(x) '0x1.5p+3' On Tue, Jun 19, 2012 at 9:53 PM, Edward C. Jones wrote: > hexadecimal -- *'I am what I am because of who we all are'* h3manth.com *-- Hemanth HM * -- http://mail.pyth

Re: string to list

2012-06-14 Thread Hemanth H.M
>>> list(literal_eval('"aa","bb 'b'","cc"')) ['aa', 'bb ', 'cc'] Strange? On Thu, Jun 14, 2012 at 1:09 PM, Hemanth H.M wrote: > @Annop Nice one, but you seem to have missed a parenthesis. > >

Re: string to list

2012-06-14 Thread Hemanth H.M
@Annop Nice one, but you seem to have missed a parenthesis. >>> list(literal_eval("'aa','bb','cc'") should have been >>> list(literal_eval("'aa','bb','cc'")) On Thu, Jun 14, 2012 at 12:58 PM, Anoop Thomas Mathew wrote: > >>> list(literal_eval("'aa','bb','cc'") -- *'I am what I am because

Re: Internationalized domain names not working with URLopen

2012-06-13 Thread Hemanth H.M
My bad, it worked; need to avoid http:// along with snowman, before encode. On Wed, Jun 13, 2012 at 9:02 PM, Hemanth H.M wrote: > Well not really! does not work with '☃.net' > > Traceback (most recent call last): > File "", line 1, in > File "/usr

Re: Internationalized domain names not working with URLopen

2012-06-13 Thread Hemanth H.M
Well not really! does not work with '☃.net' Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.6/urllib2.py", line 126, in urlopen return _opener.open(url, data, timeout) File "/usr/lib/python2.6/urllib2.py", line 391, in open response = self._open(req, da