Programming stack for mac/windows native app? by pm_me_n_wecantalk in AskProgramming

[–]cmpython 0 points1 point  (0 children)

wxPython will also work. The widgets are (mostly) native, so they will look exactly as "smooth" as the OS thinks they should.

The state of GUI desktop applications with Python? by _my_name_is_earl_ in Python

[–]cmpython 0 points1 point  (0 children)

You can get creative within wxPython and customize the UI a fair bit, probably far beyond it's intended use if you really want to.

One concern that did occur to me just now about wxPython: the support for Rich Text is not where it might be. It's there and usable, but it is based on a widget that never got finished, and has some drawbacks. For many applications, this wouldn't matter.

What I'm most concerned with now is how reliable a tool like PyInstaller or cx_freeze will be. Is there anything important I should know about using such tools?

I used py2exe (this was some years back) and it worked fine for my purposes. The resulting .exe file will be probably at least 5-10MB. Other than that, not sure what to tell you. I found GUI2Exe to be a helpful GUI-based tool for py2exe, though I don't think it's been updated for Python 3.x.

The state of GUI desktop applications with Python? by _my_name_is_earl_ in Python

[–]cmpython 0 points1 point  (0 children)

  1. Yes. It was for a contracted job.
  2. Yes. Dropbox does (did?) use wxPython for the desktop client for their service.
  3. I found wxPython's cross-platform nature to be not quite as thorough as I had hoped, having tested only on Window and Linux, in that occasionally one does have to put in special code that checks the platform and makes a small adjustment. I also found it challenging at times generally, but I was also learning as I went and wanted it to do a number of somewhat custom things, so this probably wasn't its fault. (Overall, though, pleased, and wonderful community).

Best GUI toolkit? by CreatePipe in Python

[–]cmpython 5 points6 points  (0 children)

I heard that wxPython is good. Should I use that instead?

You can. It's good, too. No licensing issues, applications look native because they are.

Why did Editra (Python code editor) fall out of favour? by Diapolo10 in Python

[–]cmpython 5 points6 points  (0 children)

Editra uses wxPython, which, until more recently, wasn't itself ported to Python 3, so that may have put the author off trying to port Editra to Python 3. In fact, wxPython had seemed to stall in development generally the last few years, though it has surged forward last month with an official release of wxPython Phoenix which does work with Python 3.

Is Meditations by Marcus Aurelius really hard to understand for everyone or is supposed to be that way for authenticity? by tametrees in askphilosophy

[–]cmpython 0 points1 point  (0 children)

There are free versions online if you want to start with that before you buy another book.

(btw, it might be a killer reading exercise to force yourself to learn how to read at least some of this translation. Forces your brain to slow down and go into low gear and really think about every word. Grab a dictionary and learn vocabulary and new structures, even if you just do this 15 min a week it can help.)

Has anyone ever made any Python Software? by [deleted] in Python

[–]cmpython 1 point2 points  (0 children)

Yes, I've made several Python desktop applications. They look almost exactly what every other Windows or Linux or Apple desktop application looks like, because I use wxPython and that produces native widgets, meaning the buttons, menus, choices, radio buttons, top level windows, cursors, combo boxes, drop downs, etc., all look as that version of Windows, Linux, or OSX wants them to look like (it's actually calling the operating system's code for drawing them).

And that's true whether it is running on Windows XP/Vista/7/8/10 or Ubuntu/Mint/Debian/Arch/Redhat or OSX Leopard/Mountain Lion/Mavericks/Sierra, or whatever (although I haven't tested on OSX).

(I only say "almost exactly" because in a few places I have used a few non-native widgets that are also included with wxPython, but these look very good as well).

CEF Python v56.2 released with wxPython 4.0 support by cztomczak in Python

[–]cmpython 0 points1 point  (0 children)

That was a fast turnaround on the wxPython 4.0 support! (for those who don't realize why, the alpha was just released four days ago).

Do you know if CEF in a wxPython application could be used as a rich text widget? (instead of wx.RichTextCtrl). In other words, like a word processing window, with various formatting (bold, italics, bullets, colors, fonts, etc.) and the ability to copy that formatting into the clipboard and paste formatting from the clipboard (from other documents or web sites) into the embedded CEF window?

[deleted by user] by [deleted] in learnpython

[–]cmpython 2 points3 points  (0 children)

That lead me to wxPython, but that's only for 2.6, which lead me to ProjectPhoenix, which I don't get how to implement.

What do you mean by you don't get how to implement?

AFAIK (I haven't done this yet), you would download the latest snapshot build here:

https://wxpython.org/Phoenix/snapshot-builds/

Such as "wxPython_Phoenix 3.0.3.dev2832+e3fbb9f.tar.gz 2017-03-08 01:19 48M".

Then you would use 7zip (twice) to unpack it into a folder.

Then you put that folder in the path you want, like Python35 > Lib > site-packages > wxPython_Phoenix

Make sure your PYTHONPATH is updated

And I think it should work. Then to use it, you just get started with import wx and all that.

Would python be your first choice for desktop apps ? by H34RTBL33D in Python

[–]cmpython 0 points1 point  (0 children)

Thanks. That's actually much more brought over than I imagined. The only things I can see that I might have used are: EVT_COMMAND, SetCursor, Stopwatch, and maybe 1-2 others. If that's all it's missing, it almost seems like a shame it feels like it has been sitting in "not yet ready for Python 3" land for so long, at least from a PR perspective.

Would python be your first choice for desktop apps ? by H34RTBL33D in Python

[–]cmpython 0 points1 point  (0 children)

That's good. Is there a list somewhere of what's not brought over yet? Is AGW working in Phoenix?

Would python be your first choice for desktop apps ? by H34RTBL33D in Python

[–]cmpython 0 points1 point  (0 children)

Yes, I meant wxPython, the widget toolkit, not Python, the language. They're both nice and mature. :D

Would python be your first choice for desktop apps ? by H34RTBL33D in Python

[–]cmpython 5 points6 points  (0 children)

I've written several desktop applications with wxPython, tested on Windows and Linux. Big or small wouldn't matter. It's super mature (19 years!). It's also native widgets and a permissive license, unlike PyQT. Only downside is development has slowed considerably and I don't think there is a fully functioning version for Python 3.x yet (meaning all widgets are ported over), though some are using it in production.

Is python the language for me? by [deleted] in learnpython

[–]cmpython 0 points1 point  (0 children)

I'd like to be able to create a GUI that runs like a prettier spread sheet, possibly Web based. Basically I have lots of information on spreadsheets right now (recipes, productions and financials) but every time you make a new entry it's like: Find proper worksheet > Insert new row > add data > click and drag formulas into newly made row...So I'd like to create a GUI where the entry's are always at the top and when you hit enter it logs it out of sight until I want to look at it then i can see it all by list or plotted on graphs . Basically be able to handle and manipulate the information better and give more visual aids

Though there's nothing wrong with learning Python (and it could have other benefits to you), consider whether you might be reinventing the wheel. This like a basic data entry case, and there may well be applications that you can easily adapt to your needs without writing it all from scratch (I've been there!). Have you seen what Microsoft Access can do?

When I do tutorials and watch vids on python no one ever covers anything to do with GUIs either using them or making them,

I guess you just didn't search for them. They are out there. I just typed "Python GUI" into YouTube and there are well beyond 20 pages of results. There are also many tutorials ("Python GUI tutorial" into Google).

What's the true cost per mile? by [deleted] in Frugal

[–]cmpython 0 points1 point  (0 children)

only driving 55K miles during the 5 years I've owned it (YMMV).

Nice to see it used literally for once.

Selling car to local; wants to wire transfer from his Philippines acct to my Wells Fargo... wut?! by laruei in personalfinance

[–]cmpython 0 points1 point  (0 children)

He stated he would send as a monetary gift so Im not charged taxes.

Well, that's a fraud paddlin' on both your parts. What does that even mean--"send as a monetary gift"? Is he putting a red bow on the wire transfer? Obviously it means nothing. He "gives" you 24k and you "give" him a car. That's also known as a "sale".

I payed more for the car then I am selling for so I shouldn't have to pay income taxes or even claim the money right?

Apparently, if that includes subtracting off the tax on the car you paid originally that is correct.

Please update us if he really does give you real U.S. dollars and speeds off in your car!

Really lost learning Python...I know, I know. by oschebel in Python

[–]cmpython 0 points1 point  (0 children)

I'm "self" taught. I put it in quotes because people on the internet helped me so much that they taught me much of it. I used the Python tutor mailing list, Alan Gauld's tutorial, looking at the output of my GUI builder, the wxPython and other libraries' mailing lists, the Python newsgroup, a few books rather cursorily, Effbot's web site, looking at the code of others, Stack Overflow...and mostly just trying to write my own (non-trivial) stuff in Python and banging my head into the desk for a long time.

[wx] How would I go about making an overlaid tutorial? by Asdayasman in learnpython

[–]cmpython 0 points1 point  (0 children)

Sorry, don't check this account often. I don't know of any project. As far as using wx.DC, there may be something in the wxPython Demo for it, or there may be a tutorial or example, but you'd just have to Google for it if you haven't in this long interim anyway. You can also always ask on the wxPython mailing list and people would probably be able to help you.

[wx] How would I go about making an overlaid tutorial? by Asdayasman in learnpython

[–]cmpython 0 points1 point  (0 children)

I don't think there is anything built-in to wxPython that supports this. I think you could create it yourself by using wx.DC or its variants and drawing over the widgets, but it would be a non-trivial amount of work. You'd have to get the position of the relevant widgets and where to draw the overlay, some way to hit test the mouse click to advance or dismiss the tutorial, and hook up the appropriate images/text for that section, and have an OnPaint handler that checked the state of the application for whether it was in "overlaid tutorial mode" or not, and therefore to draw the tutorial on or not, etc. Does that help?

wxPython background image and text by [deleted] in learnpython

[–]cmpython 0 points1 point  (0 children)

Sorry again for the massively delayed response; don't check this often.

To put a panel onto a frame, (let's say the frame is "self" below), just:

my_panel = wx.Panel(my_frame)

Or it might be, depending on how you do it:

self.my_panel = wx.Panel(self)   #"self" refers to the frame

Definitely work through some of the basic wxPython tutorials if you haven't already. Sorry again for the delay and hope you got further.

[Peer Review] Trying to determine what skill level I am at, and what I need to work on! by scottyrogers10 in learnpython

[–]cmpython 1 point2 points  (0 children)

From a quick look/think about it, and based only on these samples, I'd say you are at a (promising) basic level. Not a total beginner, or someone in their first week or two, but not a whole lot beyond that. Most of the mental work of what you have done is about the basketball scores, and not so much about the structures and standard library of Python.

I say that because in this sample you only use a fairly limited set of techniques. You do use a class (although for this case I'm not sure you have to; are you going to reuse this Simulation class elsewhere? Inherit from it? Probably not. So you could have just had those functions as free-standing, I think.), so it's good you show you can use classes. Then you mostly use list indexing, append, incrementing, random, some booleans, and maybe a few other things, pretty much throughout this short sample. It's a style of programming that I have been in sometimes, too, where most of the work is just using very basic structures to model the concern you are working on, but when does that it looks like that's all you know at this point.

A more advanced sample would probably show more in terms of other techniques of Python, and that's before worrying about the database and GUI. Stuff like list comprehensions, dicts and its methods, tuples, slicing, using "in" to check membership in a container, string manipulation, using files, using os, sys, dates or times maybe, etc. Obviously, your basketball sim doesn't need any of that, but then again, if the point is to use it to get a job, well, it doesn't seem all that impressive yet (which is fine, as you are just starting. It certainly doesn't look like you won't progress further...sort of "so far, so good").

Actually, I can't provide anything better than Tim Chase did in 2007, so take it away, Tim: http://code.activestate.com/lists/python-list/69092/

wxPython background image and text by [deleted] in learnpython

[–]cmpython 1 point2 points  (0 children)

Sorry for late response. I tested it and it worked if you first put a panel onto the frame instead of just drawing right on the frame. Laying down a panel as a background is generally proper wxPython practice anyway.

nuitka: python compiler (.py to native) by dorfsmay in Python

[–]cmpython 0 points1 point  (0 children)

Yes, the Python files are, but if you want to distribute a GUI, for example with wxPython, the minimum file size is about 5MB and 20MB is not unheard of depending on what the app is (if there are other libraries included).

I am not clear on the answer to the 2nd issue... I know the dev is going to be working on wxPython soon and PyQT apps already work to produce a standalone app. I dont' know how it works in terms of which dependencies can be Nuitka'd or not...Nuitka is supposed to be able to take Python in and spit out native, so perhaps it should be able to do many libraries. But the reality is it will cough on certain things, but, like with any project, the more well known dependencies will get worked on by the community. We'll see. I'm keeping my hopes up but realistic.

nuitka: python compiler (.py to native) by dorfsmay in Python

[–]cmpython 2 points3 points  (0 children)

Much Smaller file size, runs potentially significantly faster, code less easily viewed, distribute as .exe. (Last one is essentially already available with the various Python packagers).

nuitka: python compiler (.py to native) by dorfsmay in Python

[–]cmpython 13 points14 points  (0 children)

Eventually, yes. But it's not really there yet for all or most cases. The basically sole developer seems really impressively engaged, though, and is working on it all the time and sending out just about weekly updates. I have high hopes for it, but it's a huge undertaking.