Skip to content
This repository has been archived by the owner on Jul 31, 2018. It is now read-only.

Commit

Permalink
Change the project structure.
Browse files Browse the repository at this point in the history
Add pywinauto version + platform in the title.
Fix portable tools for PyInstaller2.
  • Loading branch information
moden-py committed Sep 12, 2015
1 parent e728729 commit 6a21a44
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 197 deletions.
5 changes: 4 additions & 1 deletion src/_mainframe.py → _mainframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import proxy
import exceptions
import const
import platform
import thread

properties = {}
Expand All @@ -46,7 +47,9 @@ def _init_ctrls(self, prnt):
#-----Main frame-----
wx.Frame.__init__(self, id=wxID_FRAME1, name='', parent=prnt,
style=wx.MINIMIZE_BOX | wx.MAXIMIZE_BOX | wx.SYSTEM_MENU | wx.CAPTION | wx.CLOSE_BOX | wx.CLIP_CHILDREN | wx.RESIZE_BORDER,
title='SWAPY - Simple Windows Automation on Python. v %s' % const.VERSION)
title='SWAPY - Simple Windows Automation on Python v. %s. pywinauto v. %s. %s' % (const.VERSION,
proxy.pywinauto.__version__,
platform.architecture()[0]))
self.SetIcon(wx.Icon(proxy.resource_path("swapy_dog_head.ico"),
wx.BITMAP_TYPE_ICO))

Expand Down
2 changes: 1 addition & 1 deletion src/const.py → const.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@
123 : 'Expand',
}

VERSION = '0.4.3'
VERSION = '0.4.4'
23 changes: 0 additions & 23 deletions mockap/App1.py

This file was deleted.

112 changes: 0 additions & 112 deletions mockap/Frame1.py

This file was deleted.

Binary file removed mockap/logo.bmp
Binary file not shown.
51 changes: 0 additions & 51 deletions mockap/module1.py

This file was deleted.

23 changes: 14 additions & 9 deletions src/proxy.py → proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
# Boston, MA 02111-1307 USA

import pywinauto
import sys, os
import time
import wx
import thread
Expand All @@ -34,15 +35,19 @@

pywinauto.timings.Timings.window_find_timeout = 1

def resource_path(relative):
import os
return os.path.join(
os.environ.get(
"_MEIPASS2",
os.path.abspath(".")
),
relative
)
def resource_path(filename):
if hasattr(sys, '_MEIPASS'):
# PyInstaller >= 1.6
###os.chdir(sys._MEIPASS)
filename = os.path.join(sys._MEIPASS, filename)
elif '_MEIPASS2' in os.environ:
# PyInstaller < 1.6 (tested on 1.5 only)
###os.chdir(os.environ['_MEIPASS2'])
filename = os.path.join(os.environ['_MEIPASS2'], filename)
else:
###os.chdir(sys.path.dirname(sys.argv[0]))
filename = os.path.join(os.path.dirname(sys.argv[0]), filename)
return filename

class SWAPYObject(object):
'''
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 6a21a44

Please sign in to comment.