seed random from ruby interface
[swftools.git] / wx / gpdf2swf.py
blob3fd12c6bde12171f58daea87c065619efdbfba6e
1 #!/usr/bin/env python
2 # -*- coding: UTF-8 -*-
4 # gpdf2swf.py
5 # graphical user interface for pdf2swf
7 # Part of the swftools package.
8 #
9 # Copyright (c) 2008,2009 Matthias Kramm <kramm@quiss.org>
11 # This program is free software; you can redistribute it and/or modify
12 # it under the terms of the GNU General Public License as published by
13 # the Free Software Foundation; either version 2 of the License, or
14 # (at your option) any later version.
16 # This program is distributed in the hope that it will be useful,
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 # GNU General Public License for more details.
21 # You should have received a copy of the GNU General Public License
22 # along with this program; if not, write to the Free Software
23 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
25 from __future__ import division
26 import os
27 import sys
28 import imp
30 def main_is_frozen():
31 return (hasattr(sys, "frozen") or # new py2exe
32 hasattr(sys, "importers") # old py2exe
33 or imp.is_frozen("__main__")) # tools/freeze
35 if main_is_frozen():
36 sys.path.insert(0, os.path.join("..", "python25"))
37 else:
38 sys.path.insert(0, os.path.join("..", "lib", "python"))
40 import wx
41 from app import Pdf2Swf
43 if __name__ == "__main__":
44 app = wx.App(False)
45 app.SetAppName(u"gpdf2swf")
46 Pdf2Swf()
47 app.MainLoop()