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 am reading a little bit on Objective-C, and since it comes from Smalltalk, like Ruby does, so I wonder, is it true that if using Ruby, (if Apple change XCode to support it), to develop iPhone or Mac app, it is not suitable really because of the speed? For example, Angry Birds probably isn't as smooth as it is now i... | false | 6,129,086 | 0.066568 | 1 | 0 | 1 | Python and Ruby themselves are not too fast, but many programs today are written to basically do none of the heavy lifting alone. For instance, if you want to save a PNG file as a JPG, you are certainly going to use the built in system calls to do it. In that case it does not really matter if it takes 0.00001 seconds i... | 1 | 1,121 | 0 | 1 | 2011-05-25T18:28:00.000 | python,objective-c,ruby,ios | Is Ruby or Python not suitable for iPhone or Mac app development because of speed, and any compiler that can help boost the speed? | 0 | 1 | 3 | 6,129,509 | 1 |
0 | 0 | My Python backend (Django) has to request to a C++ library to get a result (with help of ctypes module).
Is it normal to call a C++ method directly? Or may be I need an intermediate thread manager that starts a new thread when python script wants a result? | true | 6,129,383 | 1.2 | 1 | 0 | 2 | Basically you have to decide what kind of operation flow you want. If you prefer synchronous processing you can call you method directly, if you favor asynchronous processing you will need an intermediate solution.
However, you have to be aware, that when you call the C++ routine directly form your Django app the call ... | 0 | 339 | 0 | 2 | 2011-05-25T18:54:00.000 | c++,python,django,ctypes,backend | High Perfomance: Do call C++ methods directly from a python backend? | 0 | 1 | 1 | 6,129,485 | 1 |
0 | 0 | Python script calls an external C++ function (using ctypes). Memory leaks are possible when execution the C++ function.
Will all allocated memory (in C++ function) be automatically cleaned up after finishing of the Python script? | true | 6,129,933 | 1.2 | 0 | 0 | 2 | Yes, It will all be returned to the OS once the python interpreter exits. This is true for all processes - nothing specific to python or c++. | 1 | 169 | 0 | 1 | 2011-05-25T19:39:00.000 | c++,python,ctypes | Call an External C++ function and Memory Leaks: is all allocated memory cleaned up after finishing Python script? | 0 | 1 | 1 | 6,129,979 | 1 |
0 | 0 | I've gone from one book to another, one google search to another and I notice EVERY SINGLE ONE starts the main window in a completely different way.
I don't want to pick up bad habits so can someone please give me the best of these options and why its the better method. Below are all the ways i've seen it done
A)
class... | false | 6,133,348 | 0.148885 | 0 | 0 | 3 | Don't worry about it. You aren't going to ruin your future programming by making the wrong choice now.
None of the options you mention are wrong. They all do things differently because different applications have different requirements. No one way is best.
Just work on what you want and do what works for you, and once... | 0 | 1,956 | 0 | 3 | 2011-05-26T03:23:00.000 | python,wxpython | Confused on how to structure the GUI (wxpython) | 0 | 1 | 4 | 6,133,380 | 1 |
0 | 0 | I need to send a binary file (or a Bitmap object) from Android to a PC, which runs a Python script to receive it.
Has anybody been in the same situation or has any hints, what could be best practice here? Options are sockets or Webservice (besides from workarounds with samba etc) I guess, but what is the easiest and f... | true | 6,151,335 | 1.2 | 1 | 0 | 1 | Just doing a HTTP POST containing data to a web server should do the job. This way you have a myriad of frameworks to choose from, which saves you from doing the dirty work of pushing bits back and forth. Sure, there is some overhead, but unless you have specific reasons to avoid that (which were not mentioned in the q... | 0 | 490 | 0 | 2 | 2011-05-27T11:03:00.000 | java,android,python,networking,binaryfiles | How to best send binary file from Android to Python script on PC? | 0 | 1 | 2 | 6,151,433 | 1 |
0 | 0 | Okay, I'm just starting to get into creating GUIs with python and I'm a bit confused as how how I should go forward:
Should I download PyGTK or the current version of GTK+ if I'm using Python or does it matter?
Concerning GUI builders, from what people are saying, it seems like GTKbuilder is better to use than Glade... | true | 6,158,439 | 1.2 | 0 | 0 | 1 | PyGTK bridges GTK+ to Python, so you need all three.
Glade is an application to edit XML files. You'll definitely want it. To read those files you can use either libglade (separate, deprecated) or GtkBuilder (built into GTK+, and therefore PyGTK). | 0 | 255 | 0 | 0 | 2011-05-27T22:58:00.000 | python,user-interface,pygtk,glade,gtkbuilder | simple questions about PyGTK, GTKbuilder, GTK+ | 0 | 1 | 1 | 6,201,626 | 1 |
0 | 0 | I noticed the width argument for the Tkinter Text widget is in characters.
Is it possible to set a maximum width in characters for the text widget? | false | 6,174,390 | 0.197375 | 0 | 0 | 3 | What you want to do isn't directly supported by the widget. You can almost get there by using a couple of tricks. For example, you can set the wrap attribute to wrap at word or character boundaries, then make sure the widget is never wider than 80 characters (this requires using pack/grid/place options appropriately). ... | 0 | 8,149 | 0 | 3 | 2011-05-30T09:18:00.000 | python,text,fonts,width,tkinter | How to set maximum width in characters for the Text widget? | 0 | 1 | 3 | 6,182,702 | 1 |
0 | 0 | Is it possible to get the x y coordinates of the insertion cursor in a Tkinter Text widget? I'm trying to make a popup menu that pops up next to the insertion cursor. | true | 6,180,944 | 1.2 | 0 | 0 | 3 | The bbox method can be used to get the bounding box of an index. You can use that to get the position relative to the window. You can use the winfo method to get the x/y of the window.
Typically popups appear next to the mouse rather than the insertion point (though typically, right-clicking first sets the insertion p... | 0 | 556 | 0 | 2 | 2011-05-30T21:35:00.000 | python,text,popup,tkinter | The Tkinter Text Widget Insertion Cursor | 0 | 1 | 1 | 6,181,133 | 1 |
0 | 0 | I was thinking about adding pythonqt to my application for writing plugins. My application is in C++ and already uses the Qt framework. The pythonqt option seems like a natural fit for adding GUI components, but I'm concerned about how well the program will scale if I expose an class with millions of instances. It w... | false | 6,180,947 | 0.197375 | 0 | 0 | 2 | PythonQt only creates Python wrappers for C++ instances that are exposed to Python.
So if you do not expose millions of C++ instances to Python at the same time,
it will scale nicely and create wrappers only for the exposed objects.
These wrappers are deleted when they go out of scope in Python, so this should scale as... | 0 | 310 | 0 | 1 | 2011-05-30T21:35:00.000 | c++,python,qt | scalability of pythonqt for millions of objects | 0 | 2 | 2 | 10,348,201 | 1 |
0 | 0 | I was thinking about adding pythonqt to my application for writing plugins. My application is in C++ and already uses the Qt framework. The pythonqt option seems like a natural fit for adding GUI components, but I'm concerned about how well the program will scale if I expose an class with millions of instances. It w... | true | 6,180,947 | 1.2 | 0 | 0 | 0 | I haven't done much with it but it almost sounds like you should at least look at QtQuick/QML layer. It is hard to tell from your description what is going on but QML is a way to write Qt GUIs without doing any C++ coding. It build on the already exisiting and well working Qt/JavaScript Implementation and Bridge.
As f... | 0 | 310 | 0 | 1 | 2011-05-30T21:35:00.000 | c++,python,qt | scalability of pythonqt for millions of objects | 0 | 2 | 2 | 6,182,460 | 1 |
0 | 0 | I'm using PyQt to develop an application that in Windows, if set in preferences, should be able to start at boot.
I'm releasing this software with PyInstaller as a single executable file; i don't have a proper "installer".
Which is the best way to achieve this? ( = starting at boot)
A possible solution is to add a link... | false | 6,186,091 | 0.379949 | 0 | 0 | 4 | You may add registry key under [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run], with any name and value "path_to_your_exec". this will require local administrator right, but will work for all users.
The same key but starting with [HKEY_CURRENT_USER] will not require administrator privileges, but will... | 1 | 2,695 | 0 | 5 | 2011-05-31T10:17:00.000 | python,windows,pyqt,startup,pyinstaller | PyQt: best way to do the trick "start at boot" for my program in Windows | 0 | 1 | 2 | 6,186,198 | 1 |
0 | 0 | I have 4 spinctrls in my app. When I click on them, I want all their
content to be selected instantly. And another thing is, I need to make
them tab traversal. Can you help me with some sort of code to do this
task?
Thanks in advance. | false | 6,189,047 | 0.379949 | 0 | 0 | 2 | You need to catch EVT_SPIN or EVT_SPINCTRL and in your handler, you can select all the values by calling each of the control's GetValue method. In the wxPython demo, it seems to support tab traversal. I'm not sure what's going on with yours. Did you try the FloatSpin widget as an alternative? | 0 | 158 | 0 | 0 | 2011-05-31T14:24:00.000 | python,wxpython | Make Spinctrl selected when activated in WxPython | 0 | 1 | 1 | 6,191,925 | 1 |
1 | 0 | The engine I've been wanting to remake is from a PlayStation 1 game called Final Fantasy Tactics, and the game is basically a 2.5D game I guess you could say. Low-resolution sprites and textures, and 3D maps for battlefields. The plan is to mainly load the graphics from a disc, or .iso (I already know the sectors the g... | true | 6,195,508 | 1.2 | 1 | 0 | 0 | I'd recommend going with PySFML, and, of course, Python.
If you do your Python programming correctly , and if you really are willing to fiddle with C or ASM Python plugins for faster computations, you shouldn't really have too much performace hits. | 0 | 213 | 0 | 1 | 2011-06-01T02:04:00.000 | java,python | Game Engine Remake - Trouble Choosing a Language /API(Java or Python) | 0 | 2 | 3 | 6,195,610 | 1 |
1 | 0 | The engine I've been wanting to remake is from a PlayStation 1 game called Final Fantasy Tactics, and the game is basically a 2.5D game I guess you could say. Low-resolution sprites and textures, and 3D maps for battlefields. The plan is to mainly load the graphics from a disc, or .iso (I already know the sectors the g... | false | 6,195,508 | 0 | 1 | 0 | 0 | At the end of the day if you're passionate about the project and committed to getting the most out of the language you choose, the performance difference between java and python will be minimal if non-existent.
Personally speaking, the biggest challenge is finishing the project once it loses novelty and initial momentu... | 0 | 213 | 0 | 1 | 2011-06-01T02:04:00.000 | java,python | Game Engine Remake - Trouble Choosing a Language /API(Java or Python) | 0 | 2 | 3 | 6,195,870 | 1 |
0 | 0 | I would like to execute a method which can only be called once my QApplication is displayed, i.e. when it has entered its main event loop exec_(). I'm new to Qt4 (using PyQt4): i was hoping to have a on_start()-like callback, but didn't find one.
Do i need to create a thread or a timer? Or is there some callback includ... | false | 6,215,690 | 0 | 0 | 0 | 0 | I haven't used Qt before, so I might be wrong on this, but I imagine you could bind your on_start() method to the ApplicationActivate event, and set a flag from inside your on_start() method so that the code would only be run that very first time and not any other times the ApplicationActivate event is triggered during... | 0 | 4,716 | 0 | 4 | 2011-06-02T14:11:00.000 | python,multithreading,timer,pyqt4,event-loop | How to execute a method automatically after entering Qt event loop? | 0 | 1 | 3 | 6,218,924 | 1 |
1 | 0 | I want to develop an application targeting both android and iphone. I guess they use Java and Objective-C. Can I use single language like Python? Is it the best route? Will I lose performance, features, etc. by using Python. Are there any limitations that I will run into? | false | 6,216,890 | 0 | 1 | 0 | 0 | phonegap is one of the way that you can use to target the iphone & android.through the javascript,html. | 0 | 1,256 | 0 | 3 | 2011-06-02T15:47:00.000 | python,android,iphone,beeware | target both android and iphone with Python | 0 | 1 | 4 | 6,217,111 | 1 |
0 | 0 | I am binding C++ classes to Python and have come to an interesting solution to a previous problem, unfortunately this has lead to another question that there seems to be no easy answer too.
I am wrapping each function into a "callable" PyObject, what makes it callable is having the call function define (C side this i... | true | 6,221,533 | 1.2 | 0 | 0 | 3 | The third PyObject* is the kwargs. Write a wrapper that just... doesn't pass them. Raising TypeError if it contains anything is optional. | 1 | 390 | 0 | 0 | 2011-06-02T23:32:00.000 | python,callable | What is the exact requirement for defining a python tp_call function? | 0 | 1 | 1 | 6,221,593 | 1 |
0 | 0 | My python code is calling a C function in a native library (also written by me). The function takes two strings as arguments and returns its response as a string. The two argument strings that python passes to C library are only read by the C library, so I am not worried about their memory management. AFAIK, their memo... | false | 6,229,610 | 0.291313 | 0 | 0 | 3 | A common way to do this is adding an additional buffer parameter and a length parameter to the C function. If the function is called with a buffer size that is smaller than the required size, the function simply returns the required buffer size and performs no other action, otherwise, the data is copied into the buffer... | 1 | 2,432 | 0 | 1 | 2011-06-03T16:00:00.000 | python,memory-management,ctypes | How to manage string memory with python ctypes | 0 | 1 | 2 | 6,229,664 | 1 |
0 | 0 | I am writing one of the Mobile monitoring program in my phone which I almost finished it. My program has a pedometer which counts human's steps in a real time manner. My question is that I am now writing GUI for phone which will show let's say some picture after they accomplish 1000 steps(like an award) and so on. I am... | true | 6,230,525 | 1.2 | 0 | 0 | 0 | Which phone model and OS are we talking about? Is it running Android?
I believe pre-Android Nokia phones used Qt GUI framework
Python has Qt wrappers, look into PyQt4 for all your UI needs. | 0 | 285 | 0 | 0 | 2011-06-03T17:28:00.000 | python,mobile-phones | Python: Making a GUI in nokia phone | 0 | 1 | 1 | 6,231,462 | 1 |
0 | 0 | I've spent a very frustrating evening trying to get wxpython to work on my MacBook Pro (running Snow Leopard 10.6.6). From reading the various threads on this topic both here and on other websites this is my understanding so far:
If you are running python 2.6 or greater you can only work with wxpython if you access th... | true | 6,232,629 | 1.2 | 0 | 0 | 11 | I don't have a Mac, but I read almost all the messages on the wxPython mailing list. As I understand it, you don't want to use the Python that came with your Mac. It has been modified for the Mac specifically somehow, so you should download a normal version of Python and install it.
As for the 32-bit question, with wxP... | 0 | 662 | 1 | 5 | 2011-06-03T20:58:00.000 | macos,wxpython,32bit-64bit | Battling with wxpython | 0 | 1 | 1 | 6,232,781 | 1 |
0 | 0 | I'm looking at switching programming languages due to some unavoidable roadblocks. However, before I dedicate myself to a whole new language, I need to know if it is possible for me to play .swf or .flv files underneath other GUI elements if I am using OcempGUI and pygame? Will using those two libraries back me into a ... | true | 6,233,805 | 1.2 | 0 | 0 | 0 | Judging from the GUI's features list and usage, it does not appear to support .swf playback. If anyone has evidence to the contrary, an additional answer would be appreciated. | 0 | 461 | 0 | 1 | 2011-06-04T00:12:00.000 | python,flash,pygame | Play .swf with Python/Pygame/OcempGUI | 0 | 1 | 1 | 8,205,898 | 1 |
0 | 0 | I have a small python script which draws some turtle graphics. When my script has finished running, the turtle screen automatically closes, so to be able to see the graphics for a while I have to use time.sleep(5) at the end of the script to delay the closing.
Is there any way I can make this more dynamic, i.e. tell py... | false | 6,234,798 | 0.119427 | 0 | 0 | 3 | Try adding input() at the end of your code. | 0 | 113,747 | 0 | 41 | 2011-06-04T04:59:00.000 | python,turtle-graphics,window-management | Turtle graphics - How do I control when the window closes? | 0 | 1 | 5 | 8,966,931 | 1 |
0 | 0 | When using wxPython, is it possible to remove or disable the "Preferences" menu item that gets automatically created in the Python menu on OS X? | true | 6,265,356 | 1.2 | 0 | 0 | 1 | For the benefit of others that may run into this, I figured out the solution: "wx.App_SetMacPreferencesMenuItemId(wx.ID_NONE)". The trick is to do this before you create the menu, not after. On wxPython 2.9.1.1 it will ghost out the Preferences menu item (which is good enough for me). On 2.9.2 it will remove the item c... | 0 | 145 | 0 | 1 | 2011-06-07T12:45:00.000 | macos,wxpython | Remove Preferences menu item on OS X apps | 0 | 1 | 1 | 6,540,867 | 1 |
1 | 0 | I want to simulate touch event, keyboard event on mobile device. Can I do it with MonkeyRunner? Also, I have the impression that it only works with SDK?
I want the application to be installed on mobile, which will perform some random touch, keyboard events. Is it possible with MonkeyRunner?
If yes, please provide me he... | false | 6,275,277 | 0.066568 | 0 | 0 | 1 | I want to simulate touch event, keyboard event on mobile device. Can I do it with MonkeyRunner?
From your development machine, yes. Per your question title, you cannot use MonkeyRunner on a device.
Also, I have the impression that it only works with SDK?
Yes.
I want the application to be installed on mobile, which... | 0 | 1,492 | 0 | 0 | 2011-06-08T07:02:00.000 | android,python,monkeyrunner | Can I use MonkeyRunner tool to work in mobile as application | 0 | 1 | 3 | 6,278,753 | 1 |
0 | 0 | I want to listen on a on a UDP socket for data that will be streamed in and draw it on screen as it comes in. I believe that the socket module with bind will be suitable for receiving the data on the socket, but I am not sure on the best manner to proceed in drawing the data. The image dimensions would be known beforeh... | false | 6,285,553 | 0.197375 | 0 | 0 | 2 | kinter is included in Python, you need to install PyQt (or PySide) separately. Qt is more modern, so I would probably try it first if deployment isn't problem. | 0 | 275 | 0 | 0 | 2011-06-08T21:33:00.000 | python,udp,pyqt,tkinter | How would you draw UDP data as it comes in? | 0 | 2 | 2 | 6,285,587 | 1 |
0 | 0 | I want to listen on a on a UDP socket for data that will be streamed in and draw it on screen as it comes in. I believe that the socket module with bind will be suitable for receiving the data on the socket, but I am not sure on the best manner to proceed in drawing the data. The image dimensions would be known beforeh... | true | 6,285,553 | 1.2 | 0 | 0 | 2 | Tkinter has a canvas widget which can be used for drawing. It is vector-based, with primitives for drawing lines, circles, etc. It is very easy to use, and surprisingly powerful.
If your drawing is more like a painting where you are receiving instructions for individual pixels, you can create an image, and with that yo... | 0 | 275 | 0 | 0 | 2011-06-08T21:33:00.000 | python,udp,pyqt,tkinter | How would you draw UDP data as it comes in? | 0 | 2 | 2 | 6,291,949 | 1 |
0 | 0 | Is it possible to integrate Cython and TG2? I have one computation (written in python) which is heavily numerical and would largly benefit from rewriting into C or cython. | true | 6,292,320 | 1.2 | 0 | 0 | 2 | Without you having additionally specificity in your question and not knowing what exactly you mean by 'integrate', all I can offer is that cython provides a fairly simple way of (often dramatically) speeding up certain code written in python either via static typing or calling external c/c++ libraries. If there is only... | 1 | 74 | 0 | 0 | 2011-06-09T11:51:00.000 | python,cython,turbogears,turbogears2 | Mixing cython and turbogears 2.1 | 0 | 1 | 1 | 6,292,855 | 1 |
0 | 0 | I have multiple Tkinter.labels in a row and i would like the user to be able to click and drag their mouse over each one, activating them in the process.
I know about bindings, but i need multiple events in a single binding. Ive been messing around with <Button-1> and <Enter>, however i need a callback to be called ... | true | 6,295,440 | 1.2 | 0 | 0 | 2 | The way you solve this particular problem is to have a binding on ButtonPress and ButtonRelease that sets a flag. Then, in your binding for <Enter> (or any other event) you check for that flag.
However, while the button is pressed you won't get any <Enter> events. This is because the widget you clicked over grabs the p... | 0 | 2,142 | 0 | 2 | 2011-06-09T15:32:00.000 | python,tkinter | Activate other widgets while mouse dragging | 0 | 1 | 2 | 6,296,428 | 1 |
0 | 0 | I am running Ubuntu 10.10, and I installed Python 3.2 today. The system is already running Python 2.6.
I typed idle3.2 in the terminal and it gave me:
IDLE can't import Tkinter. Your Python may not be configured for Tk.
So I searched on Stack Overflow (and in some other places) for a solution, I installed python-tk, ... | false | 6,320,954 | 0.024995 | 0 | 0 | 1 | If you installed python-tk and the system is running python 2.6 then it is most likely that you installed Tkinter for python 2.6. Try installing python3-tk. | 0 | 46,374 | 0 | 8 | 2011-06-12T08:27:00.000 | python,linux,ubuntu,python-3.x,tkinter | IDLE can't import Tkinter. Your Python may not be configured for Tk | 0 | 4 | 8 | 6,338,479 | 1 |
0 | 0 | I am running Ubuntu 10.10, and I installed Python 3.2 today. The system is already running Python 2.6.
I typed idle3.2 in the terminal and it gave me:
IDLE can't import Tkinter. Your Python may not be configured for Tk.
So I searched on Stack Overflow (and in some other places) for a solution, I installed python-tk, ... | false | 6,320,954 | 0.049958 | 0 | 0 | 2 | The problem is caused by the version between python and idle not matching.
U can check your python version by typing : python
Then sudo aptget install the right idle version same with your python version | 0 | 46,374 | 0 | 8 | 2011-06-12T08:27:00.000 | python,linux,ubuntu,python-3.x,tkinter | IDLE can't import Tkinter. Your Python may not be configured for Tk | 0 | 4 | 8 | 13,890,255 | 1 |
0 | 0 | I am running Ubuntu 10.10, and I installed Python 3.2 today. The system is already running Python 2.6.
I typed idle3.2 in the terminal and it gave me:
IDLE can't import Tkinter. Your Python may not be configured for Tk.
So I searched on Stack Overflow (and in some other places) for a solution, I installed python-tk, ... | false | 6,320,954 | 0 | 0 | 0 | 0 | Type "idle-python2.6" in the terminal..it worked for me | 0 | 46,374 | 0 | 8 | 2011-06-12T08:27:00.000 | python,linux,ubuntu,python-3.x,tkinter | IDLE can't import Tkinter. Your Python may not be configured for Tk | 0 | 4 | 8 | 18,475,938 | 1 |
0 | 0 | I am running Ubuntu 10.10, and I installed Python 3.2 today. The system is already running Python 2.6.
I typed idle3.2 in the terminal and it gave me:
IDLE can't import Tkinter. Your Python may not be configured for Tk.
So I searched on Stack Overflow (and in some other places) for a solution, I installed python-tk, ... | false | 6,320,954 | 0.024995 | 0 | 0 | 1 | you need to install tk or tk-dev packages for ubuntu. | 0 | 46,374 | 0 | 8 | 2011-06-12T08:27:00.000 | python,linux,ubuntu,python-3.x,tkinter | IDLE can't import Tkinter. Your Python may not be configured for Tk | 0 | 4 | 8 | 8,566,253 | 1 |
0 | 0 | Every once in a while I like to take a break from my other projects to try to make a classic adventure text-based-game (in Python, this time) as a fun project, but I always have design issues implementing the item system.
I'd like for the items in the game to descend from one base Item class, containing some attribute... | false | 6,325,775 | 0.033321 | 0 | 0 | 1 | You're conflating two meanings of the "destroying" idea. The Item should get destroyed in a "gameplay" sense. Let the garbage collector worry about when to destroy it as an object.
Who has a reference to the Item? Perhaps the player has it in his inventory, or it is in a room in the game. In either case your Invent... | 1 | 1,852 | 0 | 5 | 2011-06-13T01:02:00.000 | python,oop | Managing Items in an Object Oriented game | 0 | 3 | 6 | 6,325,854 | 1 |
0 | 0 | Every once in a while I like to take a break from my other projects to try to make a classic adventure text-based-game (in Python, this time) as a fun project, but I always have design issues implementing the item system.
I'd like for the items in the game to descend from one base Item class, containing some attribute... | false | 6,325,775 | 0 | 0 | 0 | 0 | Assuming you call a method when the item is used, you could always return a boolean value indicating whether it's broken. | 1 | 1,852 | 0 | 5 | 2011-06-13T01:02:00.000 | python,oop | Managing Items in an Object Oriented game | 0 | 3 | 6 | 6,325,828 | 1 |
0 | 0 | Every once in a while I like to take a break from my other projects to try to make a classic adventure text-based-game (in Python, this time) as a fun project, but I always have design issues implementing the item system.
I'd like for the items in the game to descend from one base Item class, containing some attribute... | false | 6,325,775 | -0.033321 | 0 | 0 | -1 | at first: i don't have any python experience, so think about this in a more general way
your item should neither know or care ... your Item should have an interface that says it is something destroyable. containers and other objects that care about things that can be destroyed, can make use of that interface
that destr... | 1 | 1,852 | 0 | 5 | 2011-06-13T01:02:00.000 | python,oop | Managing Items in an Object Oriented game | 0 | 3 | 6 | 6,325,868 | 1 |
0 | 0 | I am trying to make a file manager in python that looks like GNOME default file manager (nautilus) Because I am developing a FilePane plugin for a python written text editor. I don't know if there is a widget to give me the same look of Nautilus. If not, what widgets can I use to get a nice looking file manager? | true | 6,356,190 | 1.2 | 0 | 0 | 0 | I searched GTK API and I found that GTK TreeView does what I want. | 0 | 622 | 1 | 0 | 2011-06-15T10:15:00.000 | python,pygtk,glade | PyGTK Glade File Manager | 0 | 1 | 1 | 6,441,716 | 1 |
0 | 0 | I want to have a table like display on one of panels where the user can fill in data into pre-made columns. I'm not sure what widget will give me this functionality. I want users to be able to edit elements they have already added, and to easily add another element. Any suggestions? | false | 6,362,228 | 0.197375 | 0 | 0 | 3 | Look at Grid or ListCtrl to create the columns. I think Grid is a better choice for editing as you can add TextCtrls or the like to the columns. | 0 | 94 | 0 | 1 | 2011-06-15T18:06:00.000 | python,wxpython | Looking for a wxpython widget that would let user's fill in data like they would in a table | 0 | 2 | 3 | 6,362,267 | 1 |
0 | 0 | I want to have a table like display on one of panels where the user can fill in data into pre-made columns. I'm not sure what widget will give me this functionality. I want users to be able to edit elements they have already added, and to easily add another element. Any suggestions? | false | 6,362,228 | 0 | 0 | 0 | 0 | Try ListCtrl with TextEditMixin - it's pretty neat and offers keyboard navigation to move between cells. | 0 | 94 | 0 | 1 | 2011-06-15T18:06:00.000 | python,wxpython | Looking for a wxpython widget that would let user's fill in data like they would in a table | 0 | 2 | 3 | 6,383,556 | 1 |
0 | 0 | I'm using python GTK under Gnome (Gnome 3 in Fedora 15).
I'd like to catch events when the user double clic on the icon in the tray area.
I found that "activate" signals is called when the user do a single clic, but can't find the signal or a proper way to call a method when the user double clic on it.
How can I do ?
T... | true | 6,370,804 | 1.2 | 0 | 0 | 3 | You can't. Gtk+ itself doesn't even know if it was single or double clicked.
From the Gtk+ documentation about the ::activate signal:
Gets emitted when the user activates the status icon. If and how status icons can activated is platform-dependent.
Interestingly Qt knows about this (it has Trigger and DoubleClick). M... | 0 | 477 | 0 | 3 | 2011-06-16T11:08:00.000 | python,gtk,icons,status | gtk.StatusIcon with double click | 0 | 1 | 1 | 6,477,243 | 1 |
0 | 0 | I am using Qt Designer to set up a simple gui for a program I am writing in which I need to display a column of radio buttons. I want to hide some of the radio buttons (not just disable them) based on whether or not their corresponding port is currently available. The radio buttons are in a group box with a vertical ... | true | 6,390,066 | 1.2 | 0 | 0 | 2 | Insert a vertical spacer below the bottom-most radio button. | 0 | 437 | 0 | 2 | 2011-06-17T18:21:00.000 | python,layout,pyqt4,qt-designer,groupbox | PyQt4 Vertical Layout Autospacing | 0 | 1 | 1 | 6,390,326 | 1 |
0 | 0 | I need to create a link button (gtk.LinkButton) with an URI to a local file. Does anyone know what is a valid URI format for a local file ? I want to specify a relative folder example: ../some_folder/file_i_need_to_open.txt
If this is can't be done, I don't mind putting the file in the same folder as the python source ... | true | 6,395,185 | 1.2 | 0 | 0 | 1 | Something like: file:///usr/bin/ is generally used for local URI. But maybe just /usr/bin/ works too. Have you tried it? | 0 | 396 | 0 | 0 | 2011-06-18T09:51:00.000 | python,pygtk | How to Specify URI to a local File in PyGtk LinkButton | 0 | 1 | 1 | 6,395,227 | 1 |
0 | 0 | I am writing a simple top down rpg in Pygame, and I have found that it is quite slow.... Although I am not expecting python or pygame to match the FPS of games made with compiled languages like C/C++ or event Byte Compiled ones like Java, But still the current FPS of pygame is like 15. I tried rendering 16-color Bitmap... | false | 6,395,923 | 0 | 0 | 0 | 0 | You could try using Psyco (http://psyco.sourceforge.net/introduction.html). It often makes quite a bit of difference. | 0 | 29,233 | 0 | 15 | 2011-06-18T12:15:00.000 | python,performance,pygame,frame-rate | Any way to speed up Python and Pygame? | 0 | 1 | 6 | 6,396,048 | 1 |
0 | 0 | I'm getting a Tkinter error even though it was imported and used yesterday. I have a Windows 7 OS and am running Python 2, so I'm not sure what I'm supposed to do at this point. My google-fu is weak today, I can't seem to bring up anything relevant. Any input would be greatly appreciated. | true | 6,429,397 | 1.2 | 0 | 0 | 1 | This happens when you most likely have more than one Python installed on your system and you're running the program from a version different from the one you programmed it in.
By default, a Python program on your PC will usually be opened in the latest edition of Python. | 1 | 4,656 | 0 | 3 | 2011-06-21T17:25:00.000 | python,debugging,import,tkinter,importerror | "ImportError: No module named Tkinter" even though I've used Tkinter programs as recent as yesterday and no substantial changes were made? | 0 | 2 | 2 | 6,440,612 | 1 |
0 | 0 | I'm getting a Tkinter error even though it was imported and used yesterday. I have a Windows 7 OS and am running Python 2, so I'm not sure what I'm supposed to do at this point. My google-fu is weak today, I can't seem to bring up anything relevant. Any input would be greatly appreciated. | false | 6,429,397 | 0.379949 | 0 | 0 | 4 | You may want to check if the version of the Python interpreter used to run the script got changed somehow.
import tkinter works in python 3 (instead of Tkinter). | 1 | 4,656 | 0 | 3 | 2011-06-21T17:25:00.000 | python,debugging,import,tkinter,importerror | "ImportError: No module named Tkinter" even though I've used Tkinter programs as recent as yesterday and no substantial changes were made? | 0 | 2 | 2 | 12,694,818 | 1 |
0 | 0 | I'm writing a Python application to parse a list of binary files, aggregate statistics on the data in them, and output results. I can easily output these results as a .tsv file, but this program is being written for the convenience of my coworkers, so I'm trying to have it display the results in a new window to sometim... | true | 6,431,487 | 1.2 | 0 | 0 | 2 | I wrote a test program to display the data two ways, once using a frame and grid and once drawing text directly on the canvas.
Using the frame+grid technique, the performance of 100 rows times 10 columns was quite acceptable. When I bumped that up to 200 rows the performance was more than 2x worse, and by the time I go... | 0 | 2,573 | 0 | 0 | 2011-06-21T20:20:00.000 | python,performance,grid,tkinter | Size limitations of Tkinter grid manager | 0 | 1 | 2 | 6,432,380 | 1 |
0 | 0 | I would like to write a Python/wxPython app that implements wx.FileDropTarget. This part is easy. I would also like to show the file icon as it is dragged over the app window and then display a proxy with file icon (and other meta-data, perhaps, like size) within the app window.
I would like to implement this on Window... | false | 6,433,574 | 0.099668 | 0 | 0 | 1 | I think there's not only one portable way to accomplish this ... on windows platforms, default icons for file types associations are stored on the system registry (except for executables where the icon is in the exe resources) and on linux platforms it depends on the desktop environment, each one has its own standards ... | 0 | 600 | 0 | 1 | 2011-06-22T00:29:00.000 | python,windows,filesystems,icons,wxpython | Accessing file meta-data within Python/wxPython | 0 | 1 | 2 | 6,433,722 | 1 |
0 | 0 | I want to be able to load/download a bunch of resources and notify the user of the file that's currently being loaded, but I can't just draw a frame after each file starts loading because v-sync will wait until it can draw a frame before it continues (bottle-necking the loads to less than 60/second).
Is there a way to ... | true | 6,450,283 | 1.2 | 0 | 0 | 1 | You don't specify which version of Direct3D you're using. With D3D9 you can pass D3DPRESENT_DONOTWAIT to your Present() call and it will return D3DERR_WASSTILLDRAWING if the hardware is busy processing or waiting for a vertical sync interval. This means if you have vsync enabled, in your main loop you can just call Pre... | 0 | 1,246 | 0 | 0 | 2011-06-23T06:45:00.000 | direct3d,python-idle,vertical-sync | How can I perform actions while waiting for vertical sync? | 0 | 1 | 1 | 6,458,750 | 1 |
1 | 0 | What's the best way to detect idle state for a silverlight application? I have read quite a few articles on the net by now and usually they are either for wpf/mobile apps etc.
I have created a DispatcherTimer which locks the screen after 5 minutes and it seems that I will have to go to every widget in every screen(my ... | false | 6,451,919 | 0.197375 | 0 | 0 | 2 | Handled events will not bubble up to root control. Instead you should use the AddHandler method with handledEventsToo = true. | 0 | 1,573 | 0 | 6 | 2011-06-23T09:25:00.000 | silverlight,python-idle,dispatchertimer | idle state detection silverlight 4 application | 0 | 1 | 2 | 9,692,923 | 1 |
1 | 0 | I wrote a simple sokoban like 2D game in python that I want to clean up. It's done in a sort-of OO way where each object in the game has a Draw function I can call to redraw the screen. It works out nicely since I can loop through each position on the screen and call the object's draw function.
I am learning about de... | true | 6,462,967 | 1.2 | 0 | 0 | 4 | MVC can be counter-intuitive sometimes, especially when you're first learning OO and discover that having a "draw" method makes things so organized!
Here's an overview of one of many ways you might implement MVC for your game:
Model:
"Box": box_type, pos_x, pos_y
"BoxManager": list(Box)
"GameState": box_manager, playe... | 1 | 1,166 | 0 | 2 | 2011-06-24T03:20:00.000 | python,model-view-controller,oop | MVC Game Design with objects | 0 | 3 | 3 | 6,463,049 | 1 |
1 | 0 | I wrote a simple sokoban like 2D game in python that I want to clean up. It's done in a sort-of OO way where each object in the game has a Draw function I can call to redraw the screen. It works out nicely since I can loop through each position on the screen and call the object's draw function.
I am learning about de... | false | 6,462,967 | 0 | 0 | 0 | 0 | One aspect that I'll just quickly make explicit is that when your model changes, it can't call the view to say "render this change" - because the model shouldn't know about the view(s).
Instead the model raises an event to say it has changed, and the view re-renders as necessary on receiving these. The view(s) know abo... | 1 | 1,166 | 0 | 2 | 2011-06-24T03:20:00.000 | python,model-view-controller,oop | MVC Game Design with objects | 0 | 3 | 3 | 11,327,596 | 1 |
1 | 0 | I wrote a simple sokoban like 2D game in python that I want to clean up. It's done in a sort-of OO way where each object in the game has a Draw function I can call to redraw the screen. It works out nicely since I can loop through each position on the screen and call the object's draw function.
I am learning about de... | false | 6,462,967 | 0 | 0 | 0 | 0 | Refactoring your code to conform to MVC would mean creating a "view" (like that represented your screen, and that view would have (for example) a draw method that took the "model" (a python object that contained all of the block states) and rendered that model to the screen.
Now perhaps all that draw method would do t... | 1 | 1,166 | 0 | 2 | 2011-06-24T03:20:00.000 | python,model-view-controller,oop | MVC Game Design with objects | 0 | 3 | 3 | 6,463,038 | 1 |
0 | 0 | I have all the characters of a font rendered in a PNG. I want to use the PNG for texture-mapped font rendering in OpenGL, but I need to extract the glyph information - character position and size, etc.
Are there any tools out there to assist in that process? Most tools I see generate the image file and glyph data toget... | false | 6,481,333 | 0.099668 | 0 | 0 | 1 | Generally, the way this works is you use a tool to generate the glyph images. That tool will also generate metric information for those glyphs (how big they are, etc). You shouldn't be analyzing the image to find the glyphs; you should have additional information alongside your glyphs that tell where they are, how big ... | 0 | 1,560 | 0 | 2 | 2011-06-26T00:15:00.000 | python,opengl,fonts,bitmap,gimp | Tools to extract glyph data from bitmap font image | 0 | 1 | 2 | 6,481,428 | 1 |
0 | 0 | I'm going to develop a multimedia application which is running mostly on windows.
I don't know whether python is a good choice or not and which GUI library (Wxpython or pyqt) is suitable for that. Maybe pyQt is enough(like it).
The major features of the application include:
Must have a rich GUI, a great look and feel ... | true | 6,499,507 | 1.2 | 0 | 0 | 0 | Python 3 doesn't work with wxPython right now. Python 3 does work with pyQT, but it is under GPL, so you will need to buy a license if you do not want to release your software under the GPL. | 0 | 288 | 0 | 0 | 2011-06-27T22:07:00.000 | python,user-interface,programming-languages,multimedia | A multimedia-rich application for windows, is Python enough good? | 0 | 1 | 1 | 6,499,936 | 1 |
0 | 0 | On the wxwidgets docs, I only found the EnableGridLines, which is set to false, removes both the horizontal and vertical lines, what I wish, is to remove only the horizontal lines on the grid. Is there a possible way to do this? | false | 6,527,640 | 0 | 0 | 0 | 0 | I agree with Mike. Unfortunately wx.grid.Grid.Get[Col|Row]GridLinePen() isn't hooked to the wxPython level, so you can't override those functions in your code. I had been hopeful that returning None would result in the line not being drawn. | 0 | 656 | 0 | 3 | 2011-06-29T21:45:00.000 | python,grid,wxpython,wxwidgets | Remove horizontal grid lines only on wxgrid | 0 | 2 | 2 | 6,539,871 | 1 |
0 | 0 | On the wxwidgets docs, I only found the EnableGridLines, which is set to false, removes both the horizontal and vertical lines, what I wish, is to remove only the horizontal lines on the grid. Is there a possible way to do this? | false | 6,527,640 | 0.291313 | 0 | 0 | 3 | As far as I can tell, you either have all the lines or none of them. Feel free to try cross-posting on the wxPython mailing list to make doubly sure though. | 0 | 656 | 0 | 3 | 2011-06-29T21:45:00.000 | python,grid,wxpython,wxwidgets | Remove horizontal grid lines only on wxgrid | 0 | 2 | 2 | 6,535,996 | 1 |
0 | 0 | I'm new to pyqt and I've been looking for some docs about pyqt and fullscreen mode. but I couldn't find nothing. So here is my question:
is there any way to run a PyQT 4 application on fullscreen? | true | 6,541,771 | 1.2 | 0 | 0 | 47 | use showFullScreen() on your widget. | 0 | 28,015 | 0 | 28 | 2011-06-30T22:22:00.000 | python,pyqt,fullscreen | Fullscreen with pyqt4? | 0 | 1 | 1 | 6,541,995 | 1 |
0 | 0 | I'm using Tkinter in Python, and trying to create code to run when a text box's value is changed. All the code I find online uses a mysterious tk member of Tkinter widgets, and I can't find any documentation on it! I found it's of type tkapp, but there's no documentation on that either.
Where can I find a decent resour... | false | 6,543,413 | 0 | 0 | 0 | 0 | tkapp is the highest "master". If you make a widget on the root window, tkapp is the master of that. | 0 | 2,594 | 0 | 5 | 2011-07-01T03:50:00.000 | python,graphics,tkinter | What is Tkinter's tkapp? | 0 | 1 | 2 | 32,061,918 | 1 |
0 | 0 | I'm working with an API which is distributed as a dll/so file that I need to dynamically link with my python program. To accomplish this, I want to use Cython.
I have been able to, in the past, link with the dll statically. This works well, except that the API comes in four different flavors, with theoretically infini... | true | 6,546,310 | 1.2 | 0 | 0 | 2 | I assume you are talking about writing C modules here. If so yes you can. I don't know what the equivalent on Windows is, but in Linux you can use dlopen and friends. There is a man page for it, and several web sites documenting it. Try this link "http://linux.die.net/man/3/dlopen" it provides you with a nice examp... | 1 | 981 | 0 | 2 | 2011-07-01T09:46:00.000 | python,cython | Cython: Dynamically linking with a dll/so | 0 | 1 | 1 | 6,591,378 | 1 |
0 | 0 | I'm attempting to convert a Python application I coded using the cmd module into a gui. Initially, I came across EasyGui. But after giving it a try, I find that it is very limited, the gui screens are not consistent, and overall not easy on the eyes. I read about IronPython (Python + .NET), but cannot find adequate doc... | false | 6,566,264 | 0 | 0 | 0 | 0 | The best GUI's for Python are tkinter, Qt (PyQt), and wx (wxPython). Search any of those terms to learn more. | 0 | 1,559 | 0 | 0 | 2011-07-03T23:52:00.000 | python,user-interface | Is there a preferred Python gui to use | 0 | 2 | 3 | 6,566,268 | 1 |
0 | 0 | I'm attempting to convert a Python application I coded using the cmd module into a gui. Initially, I came across EasyGui. But after giving it a try, I find that it is very limited, the gui screens are not consistent, and overall not easy on the eyes. I read about IronPython (Python + .NET), but cannot find adequate doc... | true | 6,566,264 | 1.2 | 0 | 0 | 5 | Tkinter is in the standard library, works on all platforms, and is fairly simple and lightweight, but it looks a bit clunky.
WxPython tries to use platform widgets, so it looks a bit better, but it's a separate library. On Linux, I still find it doesn't look quite right.
PyQt is a large, powerful framework - it looks g... | 0 | 1,559 | 0 | 0 | 2011-07-03T23:52:00.000 | python,user-interface | Is there a preferred Python gui to use | 0 | 2 | 3 | 6,566,327 | 1 |
0 | 0 | i have a wxlistbox in a class and i want to update the data inside the listbox from a different class.Is i possible to reload the class while leave the control from another class?if yes ,how?
eg:
i have two classes,Class A and Class B.In class A there is a wxlistbox.while starting the program class A initilise the wxli... | true | 6,581,744 | 1.2 | 0 | 0 | 1 | I would use the SetItems() method, which according to the docs does the following: "Clear and set the strings in the control from a list".
Edit: myListCtrl.SetItems(ListOfStrings)
That will replace all the items in the control with whatever is in the list. | 0 | 169 | 0 | 0 | 2011-07-05T11:13:00.000 | python,wxpython | how to update a wxlistbox from a different class? | 0 | 1 | 1 | 6,584,095 | 1 |
0 | 0 | I am building an application for Android. It will interface with some C++ libraries using Android NDK through JNI. There are also some libraries that are written in Python that I want to call from my Android application (e.g. NTLK). How can I do that?
Please note that SL4A (Scripting Layer for Android) is something dif... | false | 6,596,568 | 0.197375 | 0 | 0 | 1 | I recommend putting the NLP code into web services on a Linux server and calling those from android.
This is quite straight forward in a framework like django. | 0 | 5,930 | 0 | 7 | 2011-07-06T12:44:00.000 | android,python,embed,android-ndk,sl4a | Want to use Python Libraries in Android | 0 | 1 | 1 | 15,260,692 | 1 |
0 | 0 | In a pygame application window, the minimize, resize and close buttons are present. Is there a way to disable the close(X) button? | true | 6,619,923 | 1.2 | 0 | 0 | 6 | I don't think there is, because some window managers don't give you the ability to remove the close button. But you can write an event handler such that the close button does whatever you want, including nothing.
Why do you want to prevent the user from closing? If it's just a matter that you would rather provide an in... | 0 | 1,851 | 0 | 4 | 2011-07-08T04:17:00.000 | python,pygame | how to disable the window close button in pygame? | 0 | 2 | 2 | 6,619,966 | 1 |
0 | 0 | In a pygame application window, the minimize, resize and close buttons are present. Is there a way to disable the close(X) button? | false | 6,619,923 | 0 | 0 | 0 | 0 | Just for the record, another option would be to pass the following argument to the set_mode() method call:
pygame.display.set_mode(..., flags = pygame.NOFRAME)
This however makes the whole frame go away, including the top strip to move the window around and the other buttons, such as minimize, so it's rather overkill f... | 0 | 1,851 | 0 | 4 | 2011-07-08T04:17:00.000 | python,pygame | how to disable the window close button in pygame? | 0 | 2 | 2 | 49,826,543 | 1 |
0 | 0 | I'm trying to use the beforeInsert() signal emitted by the QSqlRelationalTableModel in PyQt. However, even after I make edits to the model, the slot connected to the signal does't run. When exactly is the beforeInsert() signal emitted? Could someone show a working example of the use of beforeInsert(), or beforeUpdate()... | false | 6,634,523 | 0.379949 | 0 | 0 | 2 | The documentation says "This signal is emitted by insertRowIntoTable() before a new row is inserted into the currently active database table". So it sounds like the signal is only emitted when insertRowIntoTable() is called, and not for any other type of model edit. | 0 | 99 | 0 | 0 | 2011-07-09T11:46:00.000 | python,pyqt | PyQt beforeInsert() signal | 0 | 1 | 1 | 6,644,954 | 1 |
0 | 0 | Is there any way to design a rounded corner TextCtrl widget? Actually I am new to wxPython and I am used to swing.
Like in swing, is their any way in wxPython too to customize the border of the widgets? | false | 6,651,098 | 0 | 0 | 0 | 0 | wxPython uses native widgets for the most part. If they don't have a rounded version, then the answer is No. However, wxPython supports custom widgets, so you could create your own text control with whatever features you want. | 0 | 764 | 0 | 0 | 2011-07-11T13:50:00.000 | python,swing,wxpython | Rounded corner border in wxPython | 0 | 1 | 1 | 6,652,801 | 1 |
0 | 0 | In wxPython, there is a ListCtrlAutoWidthMixin which makes sure that the last column in the list uses up all the space available to the list, even when it resizes.
However, I have had problems with the native wxListCtrl on Windows that mean I want to use a different list, like the HyperTreeList that is new in 2.8.12. ... | false | 6,652,365 | 0 | 0 | 0 | 0 | Possibly the best answer would have been to use the UltimateListCtrl from the same library, which shares the same API. However, this too seems to have problems. Still investigating. | 0 | 249 | 0 | 1 | 2011-07-11T15:15:00.000 | python,listview,wxpython | Automatically using maximum column width in wxPython's HyperTreeList | 0 | 1 | 1 | 6,666,289 | 1 |
0 | 0 | So, Iv'e got a pygame application. Right now, it takes a command line argument to specify which display to show the main screen on. However, I'm running it on windows, where it's hard to specify command line input to a graphical application.
So, I'd like to have a very very very simple dialog box which pops up, prompts... | false | 6,656,750 | 0.066568 | 0 | 0 | 1 | Since tkinter is built into Python, it might be better. I prefer wx, but if you just want a few dialogues, tkinter is fine.
You could also just try raw_input('type "1" for low res, "2" for high res'). I think it brings up a dialog window in Windows. | 0 | 2,527 | 0 | 1 | 2011-07-11T21:22:00.000 | python,user-interface,tkinter,pygame | Simplest way to get initial text input in pygame | 0 | 1 | 3 | 6,657,099 | 1 |
0 | 0 | I am trying to install pywin32 for Python 2.6.
I have python installed but it's not in the regular c: drive but on the d: drive . The pywin32 installer does not find it and I cannot give the custom path to it.
I checked, thepython folder is the path. Is there a workaround this issue ? | false | 6,662,536 | 1 | 0 | 0 | 8 | I had the same problem:
On 64 bit Windows, 32 bit apps are being registered under:
[1] HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python
I reckon the installer is expecting to find Python in:
[2] HKEY_LOCAL_MACHINE\SOFTWARE\Python
With regedit and local admin rights, you can export a .reg file of [1], remove all the "Wow6... | 1 | 45,238 | 0 | 7 | 2011-07-12T10:10:00.000 | python,pywin32 | Problem installing pywin32 | 0 | 4 | 11 | 23,008,561 | 1 |
0 | 0 | I am trying to install pywin32 for Python 2.6.
I have python installed but it's not in the regular c: drive but on the d: drive . The pywin32 installer does not find it and I cannot give the custom path to it.
I checked, thepython folder is the path. Is there a workaround this issue ? | false | 6,662,536 | 0.036348 | 0 | 0 | 2 | I had the same issue on Windows 10 64 bit with Python 3.6. It is installed for all users (I guess it uses a different registry hive in case it is installed for current user only).
The problem was that pywin32-220.win32-py3.6.exe searches in registry for HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Python\PythonCore\3.6 whil... | 1 | 45,238 | 0 | 7 | 2011-07-12T10:10:00.000 | python,pywin32 | Problem installing pywin32 | 0 | 4 | 11 | 41,378,346 | 1 |
0 | 0 | I am trying to install pywin32 for Python 2.6.
I have python installed but it's not in the regular c: drive but on the d: drive . The pywin32 installer does not find it and I cannot give the custom path to it.
I checked, thepython folder is the path. Is there a workaround this issue ? | true | 6,662,536 | 1.2 | 0 | 0 | 15 | From the pywin32 README
If the installation process informs you that Python is not found in the
registry, it almost certainly means you have downloaded the wrong version -
either for the wrong version of Python, or the wrong "bittedness".
Are you sure you got the right version for your python and your cp... | 1 | 45,238 | 0 | 7 | 2011-07-12T10:10:00.000 | python,pywin32 | Problem installing pywin32 | 0 | 4 | 11 | 6,662,762 | 1 |
0 | 0 | I am trying to install pywin32 for Python 2.6.
I have python installed but it's not in the regular c: drive but on the d: drive . The pywin32 installer does not find it and I cannot give the custom path to it.
I checked, thepython folder is the path. Is there a workaround this issue ? | false | 6,662,536 | 0 | 0 | 0 | 0 | I ran into this exact problem, but it seemed to me that my situation was a bit different and besides, I didn't want to have to use a registry hack. So I started to post a new question. Here's what I was going to write:
I have both 64-bit and 32-bit versions of Python 3.7 installed on my Windows 7 machine. The 64-bi... | 1 | 45,238 | 0 | 7 | 2011-07-12T10:10:00.000 | python,pywin32 | Problem installing pywin32 | 0 | 4 | 11 | 55,397,320 | 1 |
0 | 0 | I'm a self-taught programmer who jumped into Python as my first language about 7-8 months ago. I'm fairly solid at making things work, though my foundational knowledge is limited thanks to my questionable choice in college to not study computer science.
Beyond Python, I'm not really familiar with C or other lower lev... | false | 6,666,499 | 0.039979 | 1 | 0 | 1 | You should learn both, Objective-C and HTML5. HTML5 isn't very difficult to grasp even if you don't have any experience. | 1 | 5,620 | 0 | 8 | 2011-07-12T15:11:00.000 | iphone,python,objective-c,c | Python to Objective C (Expected Learning Curve) | 0 | 2 | 5 | 6,666,567 | 1 |
0 | 0 | I'm a self-taught programmer who jumped into Python as my first language about 7-8 months ago. I'm fairly solid at making things work, though my foundational knowledge is limited thanks to my questionable choice in college to not study computer science.
Beyond Python, I'm not really familiar with C or other lower lev... | false | 6,666,499 | 0 | 1 | 0 | 0 | Well when i started progamming for Objective-c i was well known in Java, but nothing close to C/Objective-c. It took me around 1 month to learn the basics (using tutorials etc).
There are some really good tutorials on iTunes (search for Objective-c seminar). I also used a couple of pdf's to use them as backup while mak... | 1 | 5,620 | 0 | 8 | 2011-07-12T15:11:00.000 | iphone,python,objective-c,c | Python to Objective C (Expected Learning Curve) | 0 | 2 | 5 | 6,666,588 | 1 |
0 | 0 | I'm trying to use Qt Designer and pyside-uic mydesign.ui > design.py
however, this program doesn't exist. I looked in site packages under python 2.7, and I see:
pyside-lupdate.exe
pyside-rcc.exe
and a bunch of other programs, but there is no such thing as pyside-uic.exe ... why ?? Why is it missing from the installati... | true | 6,684,180 | 1.2 | 0 | 0 | 8 | You should see a /Python27/Scripts/pyside-uic.exe. But I'm wondering why it's not visible (not executable). Maybe it's a packaging problem (permissions, etc). You could try to call it using the complete path. | 0 | 25,947 | 0 | 9 | 2011-07-13T19:03:00.000 | python,qt,pyside | Where is pyside-uic? | 0 | 1 | 6 | 6,685,002 | 1 |
0 | 0 | I have been searching for a way to set the tab order in a tkinter application, that I have been working on. Currently the default order seems to be working from top-down, but it requires using CTRL + Tab to cycle through the controls.
Is there any way to customize the order and, more so, change the CTRL + Tab to just ... | false | 6,687,108 | 0 | 0 | 0 | 0 | I've been searching for ways to skip some widgets while tabbing and found in tkinter's tk_focusNext function description the following: "A widget is omitted if it has the takefocus resource set to 0."
you can set takefocus on widget initialization as an argument. | 0 | 12,387 | 0 | 11 | 2011-07-13T23:59:00.000 | python,python-3.x,tabs,tkinter | How to set the tab order in a tkinter application? | 0 | 1 | 2 | 69,530,509 | 1 |
0 | 0 | I have trouble using PySide in Eclipse.
I installed py26-pyside using macports and added /opt/local/var/macports/software/py26-pyside/1.0.4_0/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/PySide to PYTHONPATH
But I got the above import error.
What am I missing? Thanks | true | 6,721,266 | 1.2 | 0 | 0 | 1 | Add /opt/local/var/macports/software/py26-pyside/1.0.4_0/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages to PYTHONPATH instead of what you have added. | 0 | 8,855 | 0 | 0 | 2011-07-17T00:58:00.000 | python,pyside | ImportError: No module named PySide.QtCore | 0 | 2 | 2 | 6,721,303 | 1 |
0 | 0 | I have trouble using PySide in Eclipse.
I installed py26-pyside using macports and added /opt/local/var/macports/software/py26-pyside/1.0.4_0/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/PySide to PYTHONPATH
But I got the above import error.
What am I missing? Thanks | false | 6,721,266 | 0 | 0 | 0 | 0 | Running Linux, I had the same problem and I don't use PYTHONPATH. Simpler to put /usr/local/lib/python2.6/site-packages in a file called /usr/lib/python2.6/site-packages/local.pth. It's pure python so it should work on other systems. The instructions in site.py are misleading. | 0 | 8,855 | 0 | 0 | 2011-07-17T00:58:00.000 | python,pyside | ImportError: No module named PySide.QtCore | 0 | 2 | 2 | 6,988,124 | 1 |
0 | 0 | I am just newbie to python and now, I am writing an interface in Nokia n79 phone. My question is that is it possible to install PyQt4 in nokia n79 or possible to run PyQt4 in Nokia n79. If yes, how? Is there anyway that I could take as a reference or take as an example. | true | 6,736,179 | 1.2 | 0 | 0 | 0 | There are python packages for symbian, look for python for S60. It's an open source project. Download the sis file to your phone and install it... good luck. | 1 | 170 | 0 | 0 | 2011-07-18T16:32:00.000 | python,user-interface,mobile,pyqt4 | PyQT4 installation in nokia n79 | 0 | 1 | 1 | 6,737,107 | 1 |
0 | 0 | I have a project in Python 2.7 and wxPython. I have both IDLE and Boa Constructor available as IDEs.
I need to change one or more properties of a GUI object, such as a button, at run time - especially size, location, and text (the latter in buttons and labels).
How do I change these properties at run time? Mind you, I'... | false | 6,736,195 | 0.099668 | 0 | 0 | 1 | Changing the widget's label or value are simple things. You can probably change a widgets location if you are using absolute positioning, but I think that would be counter-intuitive for the user. I know I wouldn't want my Close button to change locations all the time. I think you can set the size using its SetSize() me... | 1 | 249 | 0 | 0 | 2011-07-18T16:34:00.000 | python,properties,wxpython,runtime,wxwidgets | Change an object's properties at run time? | 0 | 1 | 2 | 6,737,329 | 1 |
0 | 0 | I'm new to programming and thought Python would be a good language to learn. Most of the tutorials I found were 2.7 based so I started to learn using that version. I've recently found a tkinter tutorial that I'd like to try out but I'm having a problem. If I run a script it will use Python 2.7 which contains Tkinter an... | false | 6,737,694 | 0 | 0 | 0 | 0 | It depends on what you are trying to do. You can have them coexist because 3.2 is backwards-compatible. Now you can install both versions on your computer 3.2 and 2.7, but 3.2 unfortunately will have to be used in IDLE....ugh.... Just install both and then depending on which one you want to use. Run that IDLE for eithe... | 1 | 15,701 | 0 | 10 | 2011-07-18T18:40:00.000 | python | How to I get Python 2.x and 3.x to co-exist? | 0 | 1 | 5 | 6,738,871 | 1 |
0 | 0 | How can I use MonkeyRunner to switch the screen mode(Portrait mode and Landscape mode)? | false | 6,741,863 | 0.066568 | 0 | 0 | 1 | There is a indirect way,you can toggle between portrain & landscape, but only the setting page.Steps:-
1.Disable auto-rotate screen option in settings page,keep the same page open.
2.Keep device in horizontally(It wont go to landscape mode as auto rotate is disabled
3.Get coordinates of disable/enable by enabling ... | 0 | 1,576 | 0 | 3 | 2011-07-19T03:01:00.000 | android,python,monkeyrunner,monkey | Switch the screen mode with MonkeyRunner? | 0 | 3 | 3 | 11,164,138 | 1 |
0 | 0 | How can I use MonkeyRunner to switch the screen mode(Portrait mode and Landscape mode)? | false | 6,741,863 | 0 | 0 | 0 | 0 | If its a physical device then I do not know of a way to change the screen mode without actually physically putting the device on its side. | 0 | 1,576 | 0 | 3 | 2011-07-19T03:01:00.000 | android,python,monkeyrunner,monkey | Switch the screen mode with MonkeyRunner? | 0 | 3 | 3 | 6,820,953 | 1 |
0 | 0 | How can I use MonkeyRunner to switch the screen mode(Portrait mode and Landscape mode)? | false | 6,741,863 | 0.066568 | 0 | 0 | 1 | There is no such way. | 0 | 1,576 | 0 | 3 | 2011-07-19T03:01:00.000 | android,python,monkeyrunner,monkey | Switch the screen mode with MonkeyRunner? | 0 | 3 | 3 | 8,223,351 | 1 |
0 | 0 | I can't find anything in the docs. All the code I find is messy and all over the place;
all I want to do, is have a table take up the whole frame, and have 6 columns;
ID
Name
Author
Type
Tags
More Info
The "More Info" column should have a button, which will call a function with the ID column as param. How would I do ... | true | 6,749,250 | 1.2 | 0 | 0 | 0 | Have you thought about using a ListCtrl instead? I think that might work better. I especially like the ObjectListView widget, which is a nice object oriented wrapper of the ListCtrl.
Note that neither the grid nor the ListCtrl really support buttons in their cells, although the grid might work better by using a custom ... | 0 | 1,980 | 0 | 0 | 2011-07-19T14:55:00.000 | grid,wxpython | wxPython Tables to display data on full frame | 0 | 1 | 1 | 6,750,499 | 1 |
0 | 0 | Title says it all.I can't find a way to do it... .Refresh() doens't do anything, other than crash the program.
The situation I'm in, is that I have a frame which is launched from the "main" frame. This frame makes changes to the "main" frame's menu bar and panel. What can I call to refresh the main frame, from the seco... | true | 6,750,717 | 1.2 | 0 | 0 | 0 | This one could be done with pubsub. Have the second frame publish a message to the first frame telling it to refresh. I actually think you'll want to use Layout() though. That's what I usually use when I remove or add visible elements. You shouldn't need to Refresh() a menu when removing items from it. At least, the ex... | 0 | 1,371 | 0 | 0 | 2011-07-19T16:37:00.000 | wxpython,refresh,frames | wxPython refresh frame | 0 | 1 | 1 | 6,751,443 | 1 |
0 | 0 | I have a list L of objects of my class A. This class implements __str__/__repr__, so each object has it's own string representation (not necessary unique). I have a GUI in pygtk, where I have a TreeView widget with only one column. I want to populate it with string representations of the objects in L, but then I want t... | false | 6,752,146 | 0 | 0 | 0 | 0 | If the strings are unique you can use a dictionary to link the strings with the objects by using the strings as keys. In this case you can find the objects by its string. | 0 | 2,143 | 0 | 6 | 2011-07-19T18:24:00.000 | python,pygtk,gtktreeview | Custom objects in ListStore/TreeStore | 0 | 1 | 3 | 6,755,133 | 1 |
1 | 0 | I have a button on a new form. When this button clicked I need a show some information on new form using label /or other component/. How to do it in OpenERP 6? I don't have any idea. Please give me a hand. thanks. | false | 6,755,995 | 0 | 0 | 0 | 0 | are you trying to raise any kind of error message or you want to have confirmation ?
if you want to raise exception, then it's possible , check in the addons/account.py
you'll find something that you are looking for. | 0 | 103 | 0 | 0 | 2011-07-20T01:24:00.000 | python,openerp | Dynamically create a message | 0 | 1 | 2 | 6,854,128 | 1 |
0 | 0 | I have a Python GUI that uses Tkinter. I have to SSH into another place to get data. I start a new thread to do this so that the GUI doesn't hang. During this time, I want to pop up a screen that lets the user know it is loading. Once the program is finished getting the data, I want to close the loading screen. What mu... | true | 6,764,217 | 1.2 | 0 | 0 | 0 | Have your thread set a flag when it is done. Have the GUI periodically check for that flag and dismiss the window when it is set.
You can check for the flag by creating a function that checks for the flag, and if it's not set it uses after to have itself run again a few hundred ms later. The window won't go away immedi... | 0 | 163 | 0 | 0 | 2011-07-20T15:13:00.000 | python,multithreading,user-interface,consumer,producer | How do I close a loading screen right when the other thread is finished in Python using Tk? | 0 | 1 | 1 | 6,766,383 | 1 |
0 | 0 | For those of you who have written fairly complex PyQt applications, what tips and tricks would you offer for speeding up your applications? I have a few examples of where my program begins to slow down as it grows larger:
I have a 'dashboard' written that is destroyed and re-created when a user clicks on an item in a ... | true | 6,764,329 | 1.2 | 0 | 0 | 8 | I'm not sure if this is exactly the same thing you are doing, but it sounds similar to something I have in some apps, where there is some list of custom widget. And it does significantly slow down when you are creating and destroying tons of widgets.
If its an issue of lesser amounts of total widgets, but just being cr... | 0 | 3,849 | 0 | 6 | 2011-07-20T15:21:00.000 | python,optimization,pyqt | Optimizing your PyQt applications | 0 | 2 | 2 | 6,821,582 | 1 |
0 | 0 | For those of you who have written fairly complex PyQt applications, what tips and tricks would you offer for speeding up your applications? I have a few examples of where my program begins to slow down as it grows larger:
I have a 'dashboard' written that is destroyed and re-created when a user clicks on an item in a ... | false | 6,764,329 | 0.099668 | 0 | 0 | 1 | Are you using QNetworkAccessManager to load you images? It has cache support. Also it loads everything in background with finishing callbacks.
I don't really understand what your dashboard is doing. Have you think about using QWebkit? Maybe your dashboard content is easy to be implemented in HTML?
PS. I don't like thre... | 0 | 3,849 | 0 | 6 | 2011-07-20T15:21:00.000 | python,optimization,pyqt | Optimizing your PyQt applications | 0 | 2 | 2 | 6,774,281 | 1 |
0 | 0 | I'm using Python 2.7, PyGTK 2.24, and Glade 2.8.0. I'm trying to set an image to (stretch to) fill all of the given space, but I cannot find the properties to do that. Furthermore, I may need to shrink images to fit sometimes as well.
How do I do those two things in Glade? | true | 6,795,169 | 1.2 | 0 | 0 | 0 | Glade does not allow for stretching images. This must be done in code, by scaling the pixbuf, creating a pixmap and mask from it, and then creating the image from the pixmap. | 0 | 238 | 0 | 1 | 2011-07-22T19:37:00.000 | python,image,pygtk,glade | Set Image to Fill PyGTK | 0 | 1 | 1 | 7,046,931 | 1 |
0 | 0 | This is my first post to stack overflow. I've been lurking this site for information for years, and it's always helpful, so I thought that I would post my first question.
I've been searching for some similar examples, but can't seem to find anything.
Ultimately, I'm trying to write a simple text ui for finding false ... | false | 6,807,808 | 0 | 0 | 0 | 0 | I don't know anything about ncurses, but using Tkinter or one of the other GUI toolkits, it could be done with a canvas. You would first set the scroll region, then
bind the "h" key so it sets a highlight variable to True,
bind a mouse click to a function that retrieves the location to start,
bind the left and right... | 1 | 9,844 | 0 | 8 | 2011-07-24T15:44:00.000 | python,ncurses,tui | Highlighting and Selecting text with Python curses | 0 | 1 | 2 | 6,808,886 | 1 |
0 | 0 | the subject says it all: is it possible to take an image present in the clipboard and save it to file under Tkinter? | false | 6,817,600 | 0 | 0 | 0 | 0 | Well tkinter uses the PIL for most of its advanced image stuff, in which case this problem is quite simple: Just use Image.frombuffer(mode, size, data) with the bytebuffer representing the image and then save it ala im.save(filename)- if you want a special format you can also specify it.
If you want to do it without th... | 0 | 951 | 0 | 0 | 2011-07-25T14:23:00.000 | python,tkinter | save the image in the clipboatd - in Python/Tkinter | 0 | 1 | 2 | 6,818,171 | 1 |
0 | 0 | How can I disable a wxFrame from being resized by the user? If there's a flag to put in when creating the frame, what is it? | false | 6,829,853 | 0.066568 | 0 | 0 | 1 | You can use SetSizeHints (or SetMaxSize and SetMinSize) to restrict the maximum and minimum sizes or th | 0 | 16,096 | 0 | 11 | 2011-07-26T12:16:00.000 | resize,wxpython,frame | wxPython Disable Frame Resizing | 0 | 1 | 3 | 6,829,965 | 1 |
0 | 0 | i am trying to install pygtk on my mac which then asked me to install pygobject which then asked me to get gobject-introspection . the problem i have in this installation is while configuring it shows this error :
checking for FFI... no
checking for ffi.h... configure: error: ffi.h not found
please do help me with ... | false | 6,864,484 | 0 | 0 | 0 | 0 | ffi.h is provided by the package libffi-dev, which is actually from the gcc source package. and most probably it's available for linux. | 0 | 2,065 | 0 | 0 | 2011-07-28T19:22:00.000 | python,pygtk,gobject,pygobject | problem with configuring gobject-introspection for pygobject and pygtk | 0 | 1 | 3 | 6,864,549 | 1 |
0 | 0 | I'm not sure on how to articulate this...
I have a Tkinter window, and I need to hide half of this window when a button is pressed.
However, I need the left-most side to be hidden, so that the window is now half the size it originally was,
and shows the right half of the original window.
All of Tkinter's resize fu... | false | 6,870,118 | 0.132549 | 0 | 0 | 2 | You can use right-anchored geometry specifications by using a minus sign in the right place:
123x467-78+9
However, I don't know if this will work on Windows (the above is an X11 trick, and I don't know if it is implemented in the platform-compatibility layer or not); you might have to just calculate the new position gi... | 0 | 1,136 | 0 | 0 | 2011-07-29T07:51:00.000 | python,resize,tkinter,tk | Resize Tkinter Window FROM THE RIGHT (python) | 0 | 2 | 3 | 6,870,304 | 1 |
0 | 0 | I'm not sure on how to articulate this...
I have a Tkinter window, and I need to hide half of this window when a button is pressed.
However, I need the left-most side to be hidden, so that the window is now half the size it originally was,
and shows the right half of the original window.
All of Tkinter's resize fu... | false | 6,870,118 | 0 | 0 | 0 | 0 | My IT teacher had a suggestion:
Add a Scrollbar out of sight,
and after resizing the root window,
force the scrollbar to scroll all the way to the right.
(So I guess I'd have to create a canvas,
pack all my widgets to the frame,
pack the frame to the canvas,
configure the canvas with the scrollbar?)
I'm not sure if... | 0 | 1,136 | 0 | 0 | 2011-07-29T07:51:00.000 | python,resize,tkinter,tk | Resize Tkinter Window FROM THE RIGHT (python) | 0 | 2 | 3 | 6,954,676 | 1 |
0 | 0 | I have a USB camera (uEye) which has a C++ interface allowing you to configure some features of the camera. The C++ program can read the image data from the camera and store it somewhere in pre-allocated memory. All of this runs under Windows.
Python with numpy gives me a simple environment to manipulate images and spe... | false | 6,871,537 | 0.197375 | 1 | 0 | 2 | Since you say the device has a "C++ interface", I assume it provides a header file + DLL which you can link to and control the device via an API. In such a case, the fastest approach would be to wrap this API in Python (using Swig or other C++-to-Python API tools). This will provide a very low overhead of just a couple... | 0 | 1,214 | 0 | 1 | 2011-07-29T10:08:00.000 | c++,python,windows,ipc | Share video data between C++ and Python | 0 | 1 | 2 | 6,872,320 | 1 |
0 | 0 | I'd like my wxPython application to support cut/copy/paste operations between different running instances of the application. Is it OK to simply pickle a data structure, copy it to clipboard as text, and then unpickle it for paste operations?
I know I'd have to check the data for some sign that it's from my app. Or cou... | false | 6,877,326 | 0.099668 | 0 | 0 | 1 | You should not trust data from the clipboard for unpickling, unless you have a sure way to make sure it was wrtten by your app, and has not been altered.
From the python documentation:
Warning The pickle module is not intended to be secure against
erroneous or maliciously constructed data. Never unpickle data
rec... | 0 | 261 | 0 | 2 | 2011-07-29T18:18:00.000 | python,wxpython,clipboard,pickle | Is it OK to pass complex data structures through the clipboard with wxPython? | 0 | 2 | 2 | 6,878,114 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.