File Reading In Mac

2010-11-22 Thread dilip raghavan
Hello , I have been trying to read contents from a file in MAC. I wrote the code filename = "test.rtf" FileHandle = open(filename,'r') fileStr = FileHandle.read() print fileStr FileHandle.close() When I see the output I see a lot of junk. The junk is like a lot of question marks, the fo

Re: Cpp + Python: static data dynamic initialization in *nix shared lib?

2010-07-13 Thread Dilip
On Jul 13, 2:34 am, "Alf P. Steinbach /Usenet" wrote: > Well, we got no further, but I know of three solutions: > >    A) Punting: just say that the compiler has to support C++/C function type >       mingling. >       -> Perhaps the practical solution, but formally unsafe. > >    B) On the script

Performance of Blocks in Python

2006-05-09 Thread Dilip
I read a couple of interesting blog posts about the performance of blocks in languages like Ruby, Python here[1] and here[2]. The posts start out questioning Ruby but towards the middle and the end it does draw analogies between python's design decision to introduce 'with' statement as a language