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 | With QPython on Kindle fire .. I use QEdit to write & save a .py file .. say bob.py ..
But when I switch to Console, I can't IMPORT from bob ..
Can someone tell me how to do this?
John (new to QPython) | false | 27,193,835 | 0 | 1 | 0 | 0 | I think you can save the module file into the same directory which you script locates or /sdcard/com.hipipal.qpyplus/lib/python2.7/site-packages/ | 0 | 1,136 | 0 | 0 | 2014-11-28T17:56:00.000 | qpython | How to import from saved QPython file? | 0 | 2 | 2 | 27,209,867 | 1 |
0 | 0 | I'm trying to implement syntax highlighting for text in a Text widget.
I use an external library to lexically analyse the text and give me the tokenised text. After that I go over all the words in the text and apply tag to their position in the text widget so that I can style each word.
My concern now is how do I dea... | false | 27,207,643 | 0.197375 | 0 | 0 | 1 | One possible answer is to do something like Idle does. As a user hits each key, its custom incremental parser tags identifiers that are a keyword, builtin, or def/class name*. It also tags delimited char sequences that are a string or comment. I does what can be done quickly enough.
For example, if one types printer ... | 0 | 228 | 0 | 0 | 2014-11-29T22:02:00.000 | python,performance,tkinter,syntax-highlighting,lexical-analysis | Efficiently applying text widget tags in tkinter text widgets | 0 | 1 | 1 | 27,210,959 | 1 |
1 | 0 | I want to debug separate pieces of my application in Visual Studio 2012.
I have C# executable which works with Oracle.DataAccess dll. It works fine.
Within it IronPython runtime is invoked and it works fine too.
Within these IronPython modules object from main C# application is invoked and it works fine with Oracle dll... | true | 27,208,926 | 1.2 | 0 | 0 | 1 | You can try replicating what "works for me". Create a solution containing:
python project (ironpython)
C# project
Add a reference to desired oracle library (Oracle.DataAccess.dll) to C# project using the standard VS mechanism. C# project should also contains a post build step to copy the resulting dll and pdb into th... | 0 | 390 | 0 | 0 | 2014-11-30T01:01:00.000 | c#,.net,dll,ironpython | DLL loading (C#/IronPython/C#) in VS2012 | 0 | 1 | 1 | 27,233,826 | 1 |
0 | 0 | I don't find how to force the window size with the kivy language. (ex: 800x600p)
Can you help me ?
Thanks for reading.
PITO2901 | false | 27,234,386 | 0.197375 | 0 | 0 | 2 | Set kivy.core.window.Window.size to (800, 600).
You can't set it directly in kv, but you could bind it to a button or similar. You would also need to import the Window to kv, using the #:import statement explained in the doc. | 0 | 1,505 | 0 | 1 | 2014-12-01T18:02:00.000 | python,kivy | Force Window Size Kivy | 0 | 1 | 2 | 27,235,194 | 1 |
0 | 0 | I have a QGraphicsView in a QTabWidget with its tabs on the left. I want to move the location of the vertical scrollbar of my QGraphicsView to the left side, directly underneath the tabs. Is this possible? | true | 27,243,455 | 1.2 | 0 | 0 | 0 | I found I can do this by creating separate QTabBar and QScrollBar widgets that are attached to a QTabWidget and QAbstractScrollArea (I'm using a QListWidget now but I'm sure it'll work for QGraphicsView too) and then putting those widgets in a QVBoxLayout, and then putting the QVBoxLayout next to the QTabWidget/QAbstra... | 0 | 476 | 0 | 0 | 2014-12-02T06:48:00.000 | python,layout,pyqt,scrollbar | PyQt move vertical scrollbar location in QGraphicsView | 0 | 1 | 2 | 30,058,134 | 1 |
0 | 0 | I'd like to add a feature where a user can record a video of the game that they're playing. How do I do this? | false | 27,264,051 | 0.379949 | 0 | 0 | 2 | I have not implemented the solution to this particular problem personally, but I will try to suggest one. Of course any of the solutions will slow down your programm cardinally, but technically it is possible. So what is probably worth trying, that you could use pygame.image.tostring() on you current frame, then just w... | 0 | 2,016 | 0 | 7 | 2014-12-03T05:06:00.000 | python,python-3.x,tkinter,pygame | How do you record a "game" (PyGame or Tk) into a video? | 0 | 1 | 1 | 27,306,611 | 1 |
0 | 0 | I know this is possible to do using additional libraries such as win32com or python-pptx, but I wasn wondering if anyone knew of a way to insert an image into a powerpoint slide using the standard libraries. Lots of googling has indicated that the best solution is probably win32com, but since I can guarantee that every... | true | 27,297,668 | 1.2 | 0 | 0 | 0 | It is probably possible to modify a .pptx file with the standard library without much effort: these new generation of files are meant to be zip-compressed XML + external images files, and can be handled by ziplib and standard xml parsers.
Legacy .ppt files however are a binary closed format, with little documentation, ... | 0 | 507 | 0 | 0 | 2014-12-04T15:24:00.000 | python,powerpoint | Insert Image into PPT using Standard Libraries | 0 | 1 | 1 | 27,297,868 | 1 |
0 | 0 | I am binding to ListBoxSelect and i want to implement a function which recognizes an alphabetical key-press and uses this to jump to the corresponding place in an alphabetically sorted list.
Is there a way to tell what type of event is flagged by ListBoxSelect? I see something in the documentation about getting event "... | true | 27,304,973 | 1.2 | 0 | 0 | 0 | No, there isn't a way to tell what type of event is flagged by <<ListboxSelect>>. Using <<ListboxSelect>> is useless for binding to a letter key, however. It only will fire for mouse clicks and using the arrow keys to navigate the listbox.
You can bind to <KeyPress>. That binding will tell you what key was pressed, an... | 0 | 47 | 0 | 0 | 2014-12-04T22:01:00.000 | python,tkinter | How to determine the type of event flagged by <> in Tkinter? | 0 | 1 | 1 | 27,305,312 | 1 |
0 | 0 | I want to move the coordinates on a tkinter canvas so that the bottom left corner is (0, 0), meaning that the top right corner is (height, width).
How would I do this? | false | 27,323,228 | 0 | 0 | 0 | 0 | You can't. You'll have to do math on all of your coordinates to translate them from one coordinate system to another. | 0 | 85 | 0 | 0 | 2014-12-05T19:25:00.000 | python,python-2.7,tkinter,tkinter-canvas | Move base coordinates Tkinter | 0 | 2 | 2 | 27,324,242 | 1 |
0 | 0 | I want to move the coordinates on a tkinter canvas so that the bottom left corner is (0, 0), meaning that the top right corner is (height, width).
How would I do this? | true | 27,323,228 | 1.2 | 0 | 0 | 0 | Simplest way is to write a function that inverts your vertical coordinate, given the canvas height and desired element height passed in. | 0 | 85 | 0 | 0 | 2014-12-05T19:25:00.000 | python,python-2.7,tkinter,tkinter-canvas | Move base coordinates Tkinter | 0 | 2 | 2 | 27,323,269 | 1 |
0 | 0 | So I'm trying to figure out how to make a bullet class move from character to mouse click and if it hits a monster it will do damage to a monster. I've figured out how to calculate the mouse position and character position. It has been a while since ive been in a math class.
i'm using pygame, python 3.4 | false | 27,332,961 | 0 | 0 | 0 | 0 | A possible solution could be to find the slope of the line between the point of origin(where you are shooting the bullet from) and the location of the mouse click. If you are storing the bullet's x and y values you can then use the slope to change those values every clock tick depending on the speed of the bullet or ho... | 0 | 276 | 0 | 0 | 2014-12-06T15:01:00.000 | python,pygame,mouse | Python, Shooting from Character Position to Mouse position on Mouseclick | 0 | 1 | 1 | 28,238,371 | 1 |
0 | 0 | Is there a tool that creates installers from the source code of a Kivy game for all the different supported platforms with a single button press?
Linux: .deb, .rpm or just a portable .zip file that contains a .sh script
Windows: .exe (installer or portable executable)
Mac: .app (installer or portable executable)
and p... | true | 27,347,356 | 1.2 | 0 | 0 | 2 | All are possible, but I'm not sure what people are recommending right now - the Kivy website has instructions for pyinstaller (specifically on windows as I remember, but it works well on other platforms too), with the disadvantage that pyinstaller only supports python2 right now. You can use other tools too, I've seen ... | 0 | 464 | 1 | 3 | 2014-12-07T20:20:00.000 | python,python-3.x,packaging,kivy | Creating installers or executables on Linux for every supported platform for a Kivy game | 0 | 1 | 1 | 27,349,249 | 1 |
0 | 0 | I made a Python game using Pygame. I try to make it so when it starts, it loads the shell, and entering a raw input would display the pygame window and start the game so that I can make the game playable without having to close the shell. It works, however, the window starts minimized. The game is a simple "dodge the o... | false | 27,351,387 | 0 | 0 | 0 | 0 | As I understood you, you don't want the game to start, before the window is in fullscreen-mode, right?
When I try you attempt (starting through rawinput), my display is fullscreen from the start. Have you set everything correctly?
I suggest that you stop the game until there is an actual key-input (whatever controls yo... | 0 | 2,019 | 0 | 2 | 2014-12-08T04:22:00.000 | python,window,pygame | How to focus on a window with pygame? | 0 | 1 | 1 | 27,357,511 | 1 |
0 | 0 | In my app I need to know how big the canvas is in pixels.
Instead calling canvas.size returns [100,100] no matter how many pixels the canvas is wide.
Can you please tell me a way to get how many pixels the canvas is wide and high? | true | 27,358,870 | 1.2 | 0 | 0 | 3 | There is no position nor size in a Canvas. Canvas act just as a container for graphics instructions, like Fbo that draw within a Texture, so it have a size.
In Kivy, Canvas.size doesn't exists, but i guess you called your widget a canvas. By default, a Widget size is 100, 100. If you put it into a layout, the size will... | 0 | 5,156 | 0 | 2 | 2014-12-08T13:15:00.000 | python,kivy | Size of canvas in kivy | 0 | 1 | 3 | 27,380,669 | 1 |
0 | 0 | I need to send some data from a Python program to a C++ program. The current design is such that the C++ program executes the python program in a separate thread. I wish to pass some result from the python program back to the C++ program.
What I have found so far includes:
Sending over sockets
Sending via a pipe
Using... | false | 27,384,091 | 0 | 1 | 0 | 0 | I ended up altering the the modules such that the C++ part and the Python part can work more or less independently of each other. But if passing data was necessary, I guess I would have gone via the socket route. | 0 | 622 | 0 | 0 | 2014-12-09T16:37:00.000 | python,c++,c,sockets | Strategies to send data from a Python program to a C++ program | 0 | 1 | 1 | 27,401,759 | 1 |
0 | 0 | I have a project that uses COM and 'Python' scripting. Earlier we were using 'ComTypes' now we use Win32Com. To keep backward compatibility I need to change name of some of the interfaces. So here is what I do
1) Use the 'makepy' utility to create a python file from my .tlb file, this creates a .py file at ..\Lib\site... | false | 27,385,373 | 0 | 0 | 0 | 0 | OK. I found out what is the problem. When you create a python file using makepy tool it updates the dicts.dat file in gen_py directory. So you need to copy over that file as well to other machines. | 1 | 190 | 0 | 0 | 2014-12-09T17:44:00.000 | python,win32com,typelib | python .pyc file with win32com | 0 | 1 | 1 | 27,413,739 | 1 |
0 | 0 | On scrollable tkinter objects in Python, when you call .yview(), it returns their current 'position'. I can't make heads or tails of what it returns, though. For example, when scrolled to the beginning of one of my elements, it returns (0.0, 0.4662309368191721), and when at the end, (0.5337690631808278, 1.0).
What do t... | true | 27,413,547 | 1.2 | 0 | 0 | 1 | The two numbers represent the fractional part of the data that is visible. A value of 0 (zero) means you are at the top (or left, in the case of xview), and a value of 1 (one) means bottom (or right). So, for example, if the very middle of the document were at the top of the screen, the first number would be .5. If a d... | 0 | 267 | 0 | 0 | 2014-12-11T00:46:00.000 | python,scroll,tkinter | What do the values in obj.yview() mean? | 0 | 1 | 1 | 27,414,982 | 1 |
0 | 0 | while developing qpython scripts, it would be much easier to develop them on a pc and only transfer them to the android device for testing.
What is the easiest way to do such a transfer? (Development might require to do this very frequently)
Thanks in advance for all your feedback.
tfv | false | 27,438,448 | 0 | 0 | 0 | 0 | QPy for android has built in FTP. Just enter the local address it provides into an ftp program (like bareftp for ubuntu) | 0 | 1,287 | 0 | 1 | 2014-12-12T06:57:00.000 | qpython | How to easily transfer qpython scripts from windows to android for development? | 0 | 3 | 3 | 42,170,785 | 1 |
0 | 0 | while developing qpython scripts, it would be much easier to develop them on a pc and only transfer them to the android device for testing.
What is the easiest way to do such a transfer? (Development might require to do this very frequently)
Thanks in advance for all your feedback.
tfv | false | 27,438,448 | 0.066568 | 0 | 0 | 1 | In linux with ADB installed, in terminal you can use
adb push pcprojectfolder /sdcard/com.hipipal.qpyplus/projects/androidprojectfolder
You do need to manually end the task on the phone before pushing though. | 0 | 1,287 | 0 | 1 | 2014-12-12T06:57:00.000 | qpython | How to easily transfer qpython scripts from windows to android for development? | 0 | 3 | 3 | 29,536,167 | 1 |
0 | 0 | while developing qpython scripts, it would be much easier to develop them on a pc and only transfer them to the android device for testing.
What is the easiest way to do such a transfer? (Development might require to do this very frequently)
Thanks in advance for all your feedback.
tfv | false | 27,438,448 | 0 | 0 | 0 | 0 | There is a ftp service in setting part which can help you to translate files between android device and pc. | 0 | 1,287 | 0 | 1 | 2014-12-12T06:57:00.000 | qpython | How to easily transfer qpython scripts from windows to android for development? | 0 | 3 | 3 | 27,445,725 | 1 |
0 | 0 | I came across a feature in some programming languages to call methods in other programming languages. Its called the Foreign Function Interface. For example, I would be able to call a C Language function inside a Python program. Or I could I write a wrapper for some C library in Python language for other Python users t... | true | 27,449,735 | 1.2 | 0 | 0 | 3 | Because it should also compile the foreign language as well.
No. ctypes, and the like, only need to be able to link to object code. This depends on the target foreign language having appropriate conventions for name mangling inside the object code, which C does.
if the host language is object oriented, and foreign la... | 1 | 185 | 0 | 1 | 2014-12-12T18:20:00.000 | python,c,cross-language | Wrappers for C API in programming languages | 0 | 1 | 1 | 27,449,816 | 1 |
0 | 0 | How would I draw a simple partially transparent rectangle in python. I would like to not download anything from the internet and purely use python 2.7.3. I would like to also control where the rectangle starts and ends and control its width and height. The end goal of this is to have a map (of michigan and its great la... | false | 27,465,157 | 0 | 0 | 0 | 0 | Check out
svgfig or svgwrite for svg
reportlab for pdf
pyglet for drawing to a window | 0 | 7,565 | 0 | 0 | 2014-12-14T00:37:00.000 | python,python-2.7,graphics,geometry | Drawing basic shapes in python 2 | 0 | 1 | 2 | 27,465,376 | 1 |
0 | 0 | Protobuf with pure python performance 3x slowly on pypy than CPython do.
So I try to use c++ implementation for pypy.
These are two error (PyFloatObject undefined and const char* to char*) when I compile protobuf(2.6.1 release) c++ implementation for pypy.
I compile successfully after I modify python/google/protobuf/py... | false | 27,517,939 | 0.197375 | 1 | 0 | 1 | So this is a happy non-answer using my experience. The pure-python bindings for google protobuf are a terrible port of C/C++ stuff. However, I had quite a bit of success wrapping C google protobuf generated bindings using cffi. Someone should go ahead and create a more generic binding, but that would just a short consu... | 0 | 567 | 1 | 2 | 2014-12-17T03:40:00.000 | python,c++,protocol-buffers | Is there any way to use Google Protobuf on pypy? | 0 | 1 | 1 | 27,687,619 | 1 |
0 | 0 | I want to create some GTK+2 applications using Python 3. I searched many places, but can only find tutorials for using GTK+2 together with Python 2, using PyGtk, or GTK+3 together with Python 3, using PyGobject. Is there any way to create GTK+2 applications using Python 3? | true | 27,542,828 | 1.2 | 0 | 0 | 2 | Technically, it is possible, but not advisable.
If you compile GTK 2.24 yourself with GObject introspection turned on, and don't have GTK 3.x installed, then you should be able to use from gi.repository import Gtk to access the GTK 2 API.
However, this is not supported in any way, and even prints out a warning message ... | 0 | 824 | 0 | 1 | 2014-12-18T09:08:00.000 | python-3.x,gtk2 | Is it possible to create GTK+2.x applications using Python 3? | 0 | 1 | 1 | 27,592,574 | 1 |
0 | 0 | I have made a small program in Python that involves tkinter, and I made it a pyw file because it has a shortcut on the desktop and I do not want the command prompt to get in the way. I used py2exe following the sentdex tutorial on youtube, and I got an output file, but the output file shows an error and exits before I ... | false | 27,586,108 | 0 | 0 | 0 | 0 | As far as I understand there is not a version of py2exe for python3.x
You'd be best of going for cx_freeze (Sentdex also has a tutorial on that on that) | 0 | 216 | 0 | 0 | 2014-12-21T02:02:00.000 | python-3.x,tkinter,exe,py2exe | Python py2exe with tkinter (pyw file) | 0 | 1 | 1 | 29,677,578 | 1 |
0 | 0 | I have create some custom dialogs in wxpython that I am very happy with. I can execute pretty much anything I want based on user interaction and then once "OK" is selected collect the information from whatever functions I have run.
What I am wondering is there a way to execute a final function at the time "OK" is sele... | true | 27,615,219 | 1.2 | 0 | 0 | 0 | Just create self.C in your custom dialog's __init__ method. Then bind your OK button to a handler and update it as you mentioned. Then you should be able to get its value just as you stated: value = dlg.C.GetValue().
One thing to keep in mind is that when you create the OK button, do not set its id to wx.OK. If you do,... | 0 | 237 | 0 | 1 | 2014-12-23T06:33:00.000 | wxpython,customdialog | WXPYTHON CUSTOM DIALOG | 0 | 1 | 1 | 27,622,152 | 1 |
0 | 0 | Im using Qpython3 on Android 4.2.2. Im currently able to list the latest sms from a particular contact and extract a 10 digit phone number. I want to update a contact's phone number with this number.
How should I do this ?
To be more precise, I want to be able to:
Access the contact list.
Update contact phone number ... | false | 27,642,293 | 0 | 0 | 0 | 0 | Try to run it in console because you can communicate with the interpreter directly | 0 | 90 | 0 | 0 | 2014-12-24T21:26:00.000 | android,qpython3 | How do I add a phone number to a contact using Qpython3 | 0 | 1 | 1 | 27,642,399 | 1 |
0 | 0 | How could I hide an existing Label when a button is clicked in Python(Tkinter)? | false | 27,654,494 | 0.321513 | 0 | 0 | 5 | Use can use grid_remove() to hide the label.
like self.myLabel.grid_remove(). If you want to show it again then use self.myLabel.grid(). This will show widget on its original position on grid. | 0 | 29,265 | 0 | 4 | 2014-12-26T08:06:00.000 | python,python-3.x,tkinter,label | Hide label when a button is clicked in Python | 0 | 1 | 3 | 32,515,869 | 1 |
0 | 0 | Versions
Python 3.4 with Pygame 1.9.2
Question
How can I pass the name of a function/method from one module, where this function does NOT exist, to the module containing it without having to resort to making it a string and evaluating it by eval()?
Background
I have a simple MVC pattern for training purposes. For simpl... | true | 27,744,155 | 1.2 | 0 | 0 | 0 | When I understand you correctly, you are mixing Callbacks with Events.Perhaps this makes the problem so problematic.
In Python functions are objects, and can be passed as any other object like strings. So there is no need to pass names and evaluate them. | 1 | 116 | 0 | 0 | 2015-01-02T15:03:00.000 | python,lambda,pygame,eval | Python: Passing a function name as an argument between modules | 0 | 1 | 1 | 27,744,281 | 1 |
0 | 0 | -I'm using python and cocos2D
I have the file loading a tmx-map but now I want to change a specific tile to display an image from another file, I have saved the specific tile that I want to change in a variable but changing it I don't know how.
Thanks in advance | false | 27,761,448 | 0.197375 | 0 | 0 | 1 | All I had to do was
cell.tile.image = image | 0 | 266 | 0 | 0 | 2015-01-04T01:27:00.000 | python,tile,tmx,tiled,cocos2d-python | python cocos2d change tile's image | 0 | 1 | 1 | 27,761,506 | 1 |
0 | 0 | TextInput class
Is there any way to append or edit text ???
Problem:
I created TextInput object and accessed text method to print strings.
But every time I access text method, it prints new string and it doesn't retain previous value.
How to fix the issue?
what is alternative for TextInput? | false | 27,776,107 | 0.197375 | 0 | 0 | 1 | Just replace the text with some function of the original string, e.g. textinput.text = ''.join('something ', textinput.text.replace('a', 'b'), ' and something else'). | 1 | 1,054 | 0 | 2 | 2015-01-05T08:56:00.000 | python,kivy | edit or append text (TextInput class) in kivy | 0 | 1 | 1 | 27,779,076 | 1 |
0 | 0 | I'm running QPython on my Android device. Whenever I try to import Tkinter, it says, "no modules found". What is the package name for Tkinter in PyPI? Or where can I download the Tkinter package for QPython? | false | 27,804,805 | 0.197375 | 0 | 0 | 1 | Tkinter is not installed with QPython, unlike SL4A and Kivy. You'll have to install it yourself. There is a pip console among the scripts, so I'd try using that first. | 0 | 6,218 | 0 | 1 | 2015-01-06T18:26:00.000 | tkinter,pypi,qpython | QPython on Android doesn't get imported | 0 | 1 | 1 | 30,358,514 | 1 |
0 | 0 | I have a Python wrapper (to a C lib) generated by Swig.
Have unittest run happy within PyDev.
Project structure follow PyBuilder suggested setup:
|-src
|-main
|-python
|-A.py
|-_A.so
|-unittest
|-python
|-A_tests.py
when try run pyb, ... | false | 27,807,343 | 0 | 1 | 0 | 0 | is it possible you build the .so library for another python version?
PyBuilder does not do anything special about shared objects, especially not when running unit tests.
So try running ldd _A.so and see if that matches the interpreter you're using with pyb? | 0 | 53 | 0 | 0 | 2015-01-06T21:18:00.000 | python,swig,pybuilder | PyBuilder broken for Swig-Python generated wrapper project | 0 | 1 | 1 | 27,814,800 | 1 |
0 | 0 | I have been having problems importing Tkinter. I have done research here and found that it's because I have had both 64 bit and 32 bit python on my machine. I currently use 32 bit but Tkinter is pointing to the 64 bit version. I think the easiest fix is to uninstall python and reinstall it. Will I loose all my download... | true | 27,810,710 | 1.2 | 0 | 0 | 1 | All the downloaded libraries are in the C:\Python27\Lib\site-packages. You can check this folder before you uninstall a version of Python.
I agree with Rinzler, for Python, both versions will have its own Tkinter. Maybe it's just a problem of interpreter choice of your IDE. | 1 | 2,920 | 0 | 0 | 2015-01-07T02:46:00.000 | python,python-2.7 | Uninstalling Python - Do I loose my installed packages and code? | 0 | 1 | 1 | 27,810,779 | 1 |
0 | 0 | community!
My problem:
I have an item, namely gi.repository.Gtk, marked as "Unresolved reference: Gtk".
The Gtk module did not exist at the moment of setting up Python SDK in Idea, however I've installed it little bit later.
I can't get how do I force re-sync of classpath for python? | true | 27,813,209 | 1.2 | 0 | 0 | 0 | Normally the binary modules for a Python interpreter are rescanned on IntelliJ IDEA restart. Please try restarting the IDE. | 1 | 93 | 0 | 0 | 2015-01-07T05:52:00.000 | python,intellij-idea | intellij: update classes in classpath for python plug-in | 0 | 1 | 1 | 27,828,457 | 1 |
0 | 0 | I had created an application in Python and then I tried to make an executable from it.
Works well in Ubuntu and Windows but only when on this system I have Python installed.
In other case (Tried only for Win) I get the error that "The application can't start because python34.dll is missing"
What I do (filename is curr.... | false | 27,850,953 | 0 | 0 | 0 | 0 | Just installed PyInstaller - it has the option to compile to one file. | 1 | 13,987 | 1 | 2 | 2015-01-08T22:48:00.000 | python,dll,cython | Python34.dll is missing | 0 | 1 | 2 | 34,793,148 | 1 |
1 | 0 | I've designed a desktop app using PyQt GUI toolkit and now I need to embed this app on my Django website. Do I need to clone it using django's own logic or is there a way to get it up on website using some interface. Coz I need this to work on my website same way it works as desktop. Do I need to find out packages in d... | true | 27,879,952 | 1.2 | 0 | 0 | 2 | I'm not aware of any libraries to port a PyQT desktop app to a django webapp. Django certainly does nothing to enable this one way or another. I think, you'll find that you have to rewrite it for the web. Django is a great framework and depending on the complexity of your app, it might not be too difficult. If you have... | 0 | 1,730 | 0 | 1 | 2015-01-10T18:52:00.000 | django,python-2.7,pyqt4 | Cloning PyQt app in django framework | 0 | 1 | 1 | 27,880,120 | 1 |
0 | 0 | I have a PyFloatObject that I want to convert to a C float. However, PyObjectFloat only provides a conversion to double. Can I safely cast a double to a float, or is there a function to convert PyObject to float i.e. PyObject_AsFloat. | false | 27,951,419 | 0 | 0 | 0 | 0 | sprintf into a buffer followed by atoi seems to do the trick | 1 | 2,614 | 0 | 0 | 2015-01-14T20:01:00.000 | python,c,python-c-api,python-c-extension | convert PyFloatObject to float | 0 | 1 | 3 | 27,969,486 | 1 |
0 | 0 | Is there a way to hide the IDLE (or not making it run at all), with a command, when launching a tkinter application, without having to build the application? | false | 27,955,957 | 0 | 0 | 0 | 0 | Execute it directly from the command line with python script.py. | 0 | 155 | 0 | 0 | 2015-01-15T02:38:00.000 | python-3.x,python-idle | Is there a way to hide the IDLE when running a tkinter application? | 0 | 1 | 1 | 27,956,444 | 1 |
0 | 1 | I'm running Paraview 4.2 on Linux. Here's what's happening:
I load my XDMF/hdf5 data into PV, which contains vector data.
I apply a glyph filter to the loaded data, and hit apply (thereby using the default mode of Uniform Spatial Distribution).
No glyphs appear on screen, and the information tab shows that the filter ... | false | 27,977,626 | 0 | 0 | 0 | 0 | Uniform distribution works by picking a set of random locations in space and finding data points closet to those locations to glyph. Try playing with the Seed to see if that helps pick different random locations that yield better results.
If you could share the data, that'd make it easier to figure out what could be go... | 0 | 653 | 0 | 1 | 2015-01-16T05:07:00.000 | python,paraview | Paraview glyph uniform distribution does not work on my dataset | 0 | 1 | 1 | 27,987,246 | 1 |
0 | 0 | I'm working on a pygame project at the moment and I'm wondering if there is an easy way to delete all sprites in a class. I have all the sprites in a group called self.spritegroup, so I couldn't just delete all objects in a group. Is there a simple shortcut to delete all objects in a class? | false | 28,006,100 | 0 | 0 | 0 | 0 | Well you could always just re-assign a new group object to your old group.
your_old_group = new_group
I'm not entirely sure but it seems kill is meant to delete specific sprites. | 1 | 1,778 | 0 | 1 | 2015-01-18T01:01:00.000 | python,class,pygame | Pygame delete all objects in class | 0 | 1 | 3 | 50,237,749 | 1 |
0 | 0 | In a wxpython Combobox, long strings get left-truncated in the dropdown portion. This can result in some values looking identical when they aren't. I'd like to provide better information to the user than that.
The following options occur to me:
Insert elipses in the middle of the string before adding it to the combob... | false | 28,012,863 | 0 | 0 | 0 | 0 | I would recommend using the ComboCtrl instead of the ComboBox. The benefit is that the ComboCtrl is a custom widget, so it allows more flexibility. For example, the ComboCtrl provides a scrollbar for long strings. Check out the wxPython demo for some good examples. | 0 | 172 | 0 | 1 | 2015-01-18T17:52:00.000 | combobox,wxpython | Showing long strings in wxpython Combobox dropdown | 0 | 1 | 1 | 28,027,478 | 1 |
0 | 0 | Is there a trick to show the grid layout cells (or the borders of the cells) when using it, in order to have a visual idea of what is going on behind the scenes?
I have searched a little bit, but have not found nothing yet. | true | 28,025,666 | 1.2 | 0 | 0 | 15 | If you give the containing frame a color, and use options to put padding between cells, the background will bleed through the gaps. This only works where there are widgets. If you have spans that are empty, you won't see grid lines.
It's important to realize that you aren't creating a grid object. "grid" is not a thin... | 0 | 17,747 | 0 | 15 | 2015-01-19T13:24:00.000 | python-3.x,tkinter | Show grid layout cells in tkinter | 0 | 1 | 1 | 28,027,692 | 1 |
0 | 0 | I have tried multiple times to use PyInstaller to bundle my Python2 programs, but it never seems to work with the Pygame module. I have seen many other issues on this topic, but I couldn't find any useful answers. Does anybody know a solution to this?
I am trying to do this on Ubuntu 14.10.
-Edit-
To be more specific:
... | true | 28,033,003 | 1.2 | 0 | 0 | 0 | i suggest trying another program like py2exe to bundle python programs i currently have not had any issues with it. Their are lots of good youtube videos on the process which is cmd based. I have had some personal problems using pyinstaller and think it is just buggy assuming your program is not flawed. | 1 | 9,558 | 0 | 6 | 2015-01-19T20:30:00.000 | python,pygame,pyinstaller | Pyinstaller with pygame | 0 | 1 | 2 | 28,058,867 | 1 |
0 | 0 | How do you customize the kivy logo for a kivy app?
I am using Buildozer in Ubuntu 14.04. | false | 28,063,099 | 0.197375 | 0 | 0 | 1 | These variables can be set in the buildozer.spec, e.g. icon.filename in the [app] section. | 0 | 448 | 0 | 1 | 2015-01-21T08:58:00.000 | python-2.7,customization,kivy | Customizing a kivy app logo using Buildozer | 0 | 1 | 1 | 28,068,266 | 1 |
0 | 0 | I am using PyQt5 to make the user interface. Now I have set up a tab widget, and I want to trigger the event at such a time when a specific tab is selected. In other words, for example, I have tab A and tab B, and I want to execute the function every time user is switching from tab A to tab B. | true | 28,121,876 | 1.2 | 0 | 0 | 7 | When a new tab is selected currentChanged(int index) signal of the QTabWidget is emitted. Just connect that signal to some slot and check the index of the newly selected tab which is passed as argument. | 0 | 5,574 | 0 | 8 | 2015-01-24T03:07:00.000 | python,qt,pyqt,qtabwidget | How to connect event when tab widget is selected? | 0 | 1 | 1 | 28,122,425 | 1 |
0 | 0 | So I have this little problem. When I try to install PyGame for Python 3.4 I download a .whl (wheel?) file and don't know how to use it. Some guys told me something about pip but don't know how to use/install it. | false | 28,127,730 | 0.066568 | 0 | 0 | 3 | 14 y/o? Good for you! You can put the file into your python/scripts folder and run pip install *file* (where *file* is your filename). | 1 | 64,844 | 0 | 9 | 2015-01-24T16:40:00.000 | python,pygame,pip,python-3.4 | How to install PyGame on Python 3.4? | 0 | 1 | 9 | 28,127,786 | 1 |
0 | 0 | I am using Pygame 1.9.2 with Python 3.4 to create a control program for a robot. The controller is a new Xbox One controller connected via USB which is working fine with pygame. The problem is that the trigger buttons are considered Axes which give values from -1 to 1 depending on how hard you press. Is there a way t... | true | 28,132,156 | 1.2 | 0 | 0 | 0 | (x + 1.0) / 2.0 where x is whatever you get from the controller should give you a range of 0..1 (the + 1.0 is to get you in the range 0..2) | 0 | 1,152 | 0 | 0 | 2015-01-25T01:13:00.000 | python,linux,arduino,pygame,raspberry-pi | How can I set the range for Xbox One controller Triggers using Pygame? | 0 | 1 | 1 | 28,132,200 | 1 |
0 | 0 | I am trying to run a simple Turtle Graphics file, but no drawing shows up and IDLE asks me what background color you want?
What's wrong with my Python? | false | 28,144,261 | 0 | 0 | 0 | 0 | I was asked this question by a friend, and re installation solved the problem | 0 | 197 | 0 | 0 | 2015-01-26T03:04:00.000 | python,turtle-graphics | Drawing not shown using Python Turtle Graphics | 0 | 1 | 1 | 28,177,122 | 1 |
0 | 0 | I have a Pythonscript where I want to import pygameui. When I perform:
sudo pip install pygameui
in the terminal, I get the following message:
Downloading/unpacking pygameui Running setup.py egg_info for package
pygameui
Requirement already satisfied (use --upgrade to upgrade): setuptools in
/usr/local/l... | false | 28,150,201 | 0.099668 | 0 | 0 | 1 | There is no "solution", only workarounds here.
To have working environment I install system package with pygame (i.e. pacman -S python2-pygame in Arch Linux) then create virtualenv with --system-site-packages switch. Pygame has not been updated for more than 5 years so it's highly unlikely that any changes will come in... | 1 | 1,630 | 0 | 2 | 2015-01-26T12:32:00.000 | python,pygame,raspberry-pi | Trouble with PyGameUI - RaspberryPi | 0 | 1 | 2 | 32,603,009 | 1 |
0 | 0 | I would like to know if Tkinter.Canvas is a classic or modern Python class, because super does not work as expected (for me). | true | 28,174,683 | 1.2 | 0 | 0 | 3 | All Tkinter classes in python 2.x are old style classes. | 1 | 58 | 0 | 1 | 2015-01-27T15:59:00.000 | python,python-2.7,tkinter,tkinter-canvas | Is Tkinter.Canvas a classic class? | 0 | 1 | 1 | 28,174,950 | 1 |
0 | 0 | I have just started using twillio. Im not sure if its the right tool for what I am trying.
Currently if I dial my number, there is no ring, it just picks up straight away. The reason I am mentioning this is because I would like it to first ring before it picks up. So my user can actually put down the phone before the c... | false | 28,222,797 | 0.099668 | 0 | 0 | 1 | This is where Twilio gets tricky. Technically the call is picked up instantly, so there is no timeout to let it ring.
What you can do, is initialize the phone call with a timeout, and using the Play verb, use an MP3 recording of the standard ring before letting the program do it's thing. | 0 | 91 | 0 | 0 | 2015-01-29T19:17:00.000 | python,rest,twilio | Letting twillio ring before it picks up | 0 | 1 | 2 | 28,222,877 | 1 |
0 | 0 | I have a pygame program where there's a face in the center. What I want the program to do is have a bunch of objects on the screen, all irregular. Some would be circles, others would be cut-out pictures of objects like surf boards, chairs, bananas, etc. The user would be able to drag the objects around, and they'd coll... | true | 28,228,431 | 1.2 | 0 | 0 | 0 | What you are looking for is functionality usually provided by a so-called physics engine. For very basic shapes, it is simple enough to code the basic functionality yourself. (The simplest case for 2D shapes is the collision detection between circles).
Collision detection gets pretty hard pretty quickly, especially ... | 0 | 123 | 0 | 0 | 2015-01-30T02:48:00.000 | python,pygame,collision | Pygame image collision | 0 | 1 | 1 | 28,228,513 | 1 |
0 | 0 | I have an aplication in IronPython where I load my xaml with wpf: "wpf.LoadComponent(....xaml)"
I have a Button and a TextBox in my app and when I push the button, the app start doing a 2 minute work, I need to update the textbox of the aplication during this work.
But I can´t do it. My textBox only update it when the ... | false | 28,233,768 | 0 | 0 | 0 | 0 | Following snippet might help you.
XAML :
<Label Content="" HorizontalAlignment="Left" Margin="62,163,0,0" VerticalAlignment="Top" Height="472" Width="880" Foreground="Black" FontSize="18" Background="White" x:Name="label1"/>
IronPython :
def Button_Click1(self, sender, e):
self.label1 = self.FindName('label1')
... | 0 | 2,205 | 0 | 0 | 2015-01-30T10:24:00.000 | wpf,xaml,textbox,ironpython | How to update TextBox using wpf, IronPython | 0 | 1 | 3 | 53,803,083 | 1 |
0 | 0 | I am embedding Python in C++.
I have a working C++ Python extension object.
The only thing wrong is that if I set tp_dealloc to a custom function it never gets called.
I would have thought Py_Finalize() would trigger this, or maybe terminating the program. But no.
Could anyone suggest why tp_dealloc isn't getting hit? | true | 28,266,847 | 1.2 | 0 | 0 | 1 | I believe the problem here was one of reference counting.
PyType_Ready() fills various tp_* fields depending on the bases of your type.
One of these is tp_alloc, which I have set to 0.
Its doc says the refcount is set to 1 and the memory block is zeroed.
Every instance Python creates of this type, a new PyObject get ad... | 0 | 290 | 0 | 1 | 2015-02-01T19:28:00.000 | dealloc,python-c-api | tp_dealloc not getting hit upon exit | 0 | 1 | 1 | 28,297,671 | 1 |
0 | 0 | I have created a program in python(Tkinter) which takes username and password as input and a button which, when pressed, goes through a function which checks the username and password and further runs the program. I want that, rather than clicking the button, user presses the 'Enter' key and that does the function of t... | false | 28,282,005 | 0 | 0 | 0 | 0 | I believe you'll want to bind the key to your handler: frame.bind('<Return>', some_handler). | 0 | 8,809 | 0 | 1 | 2015-02-02T16:16:00.000 | python,tkinter | Getting values by pressing 'Enter' key rather than clicking a button | 0 | 2 | 3 | 28,283,243 | 1 |
0 | 0 | I have created a program in python(Tkinter) which takes username and password as input and a button which, when pressed, goes through a function which checks the username and password and further runs the program. I want that, rather than clicking the button, user presses the 'Enter' key and that does the function of t... | false | 28,282,005 | 0 | 0 | 0 | 0 | For me, the normal binding to a function did not work. Probably because I am using it inside a class, I used the Lambda function and it worked. Here's the code:
inp.bind('', lambda _: show()) | 0 | 8,809 | 0 | 1 | 2015-02-02T16:16:00.000 | python,tkinter | Getting values by pressing 'Enter' key rather than clicking a button | 0 | 2 | 3 | 37,026,723 | 1 |
0 | 0 | I've installed Python 2.7.6 (32-bit) on Windows 7 (64-bit). This works fine in Windows Power Shell. I set the PATH to C:\Users\name\Python27\Scripts, and that didn't seem to be a problem either. I then downloaded a pygame install file, pygame-1.9.2a0-cp27-none-win32.whl, from:
http://www.lfd.uci.edu/~gohlke/pythonlibs/... | false | 28,310,782 | 0 | 0 | 0 | 0 | you must not have set the path variable in windows..it's the same mistake that i made..
set the environment variable in windows by doing fallowing steps:
right click 'My Computer'
go to properties
Advanced System Settings
Environment Variables
and set Path there..
if this doesn't help then try another method :
open ... | 1 | 559 | 0 | 0 | 2015-02-03T23:30:00.000 | python,pygame,pip | can't install pygame using pip, Python 2.7.6 on Win7 | 0 | 1 | 1 | 28,639,628 | 1 |
0 | 0 | I currently use Cython to build a module that is mostly written in C. I would like to be able to debug quickly by simply calling a python file that imports the "new" Cython module and test it. The problem is that I import GSL and therefore pyximport will not work. So I'm left with "python setup.py build; python setup.p... | false | 28,489,542 | 0 | 1 | 0 | 0 | I usually just throw all the commands I need to build and test into a shell script, and run it when I want to test. It's a lot easier than futzing with crazy Python test runners. | 1 | 87 | 0 | 4 | 2015-02-12T23:01:00.000 | python,cython | Better Way of Debugging Cython Packages | 0 | 1 | 1 | 29,159,267 | 1 |
0 | 0 | I'm going through some PyQt4 GUI tutorials and often see strings such as "&File" or "&Exit" in menus and the like.
My question is what is the purpose of the "&" symbol in this string? I can't see a difference when I miss it out. I've not come across it in other Python tutorials - is it somehow unique to PyQt?
Thanks. | true | 28,502,910 | 1.2 | 0 | 0 | 3 | The & causes PyQT to display an underscore under the letter that serves as a shortcut key for the menu item. | 1 | 784 | 0 | 1 | 2015-02-13T15:25:00.000 | python,string,pyqt4 | What is the purpose of an ampersand (&) in a PyQt4 string? | 0 | 1 | 1 | 28,502,943 | 1 |
0 | 0 | I am making an first-person open-world game in Blender Game Engine(bge), and intend to have the terrain be generated procedurally. I have looked around from website to website, and have only found various ways for the game to generate terrain in the "edit" mode, but not a way to generate it in blender game engine, eg. ... | false | 28,507,678 | 0 | 0 | 0 | 0 | Procedurally generating terrain on the fly is not that easy, but it is possible. You must create the terrain mesh with its triangles and textures during runtime and then dynamically load/unload the parts the player can see.
So you would not create a single big landmass, but rather divide your terrain in smaller chunks ... | 0 | 519 | 0 | 0 | 2015-02-13T19:53:00.000 | python,python-3.x,game-engine,blender | Procedualy Generateing Terrain in Blender Game Engine | 0 | 1 | 1 | 28,684,387 | 1 |
0 | 0 | I already tried to google it but I couldn't find anything ...
I created tkinter canvas with width 800, height 600
apparently, the left upside will be (0,0)
I want to change left downside to (0,0)
How can I do this??? | false | 28,510,010 | 0 | 0 | 0 | 0 | You cannot change the coordinate system of the canvas. You can scroll the canvas so that 0,0 is in the bottom left, but the y coordinates will be negative going up. | 0 | 209 | 0 | 0 | 2015-02-13T22:43:00.000 | python,tkinter,coordinates | How can I convert coordinate in tkinter? | 0 | 1 | 2 | 28,510,642 | 1 |
0 | 0 | Im fairly new to python. I creating a game similar to asteroids, and so far I've gotten the spaceship to move around with the arrow keys. can someone explain what i would do to make the spaceship rotate in the direction its moving? thanks in advance! | false | 28,553,439 | 0 | 0 | 0 | 0 | Each of your sprites should have velocity attributes. If your velocity is negative, turn one way. If your velocity is positive, turn the other. Because velocity indicates the direction of movement, this can be used to determine angular direction. | 0 | 774 | 0 | 0 | 2015-02-17T01:52:00.000 | python,pygame | python/pygame: how would i get my sprite to rotate in the direction it's moving? | 0 | 1 | 2 | 28,553,503 | 1 |
0 | 0 | When dealing with C extensions with Python, what is the best way to move data from a C++ array or vector into a PyObject/PyList so it can be returned to Python?
The method I am using right now seems a bit clunky. I am looping through each element and calling Py_BuildValue to append values to a PyList.
Is there someth... | true | 28,560,045 | 1.2 | 1 | 0 | 1 | You have to construct a PyObject from each element prior to adding it to a sequence.
So you have to either add them one by one, or convert them all, then pass to a constructor from PyObject[].
I guess the 2nd way is slightly faster since it doesn't have to adjust the sequence's member variables after each addition. | 0 | 983 | 0 | 0 | 2015-02-17T10:40:00.000 | python,c++,c | Best way to copy C++ buffer to Python | 0 | 1 | 3 | 28,560,741 | 1 |
0 | 0 | I am trying to open a file, remove some characters (defined in dic) and then save it to the same the file.
I can print the output and it looks fine, but I cannot save it into the same file that the original text is being loaded from.
from tkinter import *
from tkinter.filedialog import askopenfilename
from tkinter.mes... | false | 28,582,037 | 0.099668 | 0 | 0 | 1 | This is often implemented by writing to a temp file and then moving it to the original file's name. | 1 | 649 | 0 | 0 | 2015-02-18T11:06:00.000 | python-3.x | How can I save output tho the same file that I have got the data from, in Python 3 | 0 | 1 | 2 | 49,924,334 | 1 |
0 | 0 | I have a python(2.7)/wxpython program developed on windows, which I am trying to migrate to mac but am encountering some problems.
The bit I am having problems with consists of two panels:
Panel A consists of a tree control containing key=value pairs and with user editing disabled.
Panel B consists of a set of controls... | false | 28,702,522 | 0.379949 | 0 | 0 | 2 | Which version of wxPython are you using? Disabling those kinds of widgets seems to be working fine for me with current builds.
For some reason Apple thought that it was a good idea to never give the keyboard focus to some types of controls, because apparently nobody would ever want to use them with anything but a mous... | 0 | 68 | 0 | 0 | 2015-02-24T17:35:00.000 | python,macos,wxpython | wxpython control problems when migrating from win to mac | 0 | 1 | 1 | 28,724,680 | 1 |
0 | 0 | I have some problems with an App, which I wrote with kivy an packaged with buildozer is always crashing when I try to run in on my phone. On my PC I use Ubuntu 14.10 and I don't get any error when compiling it (buildozer android debug). Then I send it on my SmartPhone and I install and run it, but it just loads and aft... | false | 28,722,273 | 0 | 0 | 0 | 0 | If you are using kivy and your app loads some images, then there is no problem. But if you are using some other packages like pygame to load images, it will crash. Or if you are working in some files like reading or writing a text file, it will crash. Because when you package your app with buildozer, It will move the a... | 0 | 2,562 | 0 | 1 | 2015-02-25T14:58:00.000 | python-2.7,kivy | Android App created with Kivy (Buildozer) crashes on phone, but why? | 0 | 1 | 3 | 63,775,920 | 1 |
0 | 0 | I have been trying to get a program I wrote in PyQt to work being called from a CUPS backend on OS X.
The problem is that CUPS sandboxing keeps the program from being able to access the PyQt python modules which I have brewed in /usr/local/Cellar.
Is there any way to grab those files, as well as the Qt files in the Cel... | true | 28,723,232 | 1.2 | 0 | 0 | 1 | I got around the CUPS sandboxing by having the backend send the information to a listening server on localhost that then processed the job as I needed it. I made sure that the server listening would only accept connections from localhost.
I never was able to get pyinstaller or cx_freeze to work with PyQt, but this work... | 0 | 191 | 1 | 0 | 2015-02-25T15:42:00.000 | python,qt,pyqt,cups | Rounding up Dependencies for PyQt | 0 | 1 | 1 | 30,196,277 | 1 |
0 | 0 | First off please do not mark this topic as a duplicate. All the relevant threads are years old. I would like updated information.
What are the pros and cons of the following libraries?
I am aware of:
PyGame, seems to be the most popular but the website is full of
broken links and no news in awhile.
Cocos2D Python, Se... | false | 28,733,056 | 0.197375 | 0 | 0 | 2 | Pygame and Pyglet are definitely on the radar.
Pygame
Great, popular game engine. No support for a variety of file types. But it's no longer maintained.
Pyglet
Very powerful, high support for many files. Thorough documentation. OpenGL support, intuitive.
Cocos2D
I really feel that Coco2D is just an unnecessary medium t... | 0 | 1,029 | 0 | 2 | 2015-02-26T01:42:00.000 | python,pygame,pyglet,cocos2d-python | Python Game Libraries | 0 | 1 | 2 | 28,733,171 | 1 |
0 | 0 | I'm using a combination of Python and Squish for Qt to write tests on a Qt GUI, but I have noticed when I copy and paste tests from a suite I have and move them to another suite or computer with Squish the file will run, but when it runs anytime it sees an object name it does not recognize it and throws an exception. M... | false | 28,749,243 | 0.291313 | 0 | 0 | 3 | ... but I have noticed when I copy and paste tests from a suite
I have and move them to another suite or computer with Squish the file
will run, but when it runs anytime it sees an object name it does not
recognize it and throws an exception ...
For your test script, Squish creates this suite folder you mention.... | 0 | 246 | 0 | 0 | 2015-02-26T17:45:00.000 | python,qt,squish | Has anyone seen Squish that you must re-record after moving? | 0 | 1 | 2 | 30,211,284 | 1 |
0 | 0 | I am new to tkinter and I was wondering if there is a way to clear whole root (window). I tried with root.destroy() , but I want to have a chance to undo(to callback some widgets). I also tried .pack_forget() and .grid_forget() , but it takes a lot of time and later may cause many bugs in program.
Thank you for help. | true | 28,752,446 | 1.2 | 0 | 0 | 2 | If you plan on literally destroying everything in the root window, my recommendation is to make a single frame be a child of the root window, and then put everything inside that frame. Then, when you need to clear the root window you only have to delete this one widget, and it will take care of deleting all of the othe... | 0 | 4,266 | 0 | 1 | 2015-02-26T20:46:00.000 | python,tkinter | Clear whole root | 0 | 1 | 2 | 28,753,245 | 1 |
0 | 0 | I want to ask a ObjectListView object if and which of its columns
(index would be enough) are sorted and in which direction (asc or desc).
I know
ObjectListView.GetSortColumn()
which return a ColumnDef object.
But I can not see a way how to ask about the index of the ColumnDef.
In wx.ListCtrl I can not found anything... | true | 28,777,882 | 1.2 | 0 | 0 | 0 | There is no real getter.
Use ObjectListView.sortColumnIndex for that.
It will be '-1' if none of the columns are used for sorting.
btw: How can I add code here? The "code snipped" symbol just come up with a ugly un-understandable dialog. | 0 | 81 | 0 | 0 | 2015-02-28T03:45:00.000 | python,objectlistview | How to ask a ObjectListView which column is ordered and in which direction? | 0 | 1 | 1 | 28,974,102 | 1 |
0 | 0 | I am using Pygame to get values from a Simraceway steering wheel, which is just seen as a joystick. There are three axes on the joystick -- one for steering, one for the left paddle, and one for the right paddle.
When I do the Pygame command get_numaxes(), I correctly get back 3 axes. But when I do the command get_axi... | false | 28,780,611 | 0 | 0 | 0 | 0 | I was not able to figure out why get_axis(1) did not get the position of the left paddle.
However, I was able to use evdev to get all the information I need from the steering wheel. It's not very high level, unlike Pygame, but it does work. | 0 | 542 | 0 | 0 | 2015-02-28T10:20:00.000 | python,pygame,joystick | Pygame.not getting value for one of axes on the joystick | 0 | 1 | 1 | 28,937,815 | 1 |
0 | 0 | When I Debug my Python C extension using Visual Studio the program abort with the message: "PyThreadState_Get: no current thread".
In Release the program works fine and if I add debugging information it still works fine.
How to solve the problem? | false | 28,805,401 | 0 | 0 | 0 | 0 | If NDEBUG is defined you have to use the Debug version of the interpreter python_d.exe.
Furthermore if the name of the extension is myextension the name of the Dll in Release must be myextension.pyd but in Debug the name of the Dll must be myextension_d.pyd | 1 | 304 | 0 | 0 | 2015-03-02T08:30:00.000 | python,pycxx | Debugging my Python C extension lead to "PyThreadState_Get: no current thread" | 0 | 1 | 1 | 28,805,402 | 1 |
0 | 0 | I have a window with two grids in it. Example for using:
Making some operations on grid1. When making operations on another object in this window(like the other grid) I want to do final operation on grid1. What is the right event for this? | false | 28,807,448 | 0 | 0 | 0 | 0 | You can use focus events. Either catch wx.EVT_KILL_FOCUS which fires when you leave the grid widget or catch wx.EVT_SET_FOCUS when you enter a new widget. Then you can do something in your event handler to update grid1. | 0 | 18 | 0 | 0 | 2015-03-02T10:25:00.000 | python,wxpython | wxpython event on deactivating a grid | 0 | 1 | 1 | 28,818,633 | 1 |
0 | 0 | I am trying to use gtk table in one of my projects(GUI based) to show a pair of columns and its values. Since gtk table doesn't have borders by default, my GUI is not coming up well.
So,
Is there anyway I can add borders to gtk table and its cells?
If no can I create a customized widget with borders by extending gtk Ta... | false | 28,811,104 | 0 | 0 | 0 | 0 | Assuming you want five pixels of spacing, if you would like to have space between the different cells of your table, you can try table.set_row_spacings(5); table.set_col_spacings(5); If you would like to have space around the entire table, you can do table.set_padding(5). | 0 | 1,159 | 0 | 1 | 2015-03-02T13:34:00.000 | python,gtk,pygtk | Add border to table in pygtk | 0 | 1 | 1 | 34,956,262 | 1 |
0 | 0 | Is it possible that when a Tkinter window is made bigger or larger, everyhting in the window is scaled?
So all the proportions stay the same but their sizes vary.
Now when the window is resized all the buttons etc stay the same so I disabled resize because there is no point, it just looks bad. | false | 28,811,202 | 0 | 0 | 0 | 0 | No, it is likely not possible, depending on what you mean by "everything" and what you mean by "scaled". Any widget can be made to stretch to fill its allotted space. Text widgets and canvas widgets, for example, scale nicely. A button or label will fill the space it's in, but the text inside the widget won't change (t... | 0 | 569 | 0 | 0 | 2015-03-02T13:39:00.000 | python,tkinter,ttk | Tkinter - scale all components on resize? | 0 | 1 | 1 | 28,813,514 | 1 |
0 | 0 | I am using Python C Api to embed a python in our application. Currently when users execute their scripts, we call PyRun_SimpleString(). Which runs fine.
I would like to extend this functionality to allow users to run scripts in "Debug" mode, where like in a typical IDE, they would be allowed to set breakpointsm "watche... | true | 28,817,249 | 1.2 | 0 | 0 | 2 | PyEval_SetTrace() is exactly the API that you need to use. Not sure why you need some additional way to "pause" the execution; when your callback has been called, the execution is already paused and will not resume until you return from the callback. | 1 | 179 | 0 | 1 | 2015-03-02T18:49:00.000 | python,python-c-api | How to implement breakpoint functionality in a embedding of Python | 0 | 1 | 1 | 28,817,512 | 1 |
0 | 0 | I am having trouble posting an erase background event to draw to the screen. In my full code, I want to draw a bitmap (DC.DrawBitmap()) when a button is clicked. I do that by posting an EVT_ERASE_BACKGROUND event which is caught by a custom bound method. However, once it is in that method, the event.GetDC() method that... | false | 28,824,286 | 0 | 0 | 0 | 0 | Worked on it for an hour without success before posting, then solved it myself five minutes later...
Here's my solution, creating a ClientDC if the event doesn't have its own DC:
import wx
class Foo(wx.Frame):
def __init__(self, parent, title):
wx.Frame.__init__ (self, parent, -1, title, size=(500,300))
... | 0 | 499 | 0 | 0 | 2015-03-03T04:47:00.000 | python,wxpython | wxpython Post Erase Background with DC | 0 | 1 | 1 | 28,824,375 | 1 |
0 | 0 | I'm making a GUI with Tkinter, and I need to find a way to know if a widget (let's call it l = Label(root, text="test")) is packed or not. I know I can do if l in Tk.pack_slaves(root):..., but this seems inefficient.
Is there any way of adding a "line" to the widget.pack() method, such as telling it to set an attribute... | true | 28,856,501 | 1.2 | 0 | 0 | 2 | No, there is no built-in way to do it. It's your code doing the packing, so you can store a flag in a dictionary, or create your own pack function to do that automatically. | 0 | 473 | 0 | 0 | 2015-03-04T14:06:00.000 | python,macos,oop,tkinter | Tkinter "on-pack" method or "is-packed" attribute | 0 | 1 | 1 | 28,856,654 | 1 |
0 | 0 | When I create a QMainWindow without explicitly specifying its dimensions, PyQt will give it a -let's say- "standard size" which is not the minimum that the window can get.
Can I set this size at will in any way?
My goal is to get this "standard size" according to the currently visible widgets, when I set the visibility... | true | 28,915,681 | 1.2 | 0 | 0 | 1 | QWidget.sizeHint holds the recommended size for the widget. It's default implementation returns the layout's preferred size if the widget has a layout. So if your dialog has a layout, just use sizeHint to get the recommended size which is the default one. | 0 | 1,830 | 0 | 0 | 2015-03-07T14:04:00.000 | python,qt,pyqt | how to get the default size of a window in pyqt4 | 0 | 1 | 3 | 28,923,741 | 1 |
0 | 0 | I have this game which I have coded in python with pygame.
When I launch my game through the renpy launcher, it works just fine.
When I emulate my game through the renpy android emulator, it works just fine.
When I go through each of the build steps (install sdk, configure, build package, install package) it completes... | false | 28,921,997 | 0.197375 | 0 | 0 | 1 | I e-mailed PyTom, the creator of Ren'py, and he responded back instantly:
"Edit the rapt/blacklist.txt file, and delete the line that says **.py. "
It worked! Thanks, PyTom. | 0 | 1,556 | 0 | 0 | 2015-03-08T01:11:00.000 | python,android,pygame,renpy | Ren'Py with Renpygame for Android | 0 | 1 | 1 | 28,922,150 | 1 |
0 | 0 | I have a Notebook and add two panels to it. When I try to get the usable area of one of the panels, it returns (20,20) -- I imagine this is its size before stuff is put in. I want to get this size before I put stuff in because some proportions depend on it and I'd prefer not using absolutes.
I haven't set an actual... | false | 28,931,533 | 0.197375 | 0 | 0 | 1 | It sounds like you are trying to do this at the time of the creation of the window, before the initial layout and sizing is done, so everything still has its initial size. There are some alternative ways to deal with this situation. You could delay creating the content of the panel until the first size event. Or you... | 0 | 172 | 0 | 0 | 2015-03-08T20:30:00.000 | user-interface,wxpython | wxPython -- GetSize doesn't return actual size | 0 | 1 | 1 | 28,946,737 | 1 |
0 | 0 | There's a method to set the "letter spacing" for a wx.TextCtrl? (or another widget where I can show a small phrase)
Or is a property of the wx.Font?
Or is a inherent property of the font face I'm using?
A work-around I could implement is to write my custom control (maybe derived from RichTextCtrl) where I draw each cha... | false | 28,972,266 | 0 | 0 | 0 | 0 | No, I don't believe this is a feature of any of the text controls or their variants. You could set the wx.Font to a monospace font, but that's probably about as good as you can get going the "automatic" way. I would recommend drawing it yourself if that's really what you need. | 0 | 83 | 0 | 0 | 2015-03-10T19:17:00.000 | fonts,wxpython,label,spacing | Letter spacing in wxpython widgets | 0 | 1 | 1 | 28,973,871 | 1 |
0 | 0 | This is the situation I have:
I created an installer. It has python scripts, executable, and other file types. In the installer, I run a C# executable as a custom action, after registering the product. The C# executable moves the files into different locations (i.e. a text document will be moved to My Documents). I und... | false | 28,972,637 | 0 | 0 | 0 | 0 | A patch probably won't help you. If the locations are fixed within the install, a minor upgrade could do the trick, if you make all the files that need to stay the same "never overwrite" (unless the custom action ignores this, then things might get difficult).
If the locations are determined during the execution of the... | 1 | 52 | 0 | 0 | 2015-03-10T19:38:00.000 | c#,python,installshield,patch,software-distribution | Upgrading Application using InstallShield | 0 | 1 | 2 | 28,975,982 | 1 |
0 | 0 | Sorry, thought i edited to say i am on windows 64 bit
When trying to install Pygame using pip, I get the following error:
"requirement 'pygame.whl' looks like a file name, but the file does not exist pygame.whl is not a valid wheel filename."
I have my file paths right and pip is working. I have attempted to install ... | true | 28,997,501 | 1.2 | 0 | 0 | 0 | Thankyou so much for your help ventsyv, i finally figured it out. i believe it was an issue with the installer from pygames site. i found another site with a link to pygame and specifically for python 3.4.2. i now have no error messages and its working great. Thanks for putting up with me haha. | 1 | 2,022 | 0 | 1 | 2015-03-11T21:15:00.000 | python,installation,pygame,pip | Error while installing pygame using pip for python 3.4 | 0 | 1 | 2 | 29,056,557 | 1 |
0 | 0 | I'm trying to run scripts on qpython3, android 5.0.1 and when executing the scripts nothing happens. Even the example scripts that are installed with the app. Interactive mode/running commands in console does work, only scripts don't. What could be the reason? | false | 29,031,089 | 0.197375 | 0 | 0 | 1 | I had that issue on 4.4.4. Hit Run in the editor, then in the console it brings up you can cd to the directory the program is in and use the command 'python file.py' to start the program. It's a little annoying, but it's better than not being able to run programs at all. This problem disappeared for me on 5.1.1. | 0 | 1,329 | 0 | 0 | 2015-03-13T11:29:00.000 | python,python-3.x,qpython,qpython3 | Scripts won't run on QPython3 | 0 | 1 | 1 | 30,599,421 | 1 |
0 | 0 | I'm programming python + Gtk3.
I have a Gtk.TreeView with a Gtk.ListStore as model.
At some point of the program I need to destroy the treeview in order to put a fresh one on it's place.
However I don't know what happens with the model. Should I destroy it, clear it, or just leve it there and let python to eat it?
I've... | true | 29,044,228 | 1.2 | 0 | 0 | 1 | You can leave it to Python's garbage collector, the same way it would go if you'd close the application (it will call g_object_unref on both).
That said, remember that the idea behind the separation of models and views, is that you can mix them the way you like, i.e. display the same model in different views or even al... | 0 | 79 | 0 | 1 | 2015-03-14T00:51:00.000 | python,treeview,gtk3,treemodel | Should I 'destroy' a liststore (model of treeview) when destroy treeview? | 0 | 1 | 1 | 29,044,826 | 1 |
0 | 0 | I want to add colorless icons to menu items. To look reasonably, the icons should have the same color as the text used in the menu. It works everywhere except Ubuntu. The problem is that the default Ubuntu Unity theme uses different colors for the main menu and for other text (e.g. popup menus) in the application. I ne... | false | 29,045,905 | 0 | 0 | 0 | 0 | It turns out QMainWindow.menuBar().palette() has colors matching the Unity menu on top of the screen (I just learned it's called appmenu). That makes it possible to use the same color as the menu text.
But there is a problem. The version of the icon for the QtIcon.Active mode is not used for the active menu item. That ... | 0 | 332 | 0 | 1 | 2015-03-14T05:49:00.000 | python,qt,ubuntu,pyqt,themes | PyQt: How to find menu text color in that works with Ubuntu Unity? | 0 | 1 | 1 | 29,109,067 | 1 |
0 | 0 | As we all know, when developing an Android app in native Java, we use activities. I was wondering that, in developing Android apps in Python(with Kivy), does Kivy implements activities for the apps in itself or not? because I don't see any activity implementation on the sample codes.
If it doesn't implement activities,... | true | 29,058,419 | 1.2 | 0 | 0 | 2 | Simply put, you can use Activities (starting them using pyjnius), but not really define them, at least, it's not usually the way one work with kivy.
Kivy doesn't adjust its way of working for targetted platform, it uses its own systems, and make them work there. For what i know the advantages of separating Activities o... | 0 | 1,092 | 0 | 5 | 2015-03-15T07:48:00.000 | android,python,kivy | Python - Does Kivy implements activities in the Android apps? | 0 | 2 | 2 | 29,059,931 | 1 |
0 | 0 | As we all know, when developing an Android app in native Java, we use activities. I was wondering that, in developing Android apps in Python(with Kivy), does Kivy implements activities for the apps in itself or not? because I don't see any activity implementation on the sample codes.
If it doesn't implement activities,... | false | 29,058,419 | 0.099668 | 0 | 0 | 1 | Kivy is a great tool for developing Android Apps. The best advantage of using Kivy is that it is cross platform and the same project can be used to publish apps on mutti-platforms.
However , it has some performance related disadvantages(as do most cross-platform tools like unity , cocos etc). If you're developing only ... | 0 | 1,092 | 0 | 5 | 2015-03-15T07:48:00.000 | android,python,kivy | Python - Does Kivy implements activities in the Android apps? | 0 | 2 | 2 | 29,058,632 | 1 |
0 | 0 | I recently used homebrew to install pyqt (along with qt & sip), but get an import error whenever I try to import PyQt4 in Python 3 (which was also installed using homebrew). To confuse matters more, I am able to import PyQt4 on Python 2 via the terminal.
I'm totally new to working with Python packages and, with that, t... | false | 29,069,364 | 0.197375 | 0 | 0 | 2 | brew reinstall pyqt --with-python3 will get you sorted! | 1 | 562 | 1 | 0 | 2015-03-16T03:47:00.000 | python,homebrew | Python 3 can't find homebrew pyqt installation | 0 | 1 | 2 | 29,091,698 | 1 |
0 | 0 | I'm using wxpython.
I'd like to solve a simple problem for a GUI that consists of a button "Add", which when pressed creates a new button called "Remove". You can press "Add" as many times as you like and many remove buttons are created and added to the panel.
What I would like is for when you press one of the remove b... | false | 29,100,233 | 0.066568 | 0 | 0 | 1 | If your trouble is to pass an argument to the function, consider following:
self.Bind(wx.EVT_BUTTON, lambda e: otherFunction(arg1, arg2), button_name) | 0 | 2,124 | 0 | 1 | 2015-03-17T13:23:00.000 | wxpython | A simple example for adding and removing buttons in wxpython | 0 | 1 | 3 | 29,101,131 | 1 |
0 | 0 | I am coding a Tkinter GUI for a senior research project at school.
I need to, at some point in the code, reset the counter used to create id values for new additions. Does anyone know if this is possible beside replacing the entire canvas? Basically, after adding a bunch of lines and ovals, I need to delete them all ... | true | 29,107,842 | 1.2 | 0 | 0 | 2 | It is not possible to reset the id numbers generated by a canvas.
Your solution of deleting and recreating the canvas is a reasonable alternative, though it may not be necessary. There are probably better ways to do whatever it is you think is solved by resetting canvas ids. For example, you could generate your own id... | 0 | 813 | 0 | 2 | 2015-03-17T19:18:00.000 | python,tkinter,tkinter-canvas | Tkinter Canvas reset ID's | 0 | 1 | 1 | 29,107,985 | 1 |
0 | 0 | I have written a Python module designed to solve the Tetris cube tiling puzzle, and it contains a lot of code, but it doesn't want to run, when I press f5 to run the program, the shell restarts, but then stops working, even when I enable debugging nothing happens still. I put a print statement at the very start of the ... | true | 29,111,073 | 1.2 | 0 | 0 | 0 | The problem seems to have been an issue with the version of python I had installed. A new installation is able to run long modules fine, without any noticeable delay even from pressing f5 to first print statement. | 1 | 118 | 0 | 0 | 2015-03-17T22:40:00.000 | python,module,compilation | Does python have a limitation on the amount of code in a module? | 0 | 1 | 1 | 31,042,764 | 1 |
0 | 0 | Is there any form to set a 100% of horizontal size for TextCtrl in Toolbar?
Because I have been looking for about this in the documentation and I did not found anything. | false | 29,112,631 | 0 | 0 | 0 | 0 | You probably can't do that in a normal toolbar. However, you can easily just roll your own toolbar by using a horizontally oriented BoxSizer and adding the necessary widgets to it. Then you can add the text control with the correct proportion and the wx.EXPAND flag. | 0 | 20 | 0 | 0 | 2015-03-18T01:20:00.000 | python,user-interface,wxpython | Is there any form to set a 100% of horizontal size for TextCtrl in Toolbar? | 0 | 1 | 1 | 29,130,791 | 1 |
0 | 0 | I'am trying to build an e-commerce website using turbogears. Initially I modified the tgapp-photos to make the items come on the page properly. But then I find it difficult to make cart from the scratch and hence thought to use stroller. However, when I'am plugging it in the config.py file, all of a sudden my app stops... | true | 29,116,195 | 1.2 | 0 | 0 | 0 | Stroller is a pretty old project that is not maintained anymore. The reason why it was not working for you is that it was still pending some changes required to make it compatible with TG2.3+, it was compatible only with <=2.2. And so was looking for some Pylons imports.
To solve your problem I just released stroller 0... | 0 | 56 | 0 | 0 | 2015-03-18T07:20:00.000 | python-2.7,e-commerce,shopping-cart,turbogears2,satchless | stroller (turbogears) not working | 0 | 1 | 1 | 29,133,585 | 1 |
0 | 0 | I've been working really hard trying to find a solution to this for the past few weeks. I have committed to a direction now, but I am still not entirely satisfied with what I have come up with. Asking this now purely out of curiosity and for hope of a more proper solution for next time.
How on earth do I keep multiple ... | false | 29,132,741 | 0.379949 | 0 | 0 | 2 | One way to do it is to use viewmodels. Have one QAbstractItemModel adapter to your underlying data model. All interaction must pass through that model. When you need to further adapt the data to a view, simply use a proxy view model class that refers to the adapter above and reformats/adapts the data for a view. All th... | 0 | 442 | 0 | 2 | 2015-03-18T21:10:00.000 | python,qt,pyqt,pyside | How to keep multiple QAbstractItemModel classes in sync | 0 | 1 | 1 | 29,132,919 | 1 |
0 | 0 | Okay, so I am brand new at this and I really need for this to be dumbed down for me. My python version is 2.7.9 and I downloaded pygame-1.9.1.win32-py2.7.msi and I am on a windows computer. I really need someone to explain why this is not working. I was reading on some of the other questions that you have to change the... | false | 29,190,350 | 0 | 0 | 0 | 0 | There is only really only one way to do this:
Create a folder
Put the Python Interpreter you are using in that folder
Put the PyGame module you are using in that same folder
And your problem is now solved. I hope this helps you! | 1 | 3,786 | 0 | 0 | 2015-03-22T02:39:00.000 | python-2.7,pygame,importerror | ImportError: No module named pygame and how to change the path of pygame? | 0 | 1 | 1 | 29,221,166 | 1 |
0 | 0 | I have written a monitoring program for the control system at our plant. It is basically a GUI which lets the operator see the current status of the lock of the closed loop system and aware the operator in case the lock/loop breaks.
Now, the operation is heavily dependent on the responses of the GUI. My seniors told me... | false | 29,190,427 | 0 | 0 | 0 | 0 | I would say that if your program is simply accessing data and not interacting with the data, then a GUI seems to be a bit of overkill. GUI's are guided user interfaces, as you know, and are made for guiding a user through an interface. If the interface is just a status, as you indicated, then I see nothing wrong with a... | 1 | 1,676 | 0 | 1 | 2015-03-22T02:53:00.000 | python,user-interface,tkinter | Python TKinter for real time GUIs | 0 | 1 | 2 | 29,191,478 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.