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 will admit that starting programming on your own as a newbie can seem a bit daunting. However after toying around very basically in both Python and currently C++ I'm wondering if C may be more suitable for a hobbyist. By hobbyist I mean someone who foresees no real future in actually programming for a living but rath...
false
7,909,666
0.291313
1
0
3
You're looking at this wrong. What's your goal? If your goal is to "learn a language" then you are wasting your time. That is like investing your time into learning to use photoshop with no ambition to ever create any neato graphics. Instead of focusing on the tool, focus on what you want to do with it. If I learn ...
1
784
0
2
2011-10-26T22:23:00.000
c++,python,c
Learning programming as a hobbyist... the merits of C vs C++
0
1
2
7,909,723
1
0
1
I recently downloaded OpenCV 2.3.1, compiled with the CMake flags withQt and withQtOpenGL turned on. My Qt version is 4.7.4 and is configured with OpenGL enabled. Supposedly I only need to copy cv2.pyd to Python's site-package path: C:\Python27\Lib\site-packages And in the mean time make sure the OpenCV dlls are some...
false
7,940,848
0
0
0
0
Probably need the qt dll's in the same place as the opencv dlls - and they have to be the version built with the same compiler as opencv (and possibly python)
0
488
0
2
2011-10-29T18:33:00.000
python,qt,opencv,import
Error when importing OpenCV python module (when built with Qt and QtOpenGL)
0
1
1
7,940,923
1
0
0
I use Qt4 Designer and I want that when I click on the "yes" button, some code will execute. And when I click on the "no", some other code will be execute. How can I do it?
false
7,964,869
1
0
0
7
Right-click on your widget Select "Go to slot..." Select a signal and click OK Your custom slot declaration and definition for that signal will be added to *.cpp and *.h files. Its name will be generated automatically. upd: Sorry, I didn't notice that the question is about Python & QtDesigner itself, I was thinking of...
0
38,462
0
22
2011-11-01T09:59:00.000
python,qt4,qt-designer
Qt Designer: how to add custom slot and code to a button
0
2
2
34,307,822
1
0
0
I use Qt4 Designer and I want that when I click on the "yes" button, some code will execute. And when I click on the "no", some other code will be execute. How can I do it?
false
7,964,869
1
0
0
45
Click on the Edit Signal/Slots tool. Create a connection for your button. For this, select your button in the designer by pressing on it with the left button of the mouse. Move the mouse to some place in the main window to create a connection with the main window (it is like a red line with a earth connection). When yo...
0
38,462
0
22
2011-11-01T09:59:00.000
python,qt4,qt-designer
Qt Designer: how to add custom slot and code to a button
0
2
2
7,965,081
1
1
0
I wonder if there's a python GUI like pyqt etc. which works purely with html and javascript for layouting desktop applications... Do you know if there are projects like this? Does this make sense at all ;-) Or it it just me finding that a nice tool...
false
7,967,575
0
0
0
0
you could always use django, django templates support html, js, css, php etc.
0
3,024
0
5
2011-11-01T13:59:00.000
python,html,css,user-interface
HTML/Javascript/CSS GUI for the development of desktop applications with python?
0
2
3
7,967,656
1
1
0
I wonder if there's a python GUI like pyqt etc. which works purely with html and javascript for layouting desktop applications... Do you know if there are projects like this? Does this make sense at all ;-) Or it it just me finding that a nice tool...
false
7,967,575
0.132549
0
0
2
Since you mention PyQt yourself, you could perhaps just create a simple GUI using these tools, with your entire application made up of a QtWebKit module. Then just point to some files you created locally, and browse them using your appliction? But, this would not be any different compared to using a normal browser, so ...
0
3,024
0
5
2011-11-01T13:59:00.000
python,html,css,user-interface
HTML/Javascript/CSS GUI for the development of desktop applications with python?
0
2
3
7,967,652
1
0
0
I developed an application with wxPython and used cx_freeze to covert it to a .exe. I installed the app on WinXP and it works fine. My only misgiving is that the gui app is running with a command prompt behind it. How can I get rid of this command prompt? I imagine that it is there to display errors etc.... There must ...
false
7,970,055
0
0
0
0
You can rename your .py file to .pyw it will then run without displaying the console.
0
370
0
0
2011-11-01T17:06:00.000
windows,wxpython
Running a wxPython application in a Windows environment w/o the command prompt displaying
0
1
2
7,970,931
1
1
0
Can I port existing python scripts on android using SL4A or ASE ? What I specifically want to do is to create an android application with normal UI elements and run the python scripts from the application itself, get the output and display it. Is this possible ?
false
7,995,202
0
0
0
0
I think, what you want to do is make an independently apk file, that includes the python interpret and your script code. I don't know if this can be done in Android. The only whay I know is running your script from Android Scripting Environment.
0
1,064
0
4
2011-11-03T12:53:00.000
android,python,sl4a
Android and Python
0
2
4
7,995,273
1
1
0
Can I port existing python scripts on android using SL4A or ASE ? What I specifically want to do is to create an android application with normal UI elements and run the python scripts from the application itself, get the output and display it. Is this possible ?
true
7,995,202
1.2
0
0
2
Personnaly I think that you ask implicitly for three points: Compatibility Desktop/Mobile The first is the compatibility between the python library on the phone and the python library in your computer. If you don't use third party library and be sure to include the extra python library provided by sl4a, you should gene...
0
1,064
0
4
2011-11-03T12:53:00.000
android,python,sl4a
Android and Python
0
2
4
7,995,341
1
0
0
I've got a pygtk app which uses gtk print_run_page_setup_dialog. For some reason, some widgets (siblings to button that invoked the dialog) are no more redrawn after closing this dialog. Forcibly calling queue_draw on them works fine. I'd like to identify where are the events going, and reconnect them to proper locatio...
false
8,008,220
0
0
0
0
It sounds incredibly unlikely that the dialog should somehow mess with event handler connections for unrelated widgets. Make sure the dialog is not stuck in a nested main loop (the call you mention has run in its name, implying a call to gtk_main() is taking place to make the dialog modal).
0
43
0
0
2011-11-04T10:59:00.000
python,gtk,pygtk
Redraw events lost?
0
1
1
8,008,432
1
0
0
I am porting my console app to a QT gui. The app get data from a website and prints the rsult line by line in the console ( I use spyder). Each line are a few strings. Now I want to add a gui to the app so others can use the app as well. With QT designer I designed a nice gui. In a Main module I call the UI. Now I am ...
false
8,022,035
0.197375
0
0
1
I usually use QTextBrowser for a "logging" widget. Just create a QTextBrowser widget in your main window (i.e. self.log_widget = QTextBrowser()) Add it to some layout to be visible and part of the window Log messages to it with the append method (which accepts a string). (i.e. self.log_widget.append('Hello')) QTextBr...
0
970
0
1
2011-11-05T17:46:00.000
python,qt,widget,pyside
Print results in Qt widget iso console
0
1
1
8,022,220
1
0
0
So I've been tinkering with a few different GUI's but I haven't been able to even find a point to begin researching this question: How do I make a GUI like Steam (Digital distribution app) has? More specifically, I'm interested in how they manage to make their SHIFT+TAB menu pop up in-game, without disrupting/pausing/e...
false
8,059,845
-0.197375
0
0
-2
Hmm, that looks very much like they are using Adobe AIR or maybe Flash.
0
1,878
0
0
2011-11-09T03:00:00.000
python,user-interface
Programming a GUI Like Steam?
0
1
2
8,059,885
1
0
0
I have a few functions written in C for a game project. These functions get called quite a lot (about 2000-4000 times per second). The functions are written in C for raw speed. Now, the easiest way for me to include these functions into Python is to use ctypes. The alternative is to write a C extension to Python around...
true
8,067,171
1.2
1
0
18
I've compared the performance of a C extension vs. a ctypes wrapper. In my particular test, the difference was about 250x. There were multiple calls into the C library so the ctypes wrapper was also executing Python code. The running time for the C library was very short which made the extra overhead for Python code ev...
0
7,501
0
25
2011-11-09T15:21:00.000
python,c,ctypes,overhead
ctypes vs C extension
0
2
2
8,069,179
1
0
0
I have a few functions written in C for a game project. These functions get called quite a lot (about 2000-4000 times per second). The functions are written in C for raw speed. Now, the easiest way for me to include these functions into Python is to use ctypes. The alternative is to write a C extension to Python around...
false
8,067,171
1
1
0
9
The directly C coded interface has the potential to be much much faster. The bottleneck is the interface from Python to C and marshalling arguments and results may for example involve copying strings or converting Python lists to/from C arrays. If you have a loop that makes several hundred of these calls and some of th...
0
7,501
0
25
2011-11-09T15:21:00.000
python,c,ctypes,overhead
ctypes vs C extension
0
2
2
8,067,399
1
0
0
I've been requested to create an application with a webview in it. I've tried to import QtWebKit module but I have this error: Traceback (most recent call last): File "", line 1, in ImportError: dlopen(/Library/Python/2.6/site-packages/PyQt4/QtWebKit.so, 2): Symbol not found: _kCFWebServicesProviderDefaultDis...
false
8,077,703
0.197375
0
0
1
I was able to fix the problem by upgrading to MacOSX Lion, but if that is not an option I would just ensure that PyQt4 is not using qt4.8, which is where this issue was introduced. If I remember correctly, everything works well with qt4.7.4
0
503
0
1
2011-11-10T09:57:00.000
python,macos,pyqt,osx-leopard,qtwebkit
PyQt4 ImportError for QtWebKit‏ on Mac OS Leopard
0
1
1
8,760,805
1
0
0
I started new clear Main Window project, There are 4 Objects: MainWindow, centralWidget, menubar, and statusbar. I need to set default layout inside the window, so probably for centralWidget. But I didnt found way how to do it. I can get LayoutWidget with some particular size into centralWidget. But I want to set layou...
false
8,095,062
0.099668
0
0
1
Add some widgets to the central widget first. Then select the central widget and use the "Layout in a Grid", "Layout Vertically", etc buttons on the toolbar to add a main layout. The layouts in the "Widget Box" side-bar are used for adding child layouts to a main layout.
0
2,793
0
1
2011-11-11T14:04:00.000
python,qt,pyqt
pyqt designer and layout for central widget
0
2
2
8,095,328
1
0
0
I started new clear Main Window project, There are 4 Objects: MainWindow, centralWidget, menubar, and statusbar. I need to set default layout inside the window, so probably for centralWidget. But I didnt found way how to do it. I can get LayoutWidget with some particular size into centralWidget. But I want to set layou...
true
8,095,062
1.2
0
0
3
Right click anywhere within your centralWidget go to the Lay Out sub menu and select the Layout you want. This will be applied automatically to all contents of your centralWidget. In order to see how it works place inside it 2 or 3 push buttons and try changing the layouts.
0
2,793
0
1
2011-11-11T14:04:00.000
python,qt,pyqt
pyqt designer and layout for central widget
0
2
2
8,095,337
1
0
0
I am developing a software based on embedded Python and C++. I want to secure some of my python code and prevent people from copying it. For now I am using PyRun_SimpleString to execute the python code and the string is generated using my C++ code. If I use this method, will it secure the Python code from being copie...
true
8,116,901
1.2
0
0
0
So, as I understand it the actual program will not exist in the executable, either in python source form, nor in 'marshalled' form (basically .pyc image) or compiled form, though I guess it will exist in some encrypted or obfuscated form which is converted into python source at run time. This definitely makes it harder...
1
409
0
1
2011-11-14T03:12:00.000
python,security,embed
Can python source code executed using PyRun_SimpleString be extracted?
0
1
1
8,116,988
1
0
0
I have a library and some head files, no c++ source code, I want to use it with python. I tried py++, but gccxml report error. I tried swig, but some many "undefined symbol" errors. Are there some smart tools can do such things automatically?
false
8,119,799
0
0
0
0
This approach requires a bit a bit of work, and might not be feasible if you have a lot of functions, that you want to wrap/the functions use a lot of c++ intrinsic types as arguments/return values. If that is not the case, you can define some c-wrapper functions, with the "extern c" keyword in front of them, with pur...
0
2,475
0
3
2011-11-14T09:52:00.000
c++,python
How to wrap a c++ library for python?
0
1
3
8,120,273
1
0
0
I checked out wxPython and wxWidgets into two directories C:\dev\wx\wxPtyhon and C:\dev\wx\wxWidgets: mkdir /D c:\dev\wx\ cd c:\dev\wx git clone https://github.com/wxWidgets/wxPython.git git clone https://github.com/wxWidgets/wxWidgets.git I successfully build wxWidgets by running: cd wxwidgets\build\msw mingw32-...
false
8,125,968
0.197375
0
0
1
On Linux I got what seemed like an identical error. I removed the error in this manner: I used the find command to get a list of wx-config programs From the list, I chose a wx-config that seemed right & used its full path for WX_CONFIG
0
727
0
1
2011-11-14T18:01:00.000
wxpython,wxwidgets
How to build wxPython trunk with mingw on Windows?
0
1
1
10,554,783
1
0
0
I am trying to import a python library into SL4A. From my understanding, the easiest way to do this is to import the zipped files (egg files) of the python library into the SD Card and then import it into SL4A. Since I do not have an android device yet, I am working with the emulator. Whenever I try to push the zipped ...
true
8,141,746
1.2
0
0
0
You can create your own sdcard image, put files on it and after that mount in emulator. To create image you can use mksdcard <size> <file>: mksdcard 1024M sdcard1.iso. After that you need to mount sdcard: mount -o loop sdcard1.iso /mnt/cdrom/. Next step: copy files, umount /mnt/cdrom/ and point to image in virtual mach...
0
1,245
0
0
2011-11-15T19:09:00.000
android,python,android-emulator,sl4a
ADB push command android emulator
0
1
1
8,142,934
1
0
0
I'm a beginning programmer and i need a way to get python to recognize a keyboard event. So far i can only find these methods in vPython or tkinter, and i want to simply use the normal python shell. if anyone can help me with a module name/where i could download a module for free that would be very helpful. or simply t...
false
8,161,108
0.197375
0
0
1
There is no generic "keyboard event", they all depend on what your environment is. In a terminal there are no keyboard events at all, you simply get sent text on stdin. In Windows you need to use the Win32, on Unix you need to use the X11 API and on Mac you have to use whatever OS X uses is it Cocoa?). wxPython and tk...
0
318
0
0
2011-11-17T01:42:00.000
python-3.x,keyboard-events
Recognition of keyboard event in python
0
1
1
8,161,308
1
0
0
I need to add a popup dialog box on my GUI. So, when ever I hover my mouse over a label, it should be able to show a popup( Like the type we get while hovering over a file in windows). It should also disappear as soon i move away the mouse. To start with, I am not even sure which module or class to use. I tried menu, ...
false
8,163,195
0.066568
0
0
1
Take a look at the Balloon widget in the Tix package. I think it is just what you are looking for.
0
863
0
3
2011-11-17T06:50:00.000
python,popup,tkinter,tk,ttk
Popup Dialog in Tkinter/Python
0
1
3
8,183,103
1
0
0
So I'm coding Pacman in Python just for fun and I want to create pacman's open face (when he is eating food) using Tkinter graphics. How exactly do I draw an open face? I was thinking about using canvas.create_arc to create the open mouth but it doesn't work properly :( Any help? Thanks!
true
8,176,599
1.2
0
0
2
You are correct that you would use the create_arc method. Set the start to 45 and the extent to 270 and it will look like pacman is facing to the right with his mouth open. Since you are just learning I'll not post the exact code so you'll have a chance to figure it out on your own.
0
2,778
0
2
2011-11-18T01:10:00.000
python,tkinter,pacman
Drawing Pacman's Face in Tkinter
0
1
2
8,189,097
1
0
0
I want to create a simple project (the language doesn't really matter/but I prefer C++) which simply takes a window title as it's input and duplicate it's visual part, bit by bit, to a new window. just like a mirror better I'd say. As far as I remember there was a win32 API for this but I can't remember, so would you p...
false
8,196,618
0
0
0
0
You can get DC of first window, and get DC of second window. And after this do BitBlt or StretchBlt. It has to work... But I don't know what about DirectX/Open-Gl... I think it has to work too. But anyway. It won't take much time to check it.
0
226
0
3
2011-11-19T19:24:00.000
c++,python,c,winapi,api
How to duplicate a window's clientarea to another window?
0
1
2
14,110,911
1
0
0
I have this cellphone which runs Android OS 2.6. Due to some reasons, I want to write code directly on my cellphone just as what we do in front of our PC. So, Can we make the Android cellphone a develop-platform? I mean write/compile/run C code on Android cellphones? If we can, how?
false
8,200,317
0.066568
0
0
1
I installed sl4a which eventually gave me a sandboxed perl/python/tcl/lua enviroment. I then found their binaries in the shell and relocated them to my path so I could call them from cli. I also purchased c4droid and found that it had the tiny c binary in the shell.
0
4,409
0
2
2011-11-20T08:24:00.000
android,python,c,platform
Write C/C++/Python code on an Android cellphone
0
1
3
8,921,098
1
0
0
that it is possible to get the mouse position in wxpython using event.GetPosition() however, is it possible to get the position of a mouse in a sizer? Would this work even in an expanding sizer? Thanks.
true
8,221,586
1.2
0
0
3
The X,Y position in a sizer is exactly the same as the window that the sizer belongs to, assuming that the sizer is the sizer assigned to that window. If you've got nested sizers then you can use sizer.GetPosition and sizer.GetSize to figure out if the position is inside that nested sizer. However I would guess that...
0
852
0
1
2011-11-22T03:22:00.000
python,wxpython
Get mouse position in sizer? wxpython
0
2
2
8,234,755
1
0
0
that it is possible to get the mouse position in wxpython using event.GetPosition() however, is it possible to get the position of a mouse in a sizer? Would this work even in an expanding sizer? Thanks.
false
8,221,586
0
0
0
0
Sizers don't work with absolute positioning. They're for relative positioning. Sizers are the best at making your layout look right across multiple platforms and themes. If you really want to be able to insert stuff at specific x-y coordinates, then don't use a sizer.
0
852
0
1
2011-11-22T03:22:00.000
python,wxpython
Get mouse position in sizer? wxpython
0
2
2
8,234,664
1
0
0
I'm working on a monte carol pricer and I need to improve the efficiency of the engine. MonteCarlo path are created by a third party library (in c++) Pricing is done in IronPython (script created by the end user) Everything else is driven by a c# application the pricing process is as follow: C# application request t...
true
8,257,686
1.2
1
0
1
Finding out how much memory an object takes in .NET is a pretty difficult task. I've hit the same problem several times. There are some imperfect methods, but none are very precise. My suggestion is to get some estimate of how much a path will take, and then pass a bunch of them leaving a good margin of safety. Even if...
1
871
0
3
2011-11-24T13:16:00.000
c#,memory-management,ironpython
Virtual memory address management in c#
0
1
2
8,257,843
1
0
0
I've tested pyglet and I'm sure pyglet works well. But when I ran the script in samples/hello_world_actions.py , or anything with color, only thing in the Scene is Label. Could anyone tell me what has happend? PS:my env : Python2.7 cocos2d 0.5.0 pyglet 1.1.4 Windows7
false
8,264,192
0.197375
0
0
1
I try to rollback the graphics driver to the old version, the issue is resolved.
0
172
0
1
2011-11-25T02:08:00.000
windows-7,python-2.7,cocos2d-python
The Sprites and ColorLayers in cocos2d-python doesn't work
0
1
1
9,655,468
1
0
0
Is there any way that I can build an interactive text console using wxPython window application? It will be used to allow user to provide natural language input for the application to parse the grammar based on the language selected. It is not going to be used to run any shell or commands.
true
8,280,667
1.2
0
0
0
You can use a wx.TextCtrl for input and then when the user is done typing, you can have them press a button to do whatever checking you want done. Alternatively, you could use a wx.Timer to watch for idleness so when the user is idle for x seconds, it does the checking you want automatically too.
1
194
0
0
2011-11-26T18:39:00.000
python,user-interface,console,wxpython
Specialized Text Console in wxPython
0
1
1
8,298,887
1
0
0
I wrote a wxPython GUI where I currently configure some of the widgets and some default values by using "import data" for a module file containing several lists. But I need to compile the whole program using py2exe for a user without a python installation. In so doing, I lose the capability of letting the user edit the...
false
8,281,067
0
0
0
0
files that are imported are bundled in the executable by py2exe. The way to go is to use a configuration file that you package with your executable in a zip or with Inno Setup. Configuration files are files made to be changed at some moment, contrarily a user should not be modifying a python script. I tell you because ...
1
290
0
1
2011-11-26T19:41:00.000
python,py2exe
How to retain an "import" capability after py2exe compile
0
1
1
8,281,140
1
0
0
I want my Python program to be AppleScript-able, just like an Objective C program would be. Is that possible? (Note, this is not about running AppleScript from Python programs, nor about calling Python programs from AppleScript via Unix program invocation. Those are straightforward. I need genuine AppleScriptability of...
false
8,282,352
0
0
0
0
You can also use the py-aemreceive module from py-appscript. I use that to implement AppleScript support in my Tkinter app.
1
206
1
5
2011-11-26T23:13:00.000
python,xcode,applescript
Can a program written in Python be AppleScripted?
0
1
2
13,686,960
1
0
0
I need to create a GUI in Python for a client server interaction. The GUI is on the client side for which I want to create complex tables. I tried to use wxPython's grid class, but its too tough to create a complex table in that. I saw a couple of examples for simple table layouts. I tried to put up a snapshot of the...
true
8,290,781
1.2
0
0
0
Tkinter would be enough for this. You can create any level of complexity on the layout even with the "grid" layout manager, which allows you to specify "columnspam" and "rowspam" for widgets that will take more than a single cell.
0
903
0
1
2011-11-28T02:03:00.000
python,user-interface,tablelayout
Draw complex table layout in Python GUI
0
1
1
8,295,831
1
0
0
I am using pygame to write a program and I need some GUI configuration text field and button for control. I've already made the button using pygame, but I just can write a text field out of pygame. Maybe I need to use tkinter together with pygame. I think if there is no way to made to pygame part and tkinter part toget...
false
8,291,274
0.066568
0
0
1
I have also found pgu is awful. However, what you say about the tkinter event loop taking control is wrong. You just call root.update instead of mainloop, and this can go inside of a while loop to replace the mainloop. Answering your main question however, there is something you should be aware of. It seems that whenev...
0
6,571
0
8
2011-11-28T03:39:00.000
python,tkinter,pygame
Is there anything I need aware of using Tkinter and pygame together?
0
1
3
23,665,352
1
0
0
I'm trying to create a Python implementation of Dawkins' biomorphs as described in his book, The Blind Watchmaker. It works like this: A parent organism is displayed, as well as its offspring which are just mutated versions of the parent. Then the user clicks on a descendant it wants to breed, and all the offspring wil...
true
8,299,966
1.2
0
0
1
Depending on graphical requirements, I would say that for a lightweight app you could get away with PyQt or PyGame. For more demanding real-time graphical requirements you could use something like PyOgre or PyOpenGL. You may need to also research graph-layout/data-visualisation algorithms or libraries (e.g. dot) depend...
1
718
0
3
2011-11-28T17:40:00.000
python
Biomorph Implementation in Python
0
1
1
8,425,387
1
0
0
I have a project that has code which will communicate with a python script and call python functions. In the proj file, i've added the includePath for the python header files, and added external python library to the project (python27.a). However the qt compiler gave me an error: No rule to make target /home/pgeng/wor...
true
8,313,051
1.2
0
0
1
It seems like libpython2 is missing. You will have to : Find out what package provides this library. You can Google for that. Or search a repo for the lib.
0
107
0
0
2011-11-29T15:07:00.000
python,qt,dll,pyqt
Error on connecting to python libraries
0
1
1
8,314,327
1
0
0
I have a python program that implements pygtk for GUI. I have it running successfully on some MAC computers running os 10.6.*, after installing pygtk with macports. I have just installed pygtk on a mac 10.5.8 system. When I execute the program I get these errors: Xlib: extension "RANDR" missing on display "/tmp/la...
true
8,342,215
1.2
0
0
1
You need to install X11-2.6.*
0
674
0
0
2011-12-01T13:35:00.000
python,pygtk,x11,osx-leopard
X11 errors with pygtk on Mac OS X 10.5.8
0
1
1
9,190,899
1
0
0
I have written a program in Python that generates a 10,000 tile coordinate plane with each tile having characteristics such as texture, temperature, elevation etc. I am doing this for a project and thought a much better way to show this part of the project would be to show a 3d rendering of it and the best program i kn...
true
8,350,067
1.2
0
0
1
You will have to make a Python script for that - that would read your text file and use blender API internally to create the tiles and the scene. Blender can only render files if it does have programs (plug-ins) that do that. Actually most file-formats can be read by blender just due to plug-ins implemented in Python t...
0
1,046
0
4
2011-12-01T23:55:00.000
python,blender,render-to-texture
Can Blender generate a scene based off of a text file?
0
1
1
8,431,966
1
0
0
I am using py2exe to make executable. I want to know how to pause the program until a button is pressed.. just like we do in C using system("pause"); As the program terminates automatically in windows, I need this tool. Is there anything better than py2exe which does similar work ?
false
8,370,135
-0.132549
0
0
-2
import os Then in your code os.system("pause")
0
21,409
0
2
2011-12-03T18:59:00.000
python,py2exe
how to pause a program until a button is pressed
0
1
3
23,424,057
1
0
0
Pygame and Pyglet are for 2D game development. Pysoy needs many requirements to be installed. I can't figure out how to install Pyogre. Panda3d is giving me this error and don't know how to fix it. importerror no module named direct.showbase.showbase Is there any other good 3D game development library that could be ...
true
8,370,951
1.2
0
0
0
You can use pyopengl. i think you might have to install pygame...
0
2,006
0
0
2011-12-03T20:57:00.000
python,3d
What is the best Python library for 3D game development?
0
1
1
8,874,392
1
0
0
I intend to write a networking application with a GUI frontend, presumably using GTK. I'm completely new to GTK (and GUI programming in general). My current guess would be to use two threads, one that handles networking and the other one running the GTK frontend. Is this the common design pattern for this kind of probl...
false
8,371,453
0.099668
0
0
1
First thing to read up on in GUI programming is the Model View Controller pattern. You want to separate the data flow from the GUI as much as possible. The networking code updates the data model. When the data model has changed, it signals the front end so the GUI can redraw.
0
762
0
2
2011-12-03T22:13:00.000
python,c,gtk,pygtk
GTK networking app: need design pattern
0
1
2
8,371,633
1
0
1
I'm using QItemSelectionModel with QTableView to allow the users to select rows. The problem is that when the user then clicks on a column header to sort the rows, the selection disappears and all the sorted data is displayed. How can I keep the selection, and just sort that, rather than having all the rows appear? Tha...
true
8,388,659
1.2
0
0
0
Here is the way I ended up solving this problem: When row selections are made, put the unique IDs of each hidden row into a list, then hide all hidden rows Use self.connect(self.myHorizontalHeader, SIGNAL("sectionClicked(int)"), self.keepSelectionValues) to catch the event when a user clicks on a column header to sort...
0
623
0
0
2011-12-05T16:41:00.000
python,pyqt
How can I keep row selections in QItemSelectionModel when columns are sorted?
0
1
1
8,539,266
1
0
0
I've read that in CPython, the interpreter stack (the list of Python functions called to reach this point) is mixed with the C stack (the list of C functions that were called in the interpreter's own code). If so, then how are generators and coroutines implemented? How do they remember their execution state? Does CPyth...
true
8,389,812
1.2
0
0
21
The yield instruction takes the current executing context as a closure, and transforms it into an own living object. This object has a __iter__ method which will continue after this yield statement. So the call stack gets transformed into a heap object.
1
6,580
0
58
2011-12-05T18:10:00.000
python,coroutine
How are generators and coroutines implemented in CPython?
0
2
2
8,390,077
1
0
0
I've read that in CPython, the interpreter stack (the list of Python functions called to reach this point) is mixed with the C stack (the list of C functions that were called in the interpreter's own code). If so, then how are generators and coroutines implemented? How do they remember their execution state? Does CPyth...
false
8,389,812
1
0
0
54
The notion that Python's stack and C stack in a running Python program are intermixed can be misleading. The Python stack is something completely separated than the actual C stack used by the interpreter. The data structures on Python stack are actually full Python "frame" objects (that can even be introspected and hav...
1
6,580
0
58
2011-12-05T18:10:00.000
python,coroutine
How are generators and coroutines implemented in CPython?
0
2
2
8,391,403
1
0
0
I have been using REALbasic for a number of years to develop cross-platform apps. I have become frustrated developing with a proprietary language and so have decided to change languages and have settled on Python and QT. Since I know no Python, would people recommend Python 2 or 3? I think I will be using PyQt or PySi...
false
8,396,569
0.066568
0
0
1
PySide and PyQt4 are almost identical. In fact, you can often replace PyQt4 with PySide (and vice versa) in your code's import declarations. Python2 and Python3 are almost identical as well, with a few minor changes that a beginner won't notice for a while (aside from print being made a function). Python2 has more supp...
0
567
0
0
2011-12-06T07:26:00.000
python,qt,user-interface,pyqt,pyside
Best setup to develop cross-platform GUI-based apps using Python
0
1
3
8,396,619
1
1
0
Background: I am writing an ebook editing program in python. Currently it utilizes a source-code view for editing, and I would like to port it over to a wysiwyg view for editing. The best (only?) html renderer I could find for python was webkit (I am using the PyQt version). Question: How do I accomplish wysiwyg editin...
false
8,412,215
0.197375
1
0
1
Can i suggest a complete another approach ? Since your ebook is only <p></p>: Split the text on <p></p> to get an indexed array of all your paragraphs Make your own pagination system, and fill the screen with N paragraphs, that automatically get enough text to show from the indexed array When you are doing selection, ...
0
1,587
0
2
2011-12-07T08:17:00.000
python,html,wysiwyg
Python/Javascript: WYSIWYG html editor - Handle large documents fast and/or design theory
0
1
1
8,413,073
1
0
0
In CPython, I think, import means compile the py file to a pyc file and execute the file in the current frame, and the next time CPython will load the pyc file directly without compiling again. What about import in ironpython? I guess ironpython don't have a pyc-like format. Does it compile every time when import?
true
8,426,999
1.2
0
0
7
Yes, IronPython recompiles the imported module on every run. Twice, actually. It's complicated. On the first pass, the Python code is parsed into an AST, the AST is converted into a DLR expression tree, and the expression tree is stored. When it is time to execute it, the expression tree is compiled into a set of instr...
1
499
0
6
2011-12-08T06:19:00.000
python,import,ironpython,dynamic-language-runtime
What happens when import a module in ironpython?
0
1
1
8,434,676
1
0
0
I'm working on a project that contains a QTreeWidget. This widget will have Parent nodes with childs nodes and or other siblings nodes. Attached to each node will be a unique ID in the form of an integer as well as a name. Now..... what methods can or should I use to save all the nodes in the QTreeWidget to disk and...
false
8,432,620
0
0
0
0
I managed this by using the data property of the TreewidgetItem by setting a value in it. Using that value as a reference to find one or more or even all TreewidgetItem(s) makes it easy to save a complete tree.
0
2,266
0
2
2011-12-08T14:35:00.000
python,sqlite,pyqt,qtreewidget,qtreewidgetitem
QTreeWidget and PyQt: Methods to save and read data back in from file
0
1
2
14,873,799
1
0
0
Can I execute Python on Windows Phone? I have heard about IronPython but is it the way to go when I need to compile to a lot of existing Python code for Windows Mobile?
true
8,436,112
1.2
0
0
2
Only (some) mananged .net languages are supported on Windows Phone (note. this is not the same as Windows Mobile). IronPython is the only option available to you when it comes to executing python code on the phone.
0
967
0
0
2011-12-08T18:54:00.000
.net,python,windows-phone-7
Python on Windows Phone?
0
1
1
8,436,266
1
0
0
I am a beginner in python. For practice reasons I want to learn how to upload a python code to a website. I have a domain and web hosting service, however I'm really confused about how to integrate my code with a web page on my website. (I have a decent bit of knowledge with Tkinter) Can anybody show me how to upload t...
false
8,453,362
0
0
0
0
I would recommend you look at something like Django and mod_wsgi. Generally helps if you have shell access to the server.
0
3,068
0
0
2011-12-10T00:25:00.000
python,interface,upload,web
Simple python code to website
0
1
2
8,453,549
1
0
0
How can I build a range slider from which I can get the range of two values, e.g., min and max? The scale widget seems not meet this requirement. I can only get one value from it and I don't want to use two scale to do this. Thanks
false
8,453,871
0.197375
0
0
2
You could create one by drawing the individual parts of the widget on a canvas. It's pretty easy to add bindings for dragging things around.
0
1,222
0
3
2011-12-10T02:08:00.000
python,tkinter
How to build a range slider using tkinter?
0
1
2
8,458,598
1
0
0
I'm building simple PyGTK app with Glade. In one dialog I have table layout with labels in first column, and text entries in second column. The problem is that two columns have always same width, and I want 2nd column to be wider then the first one. How can I achieve that?
true
8,455,516
1.2
0
0
2
If you use a gtk.Table to display your widgets in your dialog. You can set the homogeneous property to False, so that cells in the table don't have the same dimensions. After that, if the largest widget in the second column is wider than the largest widget in the first column (which I assume is your case), then the sec...
0
1,466
0
2
2011-12-10T09:11:00.000
python,pygtk,glade
Setting separate GtkTable column width
0
1
1
8,456,076
1
0
0
The FileDialog in pyqt is an excellent way to get one path for a file from the user, but is there a good way to get a large number of file selections from the user?
false
8,498,475
0
0
0
0
I would suggest you to let the user use drag & drop to add files directly from their favorite file browser. As I did this in wxpython without any trouble and user-feedbacks are pretty good :)
0
5,368
0
1
2011-12-14T01:17:00.000
python,pyqt,pyqt4,qfiledialog
PyQt: How can I get a large list of filenames from the user?
0
1
2
8,498,496
1
0
0
What is the fastest or most efficient way of maintaining some sort of array for pixels on a screen in Python ? I don't want to use game libraries, just a simple array as I already have parts of it done without any libraries. I'm developing a program which moving random stuff around the screen and i need to know whether...
false
8,513,821
0
0
0
0
Since you're going to be bouncing off these boundaries, use a range of values to indicate the angle of the surface rather than just 0 or 1. Keep the array the same way you're storing the image pixels.
1
57
0
0
2011-12-15T00:56:00.000
python,graphics
Speedy lookups from some kind of table (for graphics collisions)
0
1
1
8,513,902
1
0
0
I am using the pyglet (OpenGL) library and I want to be able to change the virtual resolution without changing the size of the window. For example a 2x2 box would be drawn as 4x4 pixels on the screen. I know I can find everything that is being draw and scale it individually, but this would probably be costly. I could n...
false
8,556,589
0.197375
0
0
2
Clarification: I am thinking along the lines of the resolution settings in most games. The window stays in full screen at the same size, but the scale changes. No, the window does change the size, because the screen resolution is changed, and the window follows. However what you intend to do it perfectly possible: Fir...
0
2,504
0
2
2011-12-19T02:39:00.000
python,opengl,scale,resolution,pyglet
Scale Resolution in Pyglet
0
1
2
8,559,413
1
0
0
I am using wxpython and I would like to get all the elements in the listbox and returned in a list. (Almost like the Oposite of the "Set" function) Example: Listbox has Dog Cat Fun The function should return ["Dog","Cat","Fun"] Thanks
true
8,556,752
1.2
0
0
1
.GetItems() This function can get all elements in your Listbox as a list.
1
603
0
2
2011-12-19T03:13:00.000
wxpython,wxwidgets
How to get listbox elements in a list? wxpython
0
1
2
8,556,812
1
0
0
I have .ui, .py and .pyc files generated. Now, when I edit the .py file, how will it reflect changes in the .ui file? How do I connect .the ui and .py files together as QT designer allows only .ui files for running purposes?
false
8,571,366
0
0
0
0
the .py file generated from pyuic is not supposed to be edited by the user, best way it is intended to use is to subclass the class in .py file into your own class and do the necessary changes in your class..
0
227
0
0
2011-12-20T05:57:00.000
python,pyqt
Running .py files
0
1
2
8,571,839
1
0
0
I wanted to recompile PIL after having installed libjpeg because it threw the decoder jpeg not available whenever I tried importing JPEG images. So, I've downloaded libjpeg, compiled it and installed it. Then I removed the ./build folder from PIL's source cache, and recompiled it (using sudo python setup.py install). ...
true
8,590,714
1.2
1
0
1
What would I try: Remove old PIL and install new it from scratch (maybe it did not override properly). If you missed something when compiling the libjpeg, like path specifications it will not find some of the libraries, so I recomend trying MacPorts py27-pil port for PIL installation, which will place all dependancies...
1
672
0
0
2011-12-21T13:41:00.000
python,python-imaging-library
Can't get PIL to work on Mac OS X
0
1
2
8,591,901
1
0
0
I am writing a python application using tkinter. One of my classes only uses the delete method on an Entry widget object. I wanted to know if there was a way to only import that method instead of importing the entire package. I have tried looking around online and have tried different things, but I have not had much lu...
true
8,597,543
1.2
0
0
2
No, there is no way to import only one method of a widget, or only one method of any class. When you import a class you get the whole class. Why do you think it would be advantageous to import only one method? If you're concerned about memory consumption, don't be.
1
106
0
0
2011-12-21T23:02:00.000
python,import,tkinter
How to import only one Tkinter widget method instead of a whole package?
0
1
1
8,598,161
1
0
0
I am writing an Onscreen Keyboard in python, with clutter. I've gotten the ClutterStage's XWindow object, but I can't find any properties which prevent the window from stealing focus. Basically, it needs to accept mouse events (click, motion, etc), while not stealing keyboard focus from the window it is trying to type ...
false
8,611,290
0
0
0
0
by the way input delivery works on X11, this cannot happen: an X11 window has to have focus in order to receive input events - in other words: events are delivered only to the focused window. the input method and accessibility support in GTK+, for instance, relies on the toolkit sending and receiving data to and from a...
0
1,660
0
1
2011-12-23T01:09:00.000
python,x11,xlib,clutter
What XWindow property can prevent a window from getting focus, while letting it receive mouse events?
0
1
2
8,623,734
1
0
0
I want to learn about graphical libraries by myself and toy with them a bit. I built a small program that defines lines and shapes as lists of pixels, but I cannot find a way to access the screen directly so that I can display the points on the screen without any intermediate. What I mean is that I do not want to use a...
false
8,622,667
0.066568
0
0
1
This is rather an old thread now, but I stumbled upon it while musing the same question. I used to program in assembly language. In my day, drawing on screen was simply(?) a matter of poking a value into a memory location. The value turned a pixel on or off and defined its colour. The term 'poke' comes from Basic by t...
0
4,998
0
11
2011-12-24T00:32:00.000
python,hardware,graphics
Is there a way to access hardware directly in Python?
0
2
3
18,431,135
1
0
0
I want to learn about graphical libraries by myself and toy with them a bit. I built a small program that defines lines and shapes as lists of pixels, but I cannot find a way to access the screen directly so that I can display the points on the screen without any intermediate. What I mean is that I do not want to use a...
false
8,622,667
1
0
0
7
No, Python isn't the best choice for this type of raw hardware access to the video card. I would recommend writing C in DOS. Well, actually, I don't recommend it. It's a horrible thing to do. But, it's how I learned to do it, and it's probably about as friendly as you are going to get for accessing hardware directl...
0
4,998
0
11
2011-12-24T00:32:00.000
python,hardware,graphics
Is there a way to access hardware directly in Python?
0
2
3
8,622,706
1
0
0
I installed cocos2d today on OS X Lion, but whenever I try to import cocos in the Python interpreter, I get a bunch of import errors. File "", line 1, in File "/Library/Frameworks/Python.framework/Versions/2.7/lib/ python2.7/site-packages/cocos2d-0.5.0-py2.7.egg/cocos/init.py", line 105, in import_...
true
8,626,180
1.2
0
0
1
You could fix it. The problem comes from the fact that cocos2D is built on top of Pyglet, and the stable release of pyglet does not yet support Mac OS X 64 bits architecture. You have to use the 1.2 release of pyglet or later, which by now is not released yet. A workaround is to remove any existing Pyglet install: pip ...
0
559
1
0
2011-12-24T18:25:00.000
python,cocos2d-python
Removing cocos2d-python from Mac
0
1
1
10,575,373
1
0
0
in pygtk when I set the label mylabel = gtk.Label("Hello World!") I can get the string of label from it by mylabel.get() method. but in python interpreter I can't get the docstring of this method: help(gtk.Label.get). Anyone know why?
true
8,648,537
1.2
0
0
2
It might be that what you wanted to ask was answered by @DonQuestion already... however if you truly just wanted to ask why help(gtk.Label.get) doesn't return a help... the answer is actually very simple: because the get method in the Label object lacks a docstring in the source code. :) In fact the call to help doesn'...
0
149
0
0
2011-12-27T19:37:00.000
python,gtk,pygtk,docstring
How to get help of PyGTK methods?
0
2
3
8,648,804
1
0
0
in pygtk when I set the label mylabel = gtk.Label("Hello World!") I can get the string of label from it by mylabel.get() method. but in python interpreter I can't get the docstring of this method: help(gtk.Label.get). Anyone know why?
false
8,648,537
0.197375
0
0
3
Because the method gtk.Label.get is an object itself, and has some attributes. The builtin function help looks the __doc__ attribute and some other dictionaries of the object and the Class of the object up and returns them (formatted). You could do a help(help) for example! ;-) so help(gtk.Label.get) returns the attrib...
0
149
0
0
2011-12-27T19:37:00.000
python,gtk,pygtk,docstring
How to get help of PyGTK methods?
0
2
3
8,648,722
1
0
0
I've spent hours on this. Seems like our job on Linux is to debug scripts that don't work across the fragmented distros rather than getting work done. Setup.py tries to find what it needs and build the c modules used to wrap certain dependencies if it can find what it needs. This makes the script super fragile relati...
true
8,650,079
1.2
0
0
0
I found many distribution points for sets of rpm packages. This enabled me to install individual packages such as the headers for tcl. But, this was a bad approach because the full dependency hierarchy to build Python support for tkinter is something on the order of 60 packages. I found that the OpenSuSE repository f...
0
1,235
1
0
2011-12-27T22:48:00.000
python,build,suse
Python 2.7.2 install on Suse Linux Server 11.3 can't find tkinter dependencies
0
1
1
8,662,523
1
1
0
Is it possible to embed a wxPython based GUI in an HTML page? If not, is there any other option other than Java applets to make GUIs that can be embedded onto an HTML page?
false
8,654,165
0
0
0
0
You can use Javascript to create your own GUI to show. Maybe Google's NaCl is far enough advanced but it won't give you the cross browser compatibility you'll probably like. If you look at broadway (which is linked in one of the other answers), you'll need to run an X session for each user.
0
669
0
1
2011-12-28T09:37:00.000
python,html,wxpython
wxPython GUI on a web page?
0
1
2
8,654,270
1
0
0
I have an Android application that has user contributed images. There are a lot of users that submit black or really dark images to the backend application, that I want to filter out. Best solution would be to filter the images already at the phone and notify the user to make more light and retake the picture. Another ...
false
8,659,663
0
0
0
0
What about converting the image into greyscale one, calculate average color of the greyscale image, and filter out images than go over some threshold?
0
2,293
0
2
2011-12-28T18:19:00.000
android,python,image-processing
Detecting black images on Android or python
0
1
4
8,659,766
1
0
0
I have an NSMutableArray filled with BeziarPaths. I'd like to serialize it so that its accessible on Python. Someone suggested to me that I can try GZIP + InkML or GZIP +JSON. I was wondering what the best way to do this is. I am also really new to this, so example code would be extremely helpful. Thanks
true
8,661,415
1.2
1
0
0
Choose what you like most. Both are standards, but JSON is a generic format used for serializing dictionaries and arrays, while InkML focuses on drawing related objects. JSON support is available in both Python and Objective-C, while InkML has no built-in support in either.
0
318
0
1
2011-12-28T21:15:00.000
python,objective-c,serialization
Objective C to Python Serialization
0
1
2
8,661,467
1
0
0
I have a number of text widgets floating on a scrollable canvas widget. I want to allow users to resize them by dragging their edges and/or corners, possibly moving them if they drag the upper left edges or corner. I'm open to making them into frames with text widgets inside them, since I'm likely to do that anyway. I ...
false
8,735,668
0.099668
0
0
1
You could use the PanedWindow widget, or a combination of a few of them, inside your canvas. They are designed to do that. Getting the PanedWindow to stretch like the "sticky" command inside the canvas is an unknown though. That is what I was looking for when stumbled across this post.
0
3,942
0
1
2012-01-04T23:37:00.000
python,tkinter
Make widgets/frames inside tkinter canvas resizable
0
1
2
12,025,488
1
0
0
I'm trying to use a file that uses PIL and when I try to run it I get the following error: ImportError: The _imaging C module is not installed I know theres a bunch of threads online about this but most of them see pretty specific. I'm 100% sure there is no problem with the code I'm running. Python version 2.7.2 64bit ...
false
8,747,299
0.049958
1
0
1
try to install pillow. you can install it with the command: pip install pillow you have install the python-imaging?? sudo apt-get install python-imaging. install first the python-imaging and next install the pillow
1
6,417
0
0
2012-01-05T17:56:00.000
python,module,imaging
Python: PIL _imaging C module
0
1
4
11,829,919
1
0
0
I would like to determine a user's wallpaper path with PyGTK. If possible, I would like to not rely on a Desktop Environment's function to do this - this is because some users(like myself) do not use a DE. Because of this, I am wondering if you can use X11 or something else to determine the current wallpaper being used...
true
8,774,388
1.2
0
0
2
You MUST rely on a desktop environment, otherwise it is not possible, since X11 isn't supposed to handle such things as wallpapers. When you set a background image, an external program loads the image and sets it as the background pixmap of the root window. Therefore, unless the specific loading mechanism stores the im...
0
382
0
0
2012-01-08T00:36:00.000
python,pygtk,x11
Determining path to current wallpaper with pygtk (maybe X11?)
0
1
1
8,778,003
1
0
0
My GUI consists of a wx.ListCtrl on the left, with a list of objects to edit, and a set of wx.TextCtrls on the right, for editing the selected object. My strategy for implementing this was: On a textbox's wx.EVT_KILL_FOCUS , update the relevant attribute of the currently selected object On the list's wx.EVT_LIST_ITEM_...
true
8,783,236
1.2
0
0
1
wx.EVT_LIST_ITEM_DESELECTED will only fire when the user changes the selected object in the list box. This serves the same purpose as losing focus on the text box. Call the update routines from that event as well. To skip the subsequent wx.EVT_KILL_FOCUS from the text box set a "isDirty" attribute in the parent obje...
0
256
0
0
2012-01-09T02:12:00.000
python,wxpython,wxwidgets
The order of wxPython events is causing me problems
0
1
2
8,783,458
1
0
0
I am looking for a way in which wxPython GUI elements can be added into pygame. If there is an alternative to solve the purpose of adding GUI elements to a pygame please suggest so. I am having problem in installing PGU.Thanks for help.
false
8,798,043
0
0
0
0
I dont think its possible since wxPython (using wxWidgets c++) is a wrapper around the window management system, it rely on the OS functions to draw on screen (it convert to the right system calls depending on OS). Pygame uses SDL and a simple code to window management system, it calls few OS functions just to create ...
0
1,738
0
6
2012-01-10T02:57:00.000
user-interface,wxpython,pygame
Adding wxpython in pygame
0
1
2
9,446,899
1
0
0
Two part question: I have a 10x10 QTableWidget with QTableWidgetItem in each cell. For some reason, clicking on a cell is not sufficient to edit it, I need to double-click the cell to enter it. Is there a way to change this behavior to single click Is there a way to have 2nd cell in 1st row selected and ready for ed...
false
8,826,688
0.197375
0
0
2
You can also use setCurrentCell. table.setCurrentCell(0,1) QTableWidget.setCurrentCell (self, int row, int column)
0
3,799
0
2
2012-01-11T21:11:00.000
python,pyqt,pyqt4,editing,qtablewidget
QTableWidget how to have a cell selected for editing from code and/or with single click
0
1
2
8,948,046
1
0
0
I'm using PyQT v4.9 for Windows 7, and Visual Studio 2010 (extension PTVS 1.1 ) Autocomplete is good function in IDE. Example: object.method_of_class() #when I press the dot, see a list of possible methods. But with pyqt class, this not works, exapmle: QtGui.QDesktopWidget() How can I solve this problem? P.S. Fo...
false
8,830,355
0.53705
0
0
3
I had the same problem with PTVS version 1.1.1 . I did the following . Now auto completion works for PyQT libraries. 1. upgraded the PTVS to 1.5 2. In visual studio , select tools-options- python tools-interpreter options. Click on "Generate completion" , then restart the visual studio.
1
1,633
0
1
2012-01-12T05:01:00.000
python,visual-studio-2010,pyqt,ptvs
PyQT and Visual Studio 2010
0
1
1
11,158,550
1
0
0
What is the use of the wx.App class (apart from what the documentation says), when you can just create a frame and .Show(True) it? When should a wx.App class be used, or why shouldn't you create a frame and just show it?
false
8,835,679
0.132549
0
0
2
The wx.App does a bunch of behind the scenes stuff to make your application work. It does the main loop, which is what waits for the user to do something and then responds. You have to have it. As FogleBird mentioned. By the way, you should NOT have more than one. Doing so will cause weird issues, if it works at all.
0
661
0
1
2012-01-12T13:17:00.000
python,wxpython,wxwidgets
purpose of wx.App when just showing a frame is enough
0
1
3
8,837,486
1
0
0
I have a question about the virtual memory in Python. When the process is consuming a relatively large amount of memory, it doesn't "release" the unused memory. For example, after creating a massive list of strings, let's say the list uses 30MB of memory, so the entire process takes roughly 40MB, when the list is delet...
true
8,836,536
1.2
0
0
0
At the C level (CPython's implementation), anything that is allocated on the heap with malloc() will consume memory and this memory will not be released to the OS when that memory is freed with free(). It will only be returned when the process dies. But when new blocks are allocated with malloc() they will use the free...
1
3,099
0
1
2012-01-12T14:18:00.000
python,memory-management,virtual-memory
Virtual memory management in Python (2.6-2.7) - Will it reuse the allocated memory for any type of data?
0
1
2
8,836,643
1
0
0
A simple question, (hopefully with a simple answer). QTreeView will pass Qt.DisplayRole to the model's data function when fetching rows for display, by default. But say I wanted to pass 'MyAwesomeTreeDisplayRole' instead of Qt.DisplayRole, what would I need to do? I can't seem to find anything about where the view deci...
false
8,860,192
0
0
0
0
I've used QTreeView to view a simple table with many columns - it works well - you can adjust the column count by sending it the columnCountChanged signal. So I'm not sure you need to do what you are asking. But I've used ItemDelegates too: use my_treeview.setItemDelegate() to point the treeview to your item delegate....
0
1,128
0
2
2012-01-14T04:40:00.000
python,qt,model,pyqt
Using custom role in QTreeView instead of DisplayRole
0
1
2
9,890,722
1
0
0
As the title suggests it, I`m looking for the best solution for creating a 2D or a 3D graphic simulator. I need to build a program that simulates the behavior of some custom solar panels (how the rays fall on the surface of the panels, what happens if the panels are rotated etc). The main problem is that it has to be d...
true
8,866,301
1.2
0
0
4
If you don't have much time you should choose the language you know better. Personally I'd go for python because I think it's a very productive language. To do the rendering I'd rely on the module pygame. Nevertheless there are numerous possible libraries that can do what you need. I've used XNA a while ago and it was...
0
1,475
0
0
2012-01-14T23:33:00.000
c#,python,graphics,simulator
C# vs. Python - Best choice for a 2D/3D graphic simulator
0
1
3
8,866,408
1
0
0
I would like to know how to draw images using pygame. I know how to load them. I have made a blank window. When I use screen.blit(blank, (10,10)), it does not draw the image and instead leaves the screen blank.
false
8,873,219
0.148885
0
0
3
After using blit or any other update on your drawing surface, you have to call pygame.display.flip() to actually update what is displayed.
0
36,330
0
16
2012-01-15T20:43:00.000
python,image,pygame
What is a good way to draw images using pygame?
0
1
4
8,873,270
1
0
0
I have a window that is opened up in a Python script (NOT THROUGH Tkinter), and all I want is to send an "enter" (keypress) command to that window. I was hoping I could do this with Tkinter, but I'm at a bit of a loss as to how to send this command to the current focused window.
false
8,898,662
0
0
0
0
You cannot do this with Tkinter. Tkinter can only send events to its own windows.
0
260
0
1
2012-01-17T17:02:00.000
macos,tkinter,python-2.7
Tkinter keypress on current focused window
0
1
2
8,900,000
1
0
0
What is the best framework to use for building the GUI on a python widget? I'm currently using gnome 3, but would prefer it to be independent of the desktop environment.
false
8,905,128
0.066568
0
0
1
I have used the 3 following toolkits. wxPython is a popular choice. It supports Windows, Mac and Linux but may be tricky to install on some of these platforms (that's what i've recently noticed on 64 bits MAC and Ubuntu). It has a lot of nice widgets which can be seen with the demo app that can be downloaded separatel...
0
1,565
0
0
2012-01-18T04:19:00.000
python,gtk,widget,gnome
Python Widget/GUI framework
0
1
3
8,906,510
1
0
0
I was wondering if any of you know where I could find a simple tutorial on the web maybe to make a very simplistic gui. I have no idea how to start out in code to make one so I need your help. What I want the gui to be used for is I have written a program that I want to be to use it on other computers that already don'...
false
8,912,327
0.019997
0
0
1
If you're more into gaming you can use PyGame for GUIs.
1
104,449
0
23
2012-01-18T15:03:00.000
python,user-interface
How to make a gui in python
0
2
10
8,913,722
1
0
0
I was wondering if any of you know where I could find a simple tutorial on the web maybe to make a very simplistic gui. I have no idea how to start out in code to make one so I need your help. What I want the gui to be used for is I have written a program that I want to be to use it on other computers that already don'...
false
8,912,327
0
0
0
0
While some suggestions have included tkinter and wxPython, the other part of the answer to your question is that you will also need to package it using something like py2app, pyinstaller, or py2exe (depending on the operating system). You mentioned the other machines do not have python, so this would be required in ord...
1
104,449
0
23
2012-01-18T15:03:00.000
python,user-interface
How to make a gui in python
0
2
10
8,912,460
1
0
0
EDIT: Solved, thanks everyone! What I would like to be able to do in simple terms is take user input from one programming language, convert it into another programming language and have it compiled automatically. For example (simplified and not precisely what I want to do but along similar lines): 1) Write a python sc...
true
8,918,183
1.2
1
0
5
To me it sounds like you just want to write a user interface for interactive creation of lilypond files. I don't see what all this has to do with compilation. Your python script will need to write a file in lilypond notation and afterwards your script needs to call lilypond on that file (e.g. with os.system). You could...
0
161
0
0
2012-01-18T22:06:00.000
c++,python
Automatic compiling between languages
0
1
1
8,918,813
1
0
0
I have a treeview that is populated from a treemodel. I would like to add a colum to the treeview. Is it possible to draw the data for that column from a separate treemodel or can I append at runtime a column to the existing treemodel?
false
8,930,460
0
0
0
0
In a gtk.TreeView object there's an append_column method, so yes, you can programmatically add a column to a gtk.TreeView. However, I'm not aware of any method for adding a new column to an existing model or using multiple models for the same gtk.TreeView. Anyway, I guess you can create a new model with an extra column...
0
1,854
0
5
2012-01-19T17:24:00.000
python,gtk,pygtk,gtktreeview
Can I add a column to an existing treemodel in gtk?
0
2
3
8,931,266
1
0
0
I have a treeview that is populated from a treemodel. I would like to add a colum to the treeview. Is it possible to draw the data for that column from a separate treemodel or can I append at runtime a column to the existing treemodel?
false
8,930,460
0
0
0
0
To answer the question in the title: No, you can't add columns to a GtkTreeModel after it's been created.
0
1,854
0
5
2012-01-19T17:24:00.000
python,gtk,pygtk,gtktreeview
Can I add a column to an existing treemodel in gtk?
0
2
3
32,256,786
1
0
0
i am grabbing PIL images with screengrab from the screen, saving them in a queue and writing them into a jpg image sequence. I use a producer thread to capture and a worker to write the images down to disk. However i noticed, that this queue gets really large really fast, even though the written output is not really t...
false
8,938,442
0
0
0
0
Here's an idea, merge the images as they come in. After a set period of time or set amount merged, compress the image. Divide the image back into separate ones. /profit
1
775
0
2
2012-01-20T08:15:00.000
python,python-imaging-library,screen-grab
Reducing PIL image size in memory
0
1
1
8,938,645
1
0
0
I'd like to make a simple GUI that offers buttons which I can drag and drop into other Windows applications such that this other applications receives a certain string depending on the button chosen. What would be the easiest GUI framework for Python that allows this drag and drop?
false
8,943,446
0.066568
0
0
1
Theoretically, you can use any library for which a graphical drag-and-drop designer exists. Such tools often generate markup language which the library parses, and sometimes they generate code directly. The latter is language-dependent whilst the former shouldn't be. Either way, you'll find a way of doing it with Pytho...
0
1,910
0
2
2012-01-20T15:06:00.000
python,windows,user-interface,drag-and-drop
Simple GUI Windows Drag&Drop
0
1
3
8,944,479
1
0
0
A real newbie question here. I'm using IDLE 2.7.2 on OSX 10.7.2 and reading Zelle's Python:Programming. I haven't programmed since the 80's, so after going through the command line stuff, I'm excited to dive into Objects. I grab his graphics.py file and copy it into documents (this seems like the default location for I...
false
8,972,462
0
0
0
0
Idle runs the python commands you enter in another process, so it's reasonable to expect this "lock up" behavior to be different between the program controlled window and Idle. What's probably going on, though is that everything is fine, but you have not yet started the event loop in the program you're typing in. The ...
0
2,037
0
0
2012-01-23T13:35:00.000
python,python-idle
Graphics Window Crashing in IDLE
0
1
1
8,972,537
1
0
0
I'm running into some really weird problems with ctypes. I'm using ctypes to interface to a C++ library that has a C interface. The library has lots of parallel functionality. More often than not, the parallel calls tend to end up with a segfault from the C++ layer, but I've run into them with some serial code too. ...
false
8,989,328
0
0
0
0
CPython doesn't contain C++ code and thus there is no requirement with regards to the C++ compiler used to compile a C++ library loaded into a CPython process. However, the C layer and the C++ library must generally be compiled with the same C++ compiler. And if the C++ library or the C layer link against libpython, ...
1
337
1
2
2012-01-24T15:22:00.000
python,ctypes
ctypes - does python need to be compiled with same version as C library?
0
2
2
8,989,530
1
0
0
I'm running into some really weird problems with ctypes. I'm using ctypes to interface to a C++ library that has a C interface. The library has lots of parallel functionality. More often than not, the parallel calls tend to end up with a segfault from the C++ layer, but I've run into them with some serial code too. ...
true
8,989,328
1.2
0
0
4
There's no requirement at all that the native library that you call with ctypes has to be built with a matching runtime. In fact there's not even a requirement that the native library even uses a C runtime. For example you can use ctypes to call code written in other languages, e.g. Delphi. Or you can use ctypes to cal...
1
337
1
2
2012-01-24T15:22:00.000
python,ctypes
ctypes - does python need to be compiled with same version as C library?
0
2
2
8,989,579
1
0
0
I don't know if this is a simple matter of RTFM, but bear with me as it was a while ago I used a statically typed language... I'm porting some C# code to IronPython, and I just stumbled on this statement below. I'm not at liberty to post the actual code, so I'll write it in pseudo code instead: data_type_1 variable_1 =...
false
9,001,219
0.132549
0
0
2
The as operator is a "safe cast" operator, it converts the variable_2 to type data_type_2. If that conversion fails, it doesn't throw an exception but returns null. Further, to be able to assign a value of data_type_2 (the result of the 'as' expression) to a variable of data_type_1, that data_type_2 must be derived fro...
1
138
0
0
2012-01-25T10:35:00.000
c#,com,ironpython
How can I translate this C# variable declaration to something IronPython can handle?
0
2
3
9,001,555
1
0
0
I don't know if this is a simple matter of RTFM, but bear with me as it was a while ago I used a statically typed language... I'm porting some C# code to IronPython, and I just stumbled on this statement below. I'm not at liberty to post the actual code, so I'll write it in pseudo code instead: data_type_1 variable_1 =...
false
9,001,219
0.066568
0
0
1
After killing a few hours I figured I might as well do it the simple but perhaps not the prettiest way. I simply downloaded Visual C# 2010 Express (free version) and wrote a minimal Class Library containing one method consisting of only the troublesome statement. I then built the dll, which was promptly imported and us...
1
138
0
0
2012-01-25T10:35:00.000
c#,com,ironpython
How can I translate this C# variable declaration to something IronPython can handle?
0
2
3
9,004,636
1
0
0
I have created a program in Codeblocks (wxWidgets Application) I have compiled it and it runs perfectly when executed from the codeblocks interface ....however when i go into the release folder and run the executable it gives me *.dll file errors :/ How do i make the program ?
true
9,028,174
1.2
0
0
2
There's a good chance that Code:Blocks has a default setting for the executable path that includes the path to the libraries. As Windows finds the DLLs using the PATH environment variable this will ensure that your application works inside CodeBlocks. However in order to run it outside CodeBlocks you'd need to either c...
1
825
0
1
2012-01-27T02:11:00.000
c++,visual-c++,wxpython,wxwidgets,codeblocks
How to compile a program in wxSmith ( Codeblocks ) with all the libraries?
0
1
1
9,028,282
1
0
0
I use wxpython for GUI. In main thread I fired some threads in background and showed modal dialog in main thread immediately. Now I want this modal dialog to be updated with some info at the moment all background threads finish they job. What's the best way to do this?
false
9,038,128
0.379949
0
0
2
Pass a Queue as an argument to the threads, and let them put() a done / result object into that. Then count them.
1
173
0
3
2012-01-27T18:19:00.000
python,multithreading
Execute action when all threads in except main are finished? (Python)
0
1
1
9,038,289
1
1
0
First of all, I am sorry if this question doesn't belong to SO since I don't know where else to post it, anyway... I am looking for a decent python based database development RAD framework with nice data aware widgets and grids. A desktop framework would be much preferable to a web framework (I've developed heavy DB-ce...
false
9,045,723
0.099668
0
1
1
I am also looking for something similar to Kexi. Unfortunately python scripting is not supported in Kexi for windows. I would like to find something better than MS Access, and it does not have to be based on python. So far I have looked at quite a few IDE's but have not found anything where a GUI and database applicati...
0
684
0
3
2012-01-28T13:49:00.000
python,database,widget,rad
Python database widgets/environment like MSAccess
0
1
2
15,711,432
1
0
0
I just turned on the pygame.OPENGL flag in my set_mode out of curiosity. It made my code very unhappy: pygame.error: Cannot call on OPENGL Surfaces on the first screen.fill((0, 0, 0)). I don't NEED OpenGL, but I'm kind of curious about it. Where could I find info about pygame/SDL and OpenGL?
false
9,047,958
0.379949
0
0
2
The OpenGL flag in Pygame is used to turn your window into an OpenGL projection for other libraries - such as Rabbyt or PyOpenGL - to use. For sites on reading up on all of this, I would recommend starting out at the respective sites for PyGame, OpenGL, et al. I'd post links for them, but the spam protection mechanism ...
0
919
0
0
2012-01-28T19:35:00.000
python,opengl
Where can I find information about what/why pygame can(not) do with openGl surfaces?
0
1
1
9,048,066
1