hi all, i have a newbie problem arising from writing-then-reading a
unicode file, and i can't work out what syntax i need to read it in.
the syntax i'm using now (just using quick hack tmp files):
BEGIN
f=codecs.open("tt.xml","r","utf8")
fwrap=codecs.EncodedFile(f,"ascii","utf8")
try:
ss=u''
Fredrik Lundh wrote:
> Diez B. Roggisch wrote:
>>Just don't do any fancy encoding stuff at all, a simple
>>rrr=xml.dom.minidom.parseString(open("tt.xml").read())
>>should do.
> or
> rrr = xml.dom.minidom.parse("tt.xml")
thanks a lot guys -- both approaches work a treat.
in particular: die
python 2 :
python
Python 2.7.15 (default, May 15 2018, 15:37:31)
.
>>> import urllib2
>>> res = urllib2.urlopen('https://api.ipify.org').read()
>>> print res
www.xxx.yyy.zzz
python3
python3
Python 3.6.6 (default, Jul 19 2018, 16:29:00)
...
>>> from urllib.request import urlopen
>>> res = url
y
> built in that could do this for me.
>
> --
> Jason Voegele
> Only fools are quoted.
> -- Anonymous
I don't know about the recommended approach, but I've done something
like you suggest in a library I authored. Any files named test*.py are
fo
On Oct 20, 2:14 pm, Sid <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am tryin to copy an image into my own data structure(a sort of 2d array
> for further FFT). I've banged my head over the code for a couple of hours
> now. The simplified version of my problem is below.
>
> #-Code-
On Oct 22, 3:43 pm, korean_dave <[EMAIL PROTECTED]> wrote:
> Hi. I need a dummy's explanation to utilizing the win32com component
> to access Microsoft Excel.
>
> So far, I have this code.
>
> import win32com.client
> xl = win32com.client.Dispatch("Excel.Application")
> xl.Visible = 1
>
On Nov 15, 2:20 am, Cannonbiker wrote:
> Please I need Calling Python functions from Excel and receive result
> back in Excel. Can me somebody advise simplest solution please? I am
> more VBA programmer than Python.
A couple of years ago I used MSScriptControl for this. Couldn't find a
great ref