diff options
author | Steve Chaplin <> | 2010-09-15 21:19:41 +0800 |
---|---|---|
committer | Steve Chaplin <> | 2010-09-15 21:19:41 +0800 |
commit | 6a0a09a7c37a54cce3b890f37965868e94539ed8 (patch) | |
tree | 12cef4744e0a603e8f42e8c7c7b9132d23d2616c /test/surface_create_for_stream.py | |
parent | 30fe91ce1c122f1a2ce5dfb742b7862474db826e (diff) | |
download | py2cairo-6a0a09a7c37a54cce3b890f37965868e94539ed8.tar.gz |
Add 'wb' to write files in binary mode.
Diffstat (limited to 'test/surface_create_for_stream.py')
-rwxr-xr-x | test/surface_create_for_stream.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/surface_create_for_stream.py b/test/surface_create_for_stream.py index 61997e0..da543f2 100755 --- a/test/surface_create_for_stream.py +++ b/test/surface_create_for_stream.py @@ -30,7 +30,7 @@ class C(object): # a selection of possible args to surface.write_to_png() #fo = '/tmp/f.ps' -fo = file('/tmp/f.svg', 'w') +fo = file('/tmp/f.svg', 'wb') #fo = StringIO.StringIO() #fo = cStringIO.StringIO() #fo = sys.stdout @@ -76,6 +76,6 @@ surface.finish() # for testing StringIO: get data and write to file #string = fo.getvalue() -#f2 = file('/tmp/f.ps', 'w') +#f2 = file('/tmp/f.ps', 'wb') #f2.write(string) #f2.close() |