wxpython

How to call an existing LibreOffice python macro from a python script

折月煮酒 提交于 2020-01-17 02:24:33
问题 Currently I call an existing existing LibreOffice macro with this: def OnLOtimestamp(self): try: pid= Popen(['lowriter '"'"'vnd.sun.star.script:fs2TimeStamp.py$fs2_TimeStamp?language=Python&location=user'"'"],shell=True).pid except OSError, e: self.notify_show("Timestamp Error",str(e)) self.ma2.SetLabel("Macro timestamp") self.database['Time_stamp'] = self.database['Time_stamp'] + 1 The key bit being the Popen call, where the macro name is fs2TimeStamp.py and the function is fs2_TimeStamp but

Inconsistency between IDLE/PythonWin during module imports

房东的猫 提交于 2020-01-16 19:13:30
问题 I have been fumbling around between IDLE/PythonWin and even Aptana Studio 3 trying to get some consistency regarding importing modules. The modules I have been using lately are wx from wxPython and the arcpy module. IDLE will let me import arcpy, but not wx. PythonWin will let me import wx, but not arcpy. When I do sys.executable in IDLE I get "C:\Python27\ArcGIS10.1\Lib\site-packages\pythonwin\Pythonwin.exe" When I do sys.executable in PythonWin I get "C:\Python27\pythonw.exe" Additionally,

Inconsistency between IDLE/PythonWin during module imports

南楼画角 提交于 2020-01-16 19:13:03
问题 I have been fumbling around between IDLE/PythonWin and even Aptana Studio 3 trying to get some consistency regarding importing modules. The modules I have been using lately are wx from wxPython and the arcpy module. IDLE will let me import arcpy, but not wx. PythonWin will let me import wx, but not arcpy. When I do sys.executable in IDLE I get "C:\Python27\ArcGIS10.1\Lib\site-packages\pythonwin\Pythonwin.exe" When I do sys.executable in PythonWin I get "C:\Python27\pythonw.exe" Additionally,

Using wx.CallLater in wxPython

佐手、 提交于 2020-01-16 16:16:45
问题 I'm trying to make an object that handles basic time related functions. I want it so when any of the attributes (e.g. self.Time ) are referenced they are up to date. However, for some reason wx.CallLater(1000, self.Tick) doesn't seem to be updating the attributes. It will only print self.Time once, as opposed to every second (like I want it to). How would I go about getting the behavior I desire? Should I use something besides wx.CallLater(1000, self.Tick) ? Snippet : import wx, re, time,

Using wx.CallLater in wxPython

本秂侑毒 提交于 2020-01-16 16:16:04
问题 I'm trying to make an object that handles basic time related functions. I want it so when any of the attributes (e.g. self.Time ) are referenced they are up to date. However, for some reason wx.CallLater(1000, self.Tick) doesn't seem to be updating the attributes. It will only print self.Time once, as opposed to every second (like I want it to). How would I go about getting the behavior I desire? Should I use something besides wx.CallLater(1000, self.Tick) ? Snippet : import wx, re, time,

Using wx.CallLater in wxPython

狂风中的少年 提交于 2020-01-16 16:15:31
问题 I'm trying to make an object that handles basic time related functions. I want it so when any of the attributes (e.g. self.Time ) are referenced they are up to date. However, for some reason wx.CallLater(1000, self.Tick) doesn't seem to be updating the attributes. It will only print self.Time once, as opposed to every second (like I want it to). How would I go about getting the behavior I desire? Should I use something besides wx.CallLater(1000, self.Tick) ? Snippet : import wx, re, time,

python GUI wxPython

两盒软妹~` 提交于 2020-01-16 15:48:49
wxPython 官网 https://pypi.org/project/wxPython/ wxPython 安装 pip install wxPython ( 安装失败 ) 推荐豆瓣镜像 pip3 install -i https://pypi.douban.com/simple wxpython C:\Users\dangzhengtao>pip3 install -i https://pypi.douban.com/simple wxpython Looking in indexes: https://pypi.douban.com/simple Collecting wxpython Downloading https://pypi.doubanio.com/packages/8a/12/08d58ad0a782aa003f2f4c19c2d2d8a55bc0141f9b925ea2f066732a7319/wxPython-4.0.7.post2-cp37-cp37m-win_amd64.whl (23.0MB) |████████████████████████████████| 23.0MB 1.3MB/s Collecting numpy; python_version >= "3.0" Downloading https://pypi.doubanio.com

Pyinstaller Activex Attribute Error with wxPython

旧时模样 提交于 2020-01-16 13:29:23
问题 For some reason, when I compile my app with Pyinstaller, it gives me an error when run: Traceback (most recent call last): File "<string>", line 2, in <module> AttributeError: 'module' object has no attribute 'activex' And the top of my code (the code itself is extremely long). I've also removed a whole load of arrays at the top, which contain text for the app. from wxPython.wx import * from wx import * from wx.lib.wordwrap import wordwrap import sys, os, re class CheatulousFrame(wxFrame):

WxWidgets panels in sizers don't seem to be working

匆匆过客 提交于 2020-01-16 08:40:32
问题 I have a WxWidgets project that is setup like this: Main Frame->Main Panel->Vertical Sizer ->Horizontal Sizer for a few buttons etc ->Horizontal Sizer that shows all the main info. ->In that main sizer, I have a SimpleBook ->The Simple book has 3 panels in it. No matter what, the SimpleBook's visable page is under the top "few buttons" sizer. When having a panel in a sizer, the does the panel abide by the sizer's location within window? This looked "perfect" when the SimpleBook was a Sizer.

Is it possible to make an accordion style check list in wxPython?

眉间皱痕 提交于 2020-01-16 06:57:10
问题 I want to make a checklist with a accordion style in a wxPython widget. I know about checklistbox, but I couldn't find anything in the official docs concerning it. Has anyone done this? 回答1: You can use a wx.combo.ComboCtrl which allows any custom popup, and combine this with a wx.CheckListBox. Here's what is could look like, folded: and unfolded: To get this, I started with the ComboCtrl example in the demo, and in the ListCtrlComboPopup list class I replaced ListCtrl with CheckListBox