Active7 months ago
The problem is on Mac OS X. There are 2 tools to generate an '.app' for Mac: py2app and pyinstaller. Py2app is pretty good, but it adds the source code in the package. I don't want to share the code with the final users. With these 20 typography apps, you can! Want to create beautiful typography on your mobile device? With these 20 typography apps, you can! 20 Awesome Typography Apps You Need For Really Beautiful Fonts. (2018 Updated) 3 Master These 25 Mac Shortcuts to Work Faster and Smarter 4 7 Clever Goal Tracker Apps to Help You Make the Most of. F-Script is a lightweight open-source scripting layer specifically designed for the Mac OS X object system (i.e. F-Script provides scripting and interactive access to Cocoa frameworks and custom Objective-C objects.
Calligraphy & Hand Lettering Resource Guide. Home Contributors The Besotted Archive About Contact. Software & Apps Desktop and mobile software for digital hand lettering, graphic design, photo editing, and font designing. GIMP Open-source photo editing and painting software for Mac OSX, Windows & Linux. MacPhun Affordable photo. Price: $1.99. The AnyFont app – only for iPhones and iPads – allows you install numerous additional fonts onto your machine. Create stellar presentations when you’re on the road, and never lose your audience’s attention due to dull slides.
I want to create a GUI application which should work on Windows and Mac. For this I've chosen Python.
The problem is on Mac OS X.
There are 2 tools to generate an '.app' for Mac: py2app and pyinstaller.
- py2app is pretty good, but it adds the source code in the package. Idon't want to share the code with the final users.
- Pyinstaller generates UNIX executable, so how to run it on Mac? Icreated a bundles with this executable, but the resulted '.app' isnot working.
The questions are:
- How to configure py2app to include the source code in theexecutable, so the final users will not have access to my program?
- How to convert UNIX executable to Mac '.app' ?
- Is there a way to compile Python code with GCC ?
- In Windows it's easy, I created an 'exe' file from Python code andit works. Is it possible to create a single file 'app' for Mac ?
P.S. I use two computers (Windows and for Mac), Python 2.7, wxPython, py2exe, py2app and pyinstaller.
Also, I have checked out these sites:
Chris32.1k1313 gold badges106106 silver badges134134 bronze badges
Cristian CiocăuCristian Ciocău68922 gold badges88 silver badges1212 bronze badges
11 Answers
How to configure py2app to include the source code in the executable, so the final users will not have access to my program?
Unless you very seriously hack the python interpreter (and include the mangled version) there is no really good way to hide the source from a moderately skilled and determined user. I strongly believe this is true on Windows also. Basically, whether you include true source or bytecode, a pretty clean version of the source can be recovered. More importantly, in my opinion, unless you include the actual source code (as opposed to bytecode, you will introduce a possible dependency on the interpreter version).
How to convert UNIX executable to Mac '.app' ?
What do you mean by a UNIX executable? A Darwin (OS X) binary [which isn't actually UNIX]? That can be done using the kinds of tools you already mentioned, but it must be done carefully to avoid library dependencies.
If all you want it a simple wrapper to put a command-line binary into a window, it's pretty easy to accomplish and the free XCode suite has several examples that would serve (depending on what outputyou wan to deliver, if any).
Is there a way to compile Python code with GCC ?
GCC does not compile Python. It's a different language (although there tools in the gcc family rthat support multiple language front-ends, but not Python). There are tools that attempt to translate Python into C, and then you can compile that into a true binary, but this only works for programs that avoid certain types of construct, and the process (and restrictions) need to apply your libraries as well.
One project to allow this is Cython. It works well for some typesof code, mostly numerical code, but it is not trivial to install andexploit, very especially if you want to produce something that runs on multiple different computers.
One project to allow this is Cython. It works well for some typesof code, mostly numerical code, but it is not trivial to install andexploit, very especially if you want to produce something that runs on multiple different computers.
In Windows it's easy, I created an 'exe' file from Python code and it works. Is it possible to create a single file 'app' for Mac ?
I would have to say I am skeptical -- very skeptical -- about this. Just like the OS X case, the exe almost certainly has the source code trivially accessible within it.
One fairly easy trick is to encrypt the source code and then decrypt it on the fly, but thisseems to me like more trouble than it's worth.
GregDGregD
PyInstaller will automatically create bundles under Mac OSX for windowed executables. When running ypinstaller.py, make sure to pass the option '--windowed'.
Ipad Pro Calligraphy App
This feature is documented in the website of pyinstaller
Dicky TsangDicky Tsang2,64533 gold badges1414 silver badges1818 bronze badges
If you're not completely committed to wxPython (and for anyone else looking for a cross platform Python GUI framework), I recommend you check out Kivy. It's cross platform, GPU accelerated, and it will do the app packaging for you. It's easy to jump into, has a well thought-out architecture, and gives you an incredible amount of flexibility in terms of the interface. It's the best way I've found to make a cross platform Python GUI app.
Rafa6,53933 gold badges2929 silver badges5454 bronze badges
Jonathan PotterJonathan Potter
cxFreeze was the choice.I use it pack my python program to a Mac OS X app. Which works like a charm.
handsomeguihandsomegui
Automator was already mentioned as a quick and simple solution for Pythons scripts that are contained in a single file, but since the Automator UI has so many options, and it is not obvious how to actually do it, I'll provide step-by-step instructions (verified to work on Yosemite):
- In Automator select File >New and pick Application as document type.
- Next, make sure Actions tab is selected on the left, and then in the search box type
run
. Among other options you'll see Run Shell Script — doubleclick it, and an editor window will appear in the right panel. - From the Shell dropdown menu select /usr/bin/python.
- Paste your Python code into the edit window and then pick File >Save.
By default, the app will be saved under
$HOME/Applications
and will appear in Spotlight.If you want to be able to set your own icon and have some fancy features, like task bar icons with a menu, log windows etc, then have a look at Platypus — an open-source app for creating MacOS native bundles.
ccpizzaccpizza13.8k88 gold badges9191 silver badges9494 bronze badges
2: You can't 'convert' it, but you can move the executable to
tkbxtkbxApp.app/Contents/MacOS/something
in a .app file, with CFBundleExecutable
set to 'something'. This would not generally be recommended.5,3332424 gold badges6565 silver badges106106 bronze badges
A motivated person could probably reconstruct usable source code from the Python bytecode in your app, so you might reconsider your opposition to py2app. If you don't trust your final users, why are you doing business with them?
Russell BorogoveRussell Borogove14.4k11 gold badge3535 silver badges4141 bronze badges
The only way is py2app. You have no other way. Sorry.The research you did seems very solid and you did not miss anything.
transilvladChinese Calligraphy App
transilvlad8,0811010 gold badges3535 silver badges7474 bronze badges
Having used py2exe for windows users so they wouldn't have to deal with library versions, I've torn apart the compiled programs, they include the python bytecode files. While you can make it a violation of the license to look inside those, the fact is that if a computer can execute them, I can read them. It is possible to compile python programs with gcc, via a C preprocessor (try looking for 2c.py on google), I don't know if any of them support GCC. Again, you don't gain any security through using them, but you can get a significant speed improvement.
Calligraphy App For Pc
PerkinsPerkins
I haven't tried it with big Python projects, but for my own scripts, the easiest way I found was to use Automator
You can interactively create an app project with Run Shell Script action, then paste in your script in its editor, select your shell program (/usr/bin/python), finally save the project. And you have yourself a Mac native app.
Automator can also be driven by AppleScript. So you can pipeline this py-2-app conversion process to your build scripts.
I've never tested a GUI program with it so I don't know if you'll be happy with it. But I'd give it a try since you may wonder how well all the cited 3rd-party python modules/applications are maintained, and how long they are gonna last. Coming bundled with OS X, Automator will likely stay, unless Apple got REALLY tired of it.
kakyokakyo2,80644 gold badges3636 silver badges6767 bronze badges
cxFreeze is best solution available, first create your program or application using python and than make setup file for your application, and than build the app using build command
python setup.py build
, according to your requirement you need to make some changes.NilanjNilanj
protected by Community♦Jan 3 at 3:43
Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
Would you like to answer one of these unanswered questions instead?
Not the answer you're looking for? Browse other questions tagged pythonwxpythonmacospy2app or ask your own question.
The funny thing about Evernote and other so-called note-taking apps: Most don’t support note-taking of the actual handwritten variety. That’s a shame, because discreetly jotting down shorthand during a critical client meeting trumps pounding away at an awkward virtual keyboard every time.
Fortunately for inveterate stylus lovers, a bevy of handwriting apps offer bells, whistles, and the ability to scribble all over your smartphone or tablet until your hand cramps. Here are a few worth checking out.
Notes Plus (iPad, $7.99): Few handwriting apps can top Notes Plus. Its powerful handwriting-recognition engine parses scrawl by fat fingers and slim styli alike, sharpens hastily drawn shapes, and enables you to edit notes or drag-and-drop whole sections to other areas. Notes Plus doesn’t skimp on the extras, either: It offers audio note support, sharing, PDF import/export capabilities, and automatic Dropbox synchronization. The only major downside is that it’s currently an iPad exclusive.
Penultimate (iPad, 99 cents): If you don’t need the extra features of Notes Plus, Penultimate is a highly regarded — and cheap — handwriting app that also happens to be an iPad exclusive. It lacks audio support, PDF import options, and multitouch capabilities, but the handwriting recognition is crisp and responsive. Like Notes Plus, Penultimate packs numerous note-sharing tools and plays nice with Dropbox. It also adds Evernote support, which compensates for its inability to turn notes into editable text, a major flaw of most handwriting apps. Exporting a PDF of a note to Evernote lets Evernote’s excellent optical character recognition technology shoulder the burden.
Antipaper Notes (Android tablets, free; $5.49 upgrade available): Not every tablet sports Apple’s iconic logo. Hordes of happy Android users say that Antipaper Notes is the best tablet-optimized handwriting app available for Google devices — and the basic version is free. The attractive-looking app mimics a real notepad and sports a wide variety of page and pen types. Writing appears quickly and flawlessly, but Antipaper Notes has some notable drawbacks: The number of pages is limited in the free version, and notes may only be exported as PNG or JPG image files (not PDFs) via email. (pictured)
PenSupremacy (Android, $1.49): PenSupremacy offers a little more flexibility than Antipaper Notes. The app works on Android phones and tablets, for one thing, and it can export PDFs of your notes via email, Evernote, Facebook, and various other means. The ability to import pictures into pages is another plus, as is voice dictation for audio notes. However, not everything is rosy in PenSupremacyland: Users say the app’s handwriting recognition can be sluggish and inaccurate, and there is no Undo option.
WritePad (iOS, $3.99; Android, $9.99): WritePad doesn’t even try to save your notes in shorthand. Basically, you scribble your notes on the screen, and when you pause WritePad converts them to text. Even better, the software adapts to your chicken scratch and grows more accurate the more you use it. The handwriting-recognition engine understands English, French, German, and Spanish, and text can be automatically translated into a dozen different languages. There’s even a built-in calculator. The more expensive Androidversion adds a WritePad virtual keyboard to your device that lets you hand-write emails, website URLs, text messages, and more, which the keyboard then converts to text. It’s all very intriguing, but beware: User reviews say the handwriting-to-text conversions are inaccurate until the app catches up with your penmanship. Customer service and Android device support can also be hit-and-miss.
This is only the tip of the handwriting-app iceberg. Which apps do you prefer? Do you even care about taking notes in shorthand? Please share your thoughts in the Comments section below.