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'm developing a game and now I want to make script system for it. Now I have abstract class Object which is inherited by all game objects. I have to write a lot of technical code, add new object type into enum, register parser function for each object (that function parses object's params from file). I don't want to m...
true
5,050,372
1.2
1
0
0
Can you give us a rough idea of how large the game is going to be? If you're not careful, you could give yourself a lot of extra work without much benefit, but with some planning it sounds like it might help. The important questions are "What parts of the program do I want to simplify?", "Do I need a scripting language...
1
203
0
1
2011-02-19T10:57:00.000
c++,python,boost,system
Script system in application
0
1
1
5,055,236
1
0
0
I'm having a problem with a simple Notepad application I'm writing to teach myself basic Python/PyQt. Specifically, I want to know how to change the multi-touch pan gesture sensitivity on a QListWidget. As it is now, when I drag up and down with 2 fingers, it seems like the list is moving up/down one step for each pix...
false
5,050,817
0
0
0
0
More than likely this functionality exists because the multitouch event is being interpreted by your operating system as a scroll of some type and QT is recieving the scroll action, rather than the multitouch action directly.
0
1,586
0
3
2011-02-19T12:40:00.000
python,qt4,pyqt,pyqt4,qlistwidget
Customize PyQt multi-touch pan gestures on QListWidget
0
1
2
18,070,801
1
0
0
How can i make a smooth circular orbit at a constant speed using pygame? How would i calculate x, y on a circle?
false
5,058,591
0.099668
0
0
1
Try using polar coordinates. It's natural :) If you don't calculate enough frames to make your orbit look smooth, calculate 3-4 intermediate points of orbit to draw shorter line segments, without calculating the game state at these points. Make this radius-dependent. This helps proper collision detection, too.
0
907
0
1
2011-02-20T17:16:00.000
python,math,pygame
Making smooth orbits in pygame
0
1
2
5,058,696
1
0
0
I have a little programming experience and I did get to work with Swing (Java) and wxPython. Some years ago, I ended up having to port an app I did to OS X and all the problems I've had with wxPython just multiplied. I've started looking at alternatives and I could not find anything better than wxPython. QT was the on...
false
5,067,578
0.16514
0
0
5
Have you tried Qt? It is a cross platform C++ GUI toolkit for higher level language (PyQt). And it seemed very simple to me.
0
653
0
2
2011-02-21T15:08:00.000
python,user-interface
Why are there no simple, cross-platform, C/C++ GUI tookits for higher level languages?
0
3
6
5,067,597
1
0
0
I have a little programming experience and I did get to work with Swing (Java) and wxPython. Some years ago, I ended up having to port an app I did to OS X and all the problems I've had with wxPython just multiplied. I've started looking at alternatives and I could not find anything better than wxPython. QT was the on...
false
5,067,578
0
0
0
0
My guess is that windows developers couldn't be bothered as they have wpf etc and linux developers couldn't be bothered as they are used to it. So only people who are sick of win developement and moving to linux would embrace it. Maybe its time for you to start an open source project :) I was thinking something like wp...
0
653
0
2
2011-02-21T15:08:00.000
python,user-interface
Why are there no simple, cross-platform, C/C++ GUI tookits for higher level languages?
0
3
6
5,067,655
1
0
0
I have a little programming experience and I did get to work with Swing (Java) and wxPython. Some years ago, I ended up having to port an app I did to OS X and all the problems I've had with wxPython just multiplied. I've started looking at alternatives and I could not find anything better than wxPython. QT was the on...
false
5,067,578
0.066568
0
0
2
What you ask is a simple lib with enormous flexibility. Be able to build 3 * 3 executables, having good documentation and using other libraries all with a different background. And all of that on different OS platforms. It is quite a challenge it think QT would com the closest but it does not meet all your criteria.
0
653
0
2
2011-02-21T15:08:00.000
python,user-interface
Why are there no simple, cross-platform, C/C++ GUI tookits for higher level languages?
0
3
6
5,067,669
1
0
0
How do I make a newly created window in wxPython not take focus? I'd like to be able to create a new window, without focus jumping to it.
false
5,073,054
0.099668
0
0
1
That seems a little counter-intuitive. However, you can also simulate this by creating and showing the second frame and then calling Raise() on the original frame.
0
527
0
2
2011-02-22T01:06:00.000
python,wxpython,focus
Preventing New Windows from Capturing Focus wxPython
0
1
2
5,082,357
1
0
0
Is it possible to convert a QTabBar inside the QTabWidget into a QComboBox?
true
5,075,232
1.2
0
0
1
That might somehow be possible by overwriting QTabWidget, but I think the much cleaner, faster and easier solution would be to combine QComboBox and QStackedWidget to a new widget.
1
161
0
1
2011-02-22T07:23:00.000
python,qt,pyqt,pyqt4
Is it possible to convert a QTabBar inside the QTabWidget into a QComboBox?
0
1
1
5,077,111
1
0
0
I've installed ActivePython 3.1 and ran IDLE with -n parameter as required by the turtle module in documentation. However when I try to use it with call such as turtle.postion(), new windows is opened (with Tk icon), which freezes and shows nothing. What could be wrong?
false
5,081,499
0.197375
0
0
2
The immediate cause of the freeze is that the Tk event loop is not being serviced. Without that, Tk windows do not display or update correctly (all GUI toolkits are event based, but Tk is particularly so). Unfortunately, I don't know Python's Tk binding or IDLE nearly well enough to be able to say what that is caused b...
0
906
0
2
2011-02-22T17:19:00.000
python,windows,tk,turtle-graphics,activepython
Why ActivePython freezes after I use the turtle module?
0
2
2
5,137,220
1
0
0
I've installed ActivePython 3.1 and ran IDLE with -n parameter as required by the turtle module in documentation. However when I try to use it with call such as turtle.postion(), new windows is opened (with Tk icon), which freezes and shows nothing. What could be wrong?
false
5,081,499
0
0
0
0
Partially resolved by not running it in IDLE, I execute it as a python script and wait for input to see what is drawn.
0
906
0
2
2011-02-22T17:19:00.000
python,windows,tk,turtle-graphics,activepython
Why ActivePython freezes after I use the turtle module?
0
2
2
5,092,475
1
0
0
I'm using Python Tkinter and I want to place a variable number of text box widgets in a frame or canvas. The text boxes are packed vertically down the frame, so the first one is on top, the second one is found below, etc.. I can have all the button, listbox, etc widgets in a "left section" of the GUI, while a "right se...
true
5,082,642
1.2
0
0
0
The solution is pretty simple: bind to the <Configure> event of the canvas -- this will cause your callback to be called whenever the canvas widget is resized. You then simply need to get the width of the canvas and use that to iteratively resize all the embedded windows.
0
1,473
0
1
2011-02-22T19:03:00.000
python,canvas,widget,scroll,tkinter
Python Tkinter - Scrollable canvas containing expandable widgets
0
1
1
5,082,704
1
0
0
I'm wondering how to go about implementing a macro recorder for a python gui (probably PyQt, but ideally agnostic). Something much like in Excel but instead of getting VB macros, it would create python code. Previously I made something for Tkinter where all callbacks pass through a single class that logged actions. Un...
false
5,093,153
0.066568
0
0
1
Thinking in high level, this is what I'd do: Develop a decorator function, with which I'd decorate every event-handling functions. This decorator functions would take note of thee function called, and its parameters (and possibly returning values) in a unified data-structure - taking care, on this data structure, to m...
0
1,816
0
2
2011-02-23T15:41:00.000
python,user-interface,macros,recorder
Implementing a macro recorder for a python gui?
0
2
3
5,093,338
1
0
0
I'm wondering how to go about implementing a macro recorder for a python gui (probably PyQt, but ideally agnostic). Something much like in Excel but instead of getting VB macros, it would create python code. Previously I made something for Tkinter where all callbacks pass through a single class that logged actions. Un...
false
5,093,153
0.066568
0
0
1
You could apply the command design pattern: when your user executes an action, generate a command that represents the changes required. You then implement some sort of command pipeline that executes the commands themselves, most likely just calling the methods you already have. Once the commands are executed, you can...
0
1,816
0
2
2011-02-23T15:41:00.000
python,user-interface,macros,recorder
Implementing a macro recorder for a python gui?
0
2
3
5,093,408
1
0
0
So I've got a problem - I'm writing a game prototype in Python, using Pygame, and I want to save my games. All of the game-related data is in three instances of certain classes, and I want to save these three instances to a file. However, I've tried pickling these instances, and it doesn't work. Instead, I get "Type...
false
5,145,664
0.462117
0
0
5
The basic point of pickling is that you should be able to serialise the object somehow. An SDL surface is an in memory object holding a lot of run time state. Trying to serialise it is not totally sensible. What you should do is to decouple the state of your game from the rendering components so that you can serialise...
1
1,353
0
3
2011-02-28T17:58:00.000
python,serialization,pygame,pickle
Storing unpicklabe pygame.Surface objects in external files
0
1
2
5,145,756
1
0
0
I started using SWIG on a huge C++ library (made of of several inter-dependent static libs) to expose it to python. This library defines many primitive classes that are used throughout as parameters (images of different types for example). There is extensive use of STL, inheritance and templating in the lib as well. So...
false
5,160,308
0.197375
1
0
1
Have you considered looking into using Boost.Python?
0
982
0
3
2011-03-01T21:03:00.000
c++,python,python-imaging-library
Exposing C++ library to Python + PIL
0
1
1
5,161,325
1
0
0
Why doesn't Ctrl+C work to break a Python program that uses PyQt? I want to debug it and get a stack trace and for some reason, this is harder to do than with C++!
false
5,160,577
0.379949
0
0
4
I agree with Neil G, and would add this: If you do not call QApplication.exec_() to start the event loop, and instead execute your program in an interactive python shell (using python -i), then pyqt will automatically process events whenever the interactive prompt is waiting, and Ctrl-C should again behave as expected....
0
10,443
0
23
2011-03-01T21:28:00.000
python,pyqt
Ctrl-C doesn't work with PyQt
0
1
2
5,186,213
1
0
0
I have a list of instances of objects (wxPython widgets). I'd like to be able to tell if an instance within my list has been destroyed. How would one go about this?
true
5,162,773
1.2
0
0
4
Assuming wxPython is playing by the rules and by "destroyed" you mean "is no longer referenced", then the weakref module in the standard library should let you do what you want (specifically, you can register a callback when creating a weak reference that is invoked just before the target of the weak reference is destr...
1
803
0
1
2011-03-02T02:28:00.000
python,list,wxpython,instance
Telling if an Instance has been Destroyed
0
2
3
5,162,963
1
0
0
I have a list of instances of objects (wxPython widgets). I'd like to be able to tell if an instance within my list has been destroyed. How would one go about this?
false
5,162,773
0
0
0
0
This is applicable to all wx.Window derived objects. If it has been destroyed or disposed, it won't be None, but it will be False.
1
803
0
1
2011-03-02T02:28:00.000
python,list,wxpython,instance
Telling if an Instance has been Destroyed
0
2
3
40,513,866
1
0
0
When I try to import the 'Rect'-struct from System.Windows, IronPython-Interpreter claims that it cannot import. Since I am using the IronPython Tools for Visual Studio, i can also see that the IntelliSense-DropDown does not show this struct. Is there a need for a special statement for importing this struct? Thanks!
false
5,189,630
0.379949
0
0
2
You probably need to do: import clr clr.AddReference('WindowsBase') to load the assembly Rect is declared in before importing it.
1
273
0
1
2011-03-04T04:23:00.000
import,ironpython,rect
IronPython: Cannot import 'Rect'-struct from System.Windows
0
1
1
5,190,602
1
0
0
Is there an equivalent to Tkinter's .after() in wxPython? For those that don't know .after() allows the running of functions at some point in the future. This can be used to make loops with functions. I'm attempting to make a clock, so this would be handy for making it tick.
false
5,201,876
0.099668
0
0
1
There are several functions in wx.Python to do that. You should check the "Process and events" section of the wxPython demos, More especifically those related with wx.Timer The wx.Timer class allows you to execute code at specified intervals from within the wxPython event loop. Timers can be one-shot or repeatin...
1
1,132
0
1
2011-03-05T05:22:00.000
python,wxpython,tkinter
wxPython Equivalent to Tkinter .after()
0
1
2
5,201,931
1
0
0
i am looking to start learning. people have told me it is juts as capable. though i haven't really seen any good looking games available. some decent ones on pygame, but none really stand out. i would like to know if python really is as capable as other languages. EDIT: thanks guys, is python good for game development?
false
5,217,513
0.099668
0
0
2
Short answer: Yes, it is. But this heavily depends on your problem :)
1
161
0
0
2011-03-07T08:40:00.000
python
is python as capable as other languages like c++?
0
1
4
5,217,530
1
0
0
Im making a PyQt4 app which calls Imagemagick and ffmpeg, but it takes too much to complete the tasks and im wondering if there is a way to implement threads to this, the app is going to run in a multicore machine, and some of the methods I have seen are not efficient enough. Thanks in advance
true
5,224,679
1.2
0
0
0
The answer is yes and no - you can use QThread for threading but you'll still be subject to the GIL, so your threads will run in serial. You could try using multiprocessing to create a worker class in its own process and send work to it (or have it steal work from a queue), however this could introduce its own performa...
1
256
0
0
2011-03-07T20:08:00.000
multithreading,ffmpeg,imagemagick,pyqt4,python-2.6
Threads in PyQt4
0
1
1
5,273,687
1
0
0
i hear people say python is just as good as c++ and java but i cant find many good games made in python. a few in pygames but not many just trying to choose the right language edit: sorry, many games really, i would love to make a roguelike, basically my dream. also an overhead rpg. nothing to complex, i dont want to r...
false
5,224,759
0.099668
0
0
3
I'd say Python is okay for scripting in a game engine (See: EVE Online, Civ IV), but I wouldn't write a game engine in it. The performance just isn't there for serious real-time games. If you just want to do simple 2d stuff that's fine, but your're not going to write the next Crysis, or even the next Minecraft, in pure...
1
90,954
0
21
2011-03-07T20:17:00.000
python
is python good for making games?
0
2
6
5,224,812
1
0
0
i hear people say python is just as good as c++ and java but i cant find many good games made in python. a few in pygames but not many just trying to choose the right language edit: sorry, many games really, i would love to make a roguelike, basically my dream. also an overhead rpg. nothing to complex, i dont want to r...
false
5,224,759
0.033321
0
0
1
For the kind of games you want to make, Python is a perfectly suitable language. The only reason there are few games made in Python is because the professional game development industry nearly exclusively uses C++, which in turn due to a combination of performance concerns and reliance on legacy code. These aren't sign...
1
90,954
0
21
2011-03-07T20:17:00.000
python
is python good for making games?
0
2
6
5,261,445
1
0
0
I'm trying to manage some Virtual Machines through the vboxapi provided with the SDK. So far I managed to launch the VM and poweroff it, but I'm not able to restore the snapshot. Looks like the power off procedure locks the virtual machine until the scripts terminates, as a matter of fact this is the error that I get: ...
false
5,253,832
0
0
0
0
You need to lock the machine first so that the console object get created for you.
0
2,664
0
3
2011-03-09T23:53:00.000
python,api,virtualbox
VirtualBox Python API restoring snapshot
0
1
2
28,183,048
1
0
0
I'm trying to create a Listbox in Tkinter that has columns. I'm returning from a DB query records and would like to display each entry in it's own column for each record. Looking at Listbox, I feel like there should be this functionality there but can't find it. What widget should I be using to do this? I've been sea...
false
5,286,093
1
0
0
9
One simple solution is to use two listboxes side-by-side. There's no real magic, you just have to do a little bit of extra work to get one scrollbar to control both (easily done) and have the selection in the two sync up (also easily done).
0
62,004
0
20
2011-03-12T22:52:00.000
python,listbox,tkinter
Display Listbox with columns using Tkinter?
0
1
3
5,290,731
1
0
0
Is it possible to use both Cython and pure python extensions together? Say I'd like to have a wrapper for a C function, returning GdkPixbuf pointer. The ultimate goal would be to have that function available in python, returning gtk.gdk.Pixbuf object.
false
5,287,207
0
0
0
0
Yes it is possible because most of the things that can be done with python can also be done in cython. However, using python extensions or doing anything with python objects (as opposed to statically declared C datatypes) will incur a performance penalty, so Cython will be less of an advantage. Look into cdef classes, ...
1
272
0
0
2011-03-13T03:28:00.000
python,gtk,pygtk,cython
Cython interface with other extensions
0
1
1
5,467,143
1
0
0
I have a QTreeWidget with QComboBoxes inside of it. I would like to be able to hide the combo boxes. I am getting the QComboBox out of the tree using the itemWidget function. I have tried using setVisible(False) and hide() but neither work. Can anyone explain why this is the case and possibly offer a soultion? I s...
false
5,307,007
0
0
0
0
Have you tried putting the QComboBoxes inside a layout inside a QWidget, and placing the QWidget in the QTreeWidget?
0
220
0
1
2011-03-15T02:54:00.000
python,qt,user-interface,qt4,pyqt
PyQt Hide QDialogs Inside of QTreeWidget
0
1
1
5,312,332
1
0
0
I created three frames separately. I need to call these child frames from the click events of buttons located in a main frame. And when a child frame is open, I want the main frame to be hidden or disabled until the child frame is closed. How can I do this? Thanks in advance.
false
5,308,263
0
0
0
0
Create an event queue for each frame, when a child frame is opened set a variable that is checked on processing events to join the queue, and then unset this on destruction of the child frame. If this variable is set then throw the message away, otherwise add it to the queue for processing. Depending on the libraries y...
0
149
0
0
2011-03-15T06:31:00.000
python,wxpython
Control three frames from main menu
0
1
3
5,308,640
1
0
0
I'm trying to write some python, and I'm used to the lispy way of doing things, a REPL in EMACS and the ability to send arbitrary code snippets to the REPL. I like this way of developing code, and python's built-in IDLE seems to do it pretty well. However I do like EMACS as an editor. What's the best thing analogous to...
false
5,316,175
0.197375
0
0
3
python-mode is the default mode for editing Python in emacs. It includes commands for evaluating the buffer and running an inferior interpreter instance.
0
4,224
0
11
2011-03-15T18:18:00.000
python,emacs,slime
What's the closest thing to SLIME for python ? / What's the best way to use python from EMACS?
0
1
3
5,316,229
1
0
0
It might be the bindings (SIP) or even python, but I have a problem with Qt (pyqt4). I have a QTabWidget, and inside it I put widgets one can close. I have a widget that allocates about 400mb of memory. I have not set a parent, and I call deleteLater() on close but nothing happens. Even calling the python's gc does not...
true
5,341,954
1.2
0
0
3
I had this - somewhere you have an reference to your widget, and that reference has been counted... the only way to delete that widget is to make sure that there are no remaining references so python can garbage-collect it. At least you don't end up with a dangling reference like C++, which can lead to some nasty crash...
0
1,477
0
3
2011-03-17T16:19:00.000
python,qt,garbage-collection,pyqt4
Memory not deallocated - PyQt4
0
1
1
5,341,992
1
0
0
I've managed to package my PyQt4 app as a "standalone" application on windows, it works. However this application can upgrade itself, which is done by replacing the actual code written by me (.py files) with new versions, downloaded via the internet. How can I tell PyInstaller do its job (putting together the DLLs, gen...
false
5,366,100
0
0
0
0
I think the embedded interpreter in the executable will still search for .py files in the same directory and/or PYTHONPATH, py2exe uses a zip file for native python components, iirc pyinstaller embeds all of them in the executable, maybe there is an option to keep a zip like in py2exe (or not add them in the spec), the...
1
1,782
0
8
2011-03-20T01:12:00.000
python,installation,pyqt4,pyinstaller
PyInstaller but keeping .py files upgradeable
0
1
4
6,085,674
1
0
0
I need to run a Qt application in Batch mode, so basically I need to run it without GUI. I've already tried using QCoreApplication but my application relies on the existence of X11 window. So I need the GUI to open regularly, but I need to "hide" it from the user. I know that I have the ability to create a virtual VNC...
false
5,369,290
0.197375
0
0
1
As @utdmr suggested, that solved the problem. I've thought that show() was also responsible for the signal/slot mechanism and other Qt and X11 functions. But apparently, the application works normally, just doesn't show the GUI. And that was exactly what I needed since it is a fully developed application and the effor...
0
454
0
2
2011-03-20T15:08:00.000
python,linux,qt,user-interface,x11
How to suppress a Qt GUI application?
0
1
1
5,420,016
1
0
0
I have a gtk.Window. How do I set it to be the active window? I can call is_active() to see whether it already is, but I don't see where to make it active. Bonus points: given a gtk.Widget, how do I make the window it is a part of the active window?
false
5,393,185
-0.049958
0
0
-1
You can also use gtk.Dialog.run (if it's a Dialog) aditional to gtk.Window.present
0
4,336
0
3
2011-03-22T14:58:00.000
python,window,pygtk,gtk
gtk: set active window
0
1
4
5,441,492
1
0
0
Debugging performance problems using a standard debugger is almost hopeless since the level of detail is too high. Other ways are using a profiler, but they seldom give me good information, especially when there is GUI and background threads involved, as I never know whether the user was actually waiting for the comput...
false
5,416,987
0.066568
0
0
1
The methods you're describing, and many of the comments, seem to me to be relatively weak probabilistic attempts to understand the performance impact. Profilers do work perfectly well for GUIs and other idle-thread programs, though it takes a little practice to read them. I think your best bet is there, though -- lea...
1
182
0
6
2011-03-24T09:19:00.000
java,python,performance,debugging,debuggervisualizer
Debugging visually using >>, >, >|, ||, |<, <, <<
0
2
3
5,419,956
1
0
0
Debugging performance problems using a standard debugger is almost hopeless since the level of detail is too high. Other ways are using a profiler, but they seldom give me good information, especially when there is GUI and background threads involved, as I never know whether the user was actually waiting for the comput...
false
5,416,987
0.26052
0
0
4
The "Fast Forward to critical spot" function already exists in any debugger, it's called a "breakpoint". There are indeed debuggers that can slow down execution, but that will not help you debug performance problems, because it doesn't slow down the computer. The processor and disk and memory is still exactly as slow a...
1
182
0
6
2011-03-24T09:19:00.000
java,python,performance,debugging,debuggervisualizer
Debugging visually using >>, >, >|, ||, |<, <, <<
0
2
3
5,417,219
1
1
0
My stack for web developing includes Django/Python and Qt/C++ for non-web developing. What is most comfortable OS for a developer with such a stack ?
true
5,423,404
1.2
0
0
1
I would say: nobody cares...if you are fine with Windows, use Windows. If you are commandline guy, go with a Unix system...the distro unlikely matters...
0
237
0
1
2011-03-24T17:57:00.000
python,linux,qt
Which OS recommended for Programmers?
0
3
3
5,423,456
1
1
0
My stack for web developing includes Django/Python and Qt/C++ for non-web developing. What is most comfortable OS for a developer with such a stack ?
false
5,423,404
0.066568
0
0
1
Once you go linux, you'll never go back (though you might go crazy and move onto bsd). Ubuntu is probably the easiest OS to start with, if only because of the truckloads of documentation, forum assistance, etc. Good luck!
0
237
0
1
2011-03-24T17:57:00.000
python,linux,qt
Which OS recommended for Programmers?
0
3
3
5,423,449
1
1
0
My stack for web developing includes Django/Python and Qt/C++ for non-web developing. What is most comfortable OS for a developer with such a stack ?
false
5,423,404
0.066568
0
0
1
If you don't want to use an language that has special requirements (like .net), the question should be which os does the programmer recommend. That's really a personal decision.
0
237
0
1
2011-03-24T17:57:00.000
python,linux,qt
Which OS recommended for Programmers?
0
3
3
5,423,454
1
0
0
I need to know how to do this on a mac because whenever I try quitting it, I have to force quit it. Is there a proper way when the user clicks the exit button that Tkinter will exit normally?
false
5,427,875
0.379949
0
0
2
I figured out how. I just put a simple exit() command after the main loop.
0
888
0
2
2011-03-25T02:21:00.000
python,macos,tkinter,exit
Python: How can I make my tkinter app exit properly?
0
1
1
5,427,950
1
0
0
I am looking for a GUI toolkit which also has a good designer (like visual studio) for Python language. It should have ...Good Documentation ...Good IDE + Designer ...Cross Platform Support (if possible)
false
5,432,871
0
0
0
0
I've used PyQt together with Qt Designer, nice documentation and cross platform support.
1
1,203
0
3
2011-03-25T13:12:00.000
python,user-interface,toolkit
GUI Toolkit with Good Designer for Python
0
1
4
5,432,925
1
1
0
I am developing a 3d shooter game that I would like to run on Computers/Phones/Tablets and would like some help to choose which engine to use. I would like to write the application once and port it over to Android/iOS/windows/mac with ease. I would like to make the application streamable over the internet. The engine...
true
5,445,166
1.2
0
0
2
For the requirements that you have Unity3d is probably one of your best bets. As roy said there aren't any other 3D engines out there that will span that wide a range of platforms. Why do you think that going to a completely code based system would save you from creating a variety of classes with various responsibiliti...
0
1,543
0
0
2011-03-26T20:41:00.000
javascript,python,game-engine
3d game engine suggestions
0
2
3
5,445,501
1
1
0
I am developing a 3d shooter game that I would like to run on Computers/Phones/Tablets and would like some help to choose which engine to use. I would like to write the application once and port it over to Android/iOS/windows/mac with ease. I would like to make the application streamable over the internet. The engine...
false
5,445,166
0
0
0
0
Well I see you've checked Unity3D already, but I can't think of any other engines work on PC, Telephones and via streaming internet that suport 3D (for 2D check EXEN or any others). I'm also pretty sure that you can use Unity code-based, and it supports a couple of different languages, but for Unity to work you can't ...
0
1,543
0
0
2011-03-26T20:41:00.000
javascript,python,game-engine
3d game engine suggestions
0
2
3
5,445,300
1
0
0
I have some .png images and I want to be able to quickly: (a) Load a .png from a file. (b) Draw some simple lines on top of the .png. (c) Get the contents (bytes) of the resulting image to return as the result of an http request. It sounds like PIL is a good candidate for doing this with relatively little code. However...
true
5,446,816
1.2
1
0
2
"Draw some simple lines on top of the .png" is not a computationally intensive task. This doesn't seems to be a good candidate for the GPU since they are better suited for more complex tasks. You've got to realize that the image is initially loaded on the RAM, making it your job to send this data to the GPU memory and...
0
2,486
0
0
2011-03-27T02:23:00.000
python,opengl,python-imaging-library,gpu
How fast is Python Image Library's (PIL) ImageDraw Module, for instance as compared to OpenGL?
0
1
1
5,446,952
1
0
0
I have recently converted a library, I originally wrote in C++ with Boost Python wrapping, to C with SWIG wrapping to support more languages. I switched from C++ to C because the library consists only of a set of functions and I also want the library to be callable from C (without having to compile the whole program wi...
false
5,448,257
0
1
0
0
Take a look at Chapter 4 in C Interfaces and Implementations by Richard R. Hanson.
0
1,235
0
4
2011-03-27T09:11:00.000
python,c,swig
Most elegant way for SWIG wrapped C library to raise exceptions
0
1
2
5,521,222
1
0
0
I would like to monitor the presence of USB devices and have found modules such as PyUSB that serve this purpose. However, I don't know how to run USB detection services alongside the Tkinter main loop. Is this possible?
false
5,453,256
0
0
0
0
Might I suggest that instead of trying to constantly monitor the presence of a USB device you include a search or refresh button that will check just once.
0
874
0
2
2011-03-27T23:36:00.000
python,tkinter,pyusb
Tkinter and detection of USB devices
0
1
2
5,489,197
1
0
0
I am trying to make several different pages where I need to show different texts and buttons. What I did was I created a panel, and then several sizers on it, and then in the next page, I destroyed the panel and recreated the panel again with different contents/sizers. It worked well in Linux, but when I tried the same...
false
5,457,644
0.132549
0
0
2
It seems there are better ways to do this, but panel.Layout() solved the problem for now. :)
0
3,727
0
2
2011-03-28T10:28:00.000
python,user-interface,wxpython
wxPython panel redraw in windows
0
3
3
5,458,130
1
0
0
I am trying to make several different pages where I need to show different texts and buttons. What I did was I created a panel, and then several sizers on it, and then in the next page, I destroyed the panel and recreated the panel again with different contents/sizers. It worked well in Linux, but when I tried the same...
true
5,457,644
1.2
0
0
3
Calling Layout on the widget's parent is the best way to do this is you are adding or destroying widgets. Sometimes you also need to call Refresh() to make it redraw too, although that might only be required when you're using Freeze/Thaw.
0
3,727
0
2
2011-03-28T10:28:00.000
python,user-interface,wxpython
wxPython panel redraw in windows
0
3
3
5,460,406
1
0
0
I am trying to make several different pages where I need to show different texts and buttons. What I did was I created a panel, and then several sizers on it, and then in the next page, I destroyed the panel and recreated the panel again with different contents/sizers. It worked well in Linux, but when I tried the same...
false
5,457,644
0.066568
0
0
1
I agree with using Layout(), but might I suggest just hiding the unused panel instead of destroying it? Using the Show()/Hide() functions of the sizer, you can add both side-by-side and just hide the unused panel instead of destryong it and recreating it each time?
0
3,727
0
2
2011-03-28T10:28:00.000
python,user-interface,wxpython
wxPython panel redraw in windows
0
3
3
5,461,786
1
0
0
I am trying to change the mouse pointer using python xlib. I successfully did it using warp_pointer. But when i try to play any games like Secret Maryo Chronicles, the mouse pointer moves to the rightmost corner of the screen and not the specified location. Why is it so? Can anyone help me with this?
false
5,487,301
0
0
0
0
I'm not familiar with SMC. It may be that it uses warp_pointer itself. I know a lot of games do to simulate the relative motion support only recently introduced to XInput and I think some of them use it to stash the mouse "out of the way". Have you tried it with games that do different things with the mouse?
0
1,321
0
1
2011-03-30T13:55:00.000
python,mouse,xlib
Python xlib warp_pointer not working properly inside games
0
1
2
5,499,581
1
0
0
I am a great python fan. Recently I got an idea to write RTS engine and/or maybe a simple RTS game based upon this engine. There are a couple of things I need to think about and maybe you can give me some advice on these: Performance. Most games are written in C++. Isn't python too slow for game engine? I am aiming on...
true
5,544,634
1.2
1
0
7
Performance may be an issue with heavy graphics/math processing. If so, see Panda3D, NumPy, Cython, and PyPy. Use Pyglet, PyOpenGL with Pyglet, Panda3D (although you are writing in 2D, you can still use a 3D engine), or perhaps some other library. There don't seem to be existing RTS libraries, but there are definitely ...
0
2,553
0
3
2011-04-04T21:36:00.000
python,performance,graphics,real-time-strategy
2D RTS in Python?
0
2
2
5,544,725
1
0
0
I am a great python fan. Recently I got an idea to write RTS engine and/or maybe a simple RTS game based upon this engine. There are a couple of things I need to think about and maybe you can give me some advice on these: Performance. Most games are written in C++. Isn't python too slow for game engine? I am aiming on...
false
5,544,634
0.291313
1
0
3
I can answer your first two. Python isn't too slow for games. That all games must be written in C++ is a myth. Sure C++ (or C) might give you the best performance, but it doesn't mean you're unable to write a game in another language. Try PyGame: SDL bindings for Python.
0
2,553
0
3
2011-04-04T21:36:00.000
python,performance,graphics,real-time-strategy
2D RTS in Python?
0
2
2
5,544,672
1
0
0
I am developing an application which has to be able to print a couple of pages with Python. Now I am searching for a method to create these pages and print them. It should work on Linux and Windows. The pages contain tables, images and text. I developed the GUI with PyGtk, but I think it's convenient to create an image...
false
5,572,489
0.066568
0
0
1
Have you considered generating HTML?
0
2,696
1
2
2011-04-06T20:22:00.000
python,pdf,printing,pygtk
OS independent printing with Python
0
1
3
5,572,506
1
0
0
Can anybody recommend how to switch between scenes in pyglet. I.e. menu > game game > menu menu > help ect The only way that i can think to do it off the top of my head is by using different windows, which i am quite sure would be the complete wrong way to do it. Or by overloading all of the window's event function...
false
5,581,447
0.099668
0
0
2
The cocos2d.org framework is built on pyglet and includes scene management.
0
3,236
0
3
2011-04-07T12:58:00.000
python,pyglet
Switching scenes with pyglet
0
1
4
5,590,220
1
0
0
I have a gtk.Table to which I've attached a number of gtk.Buttons, some of which overlap others. I can't figure out how to bring a specific button to the front, however. How do I do it?
true
5,584,398
1.2
0
0
1
I've struggled with an issue similar to this, and came to the conclusion that it wasn't possible in an officially documented manner... gtk.Table doesn't seem to have been designed to deal with the idea that things might overlap. Widgets seemed to be rendered in an order related to (but not exactly) the order they were ...
0
200
0
1
2011-04-07T16:29:00.000
python,pygtk
How do I bring a PyGTK Button to the front?
0
1
2
5,585,600
1
0
0
Does anyone know of any articles or code samples to get me started customising the WxPython rich text control? I am trying to extend the rich text control to allow me to insert controls (buttons, text boxes etc) into the editing area e.g. instead of just inserting images or formatted text I would like to be able to ins...
true
5,637,677
1.2
0
0
1
Download the wxpython demo from their site, it should provide you with an in-depth example of a wxRichTextCtrl. Without providing any information about your specific customizations, there is not much else I can help with.
0
328
0
0
2011-04-12T15:25:00.000
python,wxpython,richtext
Where do I start if I want to customise the WxPython rich text control?
0
1
1
5,696,733
1
0
0
hi i am working on a VR engine "vizard" it has (like any other game engine) its mainloop, i want to integrate it with a multi-touch framework "kivy" which has its own mainloop , is it possible to do so? and if you can help me finding references about this topic thank you in advance :D
false
5,646,943
0
0
0
0
It is technically possible, but you should not do it. Simply open up the source, get the code for the two main loops and stitch it together. The results will probably be broken, though.
0
368
0
2
2011-04-13T09:17:00.000
python,multi-touch,kivy
how to integrate two apps (mainloop) together in python
0
1
2
5,647,086
1
0
0
I am a relative newbie with Python and was trying to install wxPython 2.9 using Python 2.6. I did a build from source and then installed the package both being done in a non-standard (local) path. When I try and import wx (having provided the path to the installation folder in my environment variable), I get the follow...
false
5,660,354
0
0
0
0
Add the directory containing the library given in the error to your ld search paths. See the ldconfig(8) man page for details.
1
380
0
0
2011-04-14T08:14:00.000
python,gtk,wxpython
Error while installing wxPython package in a non-standard path
0
1
1
5,660,469
1
0
0
Which is the most efficient method to display a grid of about 1000 clickable images in wxPython ? Currently i am using a GridSizer filled with StaticBitmap objects. But its quite slow for 500+ images. One more thing is that, i have a listbox of categories on the left. That is to filter the images. Categories will be l...
false
5,680,487
0
0
0
0
I would think a ListCtrl in ICON style would be the best way to do this. If you look at the wxPython Demos, the UltimateListCtrl sample in the wx.LC_ICON style is a good example of what you could create.
0
796
0
1
2011-04-15T17:50:00.000
python,image,performance,wxpython
Efficient method for a grid of clickable images in wxPython?
0
1
2
5,681,008
1
0
0
I really like D(2) language and would like to use it for multi-platform GUI application, but I see that its ecosystem is not quite developed. After moving from Linux to (Free)PC-BSD, I see there is even no 64bit compiler ready in the ports and one is not sure if any of GUI libs (QtD, gtkD, wxD) are ready for serious pr...
false
5,685,078
0.049958
0
0
1
Well, its a typical usecase to just write your number crunching code in C/C++ or any language that can be linked into a C module and just add the non performance critical stuff with a scripting language easily. The Python C interface is okay to work with and using SWIG or even writing the binding code manually isn't to...
0
1,579
0
4
2011-04-16T07:14:00.000
python,user-interface,d,cython,cpython
multi-platform gui app in C(P)ython or D
0
3
4
5,687,119
1
0
0
I really like D(2) language and would like to use it for multi-platform GUI application, but I see that its ecosystem is not quite developed. After moving from Linux to (Free)PC-BSD, I see there is even no 64bit compiler ready in the ports and one is not sure if any of GUI libs (QtD, gtkD, wxD) are ready for serious pr...
false
5,685,078
0.099668
0
0
2
Writing the GUI in a dynamic language and writing performance-sensitive code in another language is a great way to write an application. This can be done in Python, it can also be done really easily in Tcl/Tk and several other scripting languages.
0
1,579
0
4
2011-04-16T07:14:00.000
python,user-interface,d,cython,cpython
multi-platform gui app in C(P)ython or D
0
3
4
5,687,640
1
0
0
I really like D(2) language and would like to use it for multi-platform GUI application, but I see that its ecosystem is not quite developed. After moving from Linux to (Free)PC-BSD, I see there is even no 64bit compiler ready in the ports and one is not sure if any of GUI libs (QtD, gtkD, wxD) are ready for serious pr...
true
5,685,078
1.2
0
0
7
I'm obviously biased as a Cython core developer, but I can certainly recommend it. The combination of CPython and Cython provides an otherwise hard to reach level of developing speed, platform stability, portability, low-level coding and FFI capabilities, and execution performance, including a very easy optimisation pa...
0
1,579
0
4
2011-04-16T07:14:00.000
python,user-interface,d,cython,cpython
multi-platform gui app in C(P)ython or D
0
3
4
5,686,614
1
0
0
When chatting in IRC yesterday about the possibility to use P(C)ython instead of D for multi-platform GUI application, someone suggested me Enlightenment Foundation Libraries (EFL). We have researched a bit about it and considering we would like to target some mobile-platform in the future as well, EFL looks as nice al...
true
5,685,176
1.2
0
0
2
EFL looks good and promising, especially its widget toolkit which can do very smart things when resizing windows, but there are problems with it: first, it comes in a very-beta quality. Second, the widgets will look quite unfamiliar for the users. Qt is mature and stable, and it adapts to the platform look and feel (bu...
1
1,308
0
2
2011-04-16T07:38:00.000
python,qt,pyqt,pyside
Qt or EFL for multi-platform Python application
0
1
1
5,688,829
1
0
0
There are a number of Tkinter builders out there but none (that I've found) that work for Python 3. I don't have the time to learn Tkinter and don't use it much which is why I'm looking for a builder.
true
5,691,674
1.2
0
0
0
Wow, pity I didn't get any useful responses. Fortunately I have discovered a solution. PyQt4 may not be Tkinter but it works just the same ... and works in python 3.x and comes with a GUI designer that is very neat. Takes a bit of research to know how to use it but well worth it
0
12,993
0
3
2011-04-17T05:25:00.000
python-3.x,tkinter,builder
Tkinter GUI Builder
0
1
4
5,743,059
1
0
0
Using PyQt4 and Python 3 do you know how I can change the color of a QLcdNumber during the runtime ?
true
5,692,968
1.2
0
0
1
Didn't use this for some thime, but I think you had to change paletteForegroundColor and change segmentStyle to QLCDNumber::Filled or QLCDNumber::Flat
0
1,466
0
0
2011-04-17T10:22:00.000
python,qt,python-3.x,pyqt4
Change the color of the text of QLcdNumber
0
1
1
5,693,049
1
0
0
I have a Python code whose output is a .png file. What should I do to get the output in an OpenGL window? I searched a few places and the closest I got to converting an Image was StringIO() but that didn't seem very helpful.
false
5,699,508
0
0
0
0
If you want something to handle the more complex details you could setup your OpenGL using pygame then use surface = pygame.image.load(fileobj) Where fileobj is any object with a 'file-like' interface. You would need to modify the PNG generator to write to this object rather than a real file.
0
224
0
0
2011-04-18T06:59:00.000
python,image
How to change a .png output from Python to an OpenGL window output?
0
1
2
5,699,658
1
0
0
I basically want to make a clone of the classic game Pacman using Python. I would like to keep all the original graphics, sounds, etc. Perhaps being able to have the game in windowed mode would be useful. With Java I would just use Swing and be done with it. But I'd really like to use Python and make it possible for th...
false
5,743,946
0.066568
0
0
1
You could do this with Tkinter about as easily (or easier) than most other toolkits. Since pac-man graphics set the bar pretty low you could code this all by using the canvas widget. This is arguably the most portable solution since Tkinter is the official, bundled GUI toolkit so you won't require people to download an...
0
310
0
1
2011-04-21T12:15:00.000
python,pygame,pacman
What would be a good python library to use to write a portable version of pacman with nice graphics?
0
1
3
5,763,788
1
0
0
I want to use qt with python. "import qt" return me :"ImportError: No module named qt". I already instaled pyqt. what I hve to install in order to activate "import qt" Thank You
false
5,766,539
0.291313
0
0
3
import PyQt4 works for me fine.
1
22,987
0
10
2011-04-23T19:56:00.000
python
problem with import qt in python
0
1
2
5,766,552
1
0
0
I want to expose some kind of graph explorer widget in Python using PyQt and some library. Does such a library exist?
false
5,768,566
0
0
0
0
Try the nodebox-gl fork version of nodebox that support unix, but I can't find the fork version graph in nodebox :( Thanks
0
5,195
0
2
2011-04-24T04:05:00.000
python,graph,pyqt,graphviz
Python graph visualization and editing with PyQt
0
1
4
5,926,728
1
0
0
I'm looking for a Python 2D graphics library that can basically do the following and not necessarily anything more: Create a window of specified width and height Set the RGB of pixel X, Y on the back buffer. Swap buffers ...and that's it basically. I can't find anything that doesn't come with a massive amount of comp...
true
5,770,944
1.2
0
0
4
I recommend PyQt for this - it's a GUI library/framework but it has very good drawing capabilities. If you look at the examples coming with PyQt, focusing on the graphics & drawing samples, it's quite amazing what you can do with very few lines of code. Oh, and it does the double-buffering you mention automatically so ...
0
4,847
0
2
2011-04-24T14:04:00.000
python,graphics,2d
Basic Python 2D graphics?
0
1
1
5,770,967
1
0
0
I'm working on a project that basically follows a pre-defined structure, like a state machine or a wizard. I stumbled upon QWizard, its nextId() function seemed to be a good way to make my wizard dyamically load further pages. Now, it would be very nice to go back to earlier, already visited pages of the wizard. But ev...
false
5,788,526
0
0
0
0
I'm not sure I see the logical connection between the different questions you're asking here. If you want to go back to already visited pages, why do you want to delete the history? With the help of overloading the nextID method of either the QWizard or separate QWizardPages you can easily implement any custom visiting...
0
607
0
2
2011-04-26T09:40:00.000
python,qt,pyqt,qwizard
QWizard: delete history of visited pages
0
1
2
5,788,678
1
0
0
I'm using Qt with Python, and I've got a mainwindow with a status bar at the bottom. I can display a message in the bar using a QLabel, and set the color of that message using something like "<font color=\"green\">In progress</font>" for the QLabel text. I would like to also put a temporary message in the status bar, ...
false
5,795,214
0.066568
0
0
2
If your showMessages text will be all of the same color, you can define it in the palette of QStatusBar via QtDesigner(window text color) for temporary messages, and then use the QLabel color for normal and permanent messages of different colors.
0
10,542
0
5
2011-04-26T19:06:00.000
python,qt,qstatusbar
Qt statusbar color
0
1
6
11,617,883
1
0
0
I have a toolbar that has the typical buttons: new, save, save as, etc. Is there a way to gray out/disable/make unavailable icons that are not useful? For instance, if nothing has been changed, disable and gray out the save button, then re-enabled it when something has changed that requires a save. Thanks for the help!
true
5,808,881
1.2
0
0
0
myButton.set_sensitive(True) # make button available myButton.set_sensitive(False) # make button unavailable
0
128
0
1
2011-04-27T18:38:00.000
python,pygtk
Make a pygtk stock icon "unavailable"
0
1
1
5,810,073
1
0
0
Xcode 3 had templates for building Cocoa subclasses in Python. I've recently upgraded to Xcode 4 but I cannot find out how I can use other languages besides the C family (C, C++, Obj-C) in Xcode 4. Does anyone know?
false
5,843,508
0.132549
0
0
2
I've successfully built a MacRuby GUI app in XCode 4.2 on Lion today following a MacRuby tutorial on Apple's site. MacRuby also includes a template in XCode 4.2. I'm a Python programmer and really hoped to use it, but at this point I've given up on PyObjC. I use Tk in Python for quick little apps and maybe switch to Ma...
1
7,826
0
13
2011-04-30T17:39:00.000
python,xcode,xcode4,pyobjc
PyObjC on Xcode 4
0
1
3
7,815,044
1
0
0
For my sins (and for fun the learning experience) I am writing a window manager (I know, I know). I'm using python and XCB (python-xpyb). So far I have figured out that I need to use a SubStructureRedirect mask on the root window(s), and I am successfully being passed events related to applications' top-level windows. ...
false
5,845,717
0.197375
0
0
1
The short answer is configure the window (size, stacking, etc.) by calling ConfigureWindow. The long answer is here you impose policy and honor specs such as XSizeHints. Best to have a look at some existing WMs' source and get a sense of what they do. Exactly what you do depends on your desired UI. The simplest thing ...
0
848
1
2
2011-05-01T01:17:00.000
python,x11,window-managers,xcb
What should a Window Manager do with a ConfigureRequestEvent?
0
1
1
5,851,984
1
0
0
I'm just beginning a very simple pygame code that draws a green line on a white background. However, I have to use pygame.display.flip() in order for it to show up, but it seems that I would have to use this every time I made a change and this seems too impractical for me to be doing it right. Am I missing something?
true
5,851,656
1.2
0
0
3
There's a good reason for this. Double buffering is a technique used to prevent "flickering". Basically, you want to draw a frame to memory instead of to the monitor and then push the frame all at once when its drawn. Otherwise, you can see different elements of the same frame go up at different times. What you want...
0
1,583
0
2
2011-05-01T21:46:00.000
python,pygame
Beginner problem with pygame
0
1
2
5,853,562
1
0
1
I am running Python2.7.1 and OpenCV 2.2 without problems in my WinXP laptop and wrote a tracking program that is working without a glitch. But for some strange reason I cannot get the same program to run in any other computer where I tried to install OpenCV and Python (using the same binaries or appropriate 64 bit bina...
false
5,858,446
0
0
0
0
This must be an issue with the default codecs. OpenCV uses brute force methods to open video files or capture from camera. It goes by trial and error through all sources/codecs/apis it can find in some reasonable order. (at least 1.1 did so). That means that on n different systems (or days) you may get n different ways...
0
1,705
0
1
2011-05-02T14:34:00.000
opencv,python-2.7,iplimage
IplImage 'None' error on CaptureFromFile() - Python 2.7.1 and OpenCV 2.2 WinXP
0
1
3
5,859,924
1
0
0
I'm trying to create a simple game where the point is to collect as many blocks as you can in a certain amount of time, say 10 seconds. How can I get a timer to begin ticking at the start of the program and when it reaches 10 seconds, do something (in this case, exit a loop)?
false
5,890,304
1
0
0
9
Using time.time()/datetime.datetime.now() will break if the system time is changed (the user changes the time, it is corrected by a timesyncing services such as NTP or switching from/to dayligt saving time!). time.monotonic() or time.perf_counter() seems to be the correct way to go, however they are only available from...
1
148,808
0
43
2011-05-04T21:53:00.000
python,time
Timer for Python game
0
1
10
14,132,794
1
0
0
I have a bug in my python script that is using PyQt4 that causes a segmentation fault. I could not find the bug using pdb, so now I wanna try it with gdb. The core file is written and when I open it and type where, I just get memory addresses and only question marks as function names. I already installed the python-qt4...
false
5,902,379
0
0
0
0
If I remember correctly, you will also need at least libqt4-dbg and python-dbg, maybe a few others..
1
407
0
0
2011-05-05T18:20:00.000
python,gdb,segmentation-fault,pyqt4
Debugging PyQt4 using a core file
0
1
1
5,913,587
1
0
0
Some details of my machine and installed packages before proceeding further: Mac OSX version: 10.6.6 Python version: Activestate Python 2.7.1 wxpython version: wxpython 2.8 (uses Carbon API hence limited to 32-bit mode arch only) I installed wxPython2.8-osx-unicode-py2.7 from wxpython website using their .dmg installer...
false
5,920,764
1
0
0
8
If you look in the .dmg for wxPython, there is an uninstall_wxPython.py unininstall script. Just drag it to your desktop and run python ~/Desktop/uninstall_wxPython.py in a terminal.
0
4,762
1
5
2011-05-07T11:33:00.000
python,macos,wxpython,uninstallation
How to uninstall wxpython 2.8 on Mac OSX 10.6
0
1
1
5,922,093
1
0
0
I would like to know where exactly a widget is on the screen.
true
5,930,780
1.2
0
0
4
You want to use the winfo_rootx and winfo_rooty methods of a widget.
0
469
0
2
2011-05-08T22:22:00.000
python,geometry,screen,tkinter
Is there any way to get a widgets position relative to the entire screen in Tkinter?
0
1
1
5,932,003
1
0
0
Is it possible to make a wxPython window only re-sizable to a certain ratio? I know you can disable resizing; however, I'd like it so when the window was resized it stuck to a certain width to height ratio.
false
6,005,960
-0.099668
0
0
-1
I'm not too familiar with wxPython, but can't you just reset the window size to your max/min size that you want once the user pass that? Preferably in the event that detects resizing?
0
7,440
0
5
2011-05-15T01:41:00.000
python,resize,wxpython
Resizing a wxPython Window
0
1
2
6,006,073
1
1
0
I am looking into using sprox but I can't seem to find any information about styling the generated form. I am sure its got to be something obvious but i didn't see it in the docs or find anything using a google/google groups search. Ideally i would use sprox to generate the form but be able to pass in some css for lay...
true
6,006,773
1.2
0
0
0
You should be able to pass the form to the template, render it there while adding any custom css rule inside the template itself. For example using <style> tag inside the template head. If you really want to add a custom CSS on python side you can try to add CSSLink/CSSSource to css key inside form __base_widget_args__...
0
160
0
1
2011-05-15T02:34:00.000
python,web-applications,sprox
Python / TG2 - Sprox
0
1
1
6,636,134
1
0
0
I need to show a slider in one column of a grid. I was able to create a custom CellEditor which displays the slider when I double click into a cell of the appropriate column so it enters the edit mode. But I don't know how to create a custom CellRenderer that displays the slider in all cell that are not in edit mode. U...
false
6,020,070
0.197375
0
0
1
Maybe you could use the editor to set the numeric value of the cell, then on the renderer draw a vertical bar by dividing the value by the maximum possible value and multiplying it by the width of the cell (in px, to get the proportion of the cell that the slider needs to appear at) and drawing a narrow vertical rectan...
0
337
0
1
2011-05-16T16:01:00.000
wxpython,wxwidgets
wx/wxPython: How to add a slider to a grid cell?
0
1
1
6,641,179
1
1
0
I am trying to use PyQt to load the html of a web page which can then be manipulated and fed back to the page for web scraping. I am basically trying to log into a page with Javascript on it, search for documents to download (by selecting a check box next to the correct one's names), and then clicking a download button...
false
6,032,287
0
0
0
0
I think you are confused about where things happen, so it is not clear to me what it is you are attempting to do, but lets make a guess. I think you want to automate the use of a web site, where you have to call up a selection page, tick a box, click a button and handle the resulting download. If you only want to do i...
0
1,332
0
3
2011-05-17T14:24:00.000
javascript,python,screen-scraping,pyqt,pyside
Outputting and Responding to Javascript with PyQt
0
1
2
6,036,473
1
0
0
I have a wx.ScrolledWindow where is drawn on using cairo. I have implemented a zoom-functionality which right now redraws the whole content. But as there will be up to 200 curves to draw I should consider a more performant solution. I have thought of these: Buffering images for the zoom factors -1/+1 (Memory consuming...
false
6,049,208
0.099668
0
0
1
If you're double-buffering anyway, why not do a quick bitmap scale as a "preview" while waiting for the newly redrawn vector image? I confess I don't know how to do this. But if you can make it work, it should work! :)
0
1,049
0
6
2011-05-18T18:15:00.000
python,wxpython,cairo
What is the most performant way to implement zoom to a cairo-drawn canvas?
0
1
2
6,450,169
1
0
0
I was wondering if it is possible (I'm sure it is) to get a reference to a control based on the name of the control. Something like control = findcontrol("btnProduct"+buttonNumber) You probably catch my drift... (and yes, I am a newby in wxPython) Regards, Dennis
false
6,049,481
0.197375
0
0
3
You can use the frame instance's FindWindowByName() method, assuming you passed a unique name parameter to the widget or you might be able to use the frame instance's FindWindowByLabel() method. You can also find by id, but I don't really recommend that since it's better not to manage the ids yourself.
0
1,526
0
4
2011-05-18T18:39:00.000
python,wxpython
wxpython, find control based on its name
0
1
3
6,050,833
1
0
0
I'm currently working the final project for my programming class. We're writing it in Python 3.1, and I'm doing the GUI. My team's leader wants to do the whole project in 3.1, but most pyGame addons (like pyConsole) are giving me compatibility issues. So, my question is, can I write my frontend in 2.5 and then hook it...
false
6,052,379
1
0
0
6
To be honest, that's probably more trouble than it's worth. Your best bet is to get together and make a list of the addons you guys want to use and whether or not they're compatible with 3.1. Then decide if you can live without the incompatible ones. If you can't, do the project in 2.5, otherwise go with 3.1 and have...
0
195
0
7
2011-05-18T23:58:00.000
python,python-3.x,pygame
Using Python 3.1 and 2.5 together
0
2
2
6,052,506
1
0
0
I'm currently working the final project for my programming class. We're writing it in Python 3.1, and I'm doing the GUI. My team's leader wants to do the whole project in 3.1, but most pyGame addons (like pyConsole) are giving me compatibility issues. So, my question is, can I write my frontend in 2.5 and then hook it...
false
6,052,379
0.291313
0
0
3
Short Answer NO. Longer Answer. You can write your frontend with Python 2.5 and the backend with 3.0, but they can't interact at all. You need some sort of abstraction layer between them. Doing something like this you can have any language in the other side. The abstraction Layer would need to pull jobs work on them a...
0
195
0
7
2011-05-18T23:58:00.000
python,python-3.x,pygame
Using Python 3.1 and 2.5 together
0
2
2
6,052,534
1
0
0
I need a button that has a bitmap, toggles, and to which I can add a menu (I realize this is asking a lot). I can't figure out a way to do this in wx python. Here are the things I've tried and why they don't work: plate buttons: don't toggle genbitmaptogglebuttons: for some reason, these buttons kill my tooltips (I p...
false
6,064,044
0
0
0
0
Per Mark's suggestion, if you have wx 2.8.12 you can use a plate button to get the toggle/bitmap/menu functionality. Since it is not easy for me to update to the newer wx at this point, I'll use a bitmap button and fake the toggle.
0
618
0
0
2011-05-19T19:46:00.000
button,menu,bitmap,wxpython,toggle
wx python bitmap/toggle/menu button
0
2
2
6,073,070
1
0
0
I need a button that has a bitmap, toggles, and to which I can add a menu (I realize this is asking a lot). I can't figure out a way to do this in wx python. Here are the things I've tried and why they don't work: plate buttons: don't toggle genbitmaptogglebuttons: for some reason, these buttons kill my tooltips (I p...
false
6,064,044
0
0
0
0
I don't see a pre-built button with all those features. I would think that you can use the generic toggle button or maybe the ShapedButton for your bitmap toggle functionality and attach a right-click popup menu. I'm not really sure what you mean by a menu, so that may not work. If you're talking about a menu implement...
0
618
0
0
2011-05-19T19:46:00.000
button,menu,bitmap,wxpython,toggle
wx python bitmap/toggle/menu button
0
2
2
6,064,311
1
0
0
I've got a Canvas which manipulates objects in the mouse event handler. After modifying the objects, I want to trigger the OnPaint() event for the same Canvas to show (rerender) the changes. What is the right way to do this? It doesn't let me call OnPaint() directly. Also, is triggering an event from another event "wro...
true
6,076,014
1.2
0
0
4
I would just call self.Refresh() or maybe RefreshRect() and pass the area that needs to be repainted.
0
3,642
0
4
2011-05-20T18:11:00.000
python,drawing,wxpython
Force repaint in wxPython Canvas
0
1
2
6,076,453
1
0
0
I want to provide a listbox where the user can select (multiple) characters (usually close to 15). Quite often some of these will be sequenced, so a listbox is easier than a validated text entry field. Since the character combination has a meaning to the user, it is user friendly to orient the listbox horizontally. Is ...
false
6,082,723
0.379949
0
0
2
No, there is no setting, subclass or theme that will let you do that with a listbox. What you might want to use instead is a set of check buttons with the indicator turned off so they each appear as a button with a single letter. You can then pack them all horizontally in a frame. With the indicator off, the button wil...
0
1,145
0
0
2011-05-21T15:33:00.000
python,listbox,tkinter
Horizontally oriented listbox using Python and Tkinter
0
1
1
6,083,339
1
0
0
I have a Tkinter program and running it like: python myWindow.py starts it all right, but the window is behind the terminal that I use to start it. Is there a way to make it grab the focus and be the foreground application? Does it depend on the platform?
false
6,091,688
0.132549
0
0
2
This might be a feature of your particular window manager. One thing to try is for your app to call focus_force at startup, after all the widgets have been created.
0
3,844
0
7
2011-05-23T00:10:00.000
python,python-3.x,tkinter,focus
Set focus on Tkinter window (depends on platform?)
0
1
3
6,102,787
1
0
0
I'm learning wxpython right now and one thing that helps me ALOT is when I'm typing in the text editor I sometimes press the tab key to give me a hint on what I'm looking for...This is great when it works but I notice sometimes it doesn't work and I get lost looking for a syntax I can't remember... Question is how can ...
false
6,093,313
0
0
0
0
What editor do you use?? Without knowing that there's no way we can possibly help you. FWIW in vim I use C-x [onp]
0
320
0
0
2011-05-23T05:51:00.000
python
Anyway to bring up suggestion box when typing python code
0
1
1
6,093,396
1
0
0
Have you ever used those cracks and keygens with the really nice interfaces and 8-bit music playing in the bg with special effects when you clicked buttons and stuff? I'd like to create works like such (the GUI part), but I'm wondering which GUI toolkit has that kind of flexibility. Do all GUI toolkits have the ability...
false
6,111,171
0.379949
0
0
2
I'd wager most of those cracks are written in C or even assembly language, using the Windows API at a very low level. Very few, if any, are written in Python, and positively none are written using GTK. :) Crackers have different aesthetics than ordinary programmers, and they tend to idealize low-level programs with sma...
0
237
0
0
2011-05-24T13:29:00.000
python,user-interface,interface
Graphical User Interfaces for cracks, keygens, etc
0
1
1
6,112,009
1
0
0
I am trying to create a legend of sorts using ObjectListView in Python. I am able to accomplish this, using wx.PaintDC, DrawText, and DrawRectangle in wxPython, but it doesn't look very good because it is all free hand. Is it possible to create a square image, say a 10x10 pixel square, using wxPython or another packag...
false
6,118,139
0
0
0
0
You should be able to add different images to different rows with the ObjectListView widget, if I understand the question correctly. Alternatively, you might want to take a look at the UltimateListCtrl, which was written in pure Python and can have any widget put into it. I think there's a new list control widget in 2....
0
182
0
0
2011-05-24T23:49:00.000
python,wxpython,objectlistview
Creating a Legend Using ObjectListView
0
1
1
6,142,594
1
0
0
I've never created a GUI before, just simple text based stuff. I think I'm ready to move on to building a GUI and I have a project in mind. Specifically, I'm thinking about creating a simple touch typing tutor game...nothing too fancy. Which python GUI toolkit and builder would lend itself best to a project like thi...
false
6,119,508
0.099668
0
0
1
You can use Pygame modul Pygame site has a lot of tutorials, you can use those tutorials as a starting point. Good Luck!
1
867
0
0
2011-05-25T04:21:00.000
python,user-interface
python GUI to build a simple typing tutor game
0
2
2
6,119,548
1
0
0
I've never created a GUI before, just simple text based stuff. I think I'm ready to move on to building a GUI and I have a project in mind. Specifically, I'm thinking about creating a simple touch typing tutor game...nothing too fancy. Which python GUI toolkit and builder would lend itself best to a project like thi...
true
6,119,508
1.2
0
0
0
I wrote several application prototypes using the libglade library and the python bindings. I found the toolkit pretty easy to use, it acted just like any other GUI widget framework I've used, but the widgets seemed more ready to grow or shrink to fit the available space easier than many other GUI frameworks. Since they...
1
867
0
0
2011-05-25T04:21:00.000
python,user-interface
python GUI to build a simple typing tutor game
0
2
2
6,119,529
1
0
0
I have a PyGTK GUI that has a gtk.Table. Pressing one button will generate a PNG file. I can show the PNG file in the GUI by adding it somewhere in the table and calling the main window's show_all method again. Is there a better way? What if I want to show more than one PNG file at a time?
true
6,126,044
1.2
0
0
0
You can use a combination of gtk.Image, gtk.HBox (or VBox), and maybe gtk.ScrolledWindow if you plan on showing a lot of images. Just create a new gtk.Image, set the image using set_from_file, then call pack_end on the box to display it.
0
173
0
1
2011-05-25T14:28:00.000
python,gtk,png,pygtk
In PyGTK, what's a good way of displaying an image in a GUI?
0
1
1
6,127,034
1