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 have projects in C++, Java and Python. Projects in C++ export SWIG interfaces so they can be used by Java and Python projects. My question is: what building mechanism can I use to manage dependencies and build these projects? I have used SCons and GYP. They are fairly easy to use and allow plugins (code-generators, c...
false
4,141,511
0.158649
1
0
4
I tried to do a Java / C++ / C++ To Java swig / (+ Protocol buffers) project in CMAKE and it was horrible! In such a case the problem with Cmake is, that the scripting language is extremely limited. I switched to Scons and everything got much easier.
0
2,318
1
6
2010-11-10T05:32:00.000
java,c++,python,scons,gyp
What are the SCons alternatives?
0
4
5
7,201,456
1
0
0
I have projects in C++, Java and Python. Projects in C++ export SWIG interfaces so they can be used by Java and Python projects. My question is: what building mechanism can I use to manage dependencies and build these projects? I have used SCons and GYP. They are fairly easy to use and allow plugins (code-generators, c...
false
4,141,511
0.039979
1
0
1
For Java and C++ projects you can take a look into Maven + Maven-nar-plugin but for Python i really don't know the best. May be other tools like CMake would fit better.
0
2,318
1
6
2010-11-10T05:32:00.000
java,c++,python,scons,gyp
What are the SCons alternatives?
0
4
5
4,142,509
1
0
0
I have projects in C++, Java and Python. Projects in C++ export SWIG interfaces so they can be used by Java and Python projects. My question is: what building mechanism can I use to manage dependencies and build these projects? I have used SCons and GYP. They are fairly easy to use and allow plugins (code-generators, c...
false
4,141,511
1
1
0
9
CMake I use and prefer it for my projects. There's also Rake (comes with Ruby, but can be used for anything), which I regard rather highly.
0
2,318
1
6
2010-11-10T05:32:00.000
java,c++,python,scons,gyp
What are the SCons alternatives?
0
4
5
4,141,589
1
0
0
I have projects in C++, Java and Python. Projects in C++ export SWIG interfaces so they can be used by Java and Python projects. My question is: what building mechanism can I use to manage dependencies and build these projects? I have used SCons and GYP. They are fairly easy to use and allow plugins (code-generators, c...
false
4,141,511
0.039979
1
0
1
In Java world ant is "lingua franca" for build systems. Ant supports a C++ task via ant-contrib - so you can compile your C++ code. With Ant's exec task you can still run swig on C++ code in order to get the wrappers. Then standard tasks as javac/jar can be used for java application build.
0
2,318
1
6
2010-11-10T05:32:00.000
java,c++,python,scons,gyp
What are the SCons alternatives?
0
4
5
4,143,403
1
0
0
I'd like to develop a small/medium-size cross-platform application (including GUI). My background: mostly web applications with MVC architectures, both Python (Pylons + SqlAlchemy) and Java (know the language well, but don't like it that much). I also know some C#. So far, I have no GUI programming experience (neither ...
false
4,145,350
0.761594
0
1
5
I'm a Python guy and use PyQt myself, and I can wholly recommend it. Concerning your cons: compilation, distribution and deployment more difficult? No, not really. For many projects, a full setup.py for e.g. cx_Freeze can be less than 30 lines that rarely need to change (most import dependencies are detected automati...
0
3,111
0
11
2010-11-10T14:11:00.000
c#,java,python,user-interface,cross-platform
Python + QT, Windows Forms or Swing for a cross-platform application?
0
1
1
4,145,581
1
0
0
Is there a way to add undo and redo capabilities in Tkinter Entry widgets or must I use single line Text widgets for this type of functionality? If the latter, are there any tips I should follow when configuring a Text widget to act as an Entry widget? Some features that might need tweaking include trapping the Retur...
false
4,146,971
0.066568
0
0
1
Update on using this method for Undo/Redo: I am creating a GUI with lot of frames and each contains at least ten or more 'entry' widgets. I used the History class and created one history object for each entry field that I had. I was able to store all entry widgets values in a list as done here. I am using 'trace' met...
0
4,108
0
4
2010-11-10T17:03:00.000
python,user-interface,text,tkinter,tkinter-entry
Undo and Redo in an Tkinter Entry widget?
0
1
3
32,384,249
1
0
0
I'm working on a project involving puzzles made out of user-supplied images. I have been very hard-pressed to find a library that will serve my purposes. I would like to write the program in either Python or C++. I have been considering using Qt (or PyQt) to do it, so if you know of a library that will work with Qt it ...
true
4,151,746
1.2
0
0
2
You can't expect to find a library for any specific task. In this case, you need image-processing library, which is able to: draw image region with transparent background. You have piece configuration, use it as a mask to cut out edges. save drawn image to some format. Qt graphics is totally able to do all that.
0
174
0
1
2010-11-11T05:57:00.000
c++,python,qt,image-processing,pyqt
Anyone know of a C++ or Python library that will divide an image into pieces of arbitrary shape?
0
1
1
4,154,281
1
0
0
I am wondering, is it possible to display images in python?
false
4,160,082
0
0
0
0
The easiest way is to use a web server I reckon. You can script a nice, simple server with bottle and turn out a UI with images. It depends what you want to do. Python can do it all, but needs something to work with. There's pygame and stuff like that if you're just starting out.
0
12,412
0
3
2010-11-11T22:54:00.000
python,image
How do you show a picture in python?
0
4
6
14,884,366
1
0
0
I am wondering, is it possible to display images in python?
false
4,160,082
0.033321
0
0
1
The question needs more clearing up. Do you want to put the picture on a system display? Or on a window in a desktop app? Or render it to a http response? Python can do all these things in different manners, but for people to explain it - you need to specify your question a bit more.
0
12,412
0
3
2010-11-11T22:54:00.000
python,image
How do you show a picture in python?
0
4
6
4,160,323
1
0
0
I am wondering, is it possible to display images in python?
false
4,160,082
0
0
0
0
The various OpenCV bindings for Python also provide ways to display images (and videos). Might be a bit heavy if you just want to display an image.
0
12,412
0
3
2010-11-11T22:54:00.000
python,image
How do you show a picture in python?
0
4
6
4,160,130
1
0
0
I am wondering, is it possible to display images in python?
false
4,160,082
0.16514
0
0
5
Almost all GUI toolkits (wxWindows, pyQt, pyGTK, Tkinter) have Canvas or other-type widgets that allow you to draw an image. The standard library way to draw an image is to use Tkinter's Canvas widget.
0
12,412
0
3
2010-11-11T22:54:00.000
python,image
How do you show a picture in python?
0
4
6
4,160,121
1
0
0
Does Tkinter or underlying Tk framework support the ability to apply the equivalent of the attributes() method to Frames vs. Windows? Specifically: I have forms with a message area that I would like to fade away in jquery-like manner, eg. display a non-modal status message that fades away. I know I can fade a Tkinter w...
false
4,164,962
0
0
0
0
No, there is no way to do what you want. Tkinter only supports transparency on top-level windows.
0
502
0
0
2010-11-12T13:13:00.000
python,user-interface,tkinter
Python/Tkinter: Apply .attributes() method to Frame vs. Window?
0
1
1
7,360,992
1
0
0
How would I get a handle to the active gtk.Window in python? (not a window I created, but the currently focused window).
false
4,166,169
0.462117
0
0
5
The answer is actually not OS-specific -- you can do it within GTK. You can get a list of all the toplevel windows from the application using gtk.window_list_toplevels(), then iterate through it until you find one where window.is_active() returns True. If you want to consider other windows than the ones from your appli...
0
5,129
0
3
2010-11-12T15:31:00.000
python,gtk
Get active gtk window in python
0
1
2
4,169,956
1
0
0
i want to create application in windows. i need to use databases which would be preferable best for pyqt application like sqlalchemy mysql etc.
false
4,168,020
0
0
1
0
i guess its totally upto you ..but as far as i am concerned i personlly use sqlite, becoz it is easy to use and amazingly simple syntax whereas for MYSQL u can use it for complex apps and has options for performance tuning. but in end its totally upto u and wt your app requires
0
535
0
0
2010-11-12T18:49:00.000
python,database,pyqt
which databases can be used better for pyqt application
0
3
4
4,208,750
1
0
0
i want to create application in windows. i need to use databases which would be preferable best for pyqt application like sqlalchemy mysql etc.
false
4,168,020
0.049958
0
1
1
SQlite is fine for a single user. If you are going over a network to talk to a central database, then you need a database woith a decent Python lirary. Take a serious look at MySQL if you need/want SQL. Otherwise, there is CouchDB in the Not SQL camp, which is great if you are storing documents, and can express sear...
0
535
0
0
2010-11-12T18:49:00.000
python,database,pyqt
which databases can be used better for pyqt application
0
3
4
4,294,636
1
0
0
i want to create application in windows. i need to use databases which would be preferable best for pyqt application like sqlalchemy mysql etc.
false
4,168,020
0.049958
0
1
1
If you want a relational database I'd recommend you to use SQLAlchemy, as you then get a choice as well as an ORM. Bu default go with SQLite, as per other recommendations here. If you don't need a relational database, take a look at ZODB. It's an awesome Python-only object-oriented database.
0
535
0
0
2010-11-12T18:49:00.000
python,database,pyqt
which databases can be used better for pyqt application
0
3
4
4,512,428
1
0
0
I've done a few searches but I couldn't find anything about this topic. Perhaps because it is common programmer knowledge (I'm not a programmer, I've learned from necessity), or because I'm going about it the wrong way. I would like ideas/suggestions on how to manage button states for a GUI. For example, if I have a p...
false
4,172,426
0.197375
0
0
1
You are only changing button states based on events, right? There is no reason to 'poll' to see if a button state has changed. What you can do is build a function which does all of the calling for you, then call it with something like disable_buttons([okButton, graphButton, printButton]). When an event takes place tha...
0
851
0
0
2010-11-13T12:11:00.000
python,button,tkinter,state
How to handle button states efficiently in Tkinter
0
1
1
4,187,733
1
0
0
How practical would it be to use Cython as the primary programming language for a game? I am a experienced Python programmer and I absolutely love it, but I'm admittedly a novice when it comes to game programming specifically. I know that typically Python is considered too slow to do any serious game programming, which...
false
4,180,836
0.16514
0
0
5
I've found that a lot of the time, especially for larger libraries, you wind up spending a tremendous amount of time just configuring the Cython project to build, knowing which structures to import, bridging the C code into Python in either direction etc. While Cython is a nice stopgap (and significantly more pleasant ...
1
9,169
0
19
2010-11-15T01:46:00.000
python,c,cython
Using Cython for game development?
0
4
6
4,180,878
1
0
0
How practical would it be to use Cython as the primary programming language for a game? I am a experienced Python programmer and I absolutely love it, but I'm admittedly a novice when it comes to game programming specifically. I know that typically Python is considered too slow to do any serious game programming, which...
false
4,180,836
-0.033321
0
0
-1
Threads!!! A good modern game must use threads. Cython practically forbids their use, holding to GIL (global interpreter lock) the entire time, making your code run in sequence. If you are not writing a huge game, than Python/Cython is okay. But Cython is no good as a modern language without good thread support.
1
9,169
0
19
2010-11-15T01:46:00.000
python,c,cython
Using Cython for game development?
0
4
6
4,445,486
1
0
0
How practical would it be to use Cython as the primary programming language for a game? I am a experienced Python programmer and I absolutely love it, but I'm admittedly a novice when it comes to game programming specifically. I know that typically Python is considered too slow to do any serious game programming, which...
false
4,180,836
1
0
0
7
at this date (12th of April 2011) unixmab83 is wrong. Cython doesn't forbid the use of threads, you just needs to use the no_gil special statements. Beside the bindins of c++ is now functional in cython. We do use it for something which is close to gamedev. So while I cannot be final on this, cython is a valid candida...
1
9,169
0
19
2010-11-15T01:46:00.000
python,c,cython
Using Cython for game development?
0
4
6
5,638,409
1
0
0
How practical would it be to use Cython as the primary programming language for a game? I am a experienced Python programmer and I absolutely love it, but I'm admittedly a novice when it comes to game programming specifically. I know that typically Python is considered too slow to do any serious game programming, which...
false
4,180,836
0
0
0
0
I know Cython and you do not have to know C/C++. You will use static typing but very easy. The hardest part is to get the compiling working, I think on Windows this is done over visual studio thing. There is something like a standard library including math for example. The speed gain is not too big but this depends on ...
1
9,169
0
19
2010-11-15T01:46:00.000
python,c,cython
Using Cython for game development?
0
4
6
17,047,294
1
0
0
Can I program for Android using Python? I seem to have stumbled upon many links while searching... however neither of them is concrete. Any suggestions? I want to write apps for Android but really don't want to get into Java for all this. PS: My question is whether I can write proper, full fledged apps for Android.
false
4,185,061
0.039979
0
0
1
No, not currently. ASE (Android Scripting Environment) allows you to do simple script apps, but you can only write proper Android apps in Java.
0
84,928
0
112
2010-11-15T14:03:00.000
python,android
Android Python Programming
0
1
5
4,185,138
1
0
0
I've got an option menu that's about 60 items long and, needless to say, I can't see it all on the screen at once. Is there a way that I can make the OptionMenu widget in tkinter scrollable?
true
4,186,981
1.2
0
0
2
Short answer is no, but you could try a ComboBox mega-widget (quick search will throw some suitable examples up there) which could be a 'good enough' alternative (in fact with it being a combined entry field and scrolled list you could make it 'smart' by including auto-search / auto-complete - 60 items in a drop down i...
0
1,975
0
1
2010-11-15T17:13:00.000
python,tkinter
Make OptionMenu Widget Scrollable?
0
1
1
4,194,418
1
0
0
How do I get an integer type from the Tkinter Entry widget? If I try to get the value using variable_name.get(), it says it is a str. If I try to change the type using int(variable_name.get()), it says int can only accept a string or number. Any help would be welcome!
false
4,199,278
0.132549
0
0
4
In the end I just initialized the variable as tk.IntVar() instead of tk.StringVar() That way you don't have to cast it as an int, it will always be one, and the default value from the Entry element will now be 0 instead of '' That's how I approached it anyway, seems the simplest way and avoid the need for a lot of the ...
1
34,695
0
5
2010-11-16T21:41:00.000
python,tkinter
Get an Integer from Entry
0
1
6
22,458,776
1
0
0
Like the subject says: Does the latest stable pygame release work with python2.7? I've got both versions installed on my OSX Snow Leopard, but import pygame only works on python2.6 - That's the official distro which is 2.6.6, not the pre-installed one which is 2.6.1). And if it does work, how can I make it work on my m...
true
4,200,644
1.2
0
0
0
My guess is that you installed it for 2.6 and so it is residing in 2.6's library directory. Install it in 2.7's library directory and you should be good to go. I don't know OSX so I can't help with the details but a little bit of googling shouldn't be too hard. The problem is that the two python installations have dist...
1
324
0
0
2010-11-17T01:10:00.000
python,macos,pygame
Does the latest stable pygame release work with python2.7?
0
1
1
4,200,863
1
0
0
I am looking for a Python GUI library that I can rewrite the rendering / drawing. It has to support basic widgets (buttons, combo boxes, list boxes, text editors, scrolls,), layout management, event handling The thing that I am looking for is to use my custom Direct3D and OpenGL renderer for all of the GUI's drawing / ...
false
4,203,614
0.039979
0
0
1
You can use Qt Scene Framework with OpenGL rendering. There are many examples on Nokia site.
0
2,152
0
8
2010-11-17T10:51:00.000
python,user-interface,opengl,directx
Python GUI with custom render/drawing
0
1
5
4,250,496
1
0
0
I am trying to embed some python code in a c++ application i am developing with ms visual studio c++ 2010. But when i run the program, it exits with code 0x01 when i call Py_initialize(). I dont know how to find out what went wrong. the help file says, Py_Initialize can't return an error value, it only fails fataly. Bu...
true
4,216,988
1.2
0
0
0
Well, i finally found out what went wrong. I did compile my python27_d.dll with the same VC10 as my program itself. But my program is normally compiled as 64 bit executable. I just forgot to compile the dll for x64, too. I didnt think this would lead to such annoying behavoiur, as i believed i would get a linkr error t...
1
1,264
0
1
2010-11-18T16:16:00.000
c++,python,visual-studio-2010,python-c-api,python-embedding
Tried to embed python in a visual studio 2010 c++ file, exits with code 1
0
2
2
4,277,222
1
0
0
I am trying to embed some python code in a c++ application i am developing with ms visual studio c++ 2010. But when i run the program, it exits with code 0x01 when i call Py_initialize(). I dont know how to find out what went wrong. the help file says, Py_Initialize can't return an error value, it only fails fataly. Bu...
false
4,216,988
0
0
0
0
Is there simple 'hello world' type example of the Py_Initilize code in the python sdk you can start with? That will at least tell you if you have the compiler environment setup correctly, or if the error is in your usage.
1
1,264
0
1
2010-11-18T16:16:00.000
c++,python,visual-studio-2010,python-c-api,python-embedding
Tried to embed python in a visual studio 2010 c++ file, exits with code 1
0
2
2
4,217,625
1
0
0
How do I get the width and height of a Tkinter window?
true
4,220,295
1.2
0
0
32
You use the winfo_width method of the widget to get the actual width. You can use winfo_reqwidth to get the size that the widget is requesting, which may be different. Note that if you call this before the window appears on the screen, you won't get the answer you expect. Tkinter needs to have actually drawn the window...
0
22,438
0
22
2010-11-18T22:31:00.000
python,tkinter
Get Tkinter Window Size
0
2
2
4,221,002
1
0
0
How do I get the width and height of a Tkinter window?
false
4,220,295
0.099668
0
0
1
to create an exact window size you can simple do: window.geometry("400x400") as an example but you have to make sure it is like a string otherwise it wont work like I have experience
0
22,438
0
22
2010-11-18T22:31:00.000
python,tkinter
Get Tkinter Window Size
0
2
2
71,922,330
1
0
0
Wondering if there's a menu event I can bind to that's related to the currently selected menu item? By menu item I mean the items that show up in a popup menu like New, Open, Save, etc. Use case: I would like to update a statusbar area of our application with a description of the currently selected menu item. Any ideas...
true
4,220,441
1.2
0
0
2
You need to bind to the <<MenuSelect>> event.
0
1,525
0
0
2010-11-18T22:49:00.000
python,menu,tkinter
Python/Tkinter: bind to event related to currently selected menu item
0
1
2
4,220,839
1
0
0
The widgets in my application are the old style mac widgets. How do I make them become the new style ones. I am using pyqt 4.6.3-1 with python 2.7 on os x 10.6. Everything was installed using fink and I installed both qt4-mac and qt4-x11. Not sure which is being used or how to select one or the other.
true
4,232,228
1.2
0
0
1
I switched from Fink to Macports, and I got the nice widgets.
0
475
0
0
2010-11-20T10:16:00.000
python,cocoa,qt4,pyqt
getting pyqt to use cocoa widgets
0
1
1
4,365,030
1
0
0
I am writing a little gui application with Tkinter, which requires me to have a path to icon files. I am planning on embedding the file into the exe that I make with py2exe, and then retrieving it from there. The only problem is that I need to know where that file is. Does anyone know a way of getting the currently run...
false
4,234,697
0
0
0
0
Oops! I found out the answer! sys.executable should do the trick. It returns the path and filename of the currently running exe, although I must test to see that it works with py2exe.
1
1,490
0
0
2010-11-20T19:56:00.000
python,py2exe
Get path to exe file on py2exe
0
1
3
4,234,727
1
0
0
I am creating a series of buttons(Or windows) etc on RUN time. Now how do i identify when user clicks on these buttons?
false
4,239,896
0.197375
0
0
1
HI, I did an R&D on wx.Event(GetEventObject) and found out that i can get object details. SO i solved my problem using this.
0
77
0
0
2010-11-21T19:36:00.000
python,wxpython
How to Identify Dynamically created window/buttons in wxpython?
0
1
1
4,240,158
1
0
0
(Or, "Can PyPy/RPython be used to compile/translate Python to C/C++ without requiring the Python runtime?") I have tried to comprehend PyPy with its RPython and its Python, its running and its compiling and its translating, and have somewhat failed. I have a hypothetical Python project (for Windows); I would like to ke...
true
4,251,964
1.2
0
0
18
Yes, PyPy can produce standalone executables from RPython code. That means, you need to follow all the awkward RPython rules when it comes to writing code. Your Python code is completely unlikely to function out of the box and porting existing Python code is usually not fun. It won't make executables as small as C, but...
1
6,144
0
27
2010-11-23T01:41:00.000
python,compiler-construction,translate,pypy,rpython
Can PyPy/RPython be used to produce a small standalone executable?
0
1
1
4,253,643
1
0
0
I have created a gtkMenu using gtk.Menu(), appended a couple of items and now I want to remove some menu items. How can I do that?
false
4,258,771
0
0
0
0
Maybe using destroy() could save some RAM: menu.foreach(lambda child: child.destroy())
0
3,084
0
8
2010-11-23T17:10:00.000
python,pygtk
How to remove an item from a gtkMenu?
0
1
2
65,870,271
1
0
0
I'm using pygame to create a small scene. Right now, I'm working with lines. I have an array of lines which are drawn to the screen and when a line is deleted from the array, I would like the line to disappear from the screen. The problem I've found is that the line is drawn on the screen and remains static. I can't ...
true
4,276,342
1.2
0
0
1
If you use screen.fill([0,0,0]) it will fill in the background (or whatever you have set to be your background). This will erase any lines drawn on the image, essentially removing anything drawn on the background.
0
4,502
0
0
2010-11-25T11:10:00.000
python,line,pygame
Python (pygame): How can I delete a line?
0
1
3
4,276,397
1
0
0
Is it possible to display PyGame surfaces with controllable alpha? I would like to take a surface with its own per pixel alpha and display it with variable level of translucency without affecting the surface data and keep the transparency intact i.e. the objects on the surface would keep their shapes but their "content...
true
4,276,850
1.2
0
0
4
After checking both PyGame and SDL documentations I came to conclusion that what I asked wasn't doable in PyGame using standard functions. SDL docs state that per-pixel alpha and per-surface alpha cannot be combined with the former always taking the precedence. The only way to achieve the effect I want is by writing a ...
0
7,315
0
13
2010-11-25T12:05:00.000
python,pygame,transparent
PyGame: translucent sprites with per pixel alpha
0
1
4
4,535,566
1
0
0
I need to expose a file-like object from a C library that i'm wrapping with a Cython module. I want to reuse python's generic io code for stuff like buffering, readline(), etc. The new IO module seems to be just what i need, but actually using it from Cython seems to be non-trivial, I've tried several aproaches: My co...
false
4,278,444
0.197375
1
0
1
Would it be too inefficient to call os.fdopen() on the file descriptor number returned by the underlying library, and then to dispatch normal Python method calls to the resulting file object in order to do your input and output? With most I/O, I would be surprised if you could see a difference with whether you called a...
0
1,145
0
20
2010-11-25T15:08:00.000
python,file-io,cython
Exposing a file-like object from Cython
0
1
1
8,262,264
1
0
0
I was thinking that for a learning project for myself, I would try to make a GUI for ffdshow on linux, using tkinter. Wanted to make sure this project would be feasible first, before I get halfway through and run into something that cant be done in python. Basic idea is to have a single GUI window with a bunch of drop ...
false
4,278,461
0.197375
0
0
1
That is precisely the type of thing that python and Tkinter excel at. And yes, a relative newbie can easily do a task like that.
0
446
0
1
2010-11-25T15:10:00.000
python,user-interface,tkinter,ffdshow
making a python gui for ffdshow
0
1
1
4,278,800
1
0
0
This is a bit of a vague question but bear with me. I am in the process of writing a game using Python/Pyglet and openGL. I currently have it structured so that there is an object called 'world', in this are other objects with other objects inside them etc. I did it this way because for instance one part of the game is...
false
4,291,566
0
0
0
0
You could put the logic into a seperate module / into seperate classes/functions. In my 2D-Game I have a GameLogic class which simplifies registering it's methods for certain events or scheduling them (and unregistering+unscheduling them), and I created a @state_wrapper decorator which injects a simple new-style object...
0
382
0
2
2010-11-27T12:10:00.000
python,architecture,3d,pyglet
How to organise the structure of a 3D game?
0
1
2
4,368,817
1
0
0
I have a Tkinter app written in python, and I want to make "native" (easy to run) mac and windows executables of it. I've successfully built a windows .exe using py2exe, but the equivalent process with py2app isn't working. Here's my setup.py: from setuptools import setup import sys MAIN_SCRIPT = "myapp.py" WINDOWS_IC...
true
4,294,060
1.2
0
0
0
Turns out it was a problem with using Snow Leopard. I tried it on a Leopard machine at school and it builds fine.
0
1,470
0
2
2010-11-27T21:41:00.000
python,tkinter,py2app
Help building a mac application from python using py2app?
0
1
1
4,300,560
1
0
0
I'd like to remove focus from a widget manually.
false
4,299,432
0.066568
0
0
2
My solution is root.focus() it will remove widget focus.
0
16,266
0
11
2010-11-28T22:15:00.000
python,tkinter
In Tkinter how do i remove focus from a widget?
0
2
6
64,151,502
1
0
0
I'd like to remove focus from a widget manually.
false
4,299,432
0.16514
0
0
5
Set focus to another widget to remove focus from the target widget is a good idea. There are two methods for this: w.focus_set() and w.focus_force(). However, method w.focus_force() is impolite. It's better to wait for the window manager to give you the focus. Setting focus to parent widget or to the root window remove...
0
16,266
0
11
2010-11-28T22:15:00.000
python,tkinter
In Tkinter how do i remove focus from a widget?
0
2
6
47,823,400
1
0
0
So we want to program a 3d game for school, we can probably use blender for the 3d models, however we are totally clueless as to how to use them in a game/application. Are there any recommended guides/documents we should read on general 3d game programming and perhaps python specific stuff. We are also possibly conside...
false
4,303,851
0
0
0
0
I would implement the time-critical stuff as 3D and its object handling + rendering in raw C/C++ and let an embedded Python with external modules handle the game logic (object movement, object properties, scripting and so on).
1
56,291
0
15
2010-11-29T12:49:00.000
c++,python,3d
3d game with Python, starting from nothing
0
3
8
4,303,972
1
0
0
So we want to program a 3d game for school, we can probably use blender for the 3d models, however we are totally clueless as to how to use them in a game/application. Are there any recommended guides/documents we should read on general 3d game programming and perhaps python specific stuff. We are also possibly conside...
false
4,303,851
0.049958
0
0
2
If you want to write a 3D game you might want to start by understanding the basics of programming and computer science. Starting with the top and learning a language, then find yourself a good graphics library for example Panda, Pygame are all good choices, then there are other parts to consider like networking with tw...
1
56,291
0
15
2010-11-29T12:49:00.000
c++,python,3d
3d game with Python, starting from nothing
0
3
8
4,303,913
1
0
0
So we want to program a 3d game for school, we can probably use blender for the 3d models, however we are totally clueless as to how to use them in a game/application. Are there any recommended guides/documents we should read on general 3d game programming and perhaps python specific stuff. We are also possibly conside...
false
4,303,851
0.049958
0
0
2
You should be aware that 3D game consists of animated 3D models 3D environment (including NPCs and objects) simulation of interaction between the environment and the models (game logic and game mechanics) user interface (starting, saving and game settings) The game logic and mechanics is going to usually the biggest ...
1
56,291
0
15
2010-11-29T12:49:00.000
c++,python,3d
3d game with Python, starting from nothing
0
3
8
4,304,000
1
0
0
Using Python 2.6, Twisted 10.1, and GTK+ 2.22, with latest pygtk installed, I'm having problems on shutdown. When I close my application and shut down the reactor (using the gtk2reactor of course), the application simply freezes. I've poked around the twisted source and added debug messages. What ends up happening is,...
false
4,308,346
0
0
0
0
Threads, perhaps? The Twisted reactor joins all threads on shutdown, and if you're doing something in a callInThread that hangs, your loop may be unable to stop. (I'm not sure what the behavior would be if you're starting your own threads, either.)
0
426
0
1
2010-11-29T21:36:00.000
python,pygtk,twisted,gtk
Twisted + Gtk - shutdown not working properly
0
1
2
4,310,711
1
0
0
I have implemented an informational popup in a python app using a Tkinter Menu widget. I have a Text widget on a canvas in the root window. I created a Menu widget that has root as its parent. When I detect a mouse hover over the text widget I post the popup menu with menuWidget.post(). When I get a leave event from ...
false
4,328,603
0.53705
0
0
3
This is not the right way to do an informational popup. On the Mac and on windows machines menus are native controls. Because of this the unpost command doesn't work because tk cedes control to the system event loop in order to get platform-specific behavior. What you want is to use instead is a toplevel window with t...
0
2,151
0
1
2010-12-01T20:09:00.000
python,tkinter
'hover over' popup with Tkinter
0
1
1
4,328,747
1
0
0
hey all, im looking for a way of catching a button held down event in wxpython i cant seem to find anything. theres just wx.EVT_BUTTON which isnt quite what i want. i want my event to continue processing as long as the button is down. any help would be appreciated thanks james
true
4,329,377
1.2
0
0
2
I think I would catch the EVT_LEFT_DOWN and the EVT_LEFT_UP. Then start a wx.Timer to run your process on EVT_LEFT_DOWN until the EVT_LEFT_UP is fired. Alternatively, you could use a ToggleButton.
0
1,279
0
1
2010-12-01T21:32:00.000
button,wxpython
wxpython button held down event
0
1
1
4,329,486
1
0
0
Is there a way to customize the horizontal padding between an image and text in a Label widget when compound=left or right? The 2 ways I can think of are: Use PIL to dynamically add columns of pixels to an image Insert or append spaces to the text= option of the label to force the separation of image and text What I'...
true
4,333,359
1.2
0
0
0
There is no built-in way to do what you want. Your own suggestions are good. Another option is to create a frame, and place separate image and label widgets in the frame. You then have complete control of the placement of the widgets
0
912
0
0
2010-12-02T09:16:00.000
python,image,label,tkinter
Python/Tkinter: Customize horizontal padding between image and text in Label widget?
0
1
1
4,334,872
1
1
0
I am trying to integrate IronPython in my Silverlight application but am unable to do so. After downloading the binaries, every time I try to add the dlls as references in my VS2010 solution all I get is an error about them not being compiled for Silverlight. I have even tried downloading the source distribution, but c...
true
4,336,935
1.2
0
0
2
You have to use binaries from IronPython-2.6.1\Silverlight\bin folder in Silverlight.
0
127
0
3
2010-12-02T15:56:00.000
silverlight,silverlight-4.0,ironpython
Ironpython 2.6.1 on Silverlight 4
0
1
1
4,358,122
1
0
0
I'm trying to disable warning C0321 ("more than one statement on a single line" -- I often put if statements with short single-line results on the same line), in Pylint 0.21.1 (if it matters: astng 0.20.1, common 0.50.3, and Python 2.6.6 (r266:84292, Sep 15 2010, 16:22:56)). I've tried adding disable=C0321 in the Pylin...
false
4,341,746
0.015383
0
0
1
Python syntax does permit more than one statement on a line, separated by semicolon (;). However, limiting each line to one statement makes it easier for a human to follow a program's logic when reading through it. So, another way of solving this issue, is to understand why the lint message is there and not put more th...
1
404,539
0
346
2010-12-03T01:41:00.000
python,pylint
How do I disable a Pylint warning?
0
1
13
48,765,416
1
0
0
hey.. i have a panel (lets call it mainpanel) with a couple of panels in it and other widgets. i need to know what to bind the wx.EVT_LEFT_DOWN to in order for it to fire an event for clicks anywhere in mainpanel and its children. e.g. if i click on a textctrl in mainpanel i want it to pick that up aswell. binding to m...
false
4,368,885
0
0
0
0
Text controls eat mouse clicks so you may just want to catch the focus event for them. I think the rest should work though.
0
242
0
1
2010-12-06T16:55:00.000
wxpython
wxpython, what to bind an application wide mouse event to
0
1
1
4,370,204
1
0
0
Recently I installed wxPython to do some works under Windows. Most of the time I work in Linux so I have a little experience here. with python.exe interpreter, I just do 2 line of codeimport wxtmp=wx.App(False) Then the interpreter crashed with Windows error reporting. I tried both python 2.7.1 and 2.6.6 with wxPytho...
false
4,369,102
0.066568
0
0
1
If you are running that in IDLE, then that is your problem. IDLE and wx don't get along very well because you basically end up with two mainloops fighting each other. Try putting it in a file and then run the file from the command line: c:\python27\python.exe myPyFile.py That should work just fine. Otherwise, download ...
0
1,983
1
1
2010-12-06T17:19:00.000
python,wxpython
wx.App (wxPython) crash when calling
0
3
3
4,369,662
1
0
0
Recently I installed wxPython to do some works under Windows. Most of the time I work in Linux so I have a little experience here. with python.exe interpreter, I just do 2 line of codeimport wxtmp=wx.App(False) Then the interpreter crashed with Windows error reporting. I tried both python 2.7.1 and 2.6.6 with wxPytho...
true
4,369,102
1.2
0
0
0
I searched for a while and found that this is the problem with wxPython and Python >2.5. Tried many fix with manyfest file but no luck, so I think switch to PyQt is the only solution now.
0
1,983
1
1
2010-12-06T17:19:00.000
python,wxpython
wx.App (wxPython) crash when calling
0
3
3
4,496,450
1
0
0
Recently I installed wxPython to do some works under Windows. Most of the time I work in Linux so I have a little experience here. with python.exe interpreter, I just do 2 line of codeimport wxtmp=wx.App(False) Then the interpreter crashed with Windows error reporting. I tried both python 2.7.1 and 2.6.6 with wxPytho...
false
4,369,102
0.066568
0
0
1
In case like me somebody will stumble into this question like I did. Recently installed wxpython on two machines, windows 7 and XP. Testing the sample code in simple.py (provided with the wxpython docs-demos installer), running from a python console, I had the following problem on both machines: First import ok, but wh...
0
1,983
1
1
2010-12-06T17:19:00.000
python,wxpython
wx.App (wxPython) crash when calling
0
3
3
16,407,973
1
0
0
I'm using the Android 2.2 SDK emulator to test out the Scripting Layer for Android and have one annoyance. When you launch a Python interpreter and start to type code it appears that the parentheses key isn't mapped properly. When I hit the key on the PC keyboard I get ^[[20~ instead. What am I missing?
false
4,369,261
0
0
0
0
Looks like the Control-K button actually toggles the left-ALT key on the PC to mimic the virtual keyboard left-ALT.
0
669
0
0
2010-12-06T17:41:00.000
python,android,sl4a
Android Emulator Keyboard
0
1
1
4,531,739
1
0
0
How do I get my filechooser to be able to select both files and folders when the open button on the filechooser dialog is hit ? I want to squeeze the ability to open files and filders in just one filechooser. I am using GTK+ and Python.
true
4,376,500
1.2
0
0
2
I was thinking about this, and although in your comments you've decided to go another route, I do have a suggestion: Write your own file chooser subclass of the GTK+ one and provide two "Open" buttons, one to "Open File" and another to "Open Directory". That would eliminate the ambiguity discussed above.
0
1,339
0
7
2010-12-07T12:21:00.000
python,pygtk,gtk,filechooser
GTK+ Filechooser to open both files and folders
0
1
1
4,831,626
1
0
0
I am developing a Python 2.7.1 / Tkinter 8.4 app on Windows XP that checks several lines of input from a RS-232 port. However, if no input arrives it will sit in a loop for ever. I am trying to implement an ‘Abandon Test’ button on the GUI but because the main thread is busy waiting for input it doesn’t appear to eve...
true
4,376,870
1.2
0
0
5
Tk is single-threaded, so if the main thread is busy the GUI will freeze. One solution is to use a separate thread to do the reading, so when the read blocks your main thread can continue. When you get a line of input you can push it on a queue which is monitored by the main thread. The other way is to figure out how ...
0
987
0
2
2010-12-07T13:04:00.000
python,tkinter
How can I monitor Tkinter buttons when Python is busy?
0
1
1
4,377,125
1
0
0
Currently I'm drawing some things in a subclass of DrawingArea, where I get a cairo context inside an expose-event and call a draw method from there. (according to some PyGTK tutorial I found) I'm used to doing a repaint() with java, but how can I get the same effect here?
false
4,383,614
0
0
0
0
I found a solution that uses the queue_draw() method (callable from the Gtk.DrawingArea but seems like a method every gtk widget must have), but there are probably alternatives since this one implies it might get delayed, even though in my tests it didn't happen.
0
3,673
0
2
2010-12-08T02:15:00.000
python,gtk,drawing,pygtk
(Py)GTK: How can I force my window to be repainted / call expose-event?
0
1
2
4,383,675
1
0
0
I am running a .NET 3.5 C# project in Visual Studio 2008. In the project I am hosting an IronPython script that imports modules that I have compiled to .NET dlls with pyc. The version of IronPython is 2.6.1. I have used ObjectOperations.GetInstance and GetMember to wire up the python methods to the C# code. When I am d...
true
4,396,727
1.2
0
0
1
There is no way to do this out of the box. You'd need to modify IronPython/DLR so that the calls from ClrModule.CompileToMethod down would pass an option to emit symbols and then ultimately call LambdaExpression.CompileToMethod to emit symbols.
1
242
0
1
2010-12-09T09:38:00.000
.net,visual-studio,dll,ironpython
Is it possible to step into an IronPython dll compiled with pyc?
0
1
1
4,414,812
1
0
0
Is there a pack equivalent of the grid_remove() method where a widget's original pack() settings are restored on a re-pack()? Use case: When I show a packed widget that has been hidden via pack_forget(), I would like to have the widget re-packed with its original pack settings when I issue the widget.pack() show reques...
true
4,399,237
1.2
0
0
4
No, there is no equivalent. There is only pack_forget which doesn't remember where the widget was when you restore it. If I need this sort of feature I just use the grid geometry manager.
0
2,749
0
3
2010-12-09T14:23:00.000
python,tkinter,ttk
Python/Tkinter: pack equivalent of grid_remove(), eg. pack_remove()?
0
1
2
4,399,322
1
0
0
Are there any best practice tips regarding when one should use pack vs. grid for their layouts? From what I've been reading via google, the concencus seems to be that grid can handle any pack scenario but not vice-versa. To start the conversation, it appears that one use case that favors grid vs. pack is when one wants...
true
4,401,202
1.2
0
0
18
Neither is intrinsically better than the other. Each have strengths and weaknesses. Learn what those are and the choice of which to use becomes obvious. grid is considerably easier to use if you need to lay things out in a grid. pack is generally easier to use if all you need to do is put some widgets in a single row o...
0
33,054
0
31
2010-12-09T17:23:00.000
python,user-interface,layout,tkinter,ttk
When to use pack or grid layouts in tkinter?
0
3
3
4,402,589
1
0
0
Are there any best practice tips regarding when one should use pack vs. grid for their layouts? From what I've been reading via google, the concencus seems to be that grid can handle any pack scenario but not vice-versa. To start the conversation, it appears that one use case that favors grid vs. pack is when one wants...
false
4,401,202
1
0
0
10
I always recommend grid over pack for polished applications. There are only a few edge cases where pack is easier and fits the bill (everything in one row or col). grid has better "composability" (e.g. megawidgets or gridding elements of gridded elements). The reasons to prefer grid are the extra fine-tuning options...
0
33,054
0
31
2010-12-09T17:23:00.000
python,user-interface,layout,tkinter,ttk
When to use pack or grid layouts in tkinter?
0
3
3
4,411,675
1
0
0
Are there any best practice tips regarding when one should use pack vs. grid for their layouts? From what I've been reading via google, the concencus seems to be that grid can handle any pack scenario but not vice-versa. To start the conversation, it appears that one use case that favors grid vs. pack is when one wants...
false
4,401,202
0.132549
0
0
2
I personally just think grid is a lot easier to work with, so I would use that. Of course, you've probably read the one thing you should never do is try to use both at the same time in the same container. Thank you Bryan Oakley for making that distinction.
0
33,054
0
31
2010-12-09T17:23:00.000
python,user-interface,layout,tkinter,ttk
When to use pack or grid layouts in tkinter?
0
3
3
4,401,215
1
0
0
one topic that has always been of highest interest to me is 3D Programming. I've made several attempts at programming small games and never really successed. After experiences with DirectX and C++, XNA and C#, as well as Unity3d and C#, I would like to try OpenGL. Just being curious. When using C++ the way to go is rat...
true
4,403,150
1.2
0
0
3
I have used JOGL in many of my 3D projects. Learning how to use a binding is not as important as learning the actual api. Using opengl in c and java are pretty much the same. The only thing that differs is the way you set up your rendering windows and buffers. I use netbeans ide with the opengl for netbeans plugin beca...
0
1,677
0
3
2010-12-09T21:10:00.000
java,python,scala,opengl,jogl
Key to OpenGL. Java / Scala / Python
0
1
2
4,435,696
1
0
0
I want to make a gtk SpinButton, but for inputting dates. Is there an easier way to input dates into GTK? If not, how can I create a SpinButton look-alike, but whose output is text representing dates instead of integers? Ideally I'd re-use the arrows, the clicks, the integration with the adjustment, etc. I really just...
false
4,404,825
0.197375
0
0
3
The calendar is a bit large, but you can find code putting it in a popup. Personally I use a regular text entry and parse the date. As for SpinButton, it is based on a text entry, so you might be able to modify its display only by fiddling with inherited signals and returning False. See also the update-policy and numer...
0
847
0
1
2010-12-10T01:22:00.000
python,user-interface,gtk,pygtk
gtk custom spin button
0
1
3
4,450,091
1
0
0
I have done coding for mathematical simulation of Theory of Computation concepts in Python such as grammar checking and other stuff. My Problem is that I have to build a decent looking GUI for it . I have looked at PyQt4 and the lack of documentation is really a big deterrent. I have looked at other graphical libraries...
false
4,413,692
0
0
0
0
Most python guis I recommend tkinter but drag 'n drop isn't built into tkinter yet and I'm not a huge fan of the other libraries. Have you thought about IronPython in .Net and WPF? You'll need to learn the xaml syntax but it's not much harder than html (technically, it's stricter and simpler but you need to learn some ...
0
77
0
1
2010-12-10T22:02:00.000
python
Interlinking GUI in some other language and Python
0
2
2
4,413,768
1
0
0
I have done coding for mathematical simulation of Theory of Computation concepts in Python such as grammar checking and other stuff. My Problem is that I have to build a decent looking GUI for it . I have looked at PyQt4 and the lack of documentation is really a big deterrent. I have looked at other graphical libraries...
true
4,413,692
1.2
0
0
1
I'd look again at PyQT4 if you want something decent looking. PyQt has an an example directory in the source code. KDE uses QT and they have a lot examples too. You have to understand that it is a binding against QT4. When I use it with python I usually just have the QT docs open. Its pretty easy to translate. You cou...
0
77
0
1
2010-12-10T22:02:00.000
python
Interlinking GUI in some other language and Python
0
2
2
4,413,875
1
0
0
Is there anyway I could register button pushes on a joystick without using any function from pygame?
false
4,415,649
0.099668
0
0
1
If you're looking for a way to do it with just the standard Python library, the answer is probably "no" - or at the very least, "not in any straightforward manner". There are many things in the standard library, but gaming hardware support is not one of them.
0
916
0
1
2010-12-11T07:05:00.000
python
Detecting an arbittrary button press on a USB joystick WITHOUT pygame
0
1
2
4,415,722
1
1
0
Every time I need to load a local file using webkit in python I need to start with "file://" which I need to include in all files I am working with. How can I eliminate the need to do that? I want to load files like webview.load_uri('file.html') instead of webview.load_uri('file://file.html')?
true
4,416,570
1.2
0
0
3
You can't. webview.load_uri() takes a string containing a URI. 'file.html' isn't a URI, 'file://file.html' is.
0
2,182
0
2
2010-12-11T11:50:00.000
python,webkit,gtk
Problem loading local files with webkit in python
0
2
2
4,421,093
1
1
0
Every time I need to load a local file using webkit in python I need to start with "file://" which I need to include in all files I am working with. How can I eliminate the need to do that? I want to load files like webview.load_uri('file.html') instead of webview.load_uri('file://file.html')?
false
4,416,570
0.099668
0
0
1
webview.load_string() takes the text of an html file. you can load the file into a file object without the file:// and read it into the load_string function.
0
2,182
0
2
2010-12-11T11:50:00.000
python,webkit,gtk
Problem loading local files with webkit in python
0
2
2
7,470,386
1
0
0
Has anyone figured out a way to change the brace matching colours in WingIDE? I have managed to manually port my favourite colour scheme across from my text editor and the default green just doesn't do it for me. I've been unable to find instructions on how to do this in the UI, user manual and mailing lists.
true
4,418,839
1.2
0
0
1
I've contacted Wingware support and they have confirmed that there is no way to set the brace matching colour.
0
135
0
3
2010-12-11T20:40:00.000
python,wing-ide
WingIDE brace matching colours
0
1
1
4,431,943
1
0
0
I'm using a wxPython listbox on Windows to get a choice from the user, and I would like them to be able to select an item using the ENTER key, as if they had double-clicked. I know how to do this in C or C++ using the Windows API directly, but can't seem to find how to do it using wxPython. Anyone know how? It seems li...
false
4,451,166
0.066568
0
0
1
The simple answer is that the wx.ListBox doesn't support that. Try using a one column wx.ListCtrl (in Report mode) instead.
0
721
0
2
2010-12-15T14:50:00.000
python,windows,wxpython
Keyboard interface to wxPython listbox
0
2
3
4,465,221
1
0
0
I'm using a wxPython listbox on Windows to get a choice from the user, and I would like them to be able to select an item using the ENTER key, as if they had double-clicked. I know how to do this in C or C++ using the Windows API directly, but can't seem to find how to do it using wxPython. Anyone know how? It seems li...
false
4,451,166
0.066568
0
0
1
Maybe I'm missing some nuance, there wasn't much info to go on, but it sounds like you could accomplish this by catching the keydown event, matching for enter and then calling your on_doubleclick function. Unless there's an implicit double-click handling you should be good to go.
0
721
0
2
2010-12-15T14:50:00.000
python,windows,wxpython
Keyboard interface to wxPython listbox
0
2
3
4,451,586
1
0
0
I am trying to decide if it is better to use a pre-rendered large image for a scrolling map game or to render the tiles individual on screen each frame. I have tried to program the game both ways and don't see any obvious difference in speed, but that might be due to my lack of experiences. Besides for memory, is the...
false
4,451,464
0
0
0
0
Depends on the size of the map you want to make, however, with the actual technologies it's very hard to see a tile-map "rendered" to take longer than expected, tiled based games are almost extinguished, however is always a good practice and a starting point to the world of game programming
0
2,637
0
5
2010-12-15T15:12:00.000
python,pygame
Pygame: Tiled Map or Large Image
0
3
4
4,474,154
1
0
0
I am trying to decide if it is better to use a pre-rendered large image for a scrolling map game or to render the tiles individual on screen each frame. I have tried to program the game both ways and don't see any obvious difference in speed, but that might be due to my lack of experiences. Besides for memory, is the...
false
4,451,464
0.049958
0
0
1
Memory and speed are closely related. If your tile set fits in video memory, but the pre-rendered map doesn't, speed will suffer.
0
2,637
0
5
2010-12-15T15:12:00.000
python,pygame
Pygame: Tiled Map or Large Image
0
3
4
4,451,504
1
0
0
I am trying to decide if it is better to use a pre-rendered large image for a scrolling map game or to render the tiles individual on screen each frame. I have tried to program the game both ways and don't see any obvious difference in speed, but that might be due to my lack of experiences. Besides for memory, is the...
true
4,451,464
1.2
0
0
5
The only reason I can think of for picking one over the other on modern hardware (anything as fast and with as much ram as, say, an iPhone), would be technical ones that make the game code itself easier to follow. There's not much performance wise to distinguish them. One exception I can think of, is if you are using ...
0
2,637
0
5
2010-12-15T15:12:00.000
python,pygame
Pygame: Tiled Map or Large Image
0
3
4
4,451,490
1
0
0
I have a small Python app ready that I'd like to distribute around to my friends in the company. I have used wxWidgets for the GUI, with SQLite for the database. I'm planning on using py2exe for packaging the entire thing. I'd like to know if bundling the Python interpreter is required ? Does py2exe does it by default...
false
4,463,097
0
0
0
0
py2exe must bundle the Python interpreter--how else would your friends without Python use your program without it? But it does, of course. py2exe mostly includes what needs to be included based on what is imported into your app, so if you have import sqlite3 in there, it will be included. I'd try using GUI2Exe, it ma...
1
725
0
0
2010-12-16T16:37:00.000
python,installation,wxwidgets,executable,py2exe
Do I need to bundle the Python interpreter (in py2exe) when I am distributing my app?
0
1
2
4,467,946
1
0
0
i want to change my progrssbar color to Black which is green. i think by default it is green I am trying with self.progress_bar.color but doesnot reflect any change i think there will be any inbuilt method but i am unable to find it.
false
4,468,326
0.099668
0
0
1
I'm guessing here, but because wxPython wraps native widgets whenever possible, those widgets may or may not support the changing of certain colors. I know that's true with StaticText on some OSes. So you may want to try with the generic progress bar, PyProgress, since it's written in pure Python and can be hacked easi...
0
1,414
0
1
2010-12-17T06:42:00.000
wxpython
Want to change progress bar color to Black in wx python
0
1
2
4,471,136
1
0
0
I am currently in the process of discovering OpenCL via the Python binding Clyther. So far I am messing with a very simple script to get the sin or cos of a buffer of 65536. Apparently 65536 is the limit for buffers on my card but say I'd have 16 million numbers in my buffer how would I go about it without constantly ...
true
4,470,246
1.2
0
0
2
This awfully looks like you are using __constant memory. The solution is to use __global memory instead, but you have to be careful about how you access it for best performance. __constant memory is a special address space for often used constant values, but is restricted in size on current GPUs.
0
156
0
0
2010-12-17T12:02:00.000
python,opencl
Processing buffers bigger than 65536 in Clyther/OpenCL
0
1
1
4,478,655
1
0
0
I checked some other question and websites, and I've come to the conclusion that Python does allow (correct me if I'm wrong) you to make GUI programs using different cross-platform toolkits like Qt, wxWidgets and some others. But what if I don't want cross-platform portability. Primary, I want to develop native applica...
false
4,471,056
1
0
0
8
Don't waste your time. Use wxPython, which will use the native toolkit for you.
0
1,951
0
1
2010-12-17T13:52:00.000
python,windows,qt,macos,wxwidgets
Python and native GUI
0
1
3
4,471,107
1
0
0
If I were to write several classes in c++ then use swig to do the conversion so I could later use them in python, would they run faster or slower than if I completely rewrote them in python? Or is there no noticable speed difference?
true
4,476,663
1.2
1
0
6
The quality and speed of wrappers generated by SWIG is very good, and they will probably perform just as good as handcrafted wrappers. From my experience, the wrappers themselves are very thin and add very little overhead to the native functions they wrap, making it a perfectly valid choice to use wrapped libraries in...
1
3,456
0
9
2010-12-18T04:38:00.000
c++,python,performance,swig
Speed of swig wrappers
0
1
1
4,484,174
1
0
0
I'm trying to create a configuration file for a C# app in IronPython. Is there any way I can have that python file just return a value, or do I have to go through variables/functions to access the results of the script? i.e., right now I've got Config.py that looks like x = "test" and C# code that goes ...
true
4,479,679
1.2
1
0
3
You can create a ScriptSource with SourceCodeKind.AutoDetect and it will return the last expression in the file.
1
618
0
2
2010-12-18T19:21:00.000
c#,dynamic,interop,ironpython
How to create an IronPython file that simply returns a single value to C#?
0
1
1
4,480,156
1
0
0
Is there a messagebox class where I can just display a simple message box without a huge GUI library or any library upon program success or failure. (My script only does 1 thing). Also, I only need it to run on Windows.
false
4,485,610
0.066568
0
0
2
You can also use the messagebox class from tkinter: from tkinter import messagebox unless tkinter is that huge GUI you want to avoid. Usage is simple, ie: messagebox.FunctionName(title, message [, options]) with FuntionName in (showinfo, showwarning, showerror, askquestion, askokcancel, askyesno, askretrycancel...
1
53,872
0
43
2010-12-19T22:58:00.000
python,windows,user-interface,windows-7
Python Message Box Without huge library dependency
0
1
6
40,915,752
1
0
0
I am C/C /Java programmer, but lately I have started learn Python. Moreover I have 3D Graphics on my studies. I have to create 3D model of my apartment, with dynamic camera. I am wondering if this is a good idea to merge this two issues, by writing this 3D model in python. However as I said, I am a python beginner, ...
false
4,490,991
0.099668
0
0
2
If you're solely trying to learn how to do a 3d model go for the language you're the most familiar with. I'd recommend C++ or C# in that case (whichever of the 2 you meant with the second C). If you also want to learn more about the language Python is the better choice. But pure language wise I wouldn't say that C++/c#...
1
425
0
5
2010-12-20T15:19:00.000
python,3d
Is python is a good choice as language used to implementing my first 3D model?
0
1
4
4,491,082
1
0
0
I have built PyQt4 from source and everything went smoothly until I tried to use some of the classes and attributes located in QtCore. For some reason QtCore is missing a lot of functionality and data that should be there. For example from PyQt4.QtCore import QT_VERSION_STR is an import error. There were no errors or w...
false
4,499,204
0
0
0
0
If it's really an ImportError, that suggests that it's failing to import the library altogether. Check that it's definitely somewhere that's in your sys.path, and that from PyQt4 import QtCore works. If the library exists, and QT_VERSION_STR doesn't exist, it will give you a NameError rather than an ImportError.
1
856
0
0
2010-12-21T12:25:00.000
python,linux,qt4,pyqt
PyQt4.QtCore doesn't contain many of its classes and attributes
0
2
2
4,499,868
1
0
0
I have built PyQt4 from source and everything went smoothly until I tried to use some of the classes and attributes located in QtCore. For some reason QtCore is missing a lot of functionality and data that should be there. For example from PyQt4.QtCore import QT_VERSION_STR is an import error. There were no errors or w...
true
4,499,204
1.2
0
0
0
The reason for this problem was a conflict in my python path. I had two modules named sip.py in different locations on my python path, the python path was using the first one but I wanted it to use the second one. I removed the first entry from the python path as it wasn't necessary.
1
856
0
0
2010-12-21T12:25:00.000
python,linux,qt4,pyqt
PyQt4.QtCore doesn't contain many of its classes and attributes
0
2
2
4,592,960
1
0
0
With wxPython, how does one trigger an event whenever the whole window goes into/out of focus? To elaborate, I'm building a serial terminal GUI and would like to close down the connection whenever the user doesn't have my application selected, and re-open the connection whenever the user brings my app back into the f...
false
4,505,097
0.099668
0
0
2
In addition to what these fellows are saying, you might also want to try EVT_ENTER_WINDOW and EVT_LEAVE_WINDOW. I think these are fired when you move the mouse into and out of the frame widget, although I don't think the frame has to be in focus for those events to fire. @ Hugh - thanks for the readership!
0
2,304
0
1
2010-12-22T00:01:00.000
python,wxpython,wxwidgets
wxPython Whole Window Focus Event
0
3
4
4,510,733
1
0
0
With wxPython, how does one trigger an event whenever the whole window goes into/out of focus? To elaborate, I'm building a serial terminal GUI and would like to close down the connection whenever the user doesn't have my application selected, and re-open the connection whenever the user brings my app back into the f...
false
4,505,097
0.099668
0
0
2
as WxPerl programmer i know there is EVT_SET_FOCUS( EVT_KILL_FOCUS( if you initialize this event by listening to the frame as first parameter it should work as in Perl since the API is almost the same
0
2,304
0
1
2010-12-22T00:01:00.000
python,wxpython,wxwidgets
wxPython Whole Window Focus Event
0
3
4
4,505,382
1
0
0
With wxPython, how does one trigger an event whenever the whole window goes into/out of focus? To elaborate, I'm building a serial terminal GUI and would like to close down the connection whenever the user doesn't have my application selected, and re-open the connection whenever the user brings my app back into the f...
true
4,505,097
1.2
0
0
5
The correct answer for this case is to use an EVT_ACTIVATE handler bound to the frame. There will be an event whenever the frame is activated (brought into the foreground relative to other windows currently open) or deactivated. You can use the event object's GetActive method to tell which just happened.
0
2,304
0
1
2010-12-22T00:01:00.000
python,wxpython,wxwidgets
wxPython Whole Window Focus Event
0
3
4
4,521,758
1
1
0
Hi I'm a techie with no programing experience. I know html and css, but I'd like to someday be able to make an app for my phone (I have an android) and possibly mobile websites. I made learning a programing language and creating a mobile app a goal for my job, and now my boss would like me to pick a programing languag...
false
4,514,389
0
0
0
0
Python is a good beginning language, but you need to ensure that you do more than just course work. Why not just run through tutorials on Android development right off the bat? If you are worried about wasting time by not using Java immediately, then why not just start there?
0
352
0
1
2010-12-22T22:41:00.000
iphone,python,android
Beginner's Language app
0
2
5
4,514,409
1
1
0
Hi I'm a techie with no programing experience. I know html and css, but I'd like to someday be able to make an app for my phone (I have an android) and possibly mobile websites. I made learning a programing language and creating a mobile app a goal for my job, and now my boss would like me to pick a programing languag...
false
4,514,389
0.039979
0
0
1
Learn to program first before learning how to develop for the iPhone. That will give you a much better chance at success. Python a perfectly good language for learning to program, especially in the context of an Intro to CS course environment. But any intro programming language environment will do (even one designed...
0
352
0
1
2010-12-22T22:41:00.000
iphone,python,android
Beginner's Language app
0
2
5
4,514,481
1
0
0
I have a wx.FileDialog (with the wx.FD_OPEN flag) & I would like to know if I can (& how) I could change the button in the bottom right of the FileDialog from "Open" to "Create" or "Delete", etc. What I am doing is I have a button with the text "Delete Portfolio", when pressed it opens a FileDialog & allows the user to...
false
4,529,991
0
0
0
0
If you are using the native controls, which wx tends to use, then you probably can't.
0
691
0
2
2010-12-25T10:17:00.000
python,wxpython
wxPython: Change a buttons text in a wx.FileDialog
0
2
2
4,530,426
1
0
0
I have a wx.FileDialog (with the wx.FD_OPEN flag) & I would like to know if I can (& how) I could change the button in the bottom right of the FileDialog from "Open" to "Create" or "Delete", etc. What I am doing is I have a button with the text "Delete Portfolio", when pressed it opens a FileDialog & allows the user to...
false
4,529,991
0.099668
0
0
1
Yeah, I agree with Arafangion. wxPython uses the native widgets and can only manipulate them in whatever way that native widgets allow. You would need to create a custom dialog to do this.
0
691
0
2
2010-12-25T10:17:00.000
python,wxpython
wxPython: Change a buttons text in a wx.FileDialog
0
2
2
4,539,977
1
0
0
my question is quite simple, but I can't move on until I solve it. I want to develop a card game, something like Magic the Gathering. I suppose there will be just a little of animation, but much work with images, image transformation and special rendering - some kind of things, that every unit has now attack plus 2 so ...
true
4,530,901
1.2
0
0
3
if you want just a simple animation and want to finish your game fast. use the pyqt's scene view. refer to (Rapid GUI programming using python and pyqt) book if you want to learn more about scene view.
0
2,261
0
1
2010-12-25T17:02:00.000
python,pyqt,pygame
what framework to use for python card game?
0
2
3
4,562,183
1
0
0
my question is quite simple, but I can't move on until I solve it. I want to develop a card game, something like Magic the Gathering. I suppose there will be just a little of animation, but much work with images, image transformation and special rendering - some kind of things, that every unit has now attack plus 2 so ...
false
4,530,901
0
0
0
0
Both pygame and pyqt will work for what you want to do, but I'd recommend pyqt: you'll be able to use standard widgets (like listboxes, textboxes, menus, buttons, ...). I've never worked with pyqt myself, but I image that drag 'n drop is something built-in, which will be really useful for a card game. With pygame on th...
0
2,261
0
1
2010-12-25T17:02:00.000
python,pyqt,pygame
what framework to use for python card game?
0
2
3
4,562,270
1
0
0
I'm new to pyglet. I'd like to change a pixel from black to white at each on_draw iteration. So after 1000 iterations, there should be exactly 1000 white pixels in the window. However, I'd like to avoid calling 1000 draw operations in on_draw for that. So I'd like to create an image, do an RGB putpixel on the image, an...
false
4,532,008
0
0
0
0
It seems there is no easy way to do this in pyglet. So I've given up on using pyglet.
0
1,298
0
1
2010-12-25T22:51:00.000
python,image,pyglet
putpixel with pyglet
0
1
3
5,832,879
1
0
0
I have a PyQt application that reads and writes data files. I am including a 'version number' in each file written. This is a simple number similar to: 1.2 or something (major and minor versions). I am doing this so that I can change the format of these data files in future versions and then still correctly parse the...
false
4,535,895
0
0
0
0
Personally, I wouldn't do it manually this way. I'd save my code in Subversion and let it maintain the revision numbers for me.
1
3,932
0
5
2010-12-26T23:43:00.000
python,version,global-variables
Python: Best practice for including a version number in an app?
0
1
3
4,535,921
1