cross-platform

How to play sound in an Android app created by BeeWare using Python?

How to play sound in an Android app created by BeeWare using Python? Question: I used the BeeWare environment to create a simple MahJong game (find & click pairs to remove them) using Python (with Toga as layout tool) for Android. Now I would like to have some buttons give a "click sound" when pressed: …

Total answers: 2

Using a conda env created on windows for linux

Using a conda env created on windows for linux Question: I am in the process of migrating a number of environments from PC to linux. On windows I run: C:foo> conda env export > environment.yml And, later, on linux, I run: $ conda env create -f environment.yml But I get errors like: ResolvePackageNotFound: – icc_rt=2017.0.4 …

Total answers: 2

Set tkinter icon on Mac OS

Set tkinter icon on Mac OS Question: I am trying to change the icon that appears on my tk application for Mac OS. The last time I checked this code worked for windows. The goal is for this solution to work across all platforms. root = tk.Tk() app = Application(master=root) app.master.iconbitmap(“my_icon.ico”) app.mainloop() The code is …

Total answers: 5

How to share conda environments across platforms

How to share conda environments across platforms Question: The conda docs at http://conda.pydata.org/docs/using/envs.html explain how to share environments with other people. However, the docs tell us this is not cross platform: NOTE: These explicit spec files are not usually cross platform, and therefore have a comment at the top such as # platform: osx-64 showing …

Total answers: 6

Python on Electron framework

Python on Electron framework Question: I am trying to write a cross-platform desktop app using web technologies (HTML5, CSS, and JS). I took a look at some frameworks and decided to use the Electron framework. I’ve already done the app in Python, so I want to know if is possible to write cross-platform desktop applications …

Total answers: 6

Is numpy.save cross platform?

Is numpy.save cross platform? Question: Suppose I save a numpy array to a file, “arr.npy”, using numpy.save() and that I do this using a particular python version, numpy version, and OS. Can I load, using numpy.load(), arr.npy on a different OS using a different version of python or numpy? Are there any restrictions, such as …

Total answers: 1

Positive integer from Python hash() function

Positive integer from Python hash() function Question: I want to use the Python hash() function to get integer hashes from objects. But built-in hash() can give negative values, and I want only positive. And I want it to work sensibly on both 32-bit and 64-bit platforms. I.e. on 32-bit Python, hash() can return an integer …

Total answers: 5

Using absolute unix paths in windows with python

Using absolute unix paths in windows with python Question: I’m creating an application that stores blob files into the hard drive, but this script must run in both linux and windows, the issue is that i want to give it an absolute path from the filesystem root and not one relative to the project files, …

Total answers: 4