Have you tried using
test = r"C:\test.txt"
tF = open(test,'w')
thatThereString = "what you said up there turned into a string"
print >>tF,(thatThereString)
tF.close()
Or is this just the same thing...
Wonder if the modulo is causing you timing issues?
On Wed, Oct 15, 2008 at 11:12 AM, Horvátth Szabolcs
<[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I'm doing some data exporting using a python scripted plugin command and
> found the file output being very slow.
> In a specific case the file write took 90 seconds and when I commented
> the f.write() stuff (so the command only did the queries) it dropped to
> 15 seconds.
> This is the structure of the write part:
>
> for i in range(numberOfHairs):
> ...
> for j in range (numberOfPoints):
> ...
> f.write("\t\t%.3f %.3f %.3f %.3f %.3f %.3f %.3f %.3f %.3f
> %.3f\n" % (A[j][0], A[j][1], A[j][2], B[j][0]-A[j][0], B[j][1]-A[j][1],
> B[j][2]-A[j][2], C[j], D[j][0], D[j][1], D[j][2]))
> f.close()
>
> Am I doing completely wrong? What can I do to speed up ascii file writing?
>
> Cheers,
> Szabolcs
>
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
Yours,
Maya-Python Club Team.
-~----------~----~----~----~------~----~------~--~---