File Output from Python to Obj-C
File Output from Python to Obj-C
- Subject: File Output from Python to Obj-C
- From: Wesley <email@hidden>
- Date: Mon, 15 May 2006 06:36:06 -0600
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()
A thousand thanks in advance,
Wesley
_______________________________________________
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