A few short questions about bzr send implementation for Apple Mail

Erik Bågfors zindar at gmail.com
Tue Mar 25 15:39:24 GMT 2008


On Tue, Mar 25, 2008 at 4:28 PM, Aaron Bentley <aaron at aaronbentley.com> wrote:
> -----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()

Ok. Didn't know that.

However,
When I think about it, it still feels better to separate python code
and applescript code. So a small separate helper script, feels better
to me.

Any ideas on the questions? Otherwise, I'll change the code like this.

/Erik


More information about the bazaar mailing list