Re: File Output from Python to Obj-C
Re: File Output from Python to Obj-C
- Subject: Re: File Output from Python to Obj-C
- From: "Pontus Ilbring" <email@hidden>
- Date: Mon, 15 May 2006 14:55:29 +0200
On 5/15/06, Wesley <email@hidden> wrote:
Hi,
I'm doing a research project that was prototyped in Python, but is
beginning to bog as the numbers get massive, so I'm translating it to
Obj-C. It's gone fairly well. I'm stumped, however, by writing to a
file. I thought to use NSFileHandle, but I can't seem to figure out
how to use it. Can anyone suggest a straight forward way to translate
the following:
ft = open('out.xls', 'w')
ft.write("Leaders\tTop\tInteractivity\tContribution\n")
for eachTry in tries:
commCompare = simulateCommunity(C)
line = "%d\t%d\t%d\t%f\n" % (int(A*100), commCompare[0], commCompare
[1],\
commCompare[0]/float(commCompare[1]))
ft.write(line)
ft.close()
You have full access to the standard C libraries in Objective-C, so
use fopen and fprintf.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden