/usr/lib/python2.7/dist-packages/wx-2.6-gtk2-unicode/wx/tools/img2xpm.py is in python-wxgtk2.6 2.6.3.2.2-5ubuntu4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | #----------------------------------------------------------------------
# Name: wxPython.tools.img2xpm
# Purpose: Convert an image to XPM format
#
# Author: Robin Dunn
#
# RCS-ID: $Id: img2xpm.py,v 1.6 2004/04/27 19:26:29 RD Exp $
# Copyright: (c) 2002 by Total Control Software
# Licence: wxWindows license
#----------------------------------------------------------------------
# 12/21/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o V2.5 compatability update
#
"""
img2xpm.py -- convert several image formats to XPM.
Usage:
img2xpm.py [options] image_files...
Options:
-o <dir> The directory to place the .xpm file(s), defaults to
the current directory.
-m <#rrggbb> If the original image has a mask or transparency defined
it will be used by default. You can use this option to
override the default or provide a new mask by specifying
a colour in the image to mark as transparent.
-n <name> A filename to write the .xpm data to. Defaults to the
basename of the image file + '.xpm' This option overrides
the -o option.
"""
import sys
import wx
import img2img
def main():
# some bitmap related things need to have a wxApp initialized...
if wx.GetApp() is None:
app = wx.PySimpleApp()
img2img.main(sys.argv[1:], wx.BITMAP_TYPE_XPM, ".xpm", __doc__)
if __name__ == '__main__':
main()
|