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 was wondering what options are available for Python 3.x? I know Tkinter is available as well as qt, but what about the other libraries? Any word on when some of them may be ported over to 3.x?
false
2,411,886
0
0
0
0
I use exclusively Tkinter, and though it's somewhat limited in terms of images, it's remarkably easy to work with and follows the standard easy-to-read Python syntax very nicely. I'm not familiar with other GUI options, but Tkinter is great from my experience.
0
968
0
4
2010-03-09T19:21:00.000
python,user-interface,python-3.x
GUI options with python 3.x
0
1
4
29,502,724
1
0
0
I've wrote a piece of code in python and pygtk for an embeded mplayer in a gui. I assume I use GtkSocket and the slave mode of mplayer with the -wid option. But I've got an issue, when the size of my GTK window is smaller than my stream, the stream appears to be cropped. And when the size of my window is bigger than my stream, the stream appear centred inside the widget which embed MPlayer. (a gtk.Frame but I've also try with a gtk.DrawingArea) I would like to know how I can get my stream resize dynamically depending on the window's size. I don't want to use Glade or any GUI builder. Thanks in advance for any help, and please excuse my poor english.
false
2,417,705
0.099668
0
0
1
You need to tell mplayer to zoom video according to window size. This can be done either in command line (-zoom) or in the configuration file (zoom = 1).
0
1,512
0
0
2010-03-10T14:39:00.000
python,gtk,pygtk,mplayer
Dynamic resize with MPlayer and PyGTK
0
1
2
2,944,206
1
0
0
i am using PyQt but my question is a general Qt one: I have a QTableWidget that is set up by the function updateTable. It writes the data from DATASET to the table when it is called. Unfortunately this causes my QTableWidget to emit the signal cellChanged() for every cell. The signal cellChanged() is connected to a function on_tableWidget_cellChanged that reads the contents of the changed cell and writes it back to DATASET. This is necessary to allow the user to change the data manually. So everytime the table is updated, its contents are written back to DATASET. Is there a way to distinguish if the cell was changed by the user or by updateTable? i thought of disconnecting on_tableWidget_cellChanged by updateTable temporarily but that seems to be a little dirty.
false
2,431,844
0.066568
0
0
1
It seems, that this is the only signal in QTableWidget at least for 4.6. You could post a feature request, but I don't know if it is accepted and you might wait for long time ;-) Maybe you could try to write a subclass of QTableWidget and emit own signals, when cell is changed internally. Anyway, disconnecting for the time of updating the cell isn't that bad, since you can't connect to specific signal.
0
5,819
0
4
2010-03-12T10:02:00.000
python,qt,pyqt,signals,qtablewidget
QTableWidget signal cellChanged(): distinguish between user input and change by routines
0
2
3
2,432,210
1
0
0
i am using PyQt but my question is a general Qt one: I have a QTableWidget that is set up by the function updateTable. It writes the data from DATASET to the table when it is called. Unfortunately this causes my QTableWidget to emit the signal cellChanged() for every cell. The signal cellChanged() is connected to a function on_tableWidget_cellChanged that reads the contents of the changed cell and writes it back to DATASET. This is necessary to allow the user to change the data manually. So everytime the table is updated, its contents are written back to DATASET. Is there a way to distinguish if the cell was changed by the user or by updateTable? i thought of disconnecting on_tableWidget_cellChanged by updateTable temporarily but that seems to be a little dirty.
false
2,431,844
0.066568
0
0
1
I would recommend changing from a QTableWidget to a QTableView with an appropriate model. From the sounds of it, you have a database or other data object holding and arranging the data anyway, so it would hopefully be fairly easy to do. This would then allow you to distinguish between edits (setData is called on your model) and updates (data is called on your model).
0
5,819
0
4
2010-03-12T10:02:00.000
python,qt,pyqt,signals,qtablewidget
QTableWidget signal cellChanged(): distinguish between user input and change by routines
0
2
3
2,449,334
1
0
0
On a click of a button named "Add Textbox" it calls a function which creates a single textbox using (gtk.Entry) function. So each time i click that button it creates a textbox. I have a submit button which should fetches all the values of the text boxes(say 10 textboxes) generated with the name of "entry". It works for one textbox but not for multiple. In php we can create dynamix textboxes mentioning as an array name=entry[]. Do we have similar functionality in python ? Enviroment : FC10 , Glade 3 , Python 2.5 , GTK.
true
2,432,468
1.2
0
0
1
You could be a bit clearer, it's not obvious what you do with your GtkEntry after creating it. The easiest thing would be to just add it to a Python list, so you can iterate over all created GtkEntry widgets later. Or, you could "tag" the widgets with something to make them identifiable, and iterate over the containing widgets (assuming you really do add the widget to a window or something).
0
1,035
0
0
2010-03-12T11:55:00.000
python,gtk,pygtk,glade
Getting values from Multiple Text Entry using Pygtk and Python
0
1
1
2,432,881
1
0
0
I'm writing a Python+Qt4 application that would ideally need to pop up a window every once in a while, to display pdf documents and allow very basic operations, namely scrolling through the different pages and printing the document. I've found the reportLab to create pdf files, but nothing about pdf viewers. Does anyone knows anything that might help. i was really hoping for the existence of something like the QWebView widget... thanks in advance to all
false
2,435,470
-0.066568
0
0
-1
what about okular? It is a full app, but it can always be call from another app.
0
6,219
0
8
2010-03-12T19:59:00.000
python,pdf,qt4,pyqt4
pdf viewer for pyqt4 application?
0
1
3
2,435,561
1
0
0
I need to show a webpage (a complex page with script and stuff, no static html) in a frame or something. It's for a desktop application, I'm using python 2.6 + wxPython 2.8.10.1. I need to catch some events too (mostly about changing page). I've found some samples using the webview module in a gtk application, but I couldn't have it works on wx.
false
2,439,039
0.099668
0
0
1
You can embed IE, but I think that's about it. wxWebKit is working on a wx add-on to use WebKit as an embedded browser in wx, but I think it's still a work in progress.
0
788
0
0
2010-03-13T16:22:00.000
python,wxwidgets
how to embed a webpage using wx?
0
1
2
2,439,208
1
0
0
I'm a newbie with a little experience writing in BASIC, Python and, of all things, a smidgeon of assembler (as part of a videogame ROM hack). I wanted to create small tool for modifying the hex values at particular points, in a particular file, that would have a GUI interface. What I'm looking for is the ability to create small GUI program, that I can distribute as an EXE (or, at least a standalone directory). I'm not keen on the idea of the .NET languages, because I don't want to force people to download a massive .NET framework package. I currently have Python with IDLE and Boa Constructor set up, and the application runs there. I've tried looking up information on compiling a python app that relies on Wxwidgets, but the search results and the information I've found has been confusing, or just completely incomprehensible. My questions are: Is python a good language to use for this sort of project? If I use Py2Exe, will WxWidgets already be included? Or will my users have to somehow install WxWidgets on their machines? Am I right in thinking at Py2Exe just produces a standalone directory, 'dist', that has the necessary files for the user to just double click and run the application? If the program just relies upon Tkinter for GUI stuff, will that be included in the EXE Py2Exe produces? If so, are their any 'visual' GUI builders / IDEs for Python with only Tkinter? Thankyou for your time, JBMK
false
2,439,520
0.148885
0
0
3
If you're not afraid to learn a new language, consider Tcl/Tk. The reason I mention this is Tcl's superior-to-almost-everything distribution mechanism which makes it really easy to wrap up a single file exe that includes everything you need -- the Tcl/Tk runtime, your program, icons, sound files, etc. inside an embedded virtual filesystem. And the same technique you use for one platform works for all. You don't have to use different tools for different platforms. If that intrigues you, google for starpack (single file that has it all), starkit (platform-independent application) and tclkit (platform-specific runtime). Tcl/Tk isn't everyone's cup of tea, but as a getting-started GUI language it's hard to beat IMO. If it has an Achilles heel is that it has no printing support. It's surprising, though, how many GUIs don't need printing support these days.
1
640
0
7
2010-03-13T18:40:00.000
python,wxwidgets,tkinter,py2exe
As a newbie, where should I go if I want to create a small GUI program?
0
2
4
2,440,302
1
0
0
I'm a newbie with a little experience writing in BASIC, Python and, of all things, a smidgeon of assembler (as part of a videogame ROM hack). I wanted to create small tool for modifying the hex values at particular points, in a particular file, that would have a GUI interface. What I'm looking for is the ability to create small GUI program, that I can distribute as an EXE (or, at least a standalone directory). I'm not keen on the idea of the .NET languages, because I don't want to force people to download a massive .NET framework package. I currently have Python with IDLE and Boa Constructor set up, and the application runs there. I've tried looking up information on compiling a python app that relies on Wxwidgets, but the search results and the information I've found has been confusing, or just completely incomprehensible. My questions are: Is python a good language to use for this sort of project? If I use Py2Exe, will WxWidgets already be included? Or will my users have to somehow install WxWidgets on their machines? Am I right in thinking at Py2Exe just produces a standalone directory, 'dist', that has the necessary files for the user to just double click and run the application? If the program just relies upon Tkinter for GUI stuff, will that be included in the EXE Py2Exe produces? If so, are their any 'visual' GUI builders / IDEs for Python with only Tkinter? Thankyou for your time, JBMK
false
2,439,520
0
0
0
0
Python would fit your needs. wxWidgets and Python are completely different things. I think you mean wxPython, which is a GUI toolkit for Python. I am not sure whether Py2Exe would include this, as I have never used Py2Exe - I build the packages and their dependencies manually. Pretty sure tkinter would be included. I use tkinter a bit and it works well enough.
1
640
0
7
2010-03-13T18:40:00.000
python,wxwidgets,tkinter,py2exe
As a newbie, where should I go if I want to create a small GUI program?
0
2
4
2,440,232
1
0
0
I want to know if it's possible to put a frame or a panel over a menubar using wxpython? Thanks in advance!
true
2,439,677
1.2
0
0
1
Your only chance is to write some Custom Menu, which could be bit difficult but doable. So basically instead of using system menu etc, you create windows inside your main frame which look like menu.
0
123
0
0
2010-03-13T19:21:00.000
python,wxpython
Is it possible to put a wx.window (frame/panel) over a wx.MenuBar?
0
1
1
2,463,869
1
0
0
I want to change the wxpython menubar colours. How can I do it?
false
2,439,708
-0.099668
0
0
-1
don't think it's doable -- it defaults to the platform's native look
0
1,776
0
1
2010-03-13T19:30:00.000
python,wxpython
How can we change a wx.MenuBar background and foreground colour using wxpython?
0
1
2
2,440,868
1
1
0
I have been trying to add some check boxes in a pylons mako. However I don't know how to get their values in the controller. It seems that it can only get the first value of the check boxes. I tried using form encode but i got several errors. Is there an easier way to do this? Thanks
false
2,456,926
0
0
0
0
I'm assuming that "I can only get the first value" means you've got a series of checkboxes with the same value for the 'name' attribute within your form? Now, if that's the case and you're wanting a list of boolean values based on whether or not the boxes are checked or not, you'll need to do two things: First, when you define your form elements using form encode on your checkbox, set it up such that a missing value on a checkbox element returns 'False.' This way, as the browser won't send a value over unless a checkbox is "on", you validation coerces the missing value to False. class Registration(formencode.Schema): box = formencode.validators.StringBoolean(if_missing=False) Next, assuming you want a list returned, you'll not be able to name all of your elements the same. Pylons supports a nested structure, though. Look at formencode.variabledecode.NestedVariables. In short, you'll need to define a NestedVariables instance as one of your class attributes and your form 'name' attributes will need to change in order to contain explicit indexes. Edit.. here's a complete example I did real quick: import logging import pprint import formencode from pylons import request, response, session, tmpl_context as c, url from pylons.controllers.util import abort, redirect from pylons.decorators import validate from testproj.lib.base import BaseController, render log = logging.getLogger(__name__) class CheckList(formencode.Schema): box = formencode.validators.StringBoolean(if_missing=False) hidden = formencode.validators.String() class EnclosingForm(formencode.Schema): pre_validators = [formencode.NestedVariables()] boxes = formencode.ForEach(CheckList()) class MyformController(BaseController): def index(self): schema = EnclosingForm() v = schema.to_python(dict(request.params)) # Return a rendered template #return render('/myform.mako') # or, return a response response.content_type = 'text/plain' return pprint.pformat(v) And then the query string? boxes-0.box=true&boxes-0.hidden=hidden&boxes-1.box=true& boxes-1.hidden=hidden&boxes-2.hidden=hidden And lastly, the response: {'boxes': [{'box': True, 'hidden': u'hidden'}, {'box': True, 'hidden': u'hidden'}, {'box': False, 'hidden': u'hidden'}]} HTH
0
1,306
0
1
2010-03-16T18:11:00.000
python,pylons
Checkboxes with pylons
0
1
1
2,457,303
1
0
0
I've got a pile of C code that I'd like to unit test using Python's unittest library (in Windows), but I'm trying to work out the best way of interfacing the C code so that Python can execute it (and get the results back). Does anybody have any experience in the easiest way to do it? Some ideas include: Wrapping the code as a Python C extension using the Python API Wrap the C code using SWIG Add a DLL wrapper to the C code and load it into Python using ctypes Add a small XML-RPC server to the c-code and call it using xmlrpclib (yes, I know this seems a bit far-out!) Is there a canonical way of doing this? I'm going to be doing this quite a lot, with different C modules, so I'd like to find a way which is least effort.
true
2,482,270
1.2
1
0
8
I think that the exact solution depends on your code. Not all libraries are easily suitable for wrapping as a DLL. If your is, then ctypes is certainly the easiest way - just make a DLL out of your library and then test it with ctypes. An added bonus is that you now have your library conveniently wrapped as a standalone DLL which helps to decouple your application. Sometimes, however, a more thorough interaction will be required between your C code and the testing Python code. Then, it's probably best to hook it as an extension, for which SWIG is a pretty good tool that will automate away most things you'll find boring about the process.
0
12,704
0
25
2010-03-20T07:12:00.000
python,c,unit-testing,swig
Easiest way of unit testing C code with Python
0
1
2
2,489,948
1
0
0
I'm starting a computer graphics course, and I have to choose a language. Choices are between C++ and Python. I have no problem with C++, python is a work in progress. So i was thinking to go down the python road, using pyopengl for graphics part. I have heard though, that performance is an issue. Is python / pyopengl mature enough to challenge C++ on performance? I realize its a long shot, but I'd like to hear your thoughts, experiences on uses of pyopengl.
true
2,488,730
1.2
0
0
30
It depends a LOT on the contents of your computer graphics course. If you are doing anything like the introductory course I've taught in the past, it's basically spinning cubes and spheres, some texture mapping and some vertex animation, and that's about it. In this case, Python would be perfectly adequate, assuming you can get around the Unpythonic (and, lets be honest, un-C++) OpenGL state-machine paradigm. For things like doing your matrix maths you can use Numpy, the core of which is written in C and is really quite quick. You'll be up and running faster, iterate faster and most likely have more fun. If, however, you are doing some hardcore, cutting edge, millions-of-triangles-per-scene-skinned-animated-everything computer graphics course, stick with C++. If your class has given you the choice it's probably a safe bet that Python will be ok. If you want to leverage your knowledge into a real job in computer graphics though, pretty much every game and graphics engine is written in C or C++, while Python (or Lua) is left as a scripting language.
1
10,480
0
15
2010-03-21T21:10:00.000
python,c++,opengl,3d,pyopengl
pyopengl: Could it replace c++?
0
2
5
2,489,409
1
0
0
I'm starting a computer graphics course, and I have to choose a language. Choices are between C++ and Python. I have no problem with C++, python is a work in progress. So i was thinking to go down the python road, using pyopengl for graphics part. I have heard though, that performance is an issue. Is python / pyopengl mature enough to challenge C++ on performance? I realize its a long shot, but I'd like to hear your thoughts, experiences on uses of pyopengl.
false
2,488,730
0.07983
0
0
2
Python is an awesome language, but it's not the right tool for graphics. And if you want to do anything remotely advanced you'll have to use unpythonic libraries and will end up with ugly C code written in Python.
1
10,480
0
15
2010-03-21T21:10:00.000
python,c++,opengl,3d,pyopengl
pyopengl: Could it replace c++?
0
2
5
2,488,775
1
0
0
I'm new to Python and am starting to teach myself GUI programming (hopefully) using PyQT4.7 and Python 2.6 I just downloaded the whole PyQT/QT4 package (including QTDesigner) from the PyQT website, however it seems QTDesigner, which looks amazing to use as a newbie (since you can see all the attributes/properties/defaults etc) of each widget and visually edit the properties is great, but PyQT seems not to set QTDesigner to integrate directly with with PyQT and PyQTs python code generation scripts: i.e.: Hitting "View Code", tries to run the Designer->C++ script called (uic) instead of the pyuic.py script, etc. Is there a way to get QTDesigner to integrate closely with PyQT for code generation on the fly like it does with C++? If not, does that mean I have to code the entire QT GUI within my Python IDE and lookup all the documentation and boilerplate code for every widget? (seems very inefficient and inelegant compared to just having QTDesigner+Python integration). What is the customary toolchain//production flow of using Designer with PyQT? (If no direct integration is possible -- do python+pyQT users just skip using QTDesigner all together and manually write all the QT GUI code in python?) Any additional tips/suggestions for a PyQT newbie would be appreciated. Thanks! ps I know a bunch of you are probably going to tell me to just suck it up and code all the QT UI by hand, but if I use Designer while learning as asked above, please provide a way to do that so I can learn it more easily, thanks!
false
2,489,643
0.049958
0
0
1
You can run pyuic (or rather pyuic4) from hand, in your console. You can make your GUI using designer with Python, just as you would do it with C++. By the way: I have written all GUI stuff for my app (10k of code) by hand. I don't really like GUI designers and working with generated code, when you need to tweak something.
0
11,299
0
20
2010-03-22T02:08:00.000
python,qt4,pyqt4,qt-designer
Using QTDesigner with PyQT and Python 2.6
0
2
4
2,494,652
1
0
0
I'm new to Python and am starting to teach myself GUI programming (hopefully) using PyQT4.7 and Python 2.6 I just downloaded the whole PyQT/QT4 package (including QTDesigner) from the PyQT website, however it seems QTDesigner, which looks amazing to use as a newbie (since you can see all the attributes/properties/defaults etc) of each widget and visually edit the properties is great, but PyQT seems not to set QTDesigner to integrate directly with with PyQT and PyQTs python code generation scripts: i.e.: Hitting "View Code", tries to run the Designer->C++ script called (uic) instead of the pyuic.py script, etc. Is there a way to get QTDesigner to integrate closely with PyQT for code generation on the fly like it does with C++? If not, does that mean I have to code the entire QT GUI within my Python IDE and lookup all the documentation and boilerplate code for every widget? (seems very inefficient and inelegant compared to just having QTDesigner+Python integration). What is the customary toolchain//production flow of using Designer with PyQT? (If no direct integration is possible -- do python+pyQT users just skip using QTDesigner all together and manually write all the QT GUI code in python?) Any additional tips/suggestions for a PyQT newbie would be appreciated. Thanks! ps I know a bunch of you are probably going to tell me to just suck it up and code all the QT UI by hand, but if I use Designer while learning as asked above, please provide a way to do that so I can learn it more easily, thanks!
false
2,489,643
0
0
0
0
QtDesigner uses uic.exe to generate on the fly C++ code. uic.exe is a command-line tool, it gets file names as input parameters. For integration with python, you can write a python program that uses pyuic.py, match it inputs with uic.exe's input (order, switchs etc.), convert it to an executable (using py2exe) and rename the executable to uic.exe. then replace it with uic.exe in Qt's bin directory (uic.exe dont exist in PyQt as I know). You should just be careful about input arguments of uic.exe and your hand-written macro (they should match together). I think your program will need to know python's path (in order to use pyuic). if you are using windows, you could obtain the path from registry.
0
11,299
0
20
2010-03-22T02:08:00.000
python,qt4,pyqt4,qt-designer
Using QTDesigner with PyQT and Python 2.6
0
2
4
3,595,979
1
0
0
I am dealing with image buffers, and I want to be able to access data a few lines into my image for analysis with a c library. I have created my 8-bit pixel buffer in Python using create_string_buffer. Is there a way to get a pointer to a location within that buffer without re-creating a new buffer? My goal is to analyze and change data within that buffer in chunks, without having to do a lot of buffer creation and data copying. In this case, ultimately, the C library is doing all the manipulation of the buffer, so I don't actually have to change values within the buffer using Python. I just need to give my C function access to data within the buffer.
false
2,494,288
0
0
0
0
You can also use ctypes.cast(buf, ctypes.c_void_p)
0
3,210
0
5
2010-03-22T17:18:00.000
python,ctypes
ctypes and pointer manipulation
0
1
2
2,494,539
1
0
0
Hello fellow software developers. I want to distribute a C program which is scriptable by embedding the Python interpreter. The C program uses Py_Initialize, PyImport_Import and so on to accomplish Python embedding. I'm looking for a solution where I distribute only the following components: my program executable and its libraries the Python library (dll/so) a ZIP-file containing all necessary Python modules and libraries. How can I accomplish this? Is there a step-by-step recipe for that? The solution should be suitable for both Windows and Linux. Thanks in advance.
false
2,494,468
0
1
0
0
There's a program called py2exe. I don't know if it's only available for Windows. Also, the latest version that I used does not wrap everything up into one .exe file. It creates a bunch of stuff that has to be distributed - a zip file, etc..
1
5,060
0
11
2010-03-22T17:43:00.000
python,c,dll,distribution
How to create an application which embeds and runs Python code without local Python installation?
0
1
6
2,540,638
1
0
0
Any ideas how I can display an image file (bmp or png) centered on the screen as an application splash screen when running a Windows console script based on a batch file, vbscript/wscript or Python console script? I'm not interested in a wxPython solution - that's too much overhead just to implement a cosmetic feature like a splash screen. Thank you, Malcolm
false
2,502,385
0
0
0
0
Try TK, it is included with python. Also, PyGtk is lighter than wxPython, but I ended up bitting the bullet and using wxPython for the same purpose recently, it is heavy, but it didn't have any affect on the script performance.
0
5,541
1
2
2010-03-23T18:02:00.000
python,image,vbscript,batch-file,console-application
Display an image as a splash screen when running Windows batch file, vbscript/wscript or Python console script
0
1
4
2,502,963
1
0
0
How to create pygtk entry with placeholder like in HTML 5 input element?
false
2,503,562
0.066568
0
0
1
You can use PyGobject instead of pygtk, and then setting a placeholder is a piece of cake: entry.set_placeholder_text("some string")
0
981
0
3
2010-03-23T20:56:00.000
python,pygtk
Pygtk entry placeholder
0
1
3
14,070,047
1
0
1
I have FigureCanvasWxAgg instance with a figure displayed on a frame. If user clicks on the canvas another frame with a new FigureCanvasWxAgg containing the same figure will be shown. By now closing the new frame can result in destroying the C++ part of the figure so that it won't be available for the first frame. How can I save the figure? Python deepcopy from copy module does't work in this case. Thanks in advance.
false
2,513,786
0.197375
0
0
1
I'm not familiar with the inner workings, but could easily imagine how disposing of a frame damages the figure data. Is it expensive to draw? Otherwise I'd take the somewhat chickenish approach of simply redrawing it ;)
0
1,759
0
8
2010-03-25T07:45:00.000
python,wxpython,copy,matplotlib
How to copy matplotlib figure?
0
1
1
3,120,753
1
0
0
I am running python 2.6.5 and pygame 1.9.1 It seems to me I've tried everything but it keeps showing 'module not found' errors... Please help!
false
2,541,254
0.197375
0
0
1
Well I've just finished installing it on my Mac - you have to watch out for the Python Platform under Tools and File. The default is Jython, but you want to change it to point to your python version in the Frameworks file of your Library. Does that make sense?
0
997
0
0
2010-03-29T21:01:00.000
python,netbeans,import,module,pygame
Can't import pygame to Netbeans on Mac
0
1
1
2,908,642
1
0
0
I know how to reference an existing .dll to IronPython, but is there any way to add my project as a reference like I can between Visual Studio projects? Or is it best practice to create a separate class library?
true
2,550,370
1.2
0
0
3
You can't add reference to a project since it's a Visual Studio thing. I suggest that during the development process, call import (IronPython) or require (IronRuby) with the full path of your project assembly like c:\dev\MyProject\bin\Debug\MyProject.dll.
1
1,069
0
2
2010-03-31T03:45:00.000
c#,visual-studio,ironpython,ironruby
Any way to add my C# project as a reference in IronPython / IronRuby?
0
1
2
2,550,627
1
0
0
I've been browsing documentation, but haven't been able to find a straightforward tutorial, so I apologize if this is a really simple question. Anyway, I have eclipse with pydev installed on MAC OSX, and I want configure wxPython to work with eclipse, how do I do this? Once I've downloaded wxpython, what steps do I take to allow wxPython development from eclipse? Thanks!
false
2,561,542
0.197375
0
0
3
wxPython install by default to the following path /usr/local/lib/wxPython-2.9.4.0 When adding a path to the Interpreter libraries section in the eclipse preferences add this path: /usr/local/lib/wxPython-2.9.4.0/lib/python2.7/site-packages/wx-2.9.4-osx_cocoa
0
8,700
1
3
2010-04-01T15:28:00.000
python,eclipse,wxpython
Configuring Eclipse with wxPython
0
2
3
12,983,874
1
0
0
I've been browsing documentation, but haven't been able to find a straightforward tutorial, so I apologize if this is a really simple question. Anyway, I have eclipse with pydev installed on MAC OSX, and I want configure wxPython to work with eclipse, how do I do this? Once I've downloaded wxpython, what steps do I take to allow wxPython development from eclipse? Thanks!
false
2,561,542
1
0
0
7
Vinay's answer above is correct. However, if code completion is not picking it up, you might need to add the WX directory to the Pydev's interpreter library path. Window | Preferences | Pydev | Interpreter - Python | Libraries If wx is not present, New Folder and select the install directory.
0
8,700
1
3
2010-04-01T15:28:00.000
python,eclipse,wxpython
Configuring Eclipse with wxPython
0
2
3
2,562,141
1
0
0
I'm using gtk.combo_box_new_text() to make combobox list, this uses a gtk.ListStore to store only strings, so there are some way to add a separator between items without use a complex gtk.TreeModel? If this is not possible, what is the simplest way to use a gtk.TreeModel to able secuential widget addition?
true
2,571,202
1.2
0
0
4
I think that you should use ComboBox.set_row_separator_func to set a separator function where you would determine which items of your list will be separators. Since ListStore implements TreeModel interface, you should have no problem simply using it in your case. P.S.: nothing is easy in GTK :)
0
825
0
4
2010-04-03T12:07:00.000
python,user-interface,gtk,pygtk,gnome
How to add a separator in a PyGTK combobox?
0
1
1
2,571,279
1
0
0
Qt3.3 used to allow for multiple selections in the QTextEdit widget by calling the setSelection() function and specifying a different selection id (selNum) as the last argument in that function. In Qt4, to create a selection, I do it by creating a QTextCursor object and call the setPosition() or movePosition() methods. I have no problems being able to create a single selection of text. I am, however, unable to find a way to create multiple selections. The methods in Qt4 do not have an argument which allows you to set a selection id, nor can i find any other function in the QTextCursor or QTextEdit which looks like it might allow me to do so. Has this feature been completely removed from Qt4? or has is there a new and different way of doing it? Thanks. Ronny
false
2,574,195
0
0
0
0
How about creating multiple cursors (QTextCursor), each selection a different portion of the text. Would that work for you?
0
1,173
0
1
2010-04-04T10:55:00.000
python,qt,qt4,pyqt
how to create multiple selections in text edit box in qt4?
0
2
2
2,574,214
1
0
0
Qt3.3 used to allow for multiple selections in the QTextEdit widget by calling the setSelection() function and specifying a different selection id (selNum) as the last argument in that function. In Qt4, to create a selection, I do it by creating a QTextCursor object and call the setPosition() or movePosition() methods. I have no problems being able to create a single selection of text. I am, however, unable to find a way to create multiple selections. The methods in Qt4 do not have an argument which allows you to set a selection id, nor can i find any other function in the QTextCursor or QTextEdit which looks like it might allow me to do so. Has this feature been completely removed from Qt4? or has is there a new and different way of doing it? Thanks. Ronny
true
2,574,195
1.2
0
0
1
The solution, i realise now is actually quite simple. To graphically visualise all the various selections (separate QTextCursor objects), instead of calling the setTextCursor() method for the QTextEdit widget for each of the selections, i change the background color of each of those sections of text by calling the setCharFormat() method for each of those QTextCursor objects.
0
1,173
0
1
2010-04-04T10:55:00.000
python,qt,qt4,pyqt
how to create multiple selections in text edit box in qt4?
0
2
2
2,574,559
1
0
0
I want to display a gtk.Image with a high level of zoom, but scale the image to a new pixbuf with the gtk.gdk.Pixbuf methods waste a lot of memory and processor. Are there some simply way to display a zoomed image?
false
2,581,687
0.066568
0
0
1
it is not possible with gdk, i'm afraid. try cairo or opengl.
0
822
0
1
2010-04-05T23:00:00.000
python,gtk,pygtk,gnome
Zoomed PyGTK image without scale pixbuf
0
1
3
2,586,546
1
0
0
I know what Cythons purpose is. It's to write compilable C extensions in a Python-like language in order to produce speedups in your code. What I would like to know (and can't seem to find using my google-fu) is if Cython can somehow compile into an executable format since it already seems to break python code down into C. I already use Py2Exe, which is just a packager, but am interested in using this to compile down to something that is a little harder to unpack (Anything packed using Py2EXE can basically just be extracted using 7zip which I do not want) It seems if this is not possible my next alternative would just be to compile all my code and load it as a module and then package that using py2exe at least getting most of my code into compiled form, right?
false
2,581,784
0.049958
0
0
1
Aftershock's answer is good, what I want to say is about run app without console. Most like Aftershock's answer, if you want your application run without console, two points are important: Replace all the main() function in the ".c" file made by cython --embed with wmain() Add /subsystem:windows /entry:wmainCRTStartup to the end of cl.exe ... command
1
37,475
0
53
2010-04-05T23:34:00.000
python,compilation,cython
Can Cython compile to an EXE?
0
1
4
50,452,413
1
0
0
A line created using the DrawLine method of wx.DC has the onClick and onMouseOver events?
true
2,583,646
1.2
0
0
0
No wx.DC just draw to a device and those are all plain pixels, wx.DC doesn't track mouse events or any other events. If you want such behavior you will have to track mouse movement on your drawing area and on click check which area it may have clicked e.g. if near by the line show a msg etc.
0
81
0
0
2010-04-06T08:58:00.000
python,wxpython
Does wx.DC line has events?
0
1
1
2,583,745
1
0
0
For some code as follows, opts, args = getopt.getopt(sys.argv[1:], "c:", ... for o,v in opts: ... elif o in ("-c", "--%s" % checkString): kCheckOnly = True clientTemp = v If I don't give the parameter after the -c, I get the error messages as follows. Traceback (most recent call last): File "niFpgaTimingViolationMain.py", line 100, in opts, args = getopt.getopt(sys.argv[1:], "hdc:t:",[helpString, debugString, checkString, twxString]) File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/getopt.py", line 91, in getopt opts, args = do_shorts(opts, args[0][1:], shortopts, args[1:]) File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/getopt.py", line 195, in do_shorts opt) getopt.GetoptError: option -c requires argument Is there any way to catch this error, and process it to print something like this? It seems that just wrapping the code in try/except doesn't work. ERROR: You forgot to give the file name after -c option
true
2,585,803
1.2
0
0
3
You can catch getopt.GetoptError and check the 'opt' and 'msg' attributes yourself: try: opts, args = getopt.getopt(sys.argv[1:], "c:", ... except getopt.GetoptError, e: if e.opt == 'c' and 'requires argument' in e.msg: print >>sys.stderr, 'ERROR: You forgot to give the file name after -c option' sys.exit(-1)
0
752
0
2
2010-04-06T14:52:00.000
python,getopt
How to process python generated error messages my own way?
0
2
2
2,585,839
1
0
0
For some code as follows, opts, args = getopt.getopt(sys.argv[1:], "c:", ... for o,v in opts: ... elif o in ("-c", "--%s" % checkString): kCheckOnly = True clientTemp = v If I don't give the parameter after the -c, I get the error messages as follows. Traceback (most recent call last): File "niFpgaTimingViolationMain.py", line 100, in opts, args = getopt.getopt(sys.argv[1:], "hdc:t:",[helpString, debugString, checkString, twxString]) File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/getopt.py", line 91, in getopt opts, args = do_shorts(opts, args[0][1:], shortopts, args[1:]) File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/getopt.py", line 195, in do_shorts opt) getopt.GetoptError: option -c requires argument Is there any way to catch this error, and process it to print something like this? It seems that just wrapping the code in try/except doesn't work. ERROR: You forgot to give the file name after -c option
false
2,585,803
0.291313
0
0
3
the correct answer is to use the OptionParser module instead of trying to "roll your own".
0
752
0
2
2010-04-06T14:52:00.000
python,getopt
How to process python generated error messages my own way?
0
2
2
2,585,858
1
0
0
Looking at Python modules and at code in the "lib-dnyload" directory in the Python framework, I noticed whenever code is creating some kind of GUI or graphic it imports a non-Python file with a .so extension. And there are tons .so files in "lib-dnyload". From googling things I found that these files are called shared objects and are written in C or C++. I have a Mac and I use GCC. How do I make shared object files that are accessible via Python? Mainly just how to make shared objects with GCC using Mac OS X.
false
2,610,421
0
1
0
0
You can write python extensions in many ways, including Cython, SWIG, boost.python ... You can also write a shared library and use the "ctypes" library to access it.
1
4,363
0
1
2010-04-09T19:44:00.000
python,macos,gcc,distutils,shared-objects
How to create make .so files from code written in C or C++ that are usable from Python
0
1
5
2,611,684
1
0
0
There is a python module called "_Qt". PyQt is not what I want. I was wondering if there was any documentation for the _Qt module installed with python as a standard module. I have a mac.
true
2,611,593
1.2
0
0
0
That's QuickTime, nothing to do with Qt. In your question it's not really clear if you intended to use Qt or QuickTime.
1
232
0
0
2010-04-09T23:28:00.000
python,qt,module
How to use the _Qt python module?
0
1
1
2,611,862
1
0
0
I'm trying to put together a simple program that will let me visualize a series of consecutive cuts on a wood panel using a router with a particular cutting head. I'm trying to find a geometry library that is capable of subtractively modifying 3D shapes or solids by sweeping other 3D solids through them. Specifically, I'd like to be able to define a rectangular solid (the wood panel) and then define a bit profile shape, and take cuts through the rectangular solid (sometimes on a straight line, sometimes on a circular arc). Does anyone know of anything that will do this?
false
2,611,606
0
0
0
0
While not exactly a library, one way of doing this might be to build on top of the 2D-to-3D extrusion ability that most of these libraries do support. A tentative algorithm for doing this might be: Get bit profile as a 2D shape (you're likely to have this already). Extrude that profile along the line or arc that is the toolpath, creating a 3D solid that is the shape of the cut. At each vertex (say, where a straight path joins a curved one), do a "rotate extrude" or "revolve extrude" of the bit profile to generate the corner radius -- most libraries should support this operation as well. Repeat from 2 until done with all toolpaths. Do a CSG boolean subtraction of (workpiece - set_of_toolpaths). That algorithm seems like it might be fraught with edge cases, but I haven't been able to think of any so far. I'm wondering why, if it's this simple, there aren't more packages already doing it.
0
2,504
0
2
2010-04-09T23:31:00.000
c++,python,geometry,cad
Subtractively sweep a solid through another in python (or C++)
0
1
8
10,033,868
1
0
0
I do understand that this topic has been covered in some way at StackOverflow but I'm still not able to figure out the exact answer: can I treat IronPython as a Pythonic replacement to C#? I use CPython every day, I love the Zen :) but my current task is a Windows-only application with a complex GUI and some other features which I would like to implement using .NET.
true
2,617,007
1.2
0
0
13
IronPython is NOT equivalent to "other languages that run on .NET", as the language has support for substantially fewer CLR runtime features. IronPython classes are not "real" .NET classes, and DLR APIs need to be used when calling IronPython code from traditional CLR-based languages; this means that if you want genuinely easy interoperability, you're stuck writing glue to "hide" the DLR. Boo is a much more complete Pythonically-inspired language targeting the CLR. Its (dynamically inferrable) static typing (which can be replaced with duck typing on a variable-by-variable basis) also allows libraries written in Boo to be natively used from C# and other CLR-based languages, without needing to make any allowances for the language in use.
1
1,073
0
12
2010-04-11T12:38:00.000
python,.net,ironpython,cpython,python.net
Can I treat IronPython as a Pythonic replacement to C#?
0
4
6
2,617,936
1
0
0
I do understand that this topic has been covered in some way at StackOverflow but I'm still not able to figure out the exact answer: can I treat IronPython as a Pythonic replacement to C#? I use CPython every day, I love the Zen :) but my current task is a Windows-only application with a complex GUI and some other features which I would like to implement using .NET.
false
2,617,007
0.033321
0
0
1
The question "Can I treat IronPython as a Pythonic replacement for C#?" has been answered pretty well by jalf. If the question were "Is IronPython a Pythonic .NET Language?" though, then the answer would absolutely be yes. The principles of Zen - esp. least surprise - absolutely apply to IronPython's integration with the CLR as well.
1
1,073
0
12
2010-04-11T12:38:00.000
python,.net,ironpython,cpython,python.net
Can I treat IronPython as a Pythonic replacement to C#?
0
4
6
2,617,900
1
0
0
I do understand that this topic has been covered in some way at StackOverflow but I'm still not able to figure out the exact answer: can I treat IronPython as a Pythonic replacement to C#? I use CPython every day, I love the Zen :) but my current task is a Windows-only application with a complex GUI and some other features which I would like to implement using .NET.
false
2,617,007
0
0
0
0
"Complex" UI usually entails not "writing" it but building it within Visual Studio with point and click. All the callbacks and eventing code is inserted by itself. There is almost nothing like that on python side. I'd say go for C# straight out. There is one nagging thing though. If you are true Pythonista, the static typing will get to you very very quickly and you will want to start throwing heavy objects at random people. If that point comes think about building out the UI with C# and embedding IronPython as a scripting engine for implementing your business logic. That could be a tolerable middle ground.
1
1,073
0
12
2010-04-11T12:38:00.000
python,.net,ironpython,cpython,python.net
Can I treat IronPython as a Pythonic replacement to C#?
0
4
6
3,042,636
1
0
0
I do understand that this topic has been covered in some way at StackOverflow but I'm still not able to figure out the exact answer: can I treat IronPython as a Pythonic replacement to C#? I use CPython every day, I love the Zen :) but my current task is a Windows-only application with a complex GUI and some other features which I would like to implement using .NET.
false
2,617,007
1
0
0
10
That depends on what it is about C# that you need, and which needs replacing. If the reason you use C# is that you need a reasonably high performance statically typed language then no, IronPython is likely not going to be a replacement. If the reason you use it is simply "I need something that runs on .NET and can access .NET libraries", then yes, any language that runs on .NET can be used to replace it. If you use C# because you're working with a team of programmers who only know C-like languages, C# might also be difficult to replace with IronPython. It depends on what characteristics about C# it is that you care about, and need to find replacements for.
1
1,073
0
12
2010-04-11T12:38:00.000
python,.net,ironpython,cpython,python.net
Can I treat IronPython as a Pythonic replacement to C#?
0
4
6
2,617,019
1
0
0
The PyQt4 QTableWidget has both cellPressed and cellClicked signals. From the name, and the little experimentation I did with them, they appear to do exactly the same thing. Is there a difference between the two?
true
2,619,446
1.2
0
0
3
These signals on cells are not sharply documented (that I can find) but I'd interpret them by analogy with the pressed, clicked, and released signals on buttons: pressed means the mouse's left button's been pressed down inside the widget, released means the mouse's left button's been released (let up) inside the widget, clicked means the mouse's left button's been pressed, then released (let up), both inside the widget So if you press the button down inside the widget, hold it down, move the mouse elsewhere, and only then release the mouse's button, then you should only see the pressed signal, but neither of the other two; while any clicked signal always implies both pressed and released have also been signaled. I believe that normal UI behavior should be to respond to clicked only, unless you want to do something special if the button's pressed and not released for a certain time (i.e., held down for a prolonged time).
0
1,577
0
1
2010-04-12T01:43:00.000
python,pyqt4
Difference between cellPressed and cellClicked signals of PyQt4 QTableWidget
0
1
1
2,619,472
1
0
0
As per the title, is there any way to programatically change the selected item in a ComboBox and have it raise an event? I am setting the selected item using myComboBox.SetSelection(index), but this doesn't raise the wx.EVT_COMBOBOX event.
true
2,629,841
1.2
0
0
0
I use C++ version of wxWidget. Look up documentation on these two functions: void wxPostEvent(wxEvtHandler *dest, wxEvent& event) void AddPendingEvent(wxEvent& event)
0
1,192
0
1
2010-04-13T13:23:00.000
combobox,wxpython,wxwidgets
Triggering wx.EVT_COMBOBOX after programatically changing ComboBox selection?
0
1
1
2,629,895
1
0
0
I always see people mention that "Python binding" and "C Sharp binding" etc. when I am actually using their C++ libraries. What does binding mean? If the library is written in C, and does Python binding means that they use SWIG kind of tool to mock a Python interface? Newbie in this field, and any suggestion will be welcomed.
false
2,632,466
0
0
0
0
In short, yes. A binding is just that, an interface to a library or program written in another language, though it need not be generated using SWIG. SWIG is just a tool for automatic generation of the same...
0
1,840
0
6
2010-04-13T19:11:00.000
c++,python,binding
What does binding mean exactly?
0
4
4
2,632,489
1
0
0
I always see people mention that "Python binding" and "C Sharp binding" etc. when I am actually using their C++ libraries. What does binding mean? If the library is written in C, and does Python binding means that they use SWIG kind of tool to mock a Python interface? Newbie in this field, and any suggestion will be welcomed.
true
2,632,466
1.2
0
0
2
When someone talks about something like a "C# binding" of a library, they are indicating that you and API is being provided in C# for a library written in a different language. This may or may not involve an autogeneration tool like SWIG.
0
1,840
0
6
2010-04-13T19:11:00.000
c++,python,binding
What does binding mean exactly?
0
4
4
2,632,491
1
0
0
I always see people mention that "Python binding" and "C Sharp binding" etc. when I am actually using their C++ libraries. What does binding mean? If the library is written in C, and does Python binding means that they use SWIG kind of tool to mock a Python interface? Newbie in this field, and any suggestion will be welcomed.
false
2,632,466
0
0
0
0
You're right, for a general library, a "binding" essentially means "easily callable from". The binding may or may not have been created with SWIG, that's just one way to do it.
0
1,840
0
6
2010-04-13T19:11:00.000
c++,python,binding
What does binding mean exactly?
0
4
4
2,632,492
1
0
0
I always see people mention that "Python binding" and "C Sharp binding" etc. when I am actually using their C++ libraries. What does binding mean? If the library is written in C, and does Python binding means that they use SWIG kind of tool to mock a Python interface? Newbie in this field, and any suggestion will be welcomed.
false
2,632,466
0
0
0
0
If the library is written in C, and does Python binding means that they use SWIG kind of tool to mock a Python interface? Yes, you are right. That will be called a Python binding of the respective library.
0
1,840
0
6
2010-04-13T19:11:00.000
c++,python,binding
What does binding mean exactly?
0
4
4
2,632,493
1
0
0
So I'm going through the beginning stages of producing a game in Python, and I'm looking for a library that is able to manipulate pixels and blit them relatively fast. My first thought was pygame, as it deals in pure 2D surfaces, but it only allows pixel access through pygame.get_at(), pygame.set_at() and pygame.get_buffer(), all of which lock the surface each time they're called, making them slow to use. I can also use the PixelArray and surfarray classes, but they are locked for the duration of their lifetimes, and the only way to blit them to a surface is to either copy the pixels to a new surface, or use surfarray.blit_array, which requires creating a subsurface of the screen and blitting it to that, if the array is smaller than the screen (if it's bigger I can just use a slice of the array, which is no problem). I don't have much experience with PyOpenGL or Pyglet, but I'm wondering if there is a faster library for doing pixel manipulation in, or if there is a faster method, in Pygame, for doing pixel manupilation. I did some work with SDL and OpenGL in C, and I do like the idea of adding vertex/fragment shaders to my program. My program will chiefly be dealing in loading images and writing/reading to/from surfaces.
false
2,633,900
0
0
0
0
I checked out pyglet, and saw that it works well for static per pixel collision, when the image is not manipulated too much; however, I'm not sure how well it works with a dynamic image. In short, I'm looking for a library that's able to quickly display a buffer of pixels. This buffer will be constantly changing, so fast access and blitting is essential. This could be done in C with relative ease using SDL; however, I'm looking for a similar method in Python. I'm not even too worried about hardware acceleration at this point, although it would certainly be nice.
0
2,106
0
2
2010-04-13T23:28:00.000
python
Python pixel manipulation library
0
1
3
2,634,849
1
0
0
Frustrated by lack of a simple ACDSee equivalent for OS X, I'm looking to hack one up for myself. I'm looking for a gui library that accommodates: Full screen image display High quality image fit-to-screen (for display) Low memory usage Fast display Reasonable learning curve (the simpler the better) Looks like there are several choices, so which is the best? Here are some I've run across: PyOpenGL PyGame PyQT wxpython I don't have any particular experience with any of these, nor any strong desire to become an expert - I'm looking for the simplest solution. What do you recommend? [Update] For those not familiar with ACDSee, here's what it does that I care about: Simple list/thubmnail display of images in a directory Sort by name/size/type Ability to view images full screen Single-key delete while viewing full screen Move to next/previous image while viewing full screen Ability to select a group of images for: move to / copy to directory delete resize ACDSee has a bunch of niceties as well, such as remembering directories you've moved images to in the past, remembering your resize settings, displaying the total size of the images you've selected, etc. I've tried most of the options I could find (including Xee) and none of them quite get there. Please keep in mind that this is a programming/library question, not a criticism of any of the existing tools.
false
2,634,119
0
0
0
0
Use an App like Picasa (now available on mac). Use AppleScript through Python to control it from your application. Failing that, use PyObjC to create Cocoa image display component and dialogs, and so on.
0
1,562
0
3
2010-04-14T00:24:00.000
python,macos,opengl,wxpython,pyqt
Python: OSX Library for fast full screen jpg/png display
0
2
4
2,999,881
1
0
0
Frustrated by lack of a simple ACDSee equivalent for OS X, I'm looking to hack one up for myself. I'm looking for a gui library that accommodates: Full screen image display High quality image fit-to-screen (for display) Low memory usage Fast display Reasonable learning curve (the simpler the better) Looks like there are several choices, so which is the best? Here are some I've run across: PyOpenGL PyGame PyQT wxpython I don't have any particular experience with any of these, nor any strong desire to become an expert - I'm looking for the simplest solution. What do you recommend? [Update] For those not familiar with ACDSee, here's what it does that I care about: Simple list/thubmnail display of images in a directory Sort by name/size/type Ability to view images full screen Single-key delete while viewing full screen Move to next/previous image while viewing full screen Ability to select a group of images for: move to / copy to directory delete resize ACDSee has a bunch of niceties as well, such as remembering directories you've moved images to in the past, remembering your resize settings, displaying the total size of the images you've selected, etc. I've tried most of the options I could find (including Xee) and none of them quite get there. Please keep in mind that this is a programming/library question, not a criticism of any of the existing tools.
false
2,634,119
0
0
0
0
it's not an answer to your coding question but for (a big part of) the lack of ACDsee equivalent (requires OSX 10.5+): Simple list/thubmnail display of images in a directory: Finder.app Sort by name/size/type: Finder.app will do name & type, not image size (but does file size) Ability to view images full screen: quick preview (spacebar / eye icon) Single-key delete while viewing full screen: command-backspace while viewing in quickpreview, both windowed and fullscreen Move to next/previous image while viewing full screen: both quickprewiew (after selecting a group of images or whole directory with cmd-a) and Preview.app Ability to select a group of images for[...]: Finder.app will does all but resize seems like you have everything except resize just pressing the spacebar while in finder. Preview.app will resize both a single image or multiple ones in one batch.
0
1,562
0
3
2010-04-14T00:24:00.000
python,macos,opengl,wxpython,pyqt
Python: OSX Library for fast full screen jpg/png display
0
2
4
2,647,147
1
0
0
I'm trying to use boost.python library in a C++ project (Windows + VS9) but it always tries to link against pyton25.lib. Is it possible to link with version 2.6.x of python? thanks
false
2,635,933
0
1
0
0
You could try putting -lpython26 when linking
0
712
0
2
2010-04-14T08:35:00.000
python,boost
boost python version
0
2
2
2,636,724
1
0
0
I'm trying to use boost.python library in a C++ project (Windows + VS9) but it always tries to link against pyton25.lib. Is it possible to link with version 2.6.x of python? thanks
false
2,635,933
0.099668
1
0
1
You need to recompile boost-python library pointing Boost.Build to needed python version. P.S. This heals a problem of undefined references while linking with library needed. I beleive you've already turned of autolinking.
0
712
0
2
2010-04-14T08:35:00.000
python,boost
boost python version
0
2
2
2,636,711
1
0
0
Where can I download this programm?
true
2,640,880
1.2
0
0
4
Any recent version of Python should come with Tkinter support. To my knowledge, you shouldn't need to install anything else.
0
324
0
0
2010-04-14T20:41:00.000
python,installation,download,tkinter
Installation of Tkinter
0
1
3
2,640,895
1
0
0
I haven't gotten far enough into Python to make GUIs yet, so I thought I'd ask here. Can a python app be made with the windows default style GUI, or will it have its own style? The only screenshots I've seen of a python app running with a GUI had this ugly win95 look to it.
false
2,649,882
0.119427
0
0
3
Yes, you can use PyQt, or PySide (another Qt binding), or wxPython. They all support native look & feel. There's also PyGTK, but gtk apps don't to look so native .. I personally prefer Qt, so I'd suggest PyQt. If you have issues with the GPL, then you can use PySide (LGPL).
1
6,722
0
16
2010-04-16T00:34:00.000
python,user-interface
Can a native-looking GUI be made with Python
0
1
5
2,649,957
1
0
0
I'm looking to do some basic encryption of server messages which would be encrypted with C++ and decrypted using Python server side. I was wondering if anyone knew if there were good solutions that were simpler or more lightweight than Keyczar. I see that supports both C++ and python, but would using Crypto++ and PyCrypto be simpler for a newbie that just wants to get something up and running for the time being? Or should I use Keyczar for python and Crypto++ for the C++ end? The C++ libraries seem to have dependencies to hundreds of files.
false
2,650,073
0.379949
1
0
2
The C++ libraries seem to have dependencies to hundreds of files. I don't know much about Python, but that is absolutely normal for C++. I'd recommend Crypto++ -- it's a great easy to use library, and it's public domain, meaning you won't have any license problems with it. EDIT: Keep in mind a large library with lots of code does not mean that you're going to pay in terms of object code. If there are functions you don't use (Crypto++ supports hundreds of algorithms) they won't be compiled into the resulting binary.
0
942
0
1
2010-04-16T01:41:00.000
python,c++,encryption,cryptography
Lightweight cryptography toolkit(s) for C++ and Python
0
1
1
2,650,311
1
0
0
I would like to include a rich text editor in a pygtk drawing area for an application i am developing. The editor ( a small resizable widget ) should be able to move around the drawing area like a rectangle. I am not sure how to start as I am pretty new to PyGTK. thank you !
false
2,650,591
0
0
0
0
gtk.TextView is "rich", in that it can display all types of formatting and even embedded widgets. If you want the functionality of editing rich text, you will have to write something yourself, though others have tried in applications like BloGTK. From which you could steal codes.
0
2,291
0
1
2010-04-16T04:21:00.000
python,pygtk
Py GTK Drawing area and Rich Text Editor
0
1
3
2,788,540
1
0
0
Is there something similar to scene.mouse.getclick in the visual module (VPython)? I need it for a rollover. Thanks in advance. EDIT: I need a function for doing something when the mouse moves inside a special area without clicking.
false
2,655,747
0
0
0
0
scene.mouse.getclick will tell you where the mouse was when it was last clicked. This is different from scene.mouse.clicked which tells you if someone clicked. There is no correspoding way to see if someone had their mouse over a particular object. One thing you can do is use a while loop that continually checks scene.mouse.pick to see if it is the mouse is currently over an object of interest.
0
594
0
2
2010-04-16T19:52:00.000
python,mouseevent,rollover,vpython
mouse rollover event in Python (VPython)
0
2
3
2,718,009
1
0
0
Is there something similar to scene.mouse.getclick in the visual module (VPython)? I need it for a rollover. Thanks in advance. EDIT: I need a function for doing something when the mouse moves inside a special area without clicking.
true
2,655,747
1.2
0
0
1
As mentioned by mathmike, it would seem that you could use scene.mouse.pick to get the object that is currently under the mouse, and as for the 'scene-position', I think scene.mouse.pickpos is what you're looking for - if not, you should be able to calculate it from the global mouse position (through getEvent()). Otherwise, look at getting your information from the getEvent() function, and possibly writing an event loop for yourself.
0
594
0
2
2010-04-16T19:52:00.000
python,mouseevent,rollover,vpython
mouse rollover event in Python (VPython)
0
2
3
2,726,099
1
0
0
I'm new in using Python. I would like to develop Windows GUI Application using Python. After some research, I found that I have 2 options:- IronPython + .NET Framework Python + PyQt May I know which one is better for Windows Application development? Which option has more features (e.g. database support, etc)? Other than the .NET support, is there any big difference between IronPython and Python? Which one is a better choice for me? Thank you. Patrick.L
false
2,657,036
0.158649
0
0
4
Per my play with both PyQt (as interface to Qt) and IronPython (as an interface to WinForms) the bag is mixed. Both are basically "bindings" for underlying platforms. PyQt is practically "autogenerated" from Qt's API and slightly more "mature" as a wrapper because of significant use on Linux. IronPython goes a little deeper and seems to "rebox" system objects with small unfilled gaps between cPython and .Net libs (gzip, zip, subprocess etc). In both cases, you need to look through Python into the toolkit and say to yourself if you like the toolkit. All python is doing is repackaging the toolkit's API to the objects. Again, forget about Python aspect. Look at the underlying toolkit API and think to yourself if you can live with that. I personally find the C++ nature of Qt's API too un-pythonic to be happy with it. C# and Python are so alike that if you remove curlies and type declaration from C# you would not know if it's C# or Python. As a result, for a Python programmer, C#-based .Net API, code and examples as provided in MSDN and elsewhere are instantly applicable with very minor tweaks. In the end, a more correct comparison would be between PyQt (Qt bindings for cPython) and Win32py (Windows ABI bindings for cPython). IronPython is almost a reinvention of same language on a different platform, with all the problems (lacking functionality) that comes with that.
0
5,960
0
8
2010-04-17T02:52:00.000
.net,python,user-interface,ironpython,pyqt
"IronPython + .NET" vs "Python + PyQt". Which one is better for Windows App development?
0
5
5
3,042,547
1
0
0
I'm new in using Python. I would like to develop Windows GUI Application using Python. After some research, I found that I have 2 options:- IronPython + .NET Framework Python + PyQt May I know which one is better for Windows Application development? Which option has more features (e.g. database support, etc)? Other than the .NET support, is there any big difference between IronPython and Python? Which one is a better choice for me? Thank you. Patrick.L
false
2,657,036
0.197375
0
0
5
I faced the same issue and have, with misgivings, decided to go with IronPython/C#/.Net. I liked Qt but got cold feet when it was sold to Nokia because I just wasn't sure Nokia's goals in owning Qt were consistent with my needs for a windows UI. That said, Nokia has made some positive moves by combining separate platform licenses into a single license and dropping GPL licensing in favor or LGPL. Technically, Qt is well designed but relies heavily on hard to debug C# macros. I'm not sure why. The best thing about Qt is that it is open source. If you need to, you can fix it. I don't have direct experience with PyQt but it has been around for quite a while. .Net is .Net and as usual with Microsoft, a moving target. You will sacrifice speed for ease of coding. The IronPython group seems good but I'm not sure if Microsoft's commitment is there. Visual Studio support isn't there yet although the plans sound good. After all, MS only really cares if they own everything, which is not the case for Python. What I really expect is MS will create a dynamic version of C#, interpreter and all, and tell all the Python programmers that it is better and supported and well integrated with .Net. They will then through their considerable weight behind crushing Python like they've done to Java. Good luck. It's a big decision.
0
5,960
0
8
2010-04-17T02:52:00.000
.net,python,user-interface,ironpython,pyqt
"IronPython + .NET" vs "Python + PyQt". Which one is better for Windows App development?
0
5
5
2,668,271
1
0
0
I'm new in using Python. I would like to develop Windows GUI Application using Python. After some research, I found that I have 2 options:- IronPython + .NET Framework Python + PyQt May I know which one is better for Windows Application development? Which option has more features (e.g. database support, etc)? Other than the .NET support, is there any big difference between IronPython and Python? Which one is a better choice for me? Thank you. Patrick.L
false
2,657,036
0.119427
0
0
3
PyQt is a great library, but .NET is the best way to go for Windows. That is because you can use any GUI controls that C# would be able to use in Python. Furthermore, in addition to WinForms, IronPython can be used to create WPF applications, which look good. The main difference is the features, and PyQt has more cross-platform features, and .NET definitely has the edge in Windows.
0
5,960
0
8
2010-04-17T02:52:00.000
.net,python,user-interface,ironpython,pyqt
"IronPython + .NET" vs "Python + PyQt". Which one is better for Windows App development?
0
5
5
2,658,657
1
0
0
I'm new in using Python. I would like to develop Windows GUI Application using Python. After some research, I found that I have 2 options:- IronPython + .NET Framework Python + PyQt May I know which one is better for Windows Application development? Which option has more features (e.g. database support, etc)? Other than the .NET support, is there any big difference between IronPython and Python? Which one is a better choice for me? Thank you. Patrick.L
false
2,657,036
0.039979
0
0
1
I haven't used IronPython with .NET, but I have written a lot of PyQt code. From my experience, PyQt is a great library. It is a very well executed bindings to Qt, which is a very well known and widely used library. Since it's standard Python you're writing, you can enjoy all the Python standard library which gives you a ton of capabilities, in addition to several useful Qt modules imported with PyQt. Writing PyQt code is productive, and the GUIs come out pretty and responsive. And you can't ignore the portability benefit: with just the tiniest modifications, if any, you can just run these programs on Linux and they will just work.
0
5,960
0
8
2010-04-17T02:52:00.000
.net,python,user-interface,ironpython,pyqt
"IronPython + .NET" vs "Python + PyQt". Which one is better for Windows App development?
0
5
5
2,657,263
1
0
0
I'm new in using Python. I would like to develop Windows GUI Application using Python. After some research, I found that I have 2 options:- IronPython + .NET Framework Python + PyQt May I know which one is better for Windows Application development? Which option has more features (e.g. database support, etc)? Other than the .NET support, is there any big difference between IronPython and Python? Which one is a better choice for me? Thank you. Patrick.L
false
2,657,036
0.119427
0
0
3
First, there are lots more than 2 options (python has more GUI libraries than you can shake a stick at), but let's go on your premise for a minute. "Better" being subjective begs the question: "what do you want to learn?" If the goal is Windows GUI Applications development, than I'd go with .Net. .Net is well respected, there is lots of work for .Net programmers, and it's windows centric nature (yeah I know there's Mono but still) means you aren't trying to think about details of three+ sets of user expectations. If the goal is to learn widely used Python libraries and techniques, I'd go with PyQt (and recently did). It's cross-platform, well respected, and has a large community. But you lose the chance to learn the .Net platform as part of this project. I don't think you can loose either way if your goal is to learn. If your goal is to get something done, think about the long-term plans for the project and where its going over the long run. Do you want something that's well integrated into the Windows user-interface, and uses standard widgets? Do you want something that can easily be adapted to other platforms in the future?
0
5,960
0
8
2010-04-17T02:52:00.000
.net,python,user-interface,ironpython,pyqt
"IronPython + .NET" vs "Python + PyQt". Which one is better for Windows App development?
0
5
5
2,657,059
1
0
0
I installed PyScript to try it out but it just wont start. It only gives me the error: "Error126: Could not open Dll "python26.dll" followed by: "Python could not be properly initialized. We must quit." I think this may have something to do with the PYTHONPATH but since I'm a newbie and dont know what it is or exactly what to put in the PYTHONPATH, after some googling, I ask here. Also, when I tried to install wxPython it was impossible becouse the PYTHONPATH could not be found.(Just a side note)
false
2,658,779
0
0
0
0
I just copied python26.dll from my python folder to pyscripter folder and it worked well... dont know it that is a good way to do it...
1
22,256
0
5
2010-04-17T14:58:00.000
python,pythonpath,pyscripter
How do I make PyScripter work? Says it cant find python26.dll
0
3
4
13,216,653
1
0
0
I installed PyScript to try it out but it just wont start. It only gives me the error: "Error126: Could not open Dll "python26.dll" followed by: "Python could not be properly initialized. We must quit." I think this may have something to do with the PYTHONPATH but since I'm a newbie and dont know what it is or exactly what to put in the PYTHONPATH, after some googling, I ask here. Also, when I tried to install wxPython it was impossible becouse the PYTHONPATH could not be found.(Just a side note)
false
2,658,779
0
0
0
0
I finally got it working by (a) not changing the directory it gets installed in to something else...just left it in c:/programfiles/pyscripter ...and (B) going into the pyscripter folder and in the lib folder extracting the rpyc folder so that there is another rpyc folder inside the lib folder that isnt compressed! hope that helps
1
22,256
0
5
2010-04-17T14:58:00.000
python,pythonpath,pyscripter
How do I make PyScripter work? Says it cant find python26.dll
0
3
4
23,843,782
1
0
0
I installed PyScript to try it out but it just wont start. It only gives me the error: "Error126: Could not open Dll "python26.dll" followed by: "Python could not be properly initialized. We must quit." I think this may have something to do with the PYTHONPATH but since I'm a newbie and dont know what it is or exactly what to put in the PYTHONPATH, after some googling, I ask here. Also, when I tried to install wxPython it was impossible becouse the PYTHONPATH could not be found.(Just a side note)
false
2,658,779
0
0
0
0
Install python. should solve all your problems..
1
22,256
0
5
2010-04-17T14:58:00.000
python,pythonpath,pyscripter
How do I make PyScripter work? Says it cant find python26.dll
0
3
4
2,658,872
1
0
0
I have a Pygame program that needs text input. The way it does this is to get keyboard input and when a key is pressed it renders that key so it is added to the screen. Essentially it acts like a text field. The problem is, when you hold shift it doesn't do anything. I realize this is because the program ignores shift input and instead writes the text if it's number is under 128. I have thought of setting a variable when shift is pressed then capitalizing if it was true, but string capitalization only woks on letters, not things like numbers or semicolons. Is there maybe a number I can add to the ASCII number typed to modify it if shift is pressed, or something else? Edit: Essentially, I just want to know if there is a number to add to ascii characters to make it seem like they were typed with shift held down. After reading over my original question it seemed slightly obscure.
true
2,671,589
1.2
0
0
3
I can use the 'event.unicode' attribute to get the value of the key typed.
0
5,694
0
3
2010-04-19T23:27:00.000
python,ascii,character,pygame,shift
Pygame program that can get keyboard input with caps
0
2
5
2,785,753
1
0
0
I have a Pygame program that needs text input. The way it does this is to get keyboard input and when a key is pressed it renders that key so it is added to the screen. Essentially it acts like a text field. The problem is, when you hold shift it doesn't do anything. I realize this is because the program ignores shift input and instead writes the text if it's number is under 128. I have thought of setting a variable when shift is pressed then capitalizing if it was true, but string capitalization only woks on letters, not things like numbers or semicolons. Is there maybe a number I can add to the ASCII number typed to modify it if shift is pressed, or something else? Edit: Essentially, I just want to know if there is a number to add to ascii characters to make it seem like they were typed with shift held down. After reading over my original question it seemed slightly obscure.
false
2,671,589
0
0
0
0
I wrote a function that converts the strings after getting not enough help. It converts everything manually.
0
5,694
0
3
2010-04-19T23:27:00.000
python,ascii,character,pygame,shift
Pygame program that can get keyboard input with caps
0
2
5
2,683,802
1
0
0
I need to develop a multiplatform software that takes screenshots from opengl games without affecting the game in performance, it will run in the background and will add a watermark to my screenshots. What language should i use? I thought of Perl / Python. Anyone can point me out something to start? Thanks!
false
2,691,289
0
0
0
0
Do you need to add a watermark right when you take the screenshot? It would be a lot easier to simply add the watermark later to the static image, as many applications can do this (e.g. Photoshop).
0
502
0
1
2010-04-22T13:40:00.000
python,perl,opengl
Programming language for opengl screenshot software
0
3
4
2,691,789
1
0
0
I need to develop a multiplatform software that takes screenshots from opengl games without affecting the game in performance, it will run in the background and will add a watermark to my screenshots. What language should i use? I thought of Perl / Python. Anyone can point me out something to start? Thanks!
false
2,691,289
0.049958
0
0
1
I would suggest C++. That way you can use OpenGL and DirectX libraries and API calls natively. Libraries that provide such functionality to other languages typically abstract the good stuff away from reach.
0
502
0
1
2010-04-22T13:40:00.000
python,perl,opengl
Programming language for opengl screenshot software
0
3
4
2,691,336
1
0
0
I need to develop a multiplatform software that takes screenshots from opengl games without affecting the game in performance, it will run in the background and will add a watermark to my screenshots. What language should i use? I thought of Perl / Python. Anyone can point me out something to start? Thanks!
false
2,691,289
0
0
0
0
The language you know best that has some sort of OpenGL Bindings. My personal preference for such kind of applications is C, C++ or (if available) C# but it's a simple matter of preference.
0
502
0
1
2010-04-22T13:40:00.000
python,perl,opengl
Programming language for opengl screenshot software
0
3
4
2,691,318
1
0
0
I want to write a C++ application with Qt, but build a prototype first using Python and then gradually replace the Python code with C++. Is this the right approach, and what tools (bindings, binding generators, IDE) should I use? Ideally, everything should be available in the Ubuntu repositories so I wouldn't have to worry about incompatible or old versions and have everything set up with a simple aptitude install. Is there any comprehensive documentation about this process or do I have to learn every single component, and if yes, which ones? Right now I have multiple choices to make: Qt Creator, because of the nice auto completion and Qt integration. Eclipse, as it offers support for both C++ and Python. Eric (haven't used it yet) Vim PySide as it's working with CMake and Boost.Python, so theoretically it will make replacing python code easier. PyQt as it's more widely used (more support) and is available as a Debian package. Edit: As I will have to deploy the program to various computers, the C++-solution would require 1-5 files (the program and some library files if I'm linking it statically), using Python I'd have to build PyQt/PySide/SIP/whatever on every platform and explain how to install Python and everything else.
false
2,693,558
0.197375
0
0
3
If you are just learning Qt and want to leverage the speed of prototyping that Python gives you, then I would recommend you make a sample project using PyQt. As you said, there is a debian package, so you are just a simple apt-get away from making your first application. I personally use gVim as my Python/Qt editor, but you can really use any Python-friendly editor without much trouble. I liked WingIDE and they have auto-complete for Qt but once you sip from the vim kool-aid it's hard to switch. I would say that PySide is 95%+ compatible with PyQt and the LPGL license is nice, but if you are just trying to prototype your first Qt app, then I don't think there is a real reason to use PySide. Although, I do like the PySide docs better, you can also just use them and replace all the library references with PyQt. Depending on the complexity of the application you are building, it might be better off to just start from scratch with a C++ version than to try to do a bunch SIP refactoring black magic. Once you have a solid grasp of the Qt framework, you should be able to switch between the C++ and Python bindings pretty effortlessly.
0
5,460
0
25
2010-04-22T18:49:00.000
c++,python,qt,pyqt,pyside
Prototyping Qt/C++ in Python
0
1
3
2,694,114
1
0
0
I'm trying to make a very large file editor (where the editor only stores a part of the buffer in memory at a time), but I'm stuck while building my textview object. Basically- I know that I have to be able to update the text view buffer dynamically, and I don't know hot to get the scrollbars to relate to the full file while the textview contains only a small buffer of the file. I've played with Gtk.Adjustment on a Gtk.ScrolledWindow and ScrollBars, but though I can extend the range of the scrollbars, they still apply to the range of the buffer and not the filesize (which I try to set via Gtk.Adjustment parameters) when I load into textview. I need to have a widget that "knows" that it is looking at a part of a file, and can load/unload buffers as necessary to view different parts of the file. So far, I believe I'll respond to the "change_view" to calculate when I'm off, or about to be off the current buffer and need to load the next, but I don't know how to get the scrollbars to have the top relate to the beginning of the file, and the bottom relate to the end of the file, rather than to the loaded buffer in textview. Any help would be greatly appreciated, thanks!
false
2,698,533
0.099668
0
0
1
You probably should create your own Gtk.TextBuffer implementation, as the default one relies on storing whole buffer in memory.
0
494
0
4
2010-04-23T12:43:00.000
python,gtk,pygtk
Gtk: How can I get a part of a file in a textview with scrollbars relating to the full file
0
1
2
2,698,565
1
0
0
Im trying to do simple audio player, but I want use a image(icon) as a pushbutton.
false
2,711,033
0.197375
0
0
5
You can use QToolButton with set autoraise property true and there you can set your image also.
0
30,515
0
13
2010-04-26T03:42:00.000
python,qt,pyqt,pyqt4
how code a Image button in PyQt?
0
1
5
6,515,261
1
0
0
I have a (single line) TextCtrl. The user types data into this. When they press enter, the contents of the box need to be extracted so they can be processed. I can't figure out how to catch enter being pressed. According to the docs, with the style wx.TE_PROCESS_ENTER set on my TextCtrl, it should generate a wx.EVT_COMMAND_TEXT_ENTER event when enter is pressed in the box, which I could then catch. However, wx.EVT_COMMAND_TEXT_ENTER seems not to exist (I get "module has no attribute EVT_COMMAND_TEXT_ENTER), so I'm a bit stuck. Googling just gets a couple of hits of people complaining wx.EVT_COMMAND_TEXT_ENTER doesn't work, so I guess I need another way of doing it.
true
2,725,362
1.2
0
0
6
I've never seen wx.EVT_COMMAND_TEXT_ENTER. I have used wx.EVT_TEXT_ENTER though...
0
7,028
0
8
2010-04-27T21:44:00.000
python,wxpython,wxwidgets
Get text when enter is pressed in a text box in wxPython
0
1
2
2,725,392
1
0
0
I'm looking for an easy-to-use graphics lib for python that can output to screen as well as pdf. So, I would use code to draw some stuff (simple prims like ovals, rectangles, lines and points) to screen and then when things look good, have it output to pdf.
false
2,725,735
0
0
0
0
Creating PDFs is always a pain, it doesn't make sense if you do not aim to lose sanity. With that said, you are aiming to do two completely different things: when you draw to screen you draw into a raster bitmap, while PDFs are mostly dynamic, like HTML. (unlike HTML they are more prone to be the same over different platforms, but that's beside the point) If you really want to do that, the solution might be finding something that outputs PDFs, and then showing the generated PDF on screen at every step. I guess that's the only way to have WYSIWYG results.
0
9,999
0
3
2010-04-27T22:56:00.000
python,pdf,graphics
Recommendations for a simple 2D graphics python library that can output to screen and pdf?
0
2
6
2,725,787
1
0
0
I'm looking for an easy-to-use graphics lib for python that can output to screen as well as pdf. So, I would use code to draw some stuff (simple prims like ovals, rectangles, lines and points) to screen and then when things look good, have it output to pdf.
false
2,725,735
0.099668
0
0
3
If you use Tkinter, you can draw on a Canvas widget, then use its .postscript method to save the contents as a PostScript file, which you can convert to PDF using ps2pdf. postscript(self, cnf={}, **kw) Print the contents of the canvas to a postscript file. Valid options: colormap, colormode, file, fontmap, height, pageanchor, pageheight, pagewidth, pagex, pagey, rotate, witdh, x, y.
0
9,999
0
3
2010-04-27T22:56:00.000
python,pdf,graphics
Recommendations for a simple 2D graphics python library that can output to screen and pdf?
0
2
6
2,725,883
1
0
0
Imagine I have a video playing.. Can I have some sort of motion graphics being played 'over' that video.. Like say the moving graphics is on an upper layer than the video, which would be the lower layer.. I am comfortable in a C++ and Python, so a solution that uses these two will be highly appreciated.. Thank you in advance, Rishi..
true
2,759,738
1.2
1
0
0
I'm not sure I understand the question correctly but a video file is a sequence of pictures that you can extract (for instance with the opencv library C++ interface) and then you can use it wherever you want. You can play the video on the sides of an opengl 3D cube (available in all opengl tutorials) and other 3D elements around it. Of course you can also displays it in a conventional 2D interface and draw stuff on top of it, but for this you need a graphical ui. Is it what you thought or am I completely lost?
0
169
0
0
2010-05-03T17:00:00.000
c++,python,graphics,video,video-processing
Navigation graphics overlayed over video
0
1
1
2,760,860
1
0
0
i converted recently from wxpython to pyqt and im still facing alot of problems since im still noob in pyqt so is it possible to detected if user pressed (CTRL+key ) in pyqt ? and how ? i've been trying to find an answer for this for 3 days . if you know website or a good place to learn pyqt, it will be highly appreciated thanx in advance
true
2,761,512
1.2
0
0
8
Add a QShortcut and listen to its activated() signal, then perform the action in the slot. Or you could reimplement QWidget and define keyPressEvent to what you like. Check for the event parameter's modifiers() and key() to see if they match with what you want. This listens for shortcut keys when the QWidget has focus.
0
5,552
0
3
2010-05-03T22:01:00.000
python,qt,qt4,pyqt,pyqt4
getting keyboard events with pyqt
0
1
2
2,761,528
1
0
0
I have a python application which need a gui HTML editor, I know FCKeditor is nice, so how to embed the FCKeditor in a python desktop app?
true
2,777,919
1.2
0
0
1
To embed FCKeditor (or maybe better the current CKeditor?), you basically need to embed a full-fledged browser (with Javascript) -- I believe wxPython may currently be the best bet for that, as I hear it has wxIE for Windows and wxWebKitCtrl for the Mac (I don't know if old summer-of-code ideas about making something suitable for Linux ever panned out, though). Most "HTML viewer" widgets, in most GUIs, don't support Javascript, and that's a must for (F?)CKeditor.
0
340
0
0
2010-05-06T01:41:00.000
python,html,editor
Embed FCKeditor in python app
0
2
2
2,778,024
1
0
0
I have a python application which need a gui HTML editor, I know FCKeditor is nice, so how to embed the FCKeditor in a python desktop app?
false
2,777,919
0
0
0
0
In order of difficulty: If you just need to support Windows, you can embed IE in wx - see the docs and demos. wxWebKit is looking a bit more mature, but it's still in development. You could just use the web-browser using webbrowser.open(url). Things will be very crude, and interaction will be a pain. A fourth option - you could try out pyjamas for your whole GUI, then run it all in a web-browser.
0
340
0
0
2010-05-06T01:41:00.000
python,html,editor
Embed FCKeditor in python app
0
2
2
2,778,087
1
0
0
I am working with geodjango and I want to breakup a 2D Rectangular Polygon into smaller ones. My input is a big rectangle and I want to subdivide it in smaller rectangles. The sum of the smaller rectangles must be the original rectangle. All subrectangles should be equal size. How can I do that? Thank you.
false
2,783,075
0.379949
0
0
2
Pick any point inside the rectangle Draw two lines through it parallel to the edges of the rectangle. Now you've divided your rectangle into four smaller ones.
0
1,964
0
2
2010-05-06T17:22:00.000
python,geometry,gis,geodjango
Break up a polygon into smaller ones
0
1
1
2,783,174
1
0
0
How do I find if a GTKBuilder Checkbutton is checked?
true
2,788,927
1.2
0
0
1
Use checkbutton.get_active(). What's this got to do with GtkBuilder?
0
703
0
0
2010-05-07T13:35:00.000
python,gtk,pygtk,glade,gtkbuilder
Python Glade GTKBuilder Checkbutton
0
1
1
2,789,043
1
0
0
I have a fairly simple PyQt application in which I'm placing instances of a QGraphicsWidget in a QGraphicsGridLayout and want to connect the widgets with lines drawn with a QGraphicsPath. Unfortunately, no matter what I try, I always get (0, 0) back as the position for both the start and end widgets. I'm constructing the graph with a recursive function that adds widgets to the scene and layout. Once the recursive function is complete, the layout is added to a new widget, which is added to the scene to show everything. The edges are added to the scene as widgets are created. How do I get a non-zero position of any of the widgets in the grid layout? Update: I forgot to mention that I've tried both pos() and scenePos() on the widgets in the grid layout. Both always return (0, 0) as the position for every widget in the grid.
true
2,799,776
1.2
0
0
1
If you use the QGraphicsItem::pos(), it gives you the position of the item in the parent coordinates. When using QGraphicsLayout, the parent is probably the cell containing the object thus the coordinate is equal to zero. Since you want to connect widgets with path, you will need scene coordinate to define the control points: use QGraphicsItem::scenePos() to obtain the position of your QGraphicsWidget in the scene.
0
2,688
0
3
2010-05-10T00:45:00.000
python,qt,pyqt
PyQt: Get the position of QGraphicsWidgets in a QGraphicsGridLayout
0
1
1
2,801,458
1
0
0
I am looking for a graphics library for 3D reconstruction research to develop my specific viewer based on some library. OpenGL seems in a low level and I have to remake the wheel everywhere. And I also tried VTK(visualization toolkit). However, it seems too abstract that I need to master many conceptions before I start. Is there any other graphics library? I prefer to program in python. So I would like the library has a python wrapper. I think something like O3D would be better. But O3D is for javascript and it seems that Google already stops the development.
false
2,823,907
-0.039979
0
0
-1
I used openGL with C++ a few years back - found it quite low level. I also have used Java3D which seemed to be a bit higher level. If you are not stuck on using python - try Java3D - very simple to get up and running.
0
2,730
0
3
2010-05-13T01:22:00.000
python,opengl,graphics
Is there any graphics library in a higher level than OpenGL
0
1
5
2,826,036
1
0
0
I have a project idea, but unsure if using Python would be a good idea. Firstly, I'm a C++ and C# developer with some SQL experience. My day job is C++. I have a project idea i'd like to create and was considering developing it in a language I don't know. Python seems to be popular and has piqued my interests. I definitely use OOP in programming and I understand Python would work fine with that style. I could be way off on this, I've only read small bits and pieces about the language. The project won't be public or anything, just purely something of my own creation do dabble in at home. So the project would essentially represent a simple game idea I have. The game would consist roughly these things: Data structures to hold specific information (would be strongly typed). A way to output the gamestate for the players. This is completely up in the air, it can be graphical or text based, I don't really care at this point. A way to save off game data for the players in something like a database or file system. A relatively easy way for me to input information and a 'GO' button which processes the changes and obviously creates a new gamestate. The game would function similar to a board game. Really nothing out of the ordinary when I look back at that list. Would this be a fun way to learn Python or should I select another language?
true
2,823,983
1.2
0
0
6
I find that the best way to learn a new language is by doing something like this (small project of your own). Python is no different. Everything you wrote can be done in Python, so I can't find any reason not to use it, if you want to learn.
0
823
0
2
2010-05-13T01:45:00.000
python,oop
Idea for a small project, should I use Python?
0
4
4
2,824,002
1
0
0
I have a project idea, but unsure if using Python would be a good idea. Firstly, I'm a C++ and C# developer with some SQL experience. My day job is C++. I have a project idea i'd like to create and was considering developing it in a language I don't know. Python seems to be popular and has piqued my interests. I definitely use OOP in programming and I understand Python would work fine with that style. I could be way off on this, I've only read small bits and pieces about the language. The project won't be public or anything, just purely something of my own creation do dabble in at home. So the project would essentially represent a simple game idea I have. The game would consist roughly these things: Data structures to hold specific information (would be strongly typed). A way to output the gamestate for the players. This is completely up in the air, it can be graphical or text based, I don't really care at this point. A way to save off game data for the players in something like a database or file system. A relatively easy way for me to input information and a 'GO' button which processes the changes and obviously creates a new gamestate. The game would function similar to a board game. Really nothing out of the ordinary when I look back at that list. Would this be a fun way to learn Python or should I select another language?
false
2,823,983
0.148885
0
0
3
I've already voted for del-boy's answer, but I would like to go further and say that if your goals are to (1) have fun, (2) learn a new language, and (3) write your own game, then Python is a slam-dunk, no-brainer, awesome choice to achieve all three. The language excels at all the things you seem to be looking for (see Alex Martelli's answer for the caveat on strong typing), and in my opinion is not much of a "stretch" from the C family of languages (I think you will find most things simply easier, rather than strange), compared to other good languages such as Ruby or Lua.
0
823
0
2
2010-05-13T01:45:00.000
python,oop
Idea for a small project, should I use Python?
0
4
4
2,824,090
1
0
0
I have a project idea, but unsure if using Python would be a good idea. Firstly, I'm a C++ and C# developer with some SQL experience. My day job is C++. I have a project idea i'd like to create and was considering developing it in a language I don't know. Python seems to be popular and has piqued my interests. I definitely use OOP in programming and I understand Python would work fine with that style. I could be way off on this, I've only read small bits and pieces about the language. The project won't be public or anything, just purely something of my own creation do dabble in at home. So the project would essentially represent a simple game idea I have. The game would consist roughly these things: Data structures to hold specific information (would be strongly typed). A way to output the gamestate for the players. This is completely up in the air, it can be graphical or text based, I don't really care at this point. A way to save off game data for the players in something like a database or file system. A relatively easy way for me to input information and a 'GO' button which processes the changes and obviously creates a new gamestate. The game would function similar to a board game. Really nothing out of the ordinary when I look back at that list. Would this be a fun way to learn Python or should I select another language?
false
2,823,983
0.049958
0
0
1
Well, if you do C++/C#, I'd say go for it - I personally love C++ because it is (in my opinion) self-intuitive and easy. The 'grammar' of Python doesn't make much sense. Plus, if you already know another language, why learn Python for fun? I mean, if you want to create a simple project for fun, it's really not worth it, and you'll end up working for several weeks at least, before you can begin your game. So yeah, you should definitely use C++. However, if you're just trying to learn a new language, there's nothing wrong with that; Python certainly is pretty popular. Javascript is pretty easy as well, as it uses automatic inference and all that jazz.
0
823
0
2
2010-05-13T01:45:00.000
python,oop
Idea for a small project, should I use Python?
0
4
4
2,824,020
1
0
0
I have a project idea, but unsure if using Python would be a good idea. Firstly, I'm a C++ and C# developer with some SQL experience. My day job is C++. I have a project idea i'd like to create and was considering developing it in a language I don't know. Python seems to be popular and has piqued my interests. I definitely use OOP in programming and I understand Python would work fine with that style. I could be way off on this, I've only read small bits and pieces about the language. The project won't be public or anything, just purely something of my own creation do dabble in at home. So the project would essentially represent a simple game idea I have. The game would consist roughly these things: Data structures to hold specific information (would be strongly typed). A way to output the gamestate for the players. This is completely up in the air, it can be graphical or text based, I don't really care at this point. A way to save off game data for the players in something like a database or file system. A relatively easy way for me to input information and a 'GO' button which processes the changes and obviously creates a new gamestate. The game would function similar to a board game. Really nothing out of the ordinary when I look back at that list. Would this be a fun way to learn Python or should I select another language?
false
2,823,983
0.244919
0
0
5
Python seems very suitable to your purposes (e.g., pygame and other popular third party extensions make it easy to achieve nice graphics, and you can also choose curses for structured textual I/O, etc) with the single exception of what you probably mean by "strongly typed". Python is strongly typed (there is no way you can erroneously use a string for an operation for which an integer is required, and vice versa, for example), but it's dynamic strong typing: each object has a strong type, but names (in the wide sense, including barenames, compound names, items in containers, ...) do not have types -- each name refers to an object, the object has the type, not the name. You can rebind the name to a different object, and that object may have a different (strong;-) type than whatever object was previously bound to that same name. Dynamic languages all have this character, even though many go further than Python in "type laxity" ("confusing" strings and numbers, and different kinds of numbers, while Python distinguishes strings from integers from floating-point numbers, for example) -- Python is quite "type-picky"... in the dynamic sense where names, per se, have no types, though;-).
0
823
0
2
2010-05-13T01:45:00.000
python,oop
Idea for a small project, should I use Python?
0
4
4
2,824,031
1
0
0
How do i add SOCKS support to my application? and where can i get the libs? any help appreciated thanks
false
2,829,637
-0.291313
0
0
-3
VC++ has extensive support if you want to try on Windows. Google "Windows sockets for beginners msdn", great info for windows sockets... If linux, try C sockets by beej... Just google beej's guide for sockets...
0
867
0
2
2010-05-13T19:21:00.000
c++,python,c,perl,socks
SOCKS in C/C++ or another language?
0
1
2
2,829,664
1
0
0
I'm using the wxWizard widget in wxPython. Is there any way I could change the text of the next button on a page? Can i change the visibility of the navigation buttons on any page? Can I enable/disable the navigation buttons? I tried looking for answers to these questions on the wxPython site but it doesn't seem to be documented.
false
2,829,993
0
0
0
0
Use wx.FindWindowById(wx.ID_FORWARD) this will return a wxWindow object representing the Next button. Call methods on it. e.g. wx.FindWindowById(wx.ID_FORWARD).disable() would disable the Next Button.
0
211
0
0
2010-05-13T20:17:00.000
python,wxpython
Access properties of navigation buttons in wxPython's wxWizard
0
1
1
5,441,284
1
0
0
I have a simple gtk.TreeView with a gtk.ListStore model and set_reorderable(True), I want to catch the signal/event emited when the user reorder through drag&drop the list, but the documentation does not help much: "The application can listen to these changes by connecting to the model's signals" So I tried to connect the model (ListStore) signals... but surprise! ListStore has no signals, so you are dispatched to TreeModel signals, then I tried to connect with the TreeModel "rows-reordered" signal with no lucky. How should I catch the list reorder performed by the user?
true
2,831,779
1.2
0
0
3
There is no way to do that in PyGTK currently. "rows-reordered" is the correct signal, but it is impossible to derive any information from it in PyGTK other than "somehow reordered". In C GTK+ you could use the same signal and get the required information in callback, but not in Python.
0
1,654
0
1
2010-05-14T04:10:00.000
python,gtk,pygtk,gtktreeview
Catch PyGTK TreeView reorder
0
1
2
2,835,863
1
0
0
I was working on a program,that I need to support new additions. Hmmm. Let me give you some background on the program. It is an educational software program that has quizzes for the user to take, just to gain odd knowledge. Now, It currently supports 6 subjects, all organized with directores on the HDD ( i.e. the Science directory is called science. ) and the way you launch the subject to see what quizzes you have to take is by pushing a button on the home screen. This sort of thing prevents easy subject additions. I want to be able to add a subject later on without having to recode the home screen and re organize all the buttons. I would use a Listbox and os.listdir(...), but I was kind of wanting something prettier than a Listbox. I am using Tkinter on Windows. The Python version I am using is 2.6 Is there a "fancy" listbox sort of thing that can be styled to work with the background?
true
2,853,708
1.2
0
0
0
You can add buttons dynamically just fine, nothing is forcing you into the listbox. That said, I don't know why you care so much about "prettiness" since you're using Tkinter, which is very ugly by default.
1
72
0
1
2010-05-17T23:42:00.000
python,tkinter
Automatically support new changes with Python
0
1
1
2,853,858
1
0
0
How do I randomly add buttons to a Tkinter GUI? I need it to be able to create a button, then put it anywhere on the window, is this possible? I am using Python 2.6 on Windows.
false
2,853,933
0
0
0
0
There are several options to choose from. For example, you could design on a grid where you have six buttons per row. Then it's just a matter of starting at row 0, incrementing the column for each button. When you get to the last column, reset the column to 0 and increment the row by one. Another option is to use a text widget as the container, and embed your buttons in the text widget with wrapping enabled. With this trick the buttons will fill a row automatically and wrap if the user grows or shrinks the main windows. It's a tiny bit more work, but it works well if that's the behavior you want.
0
1,244
0
0
2010-05-18T00:40:00.000
python,windows,random,tkinter,button
Randomly add buttons to Tkinter GUI?
0
1
2
2,864,899
1
0
0
I am trying to write an app in python to control a motor using serial. This all works in a CLI situation fine and is generally stable. but I was wondering how simple it was to add a GUI on top of this code base? I assume there will be more code, but is there a simple way of detecting something like GTK, so it only applied the code when GTK was present? Also, GUI creation in Python in general: is it best to keep as little GUI specifics out of the code and use something like GTK's XML based approach (using gtk.glade.XML() function)? Are there other GUI toolkits that have a similar approach to the Glade / XML / "Explode in Code" approach? Thanks for any advice. Andy
false
2,857,634
0
0
0
0
I don't recommend doing a GUI in XML. All the XML does is give you a mini language for describing a layout. Why use a mini language when you can have the full power of python? As for detecting GTK, I wouldn't suggest that. Instead, add a command line argument to determine whether to create a GUI or not (eg: myprogram -g). It then becomes easy to create a desktop shortcut or command line alias to start in GUI mode, while still being able to use the command line tool from any terminal. You do, however, want to keep the GUI code separate from the bits that do the real work. Give youself a class that contains all the business logic, then have the GUI and CLI both access this object to do work.
0
1,570
0
2
2010-05-18T13:24:00.000
python,xml,user-interface,gtk,glade
How can I create a GUI on top of a Python APP so it can do either GUI or CLI?
0
1
4
2,857,711
1
0
0
I'm doing a little program and I want to distribute it using this recipe: single directory with __main__.py in it zip this directory and adding a shebang on it #!/usr/bin/env python making it executable The problem is that in this package I have also extra files (I'm using pygtk toolkit and I need images and ui xml files). When I try to access these files I have the error that the resource is unavailable (the path that I'm trying to open is something like file.zip/gui/gui.ui ). How can I handle this situation?
true
2,859,413
1.2
0
0
8
I figured out by myself, It's sufficient to use pkgutil.get_data to access the data inside a package.
0
2,816
0
4
2010-05-18T17:06:00.000
python,packaging,zipapp
Distributing an executable zip file with __main__.py, how to access extra data?
0
1
1
2,861,524
1
1
0
I am about to begin a project where I will likely use PyQt or Pyside. I will need to interface with a buggy 3rd party piece of server software that provides C++ and Java APIs. The Java APIs are a lot easier to use because you get Exceptions where with the C++ libraries you get segfaults. Also, the Python bindings to the Java APIs are automatic with Jython whereas the Python bindings for the C++ APIs don't exist. So, how would a CPython PyQt client application be able to communicate with these Java APIs? How would you go about it? Would you have another separate Java process on the client that serializes / pickles objects and communicates with the PyQt process over a socket? I don't want to re-invent the wheel... is there some sort of standard interface for these types of things? Some technology I should look into? RPC, Corba, etc? Thanks, ~Eric
false
2,860,650
0
0
0
0
If the criteria is not reinventing the wheel, there is the SimpleXMLRPCServer and xmlrpclib modules available in the standard library. They should work in Jython too.
0
1,047
0
3
2010-05-18T19:58:00.000
python,qt,pyqt,process,jython
Integrating Jython Cpython
0
1
2
2,861,467
1
0
0
Just curious if anyone knows of good sites for learning and understanding PyGame. I've programmed a bunch in Python, so I'm well-equipped with that. Just curious if anyone knows a good site or more for learning PyGame. Thanks for any help!
false
2,865,003
0
0
0
0
No one has mentioned this yet as a source of games written in pygame, but check out www.pyweek.org - it's a week-long programming competition featuring games built in python. In many cases they use pygame, though there are other libs such as pyglet and opengl that are used.
0
7,938
0
13
2010-05-19T11:25:00.000
python,pygame
Best resources for learning PyGame?
0
1
7
2,897,004
1
0
0
I'm using cx_Freeze to freeze my python program. On running cx_Freeze, a bunch of PYD files are created, a whole bunch of PYC files are put into a archive named library.zip and a few DLL files are there too. Could someone tell me the difference between the PYC and the PYD files? What's the reason for the PYD files not in the library.zip? Is it possible to put the PYD files into the archive as well? Thanks.
true
2,875,530
1.2
0
0
6
Disclaimer: I haven't used cx_Freeze in awhile...... .PYD files are DLL machine-code files that contain specific python-required functions. .PYC files are .py files that have been compiled into bytecode. so PYDs are machine code and PYCs are bytecode Now as for why the PYDs aren't in the .zip....I'd imagine it's because those .PYDs are needed by the python interpreter to run the program. What cx_Freeze does is basically this: compile all .py files and throw the .pyc files in a zip put all needed .pyd files in the zip create a stub .py file and put it in the output directory copy the python.exe and rename to myprogram.exe copy all .pyd files needed to open the .zip and run the contents So you're not actually compiling your python file, you're instead renaming the interpeter and freezing all the source files. I hope this helps.
1
3,772
0
3
2010-05-20T15:55:00.000
python,cx-freeze
cx_Freeze and PYC/PYD files
0
1
1
2,875,948
1
0
0
I'm developing a Python application using wxPython and freezing it using cxFreeze. All seems to be going fine apart from this following bit: When I run the executable created by cxFreeze, a blank console window pops up. I don't want to show it. Is there any way I could hide it? It doesn't seem to be documented on the cxFreeze site and Googling didn't turn up much apart from some similar sorta problems with Py2Exe. Thanks.
false
2,880,316
0.148885
0
0
3
If you're using Windows, you could rename your "main" script's extension (that launches the app) to .pyw
0
18,074
1
31
2010-05-21T07:37:00.000
python,wxpython,cx-freeze
How can I hide the console window when freezing wxPython applications with cxFreeze?
0
1
4
2,881,979
1