• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
File Output from Python to Obj-C
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: File Output from Python to Obj-C
      • From: Nicko van Someren <email@hidden>
    • Re: File Output from Python to Obj-C
      • From: "Pontus Ilbring" <email@hidden>
  • Prev by Date: RE: Menu States
  • Next by Date: Re: C++ gets translated into ObjC? Strange compiler errors... [RESOLVED]
  • Previous by thread: Re: Handling Right Mouse Event for NSTableView
  • Next by thread: Re: File Output from Python to Obj-C
  • Index(es):
    • Date
    • Thread