cross-platform

Find out if a python script is running in IDLE or terminal/command prompt

强颜欢笑 提交于 2019-12-12 10:49:07
问题 Is there a way to find out if the python script is running in the IDLE interpreter or the terminal? Works cross-platform if possible, or if needed a different way for each platform. Work with Python 2 and Python 3 if possible, or if needed a different way for each version. The only way I could think of is checking the processes running for IDLE but I don't know how to do that right. If IDLE is open for another script and my script is running in the terminal, a process check would return true

How can I call an OS X-specific method for my cross-platform Jar?

时光毁灭记忆、已成空白 提交于 2019-12-12 10:48:46
问题 I have a compiled executable JAR file that fails on Windows platforms. The reason for this is because I want to properly integrate certain OS X-specific properties — such as the About window . Even though I specifically cordoned off the code using a conditional, the JAR is still crashing with a NoClassDefFoundError on the very first line of execution. if (isOSX()) { com.apple.eawt.Application application = com.apple.eawt.Application.getApplication(); application.setAboutHandler(new com.apple

Cross Platform Flash Player Embedding

旧巷老猫 提交于 2019-12-12 09:53:19
问题 I need to embed the Flash player in a native application (C++) in a cross platform way (at least Windows and Mac OSX). I need to allow the Flash gui to make calls back to the native application to do things that Flash normally can’t do (e.g. write to the file system, talk to devices, loading native image processing libraries, etc). The Adobe AIR runtime is too restrictive so it is unfortunately not an option. I’ve used ActiveX hosting in Windows previously, but is there a cross platform gui

Recreate Window without destroying the Context

落爺英雄遲暮 提交于 2019-12-12 09:00:00
问题 This question is about a graphics application using OpenGL. (At the time I am using the framework GLFW but I consider changing it.) My aim is to let the user (as much as possible) continuously switch between fullscreen mode and windowed mode. This procedure should take less than a second and can occur during runtime. For example see the game Minecraft where the user can toggle fullscreen with virtually no delay. The window recreation process doesn't take so much time. But the problem is, that

Is there a reliable way to keep Compact Framework and Desktop projects in sync with Visual Studio 2008?

邮差的信 提交于 2019-12-12 08:58:56
问题 I am working on an SDK that is targeting both the Full/Desktop .Net Framework and the Compact .Net Framework. As such I have a solution that has projects for the Compact Framework and the full framework. The project files contain the same source files, or thay should. Some of the developers that are working on this SDK with me are only working on the full framework side. From time to time they add a file to the full framework projects, but forget to add it to the compact framework project.

Is there a C++ cross platform “named event like the ”CreateEvent()" in Win32?

梦想的初衷 提交于 2019-12-12 08:05:30
问题 I am looking for something analogous to CreateEvent(), SetEvent() and WaitForMultipleObjects() from the Win32 world. Specifically this has to be accessible across processes on the same machine. We are already using Poco for some cross platform stuff, but I don't see that the Poco::Event is what I want. perhaps i am missing something. EDIT: To explain what I want to do: I want process B to know when something happens in process A. This is trivial in win32 - Each process/thread calls

Qt - How to save a configuration file on multiple platforms

坚强是说给别人听的谎言 提交于 2019-12-12 07:28:02
问题 I'm writing a Qt application that needs to save some settings to the user's configuration directory. I've come up with the following code to get this folder: #ifdef Q_WS_WIN path = QDir::homePath() + "/Application Data/Timely"; #else path = QDir::homePath() + "/.config/Timely"; #endif This fails on Windows 7 cause Windows 7 uses App Data/Roaming/[YourApp]. How can I get the user's configuration folder in a cross-platform way? I'm I missing something obvious? (this is supposed to be an easy

Text in QML rendered different accross platforms

你。 提交于 2019-12-12 07:18:59
问题 I am seeing inconsistencies in the rendering of text between different platforms: The image on the top left is produced in android, and as the red guide lines indicate, it differs from the "reference" windows output in terms of vertical position and angle of the italic style. Rectangle { width: 100 height: 50 color: "grey" Text { x: 4 y: 2 font.family: sysfont font.pixelSize: 13 width: contentWidth color: bgc text: "Type" } Text { x: 5 y: 13 font.family: sysfont font.pixelSize: 32 font.italic

Signifying unsaved changes by prepending * in window title - how to add a black dot in the window close button on Mac OS X?

跟風遠走 提交于 2019-12-12 06:09:33
问题 I am writing a text editor in Tkinter, using a TopLevel window that includes a Text widget. Currently, when a document/buffer contains unsaved changes, I prepend the title of the window with an asterisk as in MyDocument -> *MyDocument , as customary under *nix environments. For that purpose, I am using the edit_modified method of Text as follows: import Tkinter as tk class EditingWindow(tk.Toplevel): # [...] self.text = tk.Text(...) # track modifications of the text: self.text.bind("<

Library for cross-platform developing on Android/IPhone OS [closed]

孤街醉人 提交于 2019-12-12 06:08:37
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . does anyone know a good library which is compliant with both Android and IPhone operating systems with a license less strict than GPL 2.0, 3.0? Any license like Eclipse, BSD, LGPL should be fine. I'm looking for a nice general purposes library , to be used in building a closed source application that should run