Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm starting a development project in Python and need advice, help, prayers, for getting my workstation software all setup. It's just me so I'm not interested in anything "cloud" except as my backup hub.
I've succeeded in getting a tiny app to run using both TKinter and wxPython for GUI. (Actually, the wxPython edition has some glitch I haven't resolved yet.) My fingers know Emacs (pause for laughter to end...).
Some initial concerns include:
My brain knows CVS. Do folks still use that for one-man projects?
If not, what should I be doing?
programming for multiple editions of Python
(my workstation has v2.6, 2.7, 3.0, and 3.4...python --version reports v2.7.6)
list of additional packages and modules that I really want to use
(other than what is built-in or ships with Python editions)
is there value in switch to another IDE? If so, which?
(please don't make this an flame war about editors and IDEs)
what else have I forgotten to think about?
My workstations run Linux Mint 17.3 with Cinnamon or KDE desktops.
I also run an Ubuntu Server as my in-house mothership.
I've been a code slinger since the 70's with a Masters in Computer Science. The last part of my career was Project Manager "suit". I'm blowing the dust off my developer skills. Other than that, I'm retired.
Thanks in advance,
~~~ 0;-Dan
PS/ I'll summarize what I learn here and post it for LQ and others. 0;-D
Last edited by SaintDanBert; 05-31-2016 at 01:28 PM.
Folks,
I'm working to learn Python programming that includes a GUI. I found a web site, Building a Basic GUI with Python and built the wxPython edition. Can someone help with a runtime problem?
Symptoms:
(please refer to the code found at the above web site)
the label appears, but the colors are not correct
the text entry field does not expand to the size of the supplied static string
nothing happens when I type text and press ENTER.
BUTTON works as expected.
Here is the code that is giving me fits:
Code:
class simpleapp_wx(wx.Frame):
.
.
.
def initialize(self):
#--- load our layout manager
sizer = wx.GridBagSizer( )
#--- prepare for text entry
self.entry = wx.TextCtrl( self, -1, value=u"Enter text here.")
sizer.Add(self.entry,(0,0),(1,1),wx.EXPAND)
self.Bind(wx.EVT_TEXT_ENTER,self.OnPressEnter,self.entry )
#--- next we need the button
button = wx.Button( self,-1,label="Click me!")
sizer.Add(button, (0,1) )
self.Bind(wx.EVT_BUTTON,self.OnButtonClick,button)
#--- we need a label
self.label = wx.StaticText( self, -1, label=u"Hello!")
self.label.SetBackgroundColour( wx.BLUE )
self.label.SetForegroundColour( wx.WHITE )
sizer.Add(self.label,(1,0),(1,2),wx.EXPAND )
#--- now we want to permit dialog to 'resize'
sizer.AddGrowableCol( 0 )
self.SetSizerAndFit( sizer )
#..... limit to horizontal resize
self.SetSizeHints( -1, self.GetSize().y, -1, self.GetSize().y )
self.entry.SetFocus( )
self.entry.SetSelection( -1, -1 )
self.Show( True )
I'd love to look at what is happening with xev -id or similar, but I've no idea how to discover the needed X-window ID to watch. That should clearly show how dated and rusty my skills are.
My workstation is Linux Mint 17.3. python --version reports v2.7.6.
Thanks to my distro, I have a mix of v2 and v3 Python installed.
I suspect that I'm seeing some differences between what the web site example expects and what is provided by my available Python and modules. I have no idea how to find these problems with versions and such.
I built the TKinter edition from the same web site and all worked as expected.
It would be more useful if you would include the full code sample.
I believe your problem has nothing to do with Python 2 vs 3. But it's hard to say what the problem is without seeing what you are actually running.
I highly recommend zetcode.com for really good wxPython (he has both a beginner's guide and advanced). It's an amazing site with solid examples that you can build up from.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.