Web Development int64 0 1 | Data Science and Machine Learning int64 0 1 | Question stringlengths 35 6.31k | is_accepted bool 2
classes | Q_Id int64 5.14k 40.5M | Score float64 -1 1.2 | Other int64 0 1 | Database and SQL int64 0 1 | Users Score int64 -6 163 | Answer stringlengths 19 4.91k | Python Basics and Environment int64 0 1 | ViewCount int64 12 475k | System Administration and DevOps int64 0 1 | Q_Score int64 0 346 | CreationDate stringlengths 23 23 | Tags stringlengths 6 68 | Title stringlengths 12 138 | Networking and APIs int64 0 1 | Available Count int64 1 31 | AnswerCount int64 1 35 | A_Id int64 5.3k 72.3M | GUI and Desktop Applications int64 1 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 0 | I have been playing with basic Python and be familiar with Turtle module in Python. Then, I download Kivy, and write some basic application with that.
my problem is that I couldn't use Turtle module in Kivy. I search a lot, but I couldn't find any example or tutorial on it.
is it possible to use turtle module in Kivy a... | true | 33,763,674 | 1.2 | 0 | 0 | 3 | The default turtle gui uses tkinter (a different graphics toolkit), it can't draw in a kivy app. You can certainly use the turtle module with Kivy, it should be very easy to draw the turtle's path, but you'd need to write some code to actually do this - turning the turtle position stuff into kivy graphics instructions. | 0 | 984 | 0 | 2 | 2015-11-17T17:47:00.000 | android,python,kivy,turtle-graphics | Turtle and Kivy | 0 | 1 | 1 | 33,767,341 | 1 |
0 | 0 | I have downloaded the package 'Kivy-1.9.0-py3.4-win32-x64' from their website. I extracted it and gives me a folder with gstreamer, kivy34, MinGW, etc. As I have searched to some tutorials I clicked the kivy-3.4.bat file to set the paths. Now I'm lost, what to do next?
I wanted to do Kivy applications through Python I... | false | 33,782,926 | 0 | 0 | 0 | 0 | Make sure you have PIP installed (it gives the option to install when you download python). Then, open a command shell (CMD on Windows; enter the search bar and type in 'cmd') and type pip install kivy.
Some would recommend setting up a virtualenv and stuff but as a quick answer this should work. | 0 | 2,161 | 0 | 0 | 2015-11-18T14:40:00.000 | python,kivy | How to install Kivy on Windows? | 0 | 1 | 1 | 43,096,978 | 1 |
0 | 0 | I have been trying to install the pygame module and get the error
ImportError: No module named 'pygame'.
I currently have Python version 3.3.4 and installed pygame cp33 32-Bit.
It is currently a whl file and I have tried following tutorials etc in order to import it but I'm having no luck. | false | 33,786,307 | 0 | 0 | 0 | 0 | You can easy install and check which version fits you by downloading PyCharm IDE. When you download it, go to:
File
Settings
Project <project's name>
Python Interpreter
Then press the plus icon on your right (install), and type pygame. When you find the module, check the box Specify version and select the version you... | 1 | 346 | 0 | 1 | 2015-11-18T17:17:00.000 | python,pygame | Installing Pygame Module | 0 | 1 | 3 | 63,551,510 | 1 |
0 | 0 | Is it possible to have dynamic text alignment with kivy listview?
I have a list of responses from a web lookup.
I would like to have the text alignment (left or center) of each list item depending on the quality of the response item.
I can't find a way to access 'halign' for each list item. | false | 33,789,249 | 0 | 0 | 0 | 0 | You can use your own item class, I think this is an option on the ListAdapter (maybe named cls). In doing so, you can add whatever logic you like to how the item is displayed. | 0 | 383 | 0 | 0 | 2015-11-18T20:00:00.000 | python,widget,kivy | Kivy listview text alignment | 0 | 1 | 1 | 33,792,073 | 1 |
1 | 0 | I am working on a screen written in wxPython, and Python, that has five groups of CheckBoxes. Three of the groups can have between none and all the CheckBoxes selected. However with two of the groups only none or one can be selected. RadioButtons have been considered and disregarded as you cannot select none and their ... | true | 33,829,421 | 1.2 | 0 | 0 | 0 | Have you considered cycling through them on EVT_CHECKBOX.
Each box can be tested with IsChecked(), if the test is True then you can use SetValue(False) on the others or whatever suits your requirements.
Also, there is nothing to stop you creating a radiobutton with the value None. | 0 | 915 | 0 | 0 | 2015-11-20T14:43:00.000 | python,checkbox,wxpython | Need To Select Only One Checkbox In Group | 0 | 1 | 1 | 33,853,583 | 1 |
0 | 0 | After researching a little I found some libraries like pygame, tkinter, etc. I was able to install pygame easily but am not able to find any help on how to install tkinter for v3.2.
I know many of these type of q's heve been answered but most of them show only errors when importing Python or it is for Linux/mac.
I have... | true | 33,968,542 | 1.2 | 0 | 0 | 0 | Tkinter is already installed with Python so you just need to import tkinter. Don't import Tkinter as you might see in some tutorials because Python 3+ has a different version. | 0 | 189 | 0 | 0 | 2015-11-28T06:43:00.000 | python,tkinter | Tkinter install in Python version 3.2 | 0 | 1 | 1 | 33,969,234 | 1 |
0 | 0 | So far I am using Tkinter to make textfields in Python.
My question is how do I make it so there are placeholders, preferably in the style of mathematica or something similar so that when a user starts a new line, a right and left place holder appear on that line and the user can only enter text in these placeholders?... | false | 33,974,018 | 0 | 0 | 0 | 0 | tkinter doesn't have anything built-in to support this. Tkinter likely has all of the fundamental building blocks in order to build it yourself, but it will require a lot of work on your part. | 1 | 62 | 0 | 0 | 2015-11-28T17:06:00.000 | python,tkinter,textfield | Adding dotted text placeholders within a textfield in Python? | 0 | 1 | 1 | 34,096,603 | 1 |
0 | 0 | I trying to make an application with a pop-up menu - when I type SPACE-R_ALT on my keyboard, globally across the OS (Windows in my case). When that happens, I want to pop-up a window (I know how to do that), and it is crucial that I can happen to be using Chrome or Word, then tap Space-Right Alt, then be able to open u... | true | 33,980,603 | 1.2 | 0 | 0 | 0 | I figured it out with Furas's help - with Pyhook I can wait for events globally, and then tie in the event with tkinter events. | 0 | 65 | 0 | 0 | 2015-11-29T07:52:00.000 | python,tkinter | Check for tkinter events globally (across OS) | 0 | 1 | 1 | 33,993,563 | 1 |
0 | 0 | I can't seem to get Tkinter to load up in the pip search menu. This is what I have done so far: view>python enviorments>updated/installed setuptools>pip search menu> input"Tkinter" with no luck.Please help, Thanks guys! | false | 34,014,148 | 0.53705 | 0 | 0 | 3 | Tkinter should be installed by default, so there's no need to install it.
If you don't have it, open Programs and Features, find Python and select Change, then make sure that the Tcl/Tk option is selected. | 1 | 11,918 | 0 | 2 | 2015-12-01T06:41:00.000 | python-3.x,tkinter,visual-studio-2015 | How to install Tkinter to visual studio 2015 | 0 | 1 | 1 | 34,078,641 | 1 |
0 | 0 | I own a raspberry pi 2 and i start learning Python. I would like to do something very basic : the window of my Python program on top of omxplayer window like a notification system.
I have been able to make an "always on top" window with TKinter but when i launch omxplayer my window is no more on top.
I would apreciate... | false | 34,031,727 | 0 | 0 | 0 | 0 | My solution is to used Hello_font from the hello_pi examples on the raspberry pi. | 0 | 985 | 0 | 0 | 2015-12-01T22:51:00.000 | python,omxplayer | Python + TKinter + OMXPlayer window on top | 0 | 1 | 2 | 34,075,563 | 1 |
0 | 0 | The title says it all, really. I am writing functions that deal with pygame.Surface objects from multiple sources. Among other operations, these functions will ensure that the Surface objects they return have been convert()ed at least once (or, according to user preference, convert_alpha()ed), as is required to optim... | true | 34,033,149 | 1.2 | 0 | 0 | 1 | I do not believe the existing API provides a way to do this. I think the intended use is to convert all your surfaces (why wouldn't you?) so you never have to worry about it.
Perhaps it is possible to subclass pygame.Surface and override the convert methods to set a flag in the way you wish. | 0 | 86 | 0 | 1 | 2015-12-02T01:02:00.000 | python,pygame,pygame-surface | how can you tell whether convert()/convert_alpha() has already been run on a pygame.Surface? | 0 | 1 | 1 | 34,033,205 | 1 |
0 | 0 | I am a making a blackjack game with cards using turtle and each time I play a hand turtle just prints over the last game instead of clearing the window. Is there a method that closes the window when it is called or is there another why of doing this? | true | 34,033,701 | 1.2 | 0 | 0 | 18 | I want to clarify what various turtle functions do as there are misunderstandings in this discussion, including in the currently accepted answer, as the method names themselves can be confusing:
turtle.mainloop() aka turtle.Screen().mainloop() Turns control over to tkinter's event loop. Usually, a lack of turtle.Scr... | 0 | 46,320 | 0 | 7 | 2015-12-02T02:07:00.000 | python,turtle-graphics | Python: How to reset the turtle graphics window | 0 | 1 | 2 | 42,260,054 | 1 |
0 | 0 | I am trying to build the android app from kivy application. I used the Buildozer image as given on the kivy.org downloads page, but that Virtual Machine never runs on the virtualbox. Is there any other way to do this. I have seen some SO questions regarding this but they seem to be very old and hasn't been of much help... | false | 34,035,329 | 0 | 0 | 0 | 0 | You need to provide information about what goes wrong when you try to run the VM - nobody can help if we know only that something doesn't work.
Alternatively, you can make a new VM with any linux distro (a recent Ubuntu is a good choice) and install all the dependencies. Kivy's VM is nothing special except that it has ... | 0 | 145 | 0 | 1 | 2015-12-02T05:08:00.000 | android,python,apk,kivy | Building Android apk from kivy application | 0 | 1 | 1 | 34,042,147 | 1 |
1 | 0 | I'm writing Android app.
The problem is that it should execute some calculations and library for this is written in Python.
What is the best way to invoke Python from Android/Java?
I heard about Kivy and even managed to run application, but python code returns latex formulae, that can't be rendered within Kivy app. | false | 34,069,428 | 0 | 0 | 0 | 0 | You can probably render LaTeX in Kivy fairly easily using a png exporter (such as presumably exists for web export tools, and modes like emacs' preview mode).
If you need to run python as part of a java app, probably a practical way to do it is to use kivy's python-for-android tools with your own java frontend, invokin... | 0 | 231 | 0 | 0 | 2015-12-03T15:11:00.000 | android,python,kivy | Run Python Code from Android | 0 | 1 | 1 | 34,069,875 | 1 |
0 | 0 | I have code which runs immediately when I run using python. The code has tkinter module and bunch of if statements. I created a standalone executable and it takes about 8 minutes to give the output for the GUI. I was wondering why it takes so much time to run ?
Thanks in advance. | false | 34,099,639 | 0 | 0 | 0 | 0 | If you do a bunch of work before calling mainloop, you won't see anything appear until you call mainloop or update. The only way a window will appear is in response to an event that asks for the window to be displayed, and tkinter can't process events if mainloop isn't running. | 1 | 275 | 0 | 0 | 2015-12-05T00:16:00.000 | python,tkinter,pyinstaller | pyinstaller executable takes more than 8 minutes print out? | 0 | 1 | 1 | 34,137,551 | 1 |
0 | 0 | I am working on an assignment for school, and didn't realize that I needed to install the pygame/livewires package to use the program I am writing, because I have been using a school laptop while in class and haven't used my personal laptop. It is a really simple program, but I still can't run it because the pygame set... | false | 34,123,018 | 0 | 0 | 0 | 0 | For python3 this works for me:
First you need to install pip module (it will help to install livewires in last step)
sudo apt install python3-pip
Install pygame module which is required for livewires
sudo apt install python3-pygame
And at last install needed module
pip3 install livewires
But most likely livewire... | 1 | 3,136 | 0 | 1 | 2015-12-06T21:30:00.000 | python,installation,pygame,livewires | Installing livewires for python | 0 | 1 | 3 | 66,070,964 | 1 |
0 | 0 | I use LinuxMint 17.3 Cinnamon in VirtualBox, 1920*1080 resolution is used in this machine, the Hi-DPI option is turned on. The host machine is Windows 10, with 3840*2160 resolution.
Despite turning on Hi-DPI option in LinuxMint, some applications become to look good for comfortable work, in terms of scaling, but python... | false | 34,132,203 | -0.099668 | 0 | 0 | -1 | you can use the Clmage module to increase the resolution of your GUI render | 0 | 15,979 | 0 | 9 | 2015-12-07T11:14:00.000 | python,python-2.7,tkinter,tk | Scaling of Tkinter GUI in 4k (3840*2160) resolution? | 0 | 1 | 2 | 68,737,194 | 1 |
0 | 0 | I am currently using the turtle.goto cords from a text file. I have the triangle drawn and everything but I don't know how to fill the triangle. | false | 34,160,995 | 0.379949 | 0 | 0 | 2 | You are ending fill after every new coordinate. You need to call t.begin_fill() before your for loop and call t.end_fill() after the last coordinate, otherwise you are just filling in your single line with each iteration. | 1 | 812 | 0 | 2 | 2015-12-08T16:26:00.000 | python,colors,turtle-graphics | Python Turtle fill the triangle with color? | 0 | 1 | 1 | 34,161,243 | 1 |
0 | 0 | I use QListView (in PyQt5) to display strings.
I want to have the background color of each item in that list changing between two colors to make it easier to read.
I tried Qt.DecorationRole but this only create an "icon" on the left side of each item. | true | 34,188,594 | 1.2 | 0 | 0 | 1 | self. listWidget.setAlternatingRowColors(True) this will give you Alternate color for each row. | 1 | 963 | 0 | 0 | 2015-12-09T20:43:00.000 | python,c++,qt,pyqt,qlistview | QListView with row background in two different colors | 0 | 1 | 1 | 34,188,907 | 1 |
0 | 0 | I have a Python script and a C++ program running at the same time, both accessing the GPIO pins (not the same ones, though) in this order:
C++
Python
C++
The access of the C++ program worked (I used wireless transmitters and received the message). After that the Python access (light up an LED) worked as well. But whe... | false | 34,200,159 | 0 | 1 | 0 | 0 | If you clean up the GPIO Headers in both scripts, it should be possible, otherwise it wont work.
You can clean up in python by using GPIO.cleanup(), then it sould work, cause it is clean again to your c++ Code. | 0 | 250 | 0 | 0 | 2015-12-10T10:58:00.000 | python,c++,raspberry-pi,gpio | Is it possible to access GPIO pins from a Python script and a C++ program at the same time? | 0 | 1 | 2 | 40,125,816 | 1 |
0 | 0 | Trying to install python-poppler-qt4 on Windows (8.1) but i've been having issues building/installing it
(error fatal error C1083: Cannot open include file: 'QMetaType' : No such file or directory. #include QMetaType)
Before this error I had a missing poppler-qt4.dll issue. After locating and installing the dll I get ... | false | 34,213,429 | 0 | 0 | 0 | 0 | In C:\poppler-0.24.5\include\src replace it C:\poppler-0.24.5\include\qt4\src | 0 | 627 | 0 | 1 | 2015-12-10T23:09:00.000 | python,qt,pyqt4,poppler | Python Poppler install issues | 0 | 1 | 2 | 34,292,822 | 1 |
0 | 0 | Kind all, I'm really new to python and I'm facing a task which I can't completely grasp.
I've created an interface with Tkinter which should accomplish a couple of apparently easy feats.
By clicking a "Start" button two threads/processes will be started (each calling multiple subfunctions) which mainly read data from a... | false | 34,284,335 | 0 | 0 | 0 | 0 | First you can use subprocess.Popen() to spawn child processes, then later you can use Popen.terminate() to terminate them.
Note that you could also do everything in a single Python thread, without subprocesses, if you want to. It's perfectly possible to "multiplex" reading from multiple ports in a single event loop. | 1 | 1,596 | 0 | 4 | 2015-12-15T08:34:00.000 | python,multithreading,kill-process | How to integrate killable processes/thread in Python GUI? | 0 | 1 | 2 | 34,284,612 | 1 |
0 | 0 | There are multiple questions about "how to" call C C++ code from Python. But I would like to understand what exactly happens when this is done and what are the performance concerns. What is the theory underneath? Some questions I hope to get answered by understanding the principle are:
When considering data (especially... | true | 34,284,421 | 1.2 | 1 | 0 | 2 | You can call between C, C++, Python, and a bunch of other languages without spawning a separate process or copying much of anything.
In Python basically everything is reference-counted, so if you want to use a Python object in C++ you can simply use the same reference count to manage its lifetime (e.g. to avoid copying... | 0 | 397 | 1 | 2 | 2015-12-15T08:39:00.000 | python,c++,c,language-binding | How does calling C or C++ from python work? | 0 | 1 | 1 | 34,284,538 | 1 |
0 | 0 | I have an interface made with Kivy, which has an image in part of it. I want to fade one edge of this image. What's the easiest way of achieving this? | false | 34,324,386 | -0.197375 | 0 | 0 | -1 | You can just create another image with faded edge and load it. | 0 | 243 | 0 | 0 | 2015-12-16T23:56:00.000 | python,kivy | How to add a gradient to an image | 0 | 1 | 1 | 34,325,646 | 1 |
0 | 0 | I'm trying to set up a complete build environment with SCons and I came across this problem:
My project can be compiled with two different compilers (c or cpp compilers) and the resulting object files linked with the same linker.
Because of this, I need to know how to split the compilation part from the linking part.
A... | false | 34,333,808 | 0 | 0 | 0 | 0 | Create two Environments, one with each compiler, use where necessary.
Then use whichever Environment you need for linking object from either Environment. | 1 | 657 | 0 | 0 | 2015-12-17T11:45:00.000 | python,build,scons | How to compile with two different compilers using SCons? | 0 | 1 | 2 | 34,335,139 | 1 |
0 | 0 | I am trying to run a Tkinter GUI on Python 3.x and When I use the .get command to get the number off a scale, this error pops up
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Python34\lib\tkinter\__init__.py", line 1482, in __call__
return self.func(*args)
File "C:\Users\Danny\Downlo... | true | 34,344,624 | 1.2 | 0 | 0 | 1 | That usually means that you're trying to call a method on a widget that has been destroyed. The string .52674064 is the internal name of a specific widget.
This can easily happen if you call a function via a binding or via after, if the widget is destroyed before the binding or after call has been triggered. | 0 | 642 | 0 | 0 | 2015-12-17T21:32:00.000 | user-interface,python-3.x,tkinter | tkinter.TclError: invalid command name ".52674064 | 0 | 1 | 1 | 34,344,977 | 1 |
0 | 0 | I have a QTableView on top of a QSqlTableModel. My database is sqlite.
I know QSqlTableModel lazily loads the data from the database (it actually loads 256 rows at a time), so when the users scrolls the view to the bottom, the model loads the 256 next rows.
I would like to know:
What is the signal emitted when the use... | true | 34,357,818 | 1.2 | 0 | 0 | 0 | The view asks the model for data by calling data function for all table cells that are visible. The model then queries the database if needed. How this happens in detail depends on the underlying database. The QSqlQueryModel documentation says that: "if the database doesn't return the number of selected rows in a query... | 0 | 304 | 0 | 0 | 2015-12-18T14:27:00.000 | python,qt,pyqt | What model's slot is called when Qtableview scrolled | 0 | 1 | 1 | 34,370,666 | 1 |
0 | 0 | I am new to 3d world. I would like to open 3ds files with python and visualize the objects.
I could not find any easy and straight forward way to play with 3ds max files.
Can you let me know how can I achieve this? | false | 34,400,788 | 0 | 0 | 0 | 0 | According to my understanding, there are some advanced graphics libraries out there for advanced usage, however Blender, (an application developed in python) supports python scripting. There are even a simple drag and drop game engine for simpler tasks. | 1 | 717 | 0 | 1 | 2015-12-21T16:59:00.000 | python,file,3d,3dsmax | how to open 3ds files with python | 0 | 1 | 1 | 34,401,590 | 1 |
0 | 0 | Running brew install pyqt --with-python3, I get Error: Failed to determine the layout of your Qt installation. Adding --verbose to the brew script, the problem is that ld can't find -lgcc_s.10.5.
(This is on Mac OS X 10.10.5 Yosemite) | true | 34,502,194 | 1.2 | 0 | 0 | 0 | Answering to help other people who encounter this: The solution was to first upgrade XCode to XCode 7.2 and open it once to accept the license and have it install additional components. Then, a brew update and a brew install pyqt --with-python3 finally worked. | 0 | 900 | 1 | 0 | 2015-12-28T23:17:00.000 | python-3.x,pyqt,homebrew | `Error: Failed to determine the layout of your Qt installation` when installing pyqt for python3 on Mavericks | 0 | 1 | 1 | 34,502,219 | 1 |
0 | 0 | I have data in an excel spreadsheet (*.xlsx) that consists of 1,213 rows of sensitive information (so, I'm sorry I can't share the data) and 35 columns. Every entry is a string (I don't know if that is screwing it up or not). The first row is the column names and I've never had a problem importing it with the column na... | false | 34,532,708 | 0 | 0 | 1 | 0 | I have had QlikView crash when importing an Excel spreadsheet that was exported with the SQuirreL SQL client (from a Firebird database). Opening the spreadsheet in Excel, and saving it again solved the problem.
I know that this is no longer relevant to your problem, but hopefully it can help someone with a similarly ap... | 0 | 626 | 0 | 0 | 2015-12-30T15:52:00.000 | python,excel,qlikview | Why does QlikView keep crashing when I try to load my data? | 0 | 1 | 3 | 34,534,891 | 1 |
0 | 0 | Is there a way to programmatically install an Android .apk in Python?
Could you please show me how? I'm new to Python.
Thanks in advance. | true | 34,538,988 | 1.2 | 0 | 0 | 1 | As @Swing mentioned in his comment, subprocess.call("adb install path-to-file.apk ") solves the issue. | 0 | 2,635 | 0 | 3 | 2015-12-30T23:43:00.000 | android,python,apk,android-install-apk | How to install an Android .APK using Python code? | 0 | 1 | 2 | 62,234,030 | 1 |
0 | 0 | If this question could be worded better/needs to be split into many questions, please alert me
I need to package Python scripts in order to ship them as single-executables (ideally), or single-executables with supporting files (non-ideally).
I have seen py2app and py2exe. They do not fit my requirements, as I am looki... | false | 34,583,134 | 0 | 1 | 0 | 0 | Are you sure that you need to embed the Python files?
I ask because you mention you want to package the Python files as single executables. Couldn't you install Python on the target machine and since Python scripts are executables on their own, you would only need something to kick them off. A master python script cou... | 1 | 1,476 | 0 | 1 | 2016-01-04T00:10:00.000 | python,c++,python-embedding | Embedding Python into C++ | 0 | 1 | 3 | 34,583,312 | 1 |
0 | 0 | I would like to set a dictionary as an event object, but SetEventItem is expecting an object of type wxObject. What's the best way to go around this?
Basically, I have a settings dialog. If the "Apply All" button is pressed, an event is generated which will propagate up to some parent window, which can then set the se... | true | 34,621,426 | 1.2 | 0 | 0 | 0 | SetEventObject is used to set the originating GUI element not to pass data to the event listeners ...
you could certainly add a GetValue method to your GUI element that returned your dictionary... and then use GetEventObject().GetValue() to get your dictionary
alternatively the wx.lib.pubsub module is designed to pass... | 1 | 90 | 0 | 0 | 2016-01-05T21:20:00.000 | python,user-interface,wxpython | wxPython - Set dictionary as event object | 0 | 1 | 1 | 34,621,808 | 1 |
0 | 0 | I have a class derived from wx.Panel that creates an image in a large border area (e.g. a little over 30 pixels across on the left edge). I want to be able to derive subclasses from it for the panels in part of my application, but I can't figure out how to adjust the position the children in the derived panels - they ... | true | 34,625,218 | 1.2 | 0 | 0 | 0 | I abandoned this approach as unwieldy after some effort, but I did have some limited success, and I wanted to point out some of the things I learned in case someone else is considering it.
Look at PyPanel - it is designed to be overridden fairly extensively and responded well to most of what I was doing.
The best appr... | 0 | 119 | 0 | 0 | 2016-01-06T03:37:00.000 | wxpython | How to reposition children in wx.Panel derived class with a large border? | 0 | 1 | 1 | 34,937,077 | 1 |
1 | 0 | I am making an app with Kivy and Python,is there a native way to create a field with a spinbox to select the number like in HTML for the tag input (type = "number") ?? I see there are checkboxes for Kivy but not this spinbox number; should I use a normal text input provided by Kivy and get the number from that? | false | 34,629,190 | 0.197375 | 0 | 0 | 1 | You can use a Spinner widget._ | 0 | 547 | 0 | 0 | 2016-01-06T09:04:00.000 | python,html,kivy,qspinbox | Kivy native spinbox number widget for insert number | 0 | 1 | 1 | 34,631,685 | 1 |
0 | 0 | I have a number of wxPython textCtrls that are used for data input. Use is made of various Validators to make sure the data is of the correct type. I now need to validate that the data is within range, e.g. where two textCtrls are used for feet and inches that the inches are less than 12, before the user can move to th... | true | 34,634,735 | 1.2 | 0 | 0 | 0 | Bind the textctrl to wx.EVT_KILL_FOCUS and then check the contents of the textctrl. If there is invalid input, issue your error message and then self.my_textCtrl.SetFocus() which will put you back in the textctrl for input again. | 0 | 165 | 0 | 0 | 2016-01-06T13:49:00.000 | python-2.7,validation,wxpython | Validating wx.textCtrl Field For Sensible Values | 0 | 1 | 1 | 34,651,896 | 1 |
0 | 0 | I'm learning to use Tkinter and in the tutorials it tells me to import W from Tkinter, but W is just a str ("w").
My question is why use Tkinter.W not "w". Is it because Tkinter will sometimes have the var equal something else dependent upon system? | false | 34,699,869 | 0.099668 | 0 | 0 | 1 | This is done mostly for user convinience.
Consider the Image class from PIL/Pillow. It has a method to create a thumbnail out of an image, in the process resizing it. The method takes two arguments, the new size in a tuple and a resampling method. This can be antialias, bilinear, cubic, etc. These are internally repres... | 1 | 535 | 0 | 1 | 2016-01-09T22:53:00.000 | python,tkinter,python-2.x | Python Tkinter: Why use Tkinter.W not str "w" | 0 | 2 | 2 | 34,700,366 | 1 |
0 | 0 | I'm learning to use Tkinter and in the tutorials it tells me to import W from Tkinter, but W is just a str ("w").
My question is why use Tkinter.W not "w". Is it because Tkinter will sometimes have the var equal something else dependent upon system? | true | 34,699,869 | 1.2 | 0 | 0 | 2 | I always use the string value. I see absolutely no benefit in using the constants. The chance of them changing is virtually zero. These constants have remained unchanged since Tkinter was created.
tkinter takes backwards compatibility pretty seriously, so even if they are changed, the string values will undoubtedly co... | 1 | 535 | 0 | 1 | 2016-01-09T22:53:00.000 | python,tkinter,python-2.x | Python Tkinter: Why use Tkinter.W not str "w" | 0 | 2 | 2 | 34,703,004 | 1 |
1 | 0 | I want to develop an app to track people's Whatsapp last seen and other stuff, and found out that there are APIs out there to deal with it, but the thing is they are writen in python and are normally run in Linux I think
I have Java and Android knowledge but not python, and wonder if there's a way to develop the most o... | false | 34,710,059 | 0 | 1 | 0 | 0 | Instead of running it as one app, what about running the python script as separate from the original script? I believe it would bee possible, as android is in fact a UNIX based OS. Any readers could give their input on this idea an if it would work. | 0 | 49 | 0 | 0 | 2016-01-10T19:50:00.000 | java,android,python | how to write an Android app in Java which needs to use a Python library? | 0 | 1 | 1 | 34,710,122 | 1 |
0 | 0 | I'm writing an experimental GUI framework. The GUI is constructed by combining components (similar to widgets). There are a few "native" classes of components. The framework user specializes by providing certain methods that define configuration, bindings, etc. This can be done by extending a native class and overridin... | false | 34,710,277 | 0 | 0 | 0 | 0 | What most GUI toolkits (wxpython,kivy,pyQT) in python are doing is the inheritance approach.
I guess both approach should work but using inheritance will be more familiar to your potential users
What you may also want to look at is a template language (suck as kv lang or html)
to layout the UI since it is a modern appr... | 1 | 1,540 | 0 | 4 | 2016-01-10T20:10:00.000 | python,inheritance,monkeypatching | Monkey patching vs inheritance and overriding in Python | 0 | 1 | 2 | 34,710,599 | 1 |
0 | 0 | Hey i'm new here so if I've done something wrong i apologize. I have been searching for hours though and i figured i would just open a new question.
I want to have a python program that will open another window so it can display different information on that window whilst still displaying it's own information.
For ex: ... | false | 34,793,777 | 0 | 0 | 0 | 0 | Assuming your question is to open 2 programs at the same time, couldn't you just open 2 tabs and open the 2 programs side by side like that? Ex. on mac, double click open new window and open a new tab. | 1 | 17 | 0 | 0 | 2016-01-14T15:47:00.000 | python-3.x | Python 3 opening more than one .py program instead of just calling it in the same window | 0 | 1 | 1 | 34,801,497 | 1 |
0 | 0 | I made a program using the pygame module on Python 3 and it works fine within python, but when I try to compile is using py2exe it won't run. (I just get the programName.exe has stopped working error upon trying to run it).
I managed to narrow down this problem to the pygame.font module as when I comment all the lines ... | false | 34,800,524 | 0.099668 | 0 | 0 | 1 | I had the same problem using cx_Freeze, so hopefully this will work for you as well. Open up your pygame package folder. It should be C:\Python34\Lib\site-packages\pygame. There should be a True Type Font File titled freesansbold.ttf. Copy that file then open the folder containing your exe program. There should be a zi... | 1 | 319 | 0 | 0 | 2016-01-14T21:55:00.000 | python,python-3.x,compilation,pygame,py2exe | Py2Exe won't successfully compile the pygame.font module on Python 3 | 0 | 2 | 2 | 34,801,623 | 1 |
0 | 0 | I made a program using the pygame module on Python 3 and it works fine within python, but when I try to compile is using py2exe it won't run. (I just get the programName.exe has stopped working error upon trying to run it).
I managed to narrow down this problem to the pygame.font module as when I comment all the lines ... | false | 34,800,524 | 0 | 0 | 0 | 0 | I managed to find a way! By including -l library.zip argument in the build_exe command and then following the instructions given by DeliriousSyntax in the answer above I managed to get it to work! | 1 | 319 | 0 | 0 | 2016-01-14T21:55:00.000 | python,python-3.x,compilation,pygame,py2exe | Py2Exe won't successfully compile the pygame.font module on Python 3 | 0 | 2 | 2 | 34,867,493 | 1 |
0 | 0 | I'm using PyQtGraph to plot mesh surfaces. I would like to see the 3D world with perspective turned off.
Is this possible in pyQtGraph? I have searched through the documentation and the google groups and can't find any reference to this. I think it is possible in principle with openGL so is there a way to bring this o... | false | 34,801,254 | 0 | 0 | 0 | 0 | A cursory inspection of the docs renders no help ... however if you decrease the field of view (FOV) while also increasing the distance you will approximate an orthographic projection to arbitrary precision as you vary those two parameters | 0 | 1,275 | 0 | 2 | 2016-01-14T22:49:00.000 | python-3.x,opengl,pyqtgraph | PyQtGraph - Turn off perspective in 3d view | 0 | 2 | 4 | 34,801,690 | 1 |
0 | 0 | I'm using PyQtGraph to plot mesh surfaces. I would like to see the 3D world with perspective turned off.
Is this possible in pyQtGraph? I have searched through the documentation and the google groups and can't find any reference to this. I think it is possible in principle with openGL so is there a way to bring this o... | false | 34,801,254 | 0 | 0 | 0 | 0 | I would recommend trying out the newer vispy; it is much more flexible with regards to the types of cameras and mouse interactions supported. In particular, orthographic projection happens to be the default for the 'arcball' camera type, and probably the others too; it's set by setting camera.fov to be 0.
As a bonus, e... | 0 | 1,275 | 0 | 2 | 2016-01-14T22:49:00.000 | python-3.x,opengl,pyqtgraph | PyQtGraph - Turn off perspective in 3d view | 0 | 2 | 4 | 37,876,896 | 1 |
0 | 0 | In a PyQt application is it possible to kill only the GUI (Qt) part?
Any Python commands running should be unaffected, only the graphics should disappear. | true | 34,803,369 | 1.2 | 0 | 0 | 2 | how about QtGui.QWidget.setVisible(visible)
PySide.QtGui.QWidget. setVisible ( visible )
Parameters: visible – PySide.QtCore.bool
This property holds whether the widget is visible.
Calling setVisible(true) or PySide.QtGui.QWidget.show() sets the widget to visible status if all its parent widgets up to the... | 0 | 237 | 0 | 0 | 2016-01-15T02:20:00.000 | python,qt,pyqt | Kill only Qt in PyQt | 0 | 1 | 1 | 34,803,713 | 1 |
0 | 0 | I've installed Kivy some time ago, and since then I've tried many ways to run Kivy, but till today I'm not successful.
I am able to "import kivy" in python but while importing app module by "from kivy.app import app"
It shows error 'no module named app', while there is a folder in Kivy named "app".
The location of this... | false | 34,813,877 | 0 | 0 | 0 | 0 | Why are you trying to use a old version of kivy? Use the latest version 1.9.1. follow the documentation
Ensure you have the latest pip and wheel:
python -m pip install --upgrade pip wheel setup tools
. Install the dependencies (skip gstreamer (~90MB) if not needed, see Kivy’s dependencies):
python -m pip install docut... | 1 | 983 | 0 | 0 | 2016-01-15T14:58:00.000 | python,kivy | I'm getting error while importing app from kivy | 0 | 1 | 1 | 35,005,349 | 1 |
0 | 0 | I have an .so file which I pulled from an Android APK (Not my app, so I don't have access to the source, just the library)
I want to use this shared object on my 32 bit Ubuntu machine, and call some functions from it (Preferably with Python) . Is it possible to convert an Android .so to a Linux .so?
Or is there any sim... | false | 34,883,612 | 0.197375 | 1 | 0 | 1 | Most likely not. It's very probably the Android you pull it from is running on the ARM architecture, and therefore the .so library was compiled for that architecture.
Unless your desktop machine is also on the ARM architecture (it's most likely x86 and it would have to be specific such as ARMv7) the .so binary will be... | 0 | 1,289 | 1 | 3 | 2016-01-19T17:47:00.000 | android,python,linux,shared-libraries | How to use Android shared library in Ubuntu | 0 | 1 | 1 | 34,883,727 | 1 |
0 | 0 | If I set a pygame window to resizable and then click and drag on the border of the window the window will get larger but nothing blit onto the surface will get larger with it. (Which is understandable) How would I make it so that when I resize a window all blit objects resize with it and fill the window properly?
For e... | false | 34,910,086 | 0 | 0 | 0 | 0 | Recently with pygame2.0 You can use the SCALED flag | 0 | 12,690 | 0 | 7 | 2016-01-20T20:41:00.000 | python,pygame,resizable,surface,blit | Pygame. How do I resize a surface and keep all objects within proportionate to the new window size? | 0 | 1 | 3 | 58,898,639 | 1 |
0 | 0 | I'm currently creating a Snake game on Python using the TKinter library.
So right now, I've implemented the movements, the food system, and the score system. I still need some help on how I can make the snake grow when it eats the food. | true | 34,914,142 | 1.2 | 0 | 0 | 0 | I do not see the associated code that actually displays the current position of the snake on the screen and remove it after movement, but this is where you can change the size if you make the length of the snake variable and have it drawn and removed in an iterate fashion. When food is eaten, you can simply increase th... | 0 | 1,681 | 0 | 1 | 2016-01-21T02:03:00.000 | python,tkinter | Need help for a Python Snake game | 0 | 1 | 1 | 34,914,501 | 1 |
0 | 0 | I have wrote python(2.7) GUI desktop application using TKinter library and it is working fine. Now i want to convert it into web application. I have looked into pyjaco and pyjamas but not getting it done.
How can i convert it into Web App ?
Thanks in advance.. | true | 34,921,411 | 1.2 | 0 | 0 | 5 | You will have to rewrite your app. There is simply no way to convert a tkinter application to run on the web. You could potentially use pyjs to convert some of the business logic, but the entire GUI will have to be rewritten. | 0 | 9,730 | 0 | 6 | 2016-01-21T10:39:00.000 | python-2.7,web-applications,tkinter | How to Convert python Tkinter desktop App to Web App | 0 | 1 | 2 | 34,924,538 | 1 |
0 | 0 | Is there a problem with using sys.exit() to stop a Tkinter program?
I know normally people use root.destroy() why is that? | false | 34,935,100 | 0 | 0 | 0 | 0 | I use both. root.destroy() is used to destroy all windows (parent, child) within the root tkinter instance, but it doesn't end the python program.
sys.exit() stops all active applications used by python.
In short, if your python code runs a tkinter GUI exclusively and it's functionality ends after the window is close... | 1 | 2,199 | 0 | 2 | 2016-01-21T21:57:00.000 | python,python-2.7,tkinter,tk | Can I use sys.exit() to stop a Tkinter program | 0 | 1 | 2 | 34,935,285 | 1 |
0 | 0 | When I run my Tkinter application, a command line/terminal opens. How can I run my application without it invoking a command line/terminal session? | false | 34,937,925 | 0.379949 | 0 | 0 | 2 | Save your file with ".pyw" extension instead of ".py". | 0 | 1,518 | 0 | 1 | 2016-01-22T02:21:00.000 | python,tkinter,terminal,window | How to run a Tkinter program without opening a terminal | 0 | 1 | 1 | 34,939,110 | 1 |
0 | 0 | I am rendering a virtual object on a video feed, and I want to try zooming in on it. Right now, I:
rotate and translate the camera by where it actually is with respect to the object,
make a 2D texture of the latest frame filling up the entire screen, and
draw the object at the origin after multiplying the vertices by ... | false | 34,990,774 | 0 | 0 | 0 | 0 | If you are using perspective matrix adjust you field of view. Smaller fov bigger the object | 0 | 206 | 0 | 1 | 2016-01-25T10:51:00.000 | python,opengl,pyopengl | Zooming onto an object and background in OpenGL | 0 | 1 | 1 | 34,991,608 | 1 |
0 | 0 | I've spent some time looking online and so far haven't found anything that answers this without using PIL, which i can't get to work is there another way to do this simply? | false | 35,024,118 | -0.132549 | 0 | 0 | -2 | Luke, this is too late , however may help others. Your image has to be in the same sub directory with .py script. You can also type './imageFileName.png' | 0 | 33,691 | 0 | 6 | 2016-01-26T21:16:00.000 | python,image,python-3.x,tkinter | How to load an image into a python 3.4 tkinter window? | 0 | 1 | 3 | 54,412,011 | 1 |
0 | 0 | I wanted to write python code in my local computer and transfer it to Android device to execute the codes in mobile or Tablet.
Is it possible to transfer? If yes, in which location do I need to transfer. | true | 35,032,917 | 1.2 | 0 | 0 | 1 | In QPython in Programs I see /storages/emulated/0/com.hipipal/qpyplus/scripts/ | 0 | 330 | 0 | 0 | 2016-01-27T09:05:00.000 | android,python,qpython | Qpython in Android | 0 | 1 | 1 | 35,033,063 | 1 |
0 | 0 | There are many questions dealing with pyglet and pygame, but what I want to know is difference in theses two, in simple terms.
Not in technical terms, not experimental features and all that.
They are both libraries, both API, both for creation of games and multimedia apps, right?
Just in plain English, for someone like... | false | 35,044,298 | -0.132549 | 0 | 0 | -2 | I've tried pyglet and pygame and rate pygame as the best . | 0 | 3,694 | 0 | 2 | 2016-01-27T17:36:00.000 | python,api,pygame,pyglet | Difference between pyglet and pygame, in simple words? | 0 | 2 | 3 | 56,559,014 | 1 |
0 | 0 | There are many questions dealing with pyglet and pygame, but what I want to know is difference in theses two, in simple terms.
Not in technical terms, not experimental features and all that.
They are both libraries, both API, both for creation of games and multimedia apps, right?
Just in plain English, for someone like... | false | 35,044,298 | 0.066568 | 0 | 0 | 1 | PyGame is low-level library. You have to do all on your own - starting at mainloop and all functions called by mainloop. You can do it in different ways.
(And you can learn something about mainloops in Pyglet, Tkinter, PyQt, wxPython and other GUIs, not only in Python)
Pyglet is framework - it has already mainloop and... | 0 | 3,694 | 0 | 2 | 2016-01-27T17:36:00.000 | python,api,pygame,pyglet | Difference between pyglet and pygame, in simple words? | 0 | 2 | 3 | 35,044,912 | 1 |
0 | 0 | I wonder if it is possible to change the weight of one word on a tkinter button? So the result would look something like this:
[ yes, I agree ]
I've tried using tags but neither tk.Button nor tk.Button['text'] seem to allow it.
Thanks! | true | 35,064,212 | 1.2 | 0 | 0 | 1 | No, it's not possible. If you want a button with rich text you'll have to create your own. Or, create an image that has the look you want, and use the image with a standard button.
You can create your own using a text widget that is one character tall and a few characters wide. Then, you can place bindings on the butt... | 0 | 33 | 0 | 1 | 2016-01-28T14:31:00.000 | python,python-3.x,tkinter | Modifying a Part of Text on tk.Button | 0 | 1 | 1 | 35,066,487 | 1 |
0 | 0 | I'm running Qpython (andoid) 1.2.3 (the latest as of 2016-01-31) and I can get scripts to run. I've been able to create a shortcut on my homescreen for a simple test script that put the current date in yyyy-mm-dd format into the clipboard, and speaks the content. I have #qpy: console directing the script to execure in ... | false | 35,113,618 | 0 | 0 | 0 | 0 | edit the file end.sh. Remove or comment the "read" command. | 0 | 1,803 | 0 | 4 | 2016-01-31T12:03:00.000 | android,console,qpython | How do I exit Qpython (android) console automatically afer script completes? | 0 | 1 | 2 | 52,803,215 | 1 |
0 | 0 | In tkinter I am creating a Toplevel widget to prompt the user with "Are you sure you want to exit?" every time they try to exit my application. While this is happening, I want the Toplevel widget to have full focus of my application and the user to be unable to click anything on the root window, if possible.
While tryi... | true | 35,140,140 | 1.2 | 0 | 0 | 1 | Focus means that your window will receive all keyboard events until some other window gets the focus. A grab tells the window manager that your window should have the focus until you explicitly tell it that it is allowed to take it away (ungrab). | 0 | 1,583 | 0 | 2 | 2016-02-01T20:55:00.000 | python,macos,python-3.x,tkinter | Tkinter: What's the difference between grab and focus? | 0 | 1 | 1 | 35,140,293 | 1 |
0 | 0 | Quick question everyone. I apologize for how simple it is but why is it that when I add something to a frame like a checkbutton or label the formatting of the frame goes away and it's size snaps to whatever it is I put inside it?
Thank you,
Mark | true | 35,143,105 | 1.2 | 0 | 0 | 1 | That's simply how it's designed to work. It's a very powerful feature. You worry about what widgets you want in a frame and thinter can take care of doing all the math to make sure everything fits. | 0 | 30 | 0 | 0 | 2016-02-02T00:40:00.000 | python,tkinter | TKInter Frame formatting not working | 0 | 1 | 1 | 35,143,172 | 1 |
1 | 0 | I would like to verify the style of an element i.e. the color of the text shown in a textview. Whether it is black or blue ex. textColor or textSize. This information is not listed in the uiautomatorviewer.
I can get the text using elem.get_attribute("text") as the text value is seen in the Node Detail. Is there a wa... | false | 35,164,413 | 0.197375 | 0 | 0 | 1 | Update. As it turns out that cannot be done with appium webdriver.
For those of you who are wondering this is the answer I rec'd from the appium support group:
This cannot be done by appium as underlying UIAutomator framework does not allow us to do so.
In app's native context this cannot be done
In app's webview's con... | 0 | 1,771 | 0 | 1 | 2016-02-02T21:48:00.000 | android,python,appium,python-appium | Appium Android UI testing - how to verify the style attribute of an element? | 0 | 1 | 1 | 35,277,434 | 1 |
0 | 0 | I'm new to GUI-programming and using now tkinter for python.
In the past my "non-GUI" programs always consisted out of a few classes but if I look to the examples with a GUI it appears that only one class is used. All functions are included in this one class. Is this the normal way or is it possible to write a gui cla... | false | 35,165,461 | 0.53705 | 0 | 0 | 3 | It is definitely possible to use multiple classes in GUI apps.
For example you can have one class which defines and layouts GUI elements (like buttons, text fields, scrollbars etc.) and the second class would subclass it adding some functionality on top of it. | 1 | 110 | 0 | 1 | 2016-02-02T23:01:00.000 | python,oop,user-interface,tkinter | Only one Class possible for GUI programming | 0 | 1 | 1 | 35,166,083 | 1 |
0 | 0 | I'm really sorry if this question sounds really simple but I couldn't figure out the solution yet...
I'm using wxPython in order to create a GUI. I've used wx.Notebook, and created some tabs, all default configuration are located in the last tab.
My question is, how can I get these default values from the last tab and ... | false | 35,188,282 | 0 | 0 | 0 | 0 | When you create the UI, you can keep the default config in a variable. A dictionary would probably work. Then when you create the tabs, you can pass them a dictionary. Alternatively, you could just save the defaults to a config file and then use Python to read it and load it into the UI. Python can parse csv, json, xml... | 0 | 47 | 0 | 0 | 2016-02-03T21:40:00.000 | python,user-interface,wxpython | Default values from wxPython notebook | 0 | 1 | 1 | 35,229,531 | 1 |
0 | 0 | I am currently working on a Battleship game project (for learning purposes) that uses tkinter for the UI and, because I want this program to be able to run on two computers for multiplayer, twisted for data transfer. This is my first time using twisted however I have used tkinter many times.
I know both twisted and tki... | false | 35,229,352 | 0 | 0 | 0 | 0 | I currently have twisted 17.9.0 and python 3.6.
In reference to the answer above,
tksupport for python 3 is now available with twisted, so no need to create your own tksupport module. | 1 | 698 | 0 | 1 | 2016-02-05T16:48:00.000 | python,python-3.x,tkinter,twisted | Threading with Twisted with Tkinter | 0 | 1 | 2 | 49,701,788 | 1 |
0 | 0 | I have downloaded the 3.5 version of python on my windows 7 home premium computer with version 6.1 software. I wish to use a C main program with python library extensions. I have aded the path to the include folder and the library folder to the dev studio c-compiler. I am testing with the supplied test program that pri... | false | 35,250,175 | 1 | 0 | 0 | 12 | Maybe a little too late, but I found a work around for the missing 'python3x_d.lib' : When installing the python with pythoninstaller.exe, choose the advanced setup options in the first command window of the installation wizard, there choose the option "download debug binaries", then the file python3x_d.lib is automati... | 0 | 4,011 | 1 | 4 | 2016-02-07T05:43:00.000 | c,python-3.x | I cannot find python35_d.lib | 0 | 1 | 1 | 36,926,551 | 1 |
0 | 0 | I'm making a python app that triggers an action when the print screen key is pressed. I'm using pyhook library. However, every time I press a character written with the language of my country (ãíé and others) is doubling the characters . For example : ~~a ''e ''i , causing problems in the normal user written use. Is th... | false | 35,259,943 | -0.099668 | 0 | 0 | -1 | try to add this line:
# -* - coding: utf-8 -* - | 1 | 208 | 0 | 0 | 2016-02-07T22:29:00.000 | python,utf-8,pyhook | Pyhook UTF-8 issue | 0 | 1 | 2 | 35,260,023 | 1 |
0 | 0 | I made a simple chat program in python that uses tkinter and mysql db. It connects to db first, gets the messages and shows them to user. But when another user send a message to the user, the user can not see the new messages. So, I made a refresh button. But, everybody knows, people don't want to use a chat program th... | false | 35,294,239 | 0 | 0 | 0 | 0 | in order to periodically refresh the user messages, just make an infinite while loop and set it to update every 5 seconds or so. this way every 5 seconds you check to see if database has new messages. alternatively you can make the while loop update if the database has been updated at any point but this is more complex... | 0 | 294 | 0 | 0 | 2016-02-09T14:12:00.000 | python,mysql,tkinter | Python3 - Tkinter - Instant messaging | 0 | 1 | 1 | 35,295,077 | 1 |
0 | 0 | We're building off of the Tower app, which was built with dronekit-android, and flying the 3dr solo with it. We're thinking about adding some sort of collision detection with it.
Is it feasible to run some python script on the drone, basically reading some IR or ultrasound sensor via the accessory bay, and basically y... | false | 35,308,103 | 0 | 1 | 0 | 0 | I don't really know what you are asking for but:
if the distance between the centers of two circles < the sum of their radii then they have collided. | 0 | 208 | 0 | 1 | 2016-02-10T06:12:00.000 | dronekit-python,dronekit-android | Implementing collision detection python script on dronekit | 0 | 1 | 1 | 54,972,589 | 1 |
0 | 0 | I am trying to run the Invensense motion_driver_6.12. I compiled the code with IAR and the STM32 works ok - all the test I've done with the board are ok: UART, I2C.. etc. But when I run the python client demo program "eMPL-client-py" the program shows only one empty black window and nothing occurs. I tried to run first... | false | 35,313,998 | -0.099668 | 0 | 0 | -1 | which type of Invensense chip you are using?
I think you need to check if you use the right COM Port in windows.
Check if you could get data from your MPUxxxx Board through I2C
Check log_stm32.c if this function work well fputc(out[i]); | 0 | 733 | 1 | 0 | 2016-02-10T11:30:00.000 | python,stm32,discovery | Invensense Motion Driver 6.12 STM32 demo python don't work | 0 | 1 | 2 | 38,325,794 | 1 |
0 | 0 | I have a Python PyQt program which has a QWidget on the main window.
I added 2 different views into the same QWidget.
When the user clicks Button1, I show view1 and hide view2.
When the user clicks Button2, I show view2 and hide view1.
Each view has its own KeyPressEvent for using arrow keys to page through records in ... | true | 35,324,749 | 1.2 | 0 | 0 | 0 | If you setFocus on an object in the corresponding view that was just made visible, then only that view's keyPressEvent will be triggered. No need to disable or enable keypress events. The focus does this automatically.
The solution above is the answer to the question. However, I may change from using QAction buttons... | 0 | 80 | 0 | 0 | 2016-02-10T20:00:00.000 | python,view,pyqt4 | PyQt: Independent KeyPressEvent between 2 different views on a form | 0 | 1 | 1 | 35,326,282 | 1 |
0 | 0 | Ok, so our world map for a Risk-style conquest game we are making is made of a matrix of mouse-interactive "country" objects containing their own values like name, owner, and unit counts.
Right now the entire map is sized to fit within the game screen; we are considering making the map scrollable. A possibly I found wa... | true | 35,330,326 | 1.2 | 0 | 0 | 1 | You have to translate the mouse position on the screen to the world coordinates. When you scroll your map, you generate an offset, and you have to use that for translation.
Say if the map is not scrolled ((0, 0) of the map is at (0, 0) of the screen), and a player clicks on (12, 12), you know she clicked on (12, 12) of... | 0 | 192 | 0 | 1 | 2016-02-11T03:35:00.000 | python-3.x,scroll,pygame,interactive | pygame- Making mouse-interactive elements on a "scrolling" surface | 0 | 1 | 1 | 35,336,224 | 1 |
0 | 0 | I have designed my whole pygame to work for 1920x1080 resolution.
However, I have to adapt it for smaller resoltion.
There is a lot of hardcoded value in the code.
Is there a simple way to change the resolution, like resizing the final image at the end of each loop, just before drawing it ? | false | 35,333,875 | 0.099668 | 0 | 0 | 1 | i usually create a base resolution and then whenever the screen is resized, i scale all the assets and surfaces by ratios.
This works well if you have assets that are of large resolution and you have scaled then down but would pixelate for smaller images.
you can also create multiple assets file for each resolution an... | 0 | 1,469 | 0 | 1 | 2016-02-11T08:09:00.000 | python,pygame,resolution | Pygame, change resolution of my whole game | 0 | 1 | 2 | 35,334,029 | 1 |
0 | 0 | Is there a widget that shows a thread visually for Tkinter?
reason why. I want to open a Vpython window inside a Tkinter window.
I know there is a possibility to open a Vpython thread on the side while Tkinter is active, but can i show it inside Tkinter? (Like in some sort of Frame) | true | 35,349,113 | 1.2 | 0 | 0 | 0 | No, there is no widget to do that. | 1 | 96 | 0 | 0 | 2016-02-11T20:10:00.000 | python,multithreading,tkinter,vpython | can Python Tkinter widget show a thread? | 0 | 1 | 1 | 35,349,400 | 1 |
0 | 0 | Is there any way to open push notification tray for iOS on hardware device using Appium and Python.
Regards | false | 35,358,825 | 0 | 0 | 0 | 0 | No, there no way to open push notification tray for iOS on hardware device using Appium and Python, or any iOS public API. | 0 | 322 | 0 | 0 | 2016-02-12T09:20:00.000 | python,ios,iphone,selenium-webdriver,appium | Open push notification tray on iOS hardware device using Appium | 0 | 1 | 1 | 35,365,816 | 1 |
0 | 0 | I'm building a small project for my android phone using kivy. I am trying to get the android back key to do a make Toast saying 'press back again to exit', and then exit when the back key is pressed twice. I checked online and saw a tutorial on how to do this. I had to useimport android
but the problem is that it just... | true | 35,376,747 | 1.2 | 0 | 0 | 2 | Hello guys I finally found the problem. The import android actually works.
The problem was that I used it wrongly . I was trying to do a makeToast like dis 'android.makeToast'. Evidently dat was wrong. Found out there was another way to do it with pyjnius.
Thanks so ooo much for your assistance | 0 | 614 | 0 | 1 | 2016-02-13T06:11:00.000 | android,python,kivy,buildozer | kivy import android doesnt work | 0 | 1 | 1 | 35,383,918 | 1 |
0 | 0 | I have created a model using QSqlTableModel, then created a tablview using QTableView and set the model on it.
I want to update the model and view automatically whenever the database is updated by another program. How can I do that? | false | 35,383,018 | 0.197375 | 0 | 1 | 1 | There's no signal emitted for that currently. You could use a timer to query the last update timestamp and refresh the model data at designated intervals. | 0 | 255 | 0 | 0 | 2016-02-13T17:31:00.000 | python,pyqt,auto-update,qtableview,qsqltablemodel | Automatically updating QSqlTableModel and QTableView | 0 | 1 | 1 | 35,392,361 | 1 |
0 | 0 | I would like to deploy a Python3 app that uses tkinter on OpenShift. I added the following to setup.py: install_requires=["Tcl==8.6.4"]. When I ran git push I received the following error:
Could not find suitable distribution for Requirement.parse('Tcl==8.6.4').
Can anyone provide the correct syntax, distribution p... | true | 35,395,843 | 1.2 | 0 | 0 | 0 | Bryan has answered the question. Tkinter will not work with WSGI. A web framework such as Django must be used. | 0 | 105 | 1 | 0 | 2016-02-14T19:01:00.000 | python,openshift | Using Tkinter with Openshift | 0 | 1 | 1 | 35,442,172 | 1 |
0 | 0 | I'm working on an application using Python (3.4) and PyQt. The goal of the program is to manage and analyze large amount of data - up to ~50 binary files, which might be of total size up to 2-3 GB. When I tried to load a couple files into the program, it stops responding during loading and then takes ~1.5GB RAM just to... | false | 35,514,886 | 0.099668 | 0 | 0 | 1 | You might consider the HDF5 format, which can access using h5py, pytables, or other python packages. Depending on the dataformat, HDF5 could enable you to access the data on the HD in an efficient manner, which in practice means that you can save memory. The downside is that it requires some effort on your side as a ... | 1 | 367 | 0 | 1 | 2016-02-19T20:57:00.000 | python,pyqt,pyqt4,python-3.4,large-data | Python - managing large data | 0 | 1 | 2 | 35,515,404 | 1 |
0 | 0 | I have a multithreaded cython application and would like to pass an extension type between threads that holds a pointer to a thread safe Circular buffer that also makes various calculations.
Is there any way to make a c++ container handle a Extension type? | true | 35,538,946 | 1.2 | 0 | 0 | 1 | I guess you can just cast to void *, pass it into your container, then convert back to your extension type. It's up to you to ensure you still have a reference to it in order to not let the pointer being invalid. | 1 | 143 | 0 | 0 | 2016-02-21T16:53:00.000 | python,cython | Gil-less container for cython extension type | 0 | 1 | 1 | 35,573,200 | 1 |
0 | 0 | I am programming a game with multiple script files and I am wondering, on the files that I have used pygame.init(), do I have to call pygame.quit() at the end of the file? | true | 35,544,448 | 1.2 | 0 | 0 | 3 | You should only call pygame.init() and pygame.quit() on 1 and same file. this the main file where your game loop runs.
You will need other scripts for different things but all those you can just import in this main file where game loop runs.
If you find this confusing checkout some pygame projects on github that will... | 1 | 62 | 0 | 0 | 2016-02-22T01:32:00.000 | python,pygame | Python & Pygame - Does pygame.quit() have to be written at the end of every .py file? | 0 | 1 | 1 | 35,544,509 | 1 |
0 | 0 | I'm using xlwings on a Mac and would like to set the foreground color of text in a cell from Python. I see that range.color will change background color which I could use but it has an additional problem that the cell borders are overwritten by the new BG color.
Is there any way to change foreground text color from Pyt... | false | 35,584,309 | 0 | 0 | 0 | 0 | This solution is working fine for me.
from xlwings.utils import rgb_to_int
import xlwings as xw
sht.range('A1').api.Font.Color = rgb_to_int((192, 192, 192)) | 0 | 5,576 | 0 | 3 | 2016-02-23T17:32:00.000 | python,text,colors,xlwings | xlwings: set foreground text color from Python | 0 | 1 | 4 | 70,505,321 | 1 |
0 | 0 | I want to create an app for Windows but I've to developed it on Mac OS X.
I've created a desktop app with Python using PyQt5. The steps that I followed are:
Step 1. Create a desktop app (On Mac OS X):
Install Qt.
Install Sip.
Install PyQt5.
¡Develop!
Step 2. Package the Python app with PyInstaller(On Windows 8):
Ins... | false | 35,598,908 | 0.197375 | 0 | 0 | 1 | PyInstaller brings together every dependancy of your python script. But you need to install all dependancies before running pyinstaller.
So, before running it on windows, you must install qt5, sip and pyqt5. | 1 | 520 | 0 | 1 | 2016-02-24T10:02:00.000 | python,windows,macos,qt,pyqt5 | Desktop app created with PyInstaller doesn't run | 0 | 1 | 1 | 35,684,613 | 1 |
0 | 0 | I am unable to find a pygame download for Python 3.5 and the ones I have downloaded don't seem to work when I import to the shell. Help?
This is the message I receive on the shell:
import pygame
Traceback (most recent call last):
File "", line 1, in
import pygame
ImportError: No module... | false | 35,609,592 | 0 | 0 | 0 | 0 | Even when you have windows 64 bit you need to get the win32.whl file , then follow the standard instructions | 1 | 27,913 | 0 | 6 | 2016-02-24T17:59:00.000 | python,python-3.x,pygame | How do I download Pygame for Python 3.5.1? | 0 | 1 | 6 | 39,562,265 | 1 |
0 | 0 | I am currently trying to create a canvas which will have other objects on it and I want to use a scroll-bar for when the objects on the canvas take too much space so that the size of the window will stay the same.
The problem is that although I set an initial size for the canvas it changes to fit all of the objects on... | false | 35,669,264 | 0 | 0 | 0 | 0 | myscrollbar = Scrollbar(myframe,orient="vertical",command=canvas.yview)
canvas.configure(yscrollcommand=myscrollbar.set) | 0 | 1,958 | 0 | 0 | 2016-02-27T11:42:00.000 | python,canvas,tkinter | tkinter fixed canvas size | 0 | 1 | 2 | 35,670,592 | 1 |
0 | 0 | So recently I made a script, and I also finished gui and managed to merge those two together. Now i wish when I start the exe file that cmd doesn't appear but instead only GUI? Any idea on how to manage this? So far my searching didn't yield any satisfying results. Some more info is: Python 3.5, using pyinstaller to co... | false | 35,685,734 | 0 | 0 | 0 | 0 | Since your question mentions .exe executables, I'wll assume you work in the Windows environment. Try using a .pywextension instead of a .py extension for the python program. | 1 | 89 | 0 | 0 | 2016-02-28T17:23:00.000 | python,user-interface,python-3.x | How do I stop cmd from appearing when i run exe file (python 3, gui) | 0 | 1 | 1 | 35,685,792 | 1 |
0 | 0 | I have a problem statement- to develop an application for processing DICOM images for diagnostic applications from scratch. It includes:
Image processing- model based segmentation and registration (C++)
Visualization- 2D and 3D image visualization (C++)
Graphical User Interface (Python)
Is it feasible to develop this... | true | 35,715,313 | 1.2 | 0 | 0 | 0 | I would say go with VTK, ITK and Qt. Python brings nothing to the table in terms of GUI compared against Qt. VTK/ITK can read DICOM for you and probably also do segmentation and registration as needed. | 0 | 803 | 0 | 1 | 2016-03-01T05:27:00.000 | python,c++,opencv,visualization,dicom | DICOM image processing, visualization and GUI- C++ and Python | 0 | 1 | 1 | 35,716,718 | 1 |
0 | 0 | I am using Pyinstaller (after spending a long time with py2exe) to convert my REAL.py file to .exe. I used Anaconda to make .py file which is running perfectly on my computer. But when I make .exe file, it shows no error and an application is created in dist\REAL folder. But when I run the .exe file, the console opens... | false | 35,737,188 | 0 | 0 | 0 | 0 | Try using the --hidden-import=matplotlib when calling pyinstaller. For example, in the command prompt you would type:
Pyinstaller --hidden-import=matplotlib your_filename_here.py
and you could try giving it a shot with tkinter in there as well.
Pyinstaller --hidden-import=matplotlib --hidden-import=tkinter your_filenam... | 1 | 2,158 | 0 | 1 | 2016-03-02T02:13:00.000 | python-2.7,anaconda,pyinstaller | Pyinstaller with Tkinter Matplotlib numpy scipy | 0 | 1 | 2 | 47,044,598 | 1 |
0 | 0 | I have tried following the steps on the website but they're not working for me. At least I must be doing something for them not to work.
Firstly, before the steps, the site tells me to open the command line and type python --version. So I typed on the windows search bar 'command line'. Python (command line) came up and... | false | 35,779,145 | 0.039979 | 0 | 0 | 1 | i have encountered a simillar setback while trying to install kivy on python.
in python version 3, py is used instead of python for launching python in the command prompt i.e
py (to launch python3)
py -m pip install kivy (to install kivy)
N.b: before installing kivy it is recommended to install cython and other pytho... | 1 | 12,655 | 0 | 0 | 2016-03-03T17:37:00.000 | python,kivy | How to install kivy on Windows 10 | 0 | 1 | 5 | 41,786,561 | 1 |
0 | 0 | I'm fairly far along developing a Kivy app. Its targeted for android, but will also work (simultaneously with a different skin) on desktops and hopefully iOs eventually.
The basic dependencies I'm heavily using are:-
twisted - using this as an IPC, my app has a server/client
relationship between the data manipulatio... | false | 35,788,298 | 0.197375 | 0 | 0 | 1 | The immediate possibility is that you're just seeing the android processor be slower than the desktop one. I'm not sure what the benchmark comparisons are nowadays, but I've seen this be a problem in the past. That said, I'd have guessed the same as you that the difference shouldn't be that big.
I don't know if it woul... | 0 | 1,330 | 0 | 1 | 2016-03-04T04:58:00.000 | android,python,optimization,kivy | Python on android (kivy) - speed bottlenecks for certain operations? | 0 | 1 | 1 | 35,795,097 | 1 |
0 | 0 | Recently , I wanted to install OpenCV (in Win10 64 bit ) using Cmake 3.5.0-rc3 and Visual studio 2015 . I have python 3.5 as root and 2.7 as python2 . The issue is while configuring it recognizes python 3.5 as main interpreter but i want it to be 2.7.Is there a possible way to make cmake recognize 2.7 as my main pyth... | false | 35,805,904 | 0.197375 | 0 | 0 | 1 | You should look for Python related variables in the CMake GUI. There may be some variables you could set to force paths to the python2.7 interpreter, libs and include dirs. | 0 | 102 | 1 | 0 | 2016-03-04T20:58:00.000 | python,visual-studio,opencv,cmake,cmake-gui | Managing OpenCV python Cmake Studio Windows | 0 | 1 | 1 | 35,806,266 | 1 |
0 | 0 | New to Theano when I tried to use the package I keep getting the following error:
ImportError: ('The following error happened while compiling the node', Dot22(, ), '\n', 'dlopen(/Userdir/.theano/compiledir_Darwin-14.3.0-x86_64-i386-64bit-i386-2.7.11-64/tmpEBdQ_0/eb163660e6e45b373cd7909e14efd44a.so, 2): Library not loa... | false | 35,811,941 | 0 | 0 | 0 | 0 | get rid of theano and reinstall. If that doesn't work, reinstall all of python | 0 | 46 | 0 | 0 | 2016-03-05T08:34:00.000 | python-2.7,anaconda,theano | Running Theano on Python 2.7 | 0 | 1 | 1 | 42,725,755 | 1 |
0 | 0 | I am using kivy to create an android app. However some important pieces of code are based on the python os module. Now since the os is supposed to be system-dependant, i was wondering if it would work on a mobile device running android. If it doesn't work is there some other way to achieve the same results?
Also, the a... | true | 35,816,195 | 1.2 | 0 | 0 | 4 | Yes, It'll work. os works on windows, linux and mac and android is well.. linux. If python runs on it, os will too.
For simple storing you can use os.path.dirname(os.path.abspath(__file__)) and it'll store data in your data/<app>/ or data/data/<app>/ on android, so common user will not access it. Of course if your app ... | 0 | 2,556 | 0 | 2 | 2016-03-05T15:51:00.000 | android,python,kivy | Will python os module work on android? | 0 | 1 | 1 | 35,817,419 | 1 |
0 | 0 | I'm in the process of making a simple game in pygame. Its looking to be a platformer RPG. But that is neither final or relevant per this question. So far i have very little functionality in the game. Its just a skeleton at this point if that. My question is kind of two fold:
Whats the best (in terms of performance an... | false | 35,820,336 | 0 | 0 | 0 | 0 | Quick dislaimer: I do not know multiple ways to incorporate gravity, so I can not say which is "best". But, if you're fighting the performance battle in Python, you've probably fighting the wrong battle.
For gravity, you can use a vector system. Say a character jumps off the ground and has initial velocity of [5, -15] ... | 0 | 238 | 0 | 3 | 2016-03-05T21:49:00.000 | python,pygame,gravity | Pygame - Gravity Methods | 0 | 1 | 2 | 35,822,375 | 1 |
0 | 1 | I get a gtk-WARNING when trying:
cv2.imshow("WindowName", image)
I'm using this to watch a live stream one frame at a time. Are there any alternative libraries I could use? I tried several other options like PIL and Tkinter as well as wand, but could get none of them to work for various different reason. | false | 35,901,246 | 0.379949 | 0 | 0 | 2 | You need to use a windowing system to display images using imshow.
(That can be enabled in settings running sudo raspi-config)
If you absolutely, positively need to display images without using a windowing system, consider providing an html/web interface. Two options that come to mind when serving a web interface are:
... | 0 | 1,687 | 0 | 2 | 2016-03-09T19:48:00.000 | python,linux,opencv,terminal,raspberry-pi | Show image using OpenCV in Python on a Raspberry Pi terminal | 0 | 1 | 1 | 35,901,608 | 1 |
0 | 0 | I have a .cpp and .h source file pair which is a manager (I guess a wrapper also) for a c++ library I have made. I want to let people use this manager to work with my library in python. I have heard about several different ways to wrap this library into python like cython and boost.python but Im having trouble with und... | true | 35,901,908 | 1.2 | 0 | 0 | 1 | Concerning your confusion about the process, just follow any tutorial for any of the wrapper libs you found or where suggested in the comments.
If I want to make this manager usable in python, do I need to wrap it in a different way for each version of python? (2.7 vs 3.4)
Yes. You might be able to load binary module... | 1 | 85 | 0 | 0 | 2016-03-09T20:28:00.000 | python,c++,wrapper | Confusion wrapping c++ library to python | 0 | 1 | 1 | 35,902,761 | 1 |
0 | 0 | I begun to develope with Python and Kivy and I really like it :-) For daily business I'm a Java developer and also a an eclipse child. So i decided to setup eclipse (Mars) with Python, means install PyDev-Plugin and create the settings (done in one button-click).
But I have a problem, my eclipse do not want to recogniz... | false | 35,903,034 | 0.379949 | 0 | 0 | 2 | *.kv files aren't Python files. I don't think trying to treat them as such is really what you want to do. If you must, you can choose to treat *.kv files as python files by going to Preferences > General > Editors > File Associations and adding an entry for *.kv with the Python Editor as an associated editor.
My own ... | 0 | 451 | 0 | 1 | 2016-03-09T21:31:00.000 | python,ubuntu-14.04,kivy,pydev | Kivy development in eclipse PyDev on Ubuntu 14.04 SetUp | 0 | 1 | 1 | 35,906,874 | 1 |
0 | 0 | I have python 2.7 under windows x64, I have been trying to make a simple GUI using PyQt4, like this:
from PyQt4 import *
from ui_mainwindow import Ui_MainWindow
class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
when I run the program I have this error: " No module named ui_mainWindow"
-I have pyqt4 installed
- I hav... | false | 35,914,596 | 0 | 0 | 0 | 0 | As far as I know, ui_mainWindow is a python file generated by some Qt Tool, that transforms .ui file from QtDesigner to Python class.
I have no real experience with PyQT, but I know both C++/Qt and python. In C++/Qt QtCreator does the job of transforming .ui file to C++ class, but probably in python You need to do this... | 0 | 831 | 0 | 0 | 2016-03-10T11:02:00.000 | python,python-2.7,pyqt4 | python 2.7 under windows: cannot import ui_mainwindow | 0 | 1 | 1 | 35,914,964 | 1 |
0 | 0 | I'm working with Openslide's python bindings. I am using Tif images, which are supported by Openslide. It seems I am able to use the methods read_region and get_thumbnail with a smaller, binary masked Tif of about 100 mb's.
However, with a larger, RGBa Tif of about 1.5 Gb, I get the following error:
openslide.lowleve... | true | 35,924,270 | 1.2 | 0 | 0 | 1 | I would guess your smaller TIFF is not JPEG-compressed, but your larger one is.
When libtiff starts the jpeg decoder, it checks that the version number in the libjpeg library binary matches the version number in the libjpeg headers that it was compiled against, and if they do not match, it prints the warning you are s... | 0 | 574 | 0 | 0 | 2016-03-10T18:19:00.000 | python,error-handling,libjpeg,openslide | Openslide libjpeg error: Wrong JPEG library version | 0 | 1 | 1 | 35,983,246 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.