~ubuntu-branches/ubuntu/maverick/svn-workbench/maverick

« back to all changes in this revision

Viewing changes to Source/make_wb_images.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2008-07-30 23:33:06 UTC
  • mfrom: (2.1.9 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080730233306-f4radlcg6d8dr9k8
Tags: 1.5.4-2
Fix wx import. Closes: #492605.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
'''
 
2
 ====================================================================
 
3
 Copyright (c) 2003-2006 Barry A Scott.  All rights reserved.
 
4
 
 
5
 This software is licensed as described in the file LICENSE.txt,
 
6
 which you should have received as part of this distribution.
 
7
 
 
8
 ====================================================================
 
9
 
 
10
    make_eb_images.py
 
11
 
 
12
'''
1
13
import sys
2
14
 
3
 
data_spice = 32
 
15
data_slice = 32
 
16
 
 
17
argv = [
 
18
        sys.argv[0],
 
19
        'wb_images.py',
 
20
        'toolbar_images/add.png',
 
21
        'toolbar_images/checkin.png',
 
22
        'toolbar_images/delete.png',
 
23
        'toolbar_images/diff.png',
 
24
        'toolbar_images/edit.png',
 
25
        'toolbar_images/editcopy.png',
 
26
        'toolbar_images/editcut.png',
 
27
        'toolbar_images/editpaste.png',
 
28
        'toolbar_images/exclude.png',
 
29
        'toolbar_images/file_browser.png',
 
30
        'toolbar_images/history.png',
 
31
        'toolbar_images/include.png',
 
32
        'toolbar_images/info.png',
 
33
        'toolbar_images/lock.png',
 
34
        'toolbar_images/open.png',
 
35
        'toolbar_images/property.png',
 
36
        'toolbar_images/revert.png',
 
37
        'toolbar_images/terminal.png',
 
38
        'toolbar_images/unlock.png',
 
39
        'toolbar_images/update.png',
 
40
        'toolbar_images/flatview.png',
 
41
        'toolbar_images/onlychanges.png',
 
42
        'wb.png',
 
43
        ]
4
44
 
5
45
def main( argv ):
6
46
    f = file( argv[1], 'w' )
11
51
        data = i.read()
12
52
        i.close()
13
53
 
14
 
        for offset in range( 0, len(data), data_spice ):
15
 
            f.write( '    %r\n' % data[offset:offset+data_spice] )
 
54
        for offset in range( 0, len(data), data_slice ):
 
55
            f.write( '    %r\n' % data[offset:offset+data_slice] )
16
56
        f.write( '    )\n' )
17
57
    f.write( footer )
18
58
    f.close()
44
84
footer = '''
45
85
'''
46
86
 
47
 
 
48
87
if __name__ == '__main__':
49
 
    sys.exit( main( sys.argv ) )
 
88
    sys.exit( main( argv ) )