Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 14 Nov 2018, 11:31
All times are UTC - 4
 Forum index » Taking the Puppy out for a walk » Misc
Boa Constructor and tahrpup (Various methods)
Moderators: Flash, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [5 Posts]  
Author Message
edmont

Joined: 19 Nov 2012
Posts: 47

PostPosted: Fri 11 May 2018, 23:18    Post subject:  Boa Constructor and tahrpup (Various methods)
Subject description: Tool to make GUI apps using python-wxpython
 

Using tahrpup I've produced a boa constructor, Dev-BoaTP6.0.2.sfs , file and have made this available at :



http://www.smokey01.com/

you load this as you do any other .sfs file .



To help you in the next step I've produced a sample application , with extra
comments , for clarity .
To again use Boa constructor upon these files you'll need to load both into
the editor .

Note ; the Dev-BoaTP6.0.2.sfs file remains valid for updated versions of tahrpup .

I'm using ---------- to indicate the start and end of the files , don't copy
this into your code files.



----------------------------------------- Frame1.py ---------------------------------------------


#Boa:Frame:Frame1

# Use this to select a particular version of wxgtk ,
# necessary even if you only have one version installed.
# wxversion.select('3.0') might be a possibility .
#
import wxversion
wxversion.select('2.8')
import wx


def create(parent):
return Frame1(parent)

[wxID_FRAME1, wxID_FRAME1PANEL1,
] = [wx.NewId() for _init_ctrls in range(2)]

class Frame1(wx.Frame):
def _init_ctrls(self, prnt):
# generated method, don't edit
wx.Frame.__init__(self, id=wxID_FRAME1, name='', parent=prnt,
pos=wx.Point(296, 187), size=wx.Size(693, 445),
style=wx.DEFAULT_FRAME_STYLE, title='Frame1')
self.SetClientSize(wx.Size(693, 445))

self.panel1 = wx.Panel(id=wxID_FRAME1PANEL1, name='panel1', parent=self,
pos=wx.Point(0, 0), size=wx.Size(693, 445),
style=wx.TAB_TRAVERSAL)
self.panel1.SetBackgroundColour(wx.Colour(86, 157, 66))
self.panel1.SetForegroundColour(wx.Colour(239, 225, 25))

def __init__(self, parent):
self._init_ctrls(parent)

#
# Boa constructor , right side , editor , py file , edit ; add module runner .
#
if __name__ == '__main__':
app = wx.PySimpleApp()
frame = create(None)
frame.Show()

app.MainLoop()

---------------------------------------------------------------------------------------------------

----------------------------------------App1.py -----------------------------------------

#!/usr/bin/env python
#Boa:App:BoaApp

# Use this to select a particular version of wxgtk ,
# necessary even if you only have one version installed.
# wxversion.select('3.0') might be a possibility .
#
import wxversion
wxversion.select('2.8')
import wx

import Frame1

modules ={'Frame1': [1, 'Main frame of Application', u'Frame1.py']}

class BoaApp(wx.App):
def OnInit(self):
self.main = Frame1.create(None)
self.main.Show()
self.SetTopWindow(self.main)
return True

def main():
application = BoaApp(0)
application.MainLoop()

if __name__ == '__main__':
main()


if __name__ == '__main__':
pass # add a call to run your script here


-------------------------------------------------------------------------------------------------
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 13083
Location: Arizona USA

PostPosted: Sat 12 May 2018, 08:18    Post subject:  

I have no idea what this does. Should it be in Repositories?
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 12959
Location: Gatineau (Qc), Canada

PostPosted: Sat 12 May 2018, 18:47    Post subject:  

Me neither... Sounds maybe like a protocol to catch a big snake and send
it back to the zoo? (I know, I'm not being nice... Sorry!)

_________________
musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)
Back to top
View user's profile Send private message 
drunkjedi


Joined: 24 May 2015
Posts: 897

PostPosted: Sun 13 May 2018, 02:01    Post subject:  

While installing Playonlinux, I had to install wxpython (which also installed wxwidgets as a dependency) for the GUI.
This is not related to thread but when I searched for info on wxpython, I read that Boa Constructor is tool to make GUI apps using python-wxpython.
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 12959
Location: Gatineau (Qc), Canada

PostPosted: Sun 13 May 2018, 06:30    Post subject:  

drunkjedi wrote:

While installing Playonlinux, I had to install wxpython (which also installed
wxwidgets as a dependency) for the GUI.
This is not related to thread but when I searched for info on wxpython, I read
that Boa Constructor is [a] tool to make GUI apps using python-wxpython.

Ah. Now we know. Thank you, kind sir.

_________________
musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [5 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Taking the Puppy out for a walk » Misc
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0521s ][ Queries: 12 (0.0140s) ][ GZIP on ]