A few short questions about bzr send implementation for Apple Mail
Aaron Bentley
aaron at aaronbentley.com
Tue Mar 25 15:28:02 GMT 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Alexander Belchenko wrote:
> Erik Bågfors пишет:
>> Hi
>>
>> I have written support for Apple Mail. Unfortunately, this has to be
>> done using Applescript. The Applescript is generated in python. The
>> code I have now works, but due to how Applescript works, I need lines
>> longer than 80 characters. I don't like this at all of course.
>
> You can write long strings in chunks:
>
> f = open('applescript', 'w')
> f.write('beginning of very long string ')
> f.write('continuation of this very long string ')
> f.write('and more more more,')
> f.write('and finally we can put the line endings.\n')
> f.close()
You can also take advantage of Python's implicit string concatenation:
f = open('applescript', 'w')
f.write('beginning of very long string '
'continuation of this very long string '
'and more more more,'
'and finally we can put the line endings.\n')
f.close()
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFH6RoB0F+nu1YWqI0RAtqCAJ9b2q9lp7Ns3diCeFOW5VsAaXpyuwCgiG+A
EtogKpGN/y3ZzEQHyT7mnIM=
=Nza3
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list