Web Development
int64
0
1
Data Science and Machine Learning
int64
0
1
Question
stringlengths
35
6.31k
is_accepted
bool
2 classes
Q_Id
int64
5.14k
40.5M
Score
float64
-1
1.2
Other
int64
0
1
Database and SQL
int64
0
1
Users Score
int64
-6
163
Answer
stringlengths
19
4.91k
Python Basics and Environment
int64
0
1
ViewCount
int64
12
475k
System Administration and DevOps
int64
0
1
Q_Score
int64
0
346
CreationDate
stringlengths
23
23
Tags
stringlengths
6
68
Title
stringlengths
12
138
Networking and APIs
int64
0
1
Available Count
int64
1
31
AnswerCount
int64
1
35
A_Id
int64
5.3k
72.3M
GUI and Desktop Applications
int64
1
1
0
0
I'm kind of lost on how to approach this problem, I'd like to write a GUI ideally using Tkinter with python, but I initially started with Qt and found that the problem extends either with all GUI frameworks or my limited understanding. The data in this case is coming from a named pipe, and I'd like to display whatever comes through the pipe into a textbox. I've tried having one thread listen on the pipe and another create the GUI, but in both cases one thread always seems to hang or the GUI never gets created. Any suggestions?
false
731,759
0
0
0
0
In the past when I've had GUI's reading data off of external things (eg: ethernet sockets), I've had a separate thread that handles servicing the external thing, and a timed callback (generally set to something like half a second) to update the GUI widget that displays the external data.
0
641
0
0
2009-04-08T20:46:00.000
python,user-interface,named-pipes
Showing data in a GUI where the data comes from an outside source
0
2
3
731,927
1
0
0
I just want the equivalent of closing and reopening my main program. I want to invoke it when a "new"-like option from a drop-down menu is clicked on. Something like calling root.destroy() and then re-initiating the mainloop. How can I get this done?
true
731,887
1.2
0
0
1
You could take all your GUI building logic and initial state code out of the mainloop and put it into functions. Call these functions from the mainloop (something like: buildgui() & initstate()) and then, when the user clicks your menu icon, just call initstate() to set it back like it was when the application first started.
0
6,011
0
3
2009-04-08T21:14:00.000
python,tkinter
Resetting the main GUI window
0
3
3
732,131
1
0
0
I just want the equivalent of closing and reopening my main program. I want to invoke it when a "new"-like option from a drop-down menu is clicked on. Something like calling root.destroy() and then re-initiating the mainloop. How can I get this done?
false
731,887
0.26052
0
0
4
There are at least three ways you can solve this. Method one: the head fake. When you create your app, don't put all the widgets in the root window. Instead, hide the root window and create a new toplevel that represents your application. When you restart it's just a matter of destroying that new toplevel and re-running all your start-up logic. Method two: nuke and pave. Similar in concept but slightly different in execution. In this model, when you want to restart you simply delete all the widgets in the main window, reset the geometry to null (so the window will once again resize itself based on its contents) and then run the logic that draws all the other widgets. Method three: if it worked the first time... As suggested by Martin v. Löwis, simply have your program exec a new instance of the program, then exit. The first two methods are potentially faster and have the (dis?)advantage of preserving the current environment. For example you could save the copy of the clipboard, column widths, etc. The third method absolutely guarantees a blank slate.
0
6,011
0
3
2009-04-08T21:14:00.000
python,tkinter
Resetting the main GUI window
0
3
3
732,529
1
0
0
I just want the equivalent of closing and reopening my main program. I want to invoke it when a "new"-like option from a drop-down menu is clicked on. Something like calling root.destroy() and then re-initiating the mainloop. How can I get this done?
false
731,887
0.132549
0
0
2
If you are on Unix, restart the entire application with os.execv. Make sure you pass all command line arguments etc.
0
6,011
0
3
2009-04-08T21:14:00.000
python,tkinter
Resetting the main GUI window
0
3
3
732,085
1
0
0
I know I can call Tkinter.Tk().winfo_rgb(color) to get a tuple of values that represent the named color. for instance Tkinter.Tk().winfo_rgb("red") returns (65535, 0, 0) The problem is it also opens a window. I was hoping to abstract some color calculations into a generic color class, and handle whether or not the class was instantiated with "red" or "#ff0000" or maybe even some other formats. With the class abstracted, I don't have a tk parent to pull this info from without instantiating a new window, or passing in a parent. Is there any way to get this kind of color name → hex value conversion without having an instantiated Tk window?
false
732,192
0
0
0
0
Instantiate Tk(), run the code once, and then stick the information into your source as a dict literal?
0
1,348
0
2
2009-04-08T22:47:00.000
python,colors,tkinter
Get Tk winfo_rgb() without having a window instantiated
0
1
4
732,452
1
1
0
I'm writing a web-app using Python and Pylons. I need a textbox that is rich (ie, provides the ability to bold/underline/add bullets..etc...). Does anyone know a library or widget I can use? It doesn't have to be Python/Pylons specific, as it can be a Javascript implementation as well. Thanks!
false
732,429
0.066568
0
0
1
webkit-gtk is getting very stable, and i believe has python bindings now so technically you could use that (then your text editor merely needs to be <body contenteditable></body> and you'd be done. Unfortunately i'm not sure how complete its bindings are at present
0
8,362
0
4
2009-04-09T00:52:00.000
javascript,python,http,pylons,widget
HTML Rich Textbox
0
1
3
732,453
1
0
0
I understood that in certain Windows XP programs, like Photoshop, there is something called "scratch disks". What I understood that this means, and please correct me if I'm wrong, is that Photoshop manages its own virtual memory on the hard-drive, instead of letting Windows manage it. I understood that the reason for this is some limitation by Windows XP on how much total memory a process can take, regardless of HD space. I think it's around 3 GB. Did I get it right so far? I am making an application in Python for running simulations. It will take a lot of memory, and will run on Windows XP. Is it possible for it to use scratch disks? How?
false
737,947
0
0
0
0
You are probably looking for something like ZODB. However, though ZODB tries hard to be transparent, no solution is going to be 100% free of artifacts. You have to write your code with an awareness that your objects primarily live in a database, but that there are multiple representations of your objects, there are caching/syncing issues, etc. Nothing is going to make this very difficult problem completely trivial for you.
0
561
0
2
2009-04-10T15:11:00.000
python,windows,memory-management
Scratch disks in Python?
0
2
7
4,207,006
1
0
0
I understood that in certain Windows XP programs, like Photoshop, there is something called "scratch disks". What I understood that this means, and please correct me if I'm wrong, is that Photoshop manages its own virtual memory on the hard-drive, instead of letting Windows manage it. I understood that the reason for this is some limitation by Windows XP on how much total memory a process can take, regardless of HD space. I think it's around 3 GB. Did I get it right so far? I am making an application in Python for running simulations. It will take a lot of memory, and will run on Windows XP. Is it possible for it to use scratch disks? How?
false
737,947
0.028564
0
0
1
Scratch disks will benefit your application in the case that it works with very big files, Is that the case? If not, then i don't think you may find something that will benefit your application in scratch disks.
0
561
0
2
2009-04-10T15:11:00.000
python,windows,memory-management
Scratch disks in Python?
0
2
7
737,963
1
0
0
I've written a python CGI script that converts files into .jpgs and displays them in a simple HTML page. I don't want to clutter up the folders with these .jpg files, so I used tempfile.NamedTemporaryFile to create a file to store the converted .jpg output. Everything works great, but i want to remove this file after the page is displayed. Currently I have delete=False set, but i can't seem to remove the file without causing a broken img link.
false
759,271
0.53705
0
0
3
You can't remove the file from your cgi script. Because the html page is send to the user only after your script finishes to run. And then the users browser parse the html and fetch the jpg file. The simplest option is to write the temporary files to a sub directory and periodically clean that directory (living in it the last few minutes only). There are ways to improve this process but they are probably pointless. A more advanced option (which is also probably pointless, depending on your scenario) is to configure the web server to run a script on the "get jpg" request. And then you can stream the jpg through your script. That way you will know when the jpg was fetched. And in this script you can call a subscript asynchronically to delete the jpg file.
0
510
0
2
2009-04-17T06:37:00.000
python,image,cgi
How can I remove a temporary file (image) that is being displayed by CGI?
0
1
1
759,547
1
0
0
I am writing an editor which has lot of parameters that could be easily interacted with through text. I find it inconvenient to implement a separate text-editor or lots of UI code for every little parameter. Usual buttons, boxes and gadgets would be burdensome and clumsy. I'd much rather let user interact with those parameters through vim. The preferable way for me would be to get editor open vim with my text buffer. Then, when one would save the text buffer in vim, my editor would get notified from that and update it's view.
true
763,372
1.2
0
0
6
Write your intermediate results (what you want the user to edit) to a temp file. Then use the $EDITOR environment variable in a system call to make the user edit the temp file, and read the results when the process finishes. This lets users configure which editor they want to use in a pseudo-standard fashion.
0
300
0
1
2009-04-18T12:34:00.000
python,linux,vim
How to interact through vim?
0
1
3
763,426
1
0
0
There are various ways to take screenshots of a running application in Windows. However, I hear that an application can be tailored such that it can notice when a screenshot is being taken of it, through some windows event handlers perhaps? Is there any way of taking a screenshot such that it is impossible for the application to notice? (Maybe even running the application inside a VM, and taking a screenshot from the host?) I'd prefer solutions in Python, but anything will do.
false
767,212
1
0
0
6
There will certainly be no protection against a screenshot taken with a digital camera.
0
3,194
1
0
2009-04-20T07:11:00.000
python,windows,events,operating-system,screenshot
Programmatically taking screenshots in windows without the application noticing
0
2
4
767,992
1
0
0
There are various ways to take screenshots of a running application in Windows. However, I hear that an application can be tailored such that it can notice when a screenshot is being taken of it, through some windows event handlers perhaps? Is there any way of taking a screenshot such that it is impossible for the application to notice? (Maybe even running the application inside a VM, and taking a screenshot from the host?) I'd prefer solutions in Python, but anything will do.
true
767,212
1.2
0
0
3
> I hear that an application can be tailored such that it can notice when a screenshot is being taken of it Complete nonsense. Don't repeat what kids say... Read MSDN about screenshots.
0
3,194
1
0
2009-04-20T07:11:00.000
python,windows,events,operating-system,screenshot
Programmatically taking screenshots in windows without the application noticing
0
2
4
767,985
1
0
0
Is there a way to force a gtk.Window object to ignore the Window Manager's show/hide commands, such as "iconify" and "show desktop?" I'm trying to create a persistent window, stuck to the desktop, that will not disappear with all other windows when the desktop is exposed. EDIT: I guess what I'm wondering specifically is whether or not it's possible to reproduce the behavior found in applications such as docks, desktop widgets, system trays, etc. using PyGTK?
false
769,175
0
0
0
0
Not having received a "this is how to do this" answer and having done a bit more research I can say that -- as far as I know -- there is no easy way to achieve this sort of functionality with PyGTK. The best options are to set window manager hints and leave it up to the WM to do what you want (hopefully).
0
1,034
0
1
2009-04-20T16:57:00.000
python,gtk,pygtk,x11
Persistent Windows in PyGTK
0
3
5
1,030,408
1
0
0
Is there a way to force a gtk.Window object to ignore the Window Manager's show/hide commands, such as "iconify" and "show desktop?" I'm trying to create a persistent window, stuck to the desktop, that will not disappear with all other windows when the desktop is exposed. EDIT: I guess what I'm wondering specifically is whether or not it's possible to reproduce the behavior found in applications such as docks, desktop widgets, system trays, etc. using PyGTK?
false
769,175
0
0
0
0
I think gtk_window_set_type_hint(window, GDK_WINDOW_TYPE_HINT_SPLASHSCREEN) is what you want. It is also GDK_WINDOW_TYPE_HINT_DOCK, but then the window stay on top of all, and you can't send it back.
0
1,034
0
1
2009-04-20T16:57:00.000
python,gtk,pygtk,x11
Persistent Windows in PyGTK
0
3
5
5,474,070
1
0
0
Is there a way to force a gtk.Window object to ignore the Window Manager's show/hide commands, such as "iconify" and "show desktop?" I'm trying to create a persistent window, stuck to the desktop, that will not disappear with all other windows when the desktop is exposed. EDIT: I guess what I'm wondering specifically is whether or not it's possible to reproduce the behavior found in applications such as docks, desktop widgets, system trays, etc. using PyGTK?
true
769,175
1.2
0
0
2
You've got it backwards; it's not the window manager telling the window to minimize, by sending it a command. The window manager owns the window, if it wants to stop mapping a window, it will just do it, without asking the window for permission. So I would think that the answer is "no".
0
1,034
0
1
2009-04-20T16:57:00.000
python,gtk,pygtk,x11
Persistent Windows in PyGTK
0
3
5
771,431
1
0
0
I defined an handler for EVT_IDLE that does a certain background task for me. (That task is to take completed work from a few processes and integrate it into some object, making a visible change in the GUI.) The problem is that when the user is not moving the mouse or doing anything, EVT_IDLE doesn't get called more than once. I would like this handler to be working all the time. So I tried calling event.RequestMore() at the end of the handler. Works, but now it takes a whole lot of CPU. (I'm guessing it's just looping excessively on that task.) I'm willing to limit the number of times the task will be carried out per second; How do I do that? Or do you have another solution in mind?
false
783,023
0
0
0
0
This sounds like a use case for wxTimerEvent instead of wxIdleEvent. When there is processing to do call wxTimerEvent.Start(). When there isn't any to do, call wxTimerEvent.Stop() and call your methods to do processing from EVT_TIMER. (note: i use from wxWidghets for C++ and am not familiar with wxPython but I assume they have a similar API)
0
1,623
0
3
2009-04-23T18:45:00.000
python,wxpython
wxPython: Using EVT_IDLE
0
1
2
783,439
1
1
0
Has anyone done this? I've tried generating a c# proxy class and connecting through it, but I cannot figure out how to get IronPython to use the generated app.config file that defines the endpoint. It tries to connect, but I just get an error about no default endpoint. I would ideally like to make the connection using only IronPython code and not use the proxy class, if possible. The binding for the service I am trying to connect to is a NetTcpBinding if that makes any difference.
false
783,120
0
0
0
0
Is your WCF service interface available in a shared assembly? If so, you could look at using the ChannelFactory to create your client proxy dynamically (instead of using the generated C# proxy). With that method you can supply all the details of the endpoint when you create the ChannelFactory and you won't require any configuration in your .config file.
0
2,231
0
2
2009-04-23T19:08:00.000
wcf,ironpython
How to connect to a WCF Service with IronPython
0
1
2
783,626
1
0
0
I would like to start learning Python (zero past experience). I am a bit inclined to start with Python 3.0. However, I am not sure if at this time there exists a GUI editor that would be compatible with Python 3.0. I've tried installing Glade, but the one I've got works only with Python 2.5. What could I possibly use with Python 3.0? Any suggestions are welcomed. Thanks!
false
800,769
0
0
0
0
Just use whichever editor you are most comfortable with. The "leading space as logic" and duck typing mean that there is a limited amount of syntax checking and re-factoring an editor can reasonably do (or is required!) with python source. If you dont have a favorite editor then just use the "idle" editor which comes with most python distributions. If you were talking about a GUI design tool then you need to choose among the several supported GUIs (Tk, WxWindows etc. etc.) before you choose your design tool.
1
1,811
0
3
2009-04-29T03:37:00.000
python,user-interface,python-3.x
About GUI editor that would be compatible with Python 3.0
0
4
6
800,794
1
0
0
I would like to start learning Python (zero past experience). I am a bit inclined to start with Python 3.0. However, I am not sure if at this time there exists a GUI editor that would be compatible with Python 3.0. I've tried installing Glade, but the one I've got works only with Python 2.5. What could I possibly use with Python 3.0? Any suggestions are welcomed. Thanks!
false
800,769
0.033321
0
0
1
There are many useful libraries (not to mention educational material, cookbook snippets, etc.) that have yet to be ported to Python 3.0, so I recommend using Python 2.x for now (where, currently, 5 <= x <= 6). Doubly so if you're a beginner to Python. Triply so if you're actually planning on releasing some software--many systems do not ship with Python 3.0. Python 3.0 is not radically different from the Python 2.x series; what you learn in Python 2 will very much still apply to Python 3. Searching Python 3.0 here on SO reveals many threads in which the majority declare that they're not moving to Python 3.0 anytime soon.
1
1,811
0
3
2009-04-29T03:37:00.000
python,user-interface,python-3.x
About GUI editor that would be compatible with Python 3.0
0
4
6
800,824
1
0
0
I would like to start learning Python (zero past experience). I am a bit inclined to start with Python 3.0. However, I am not sure if at this time there exists a GUI editor that would be compatible with Python 3.0. I've tried installing Glade, but the one I've got works only with Python 2.5. What could I possibly use with Python 3.0? Any suggestions are welcomed. Thanks!
false
800,769
0
0
0
0
WING 3.2 beta work in python 3. ricnar
1
1,811
0
3
2009-04-29T03:37:00.000
python,user-interface,python-3.x
About GUI editor that would be compatible with Python 3.0
0
4
6
800,941
1
0
0
I would like to start learning Python (zero past experience). I am a bit inclined to start with Python 3.0. However, I am not sure if at this time there exists a GUI editor that would be compatible with Python 3.0. I've tried installing Glade, but the one I've got works only with Python 2.5. What could I possibly use with Python 3.0? Any suggestions are welcomed. Thanks!
false
800,769
0
0
0
0
The only GUI toolkit currently available in Python3.0 is Tkinter, and I don't think there are any Python3.0 GUI-builders available yet.
1
1,811
0
3
2009-04-29T03:37:00.000
python,user-interface,python-3.x
About GUI editor that would be compatible with Python 3.0
0
4
6
800,918
1
0
0
I have a little experience developing small command-line applications with Python. I want to move on to developing GUIs with Python. From the available GUI toolkits for Python, the ones I feel the most inclined to are wxPython and Tkinter; but I don't want to code all of the GUI by myself all of the time. Are there any good GUI IDEs for any of these toolkits? It doesn't need to be free or open source.
false
800,849
0.049958
0
0
2
I use Eclipse with PyDev as my Python IDE (Which is probably not the best solution out there, but it is quite decent) For GUI developement, I have used wxGlade for a mid-sized project and found it to be quite easy to use one you've grasped the concepts of WxPython. The XML generation is very useful for separating actual GUI design from program logic. All of the these are free.
0
70,190
0
43
2009-04-29T04:17:00.000
python,user-interface,ide,wxpython,tkinter
Nice IDE with GUI designer for wxPython or Tkinter
0
2
8
17,740,395
1
0
0
I have a little experience developing small command-line applications with Python. I want to move on to developing GUIs with Python. From the available GUI toolkits for Python, the ones I feel the most inclined to are wxPython and Tkinter; but I don't want to code all of the GUI by myself all of the time. Are there any good GUI IDEs for any of these toolkits? It doesn't need to be free or open source.
false
800,849
0
0
0
0
I've used wxGlade for a few mission-critical apps. If you're a little weak in wx, it can be rough, but once you get used to it, its a great tool.
0
70,190
0
43
2009-04-29T04:17:00.000
python,user-interface,ide,wxpython,tkinter
Nice IDE with GUI designer for wxPython or Tkinter
0
2
8
801,176
1
1
0
I was wondering why smartphone/mobile device OSs are not written to allow dynamic languages as the language of choice? iPhone uses Objective-C, Google Android uses Java, Windows Mobile uses any manner of .NET language. What would be the reasoning behind a mobile OS being written in Python, Ruby, or any other dynamic language? I understand that at a low level they would not cut it but C or C++ would be fine for that and Python, for example, could be the layer on top to interact with it. I mean, there is Jython or CPython. I was just wondering why we do not see more dynamic language support in today's mobile OS's.
true
816,212
1.2
1
0
14
In general it's all of these things. Memory, speed, and probably most importantly programmer familiarity. Apple has a huge investment in Objective C, Java is known by basically everyone, and C# is very popular as well. If you're trying for mass programmer appeal it makes sense to start with something popular, even if it's sort of boring. There aren't really any technical requirements stopping it. We could write a whole Ruby stack and let the programmer re-implement the slow bits in C and it wouldn't be that big of a deal. It would be an investment for whatever company is making the mobile OS, and at the end of the day I'm not sure they gain as much from this. Finally, it's the very beginning of mobile devices. In 5 years I wouldn't be at all surprised to see a much wider mobile stack.
0
3,120
0
10
2009-05-03T03:09:00.000
python,ruby,mobile,operating-system,dynamic-languages
Python/Ruby as mobile OS
0
9
13
816,248
1
1
0
I was wondering why smartphone/mobile device OSs are not written to allow dynamic languages as the language of choice? iPhone uses Objective-C, Google Android uses Java, Windows Mobile uses any manner of .NET language. What would be the reasoning behind a mobile OS being written in Python, Ruby, or any other dynamic language? I understand that at a low level they would not cut it but C or C++ would be fine for that and Python, for example, could be the layer on top to interact with it. I mean, there is Jython or CPython. I was just wondering why we do not see more dynamic language support in today's mobile OS's.
false
816,212
0
1
0
0
webOS -- the new OS from Palm, which will debut on the Pre -- has you write apps against a webkit runtime in JavaScript. Time will tell how successful it is, but I suspect it will not be the first to go down this path. As mobile devices become more powerful, you'll see dynamic languages become more prevalent.
0
3,120
0
10
2009-05-03T03:09:00.000
python,ruby,mobile,operating-system,dynamic-languages
Python/Ruby as mobile OS
0
9
13
817,560
1
1
0
I was wondering why smartphone/mobile device OSs are not written to allow dynamic languages as the language of choice? iPhone uses Objective-C, Google Android uses Java, Windows Mobile uses any manner of .NET language. What would be the reasoning behind a mobile OS being written in Python, Ruby, or any other dynamic language? I understand that at a low level they would not cut it but C or C++ would be fine for that and Python, for example, could be the layer on top to interact with it. I mean, there is Jython or CPython. I was just wondering why we do not see more dynamic language support in today's mobile OS's.
false
816,212
0
1
0
0
Memory is also a significant factor. It's easy to eat memory in Python, unfortunately.
0
3,120
0
10
2009-05-03T03:09:00.000
python,ruby,mobile,operating-system,dynamic-languages
Python/Ruby as mobile OS
0
9
13
816,228
1
1
0
I was wondering why smartphone/mobile device OSs are not written to allow dynamic languages as the language of choice? iPhone uses Objective-C, Google Android uses Java, Windows Mobile uses any manner of .NET language. What would be the reasoning behind a mobile OS being written in Python, Ruby, or any other dynamic language? I understand that at a low level they would not cut it but C or C++ would be fine for that and Python, for example, could be the layer on top to interact with it. I mean, there is Jython or CPython. I was just wondering why we do not see more dynamic language support in today's mobile OS's.
false
816,212
0
1
0
0
There is a linux distribution for OpenMoko Freerunner called SHR. Most of its settings and framework code is written in python and... well, it isn't very fast. It is bearable, but it was planned from the beginning to rewrite it in Vala. On the other side, my few smallish apps work fast enough (with the only drawback having big startup time) to consider python to develop user applications. For the record: Freerunner has ARM-something 400MHz and 128MB of RAM. I guess that once mobile devices cross 1GHz, languages like Python will be fast enough for middle-level stuff too (the low-level being the kernel).
0
3,120
0
10
2009-05-03T03:09:00.000
python,ruby,mobile,operating-system,dynamic-languages
Python/Ruby as mobile OS
0
9
13
1,077,315
1
1
0
I was wondering why smartphone/mobile device OSs are not written to allow dynamic languages as the language of choice? iPhone uses Objective-C, Google Android uses Java, Windows Mobile uses any manner of .NET language. What would be the reasoning behind a mobile OS being written in Python, Ruby, or any other dynamic language? I understand that at a low level they would not cut it but C or C++ would be fine for that and Python, for example, could be the layer on top to interact with it. I mean, there is Jython or CPython. I was just wondering why we do not see more dynamic language support in today's mobile OS's.
false
816,212
0.015383
1
0
1
I think that performance concerns may be part of, but not all of, the reason. Mobile devices do not have very powerful hardware to work with. I am partly unsure about this, though.
0
3,120
0
10
2009-05-03T03:09:00.000
python,ruby,mobile,operating-system,dynamic-languages
Python/Ruby as mobile OS
0
9
13
816,225
1
1
0
I was wondering why smartphone/mobile device OSs are not written to allow dynamic languages as the language of choice? iPhone uses Objective-C, Google Android uses Java, Windows Mobile uses any manner of .NET language. What would be the reasoning behind a mobile OS being written in Python, Ruby, or any other dynamic language? I understand that at a low level they would not cut it but C or C++ would be fine for that and Python, for example, could be the layer on top to interact with it. I mean, there is Jython or CPython. I was just wondering why we do not see more dynamic language support in today's mobile OS's.
false
816,212
0.015383
1
0
1
One of the most pressing matters is garbage collection. Garbage collection often times introduce unpredictable pauses in embedded machines which sometimes need real time performance. This is why there is a Java Micro Edition which has a different garbage collector which reduces pauses in exchange for a slower program. Refcounting garbage collectors (like the one in CPython) are also less prone to pauses but can explode when data with many nested pointers (like a linked list) get deleted.
0
3,120
0
10
2009-05-03T03:09:00.000
python,ruby,mobile,operating-system,dynamic-languages
Python/Ruby as mobile OS
0
9
13
816,233
1
1
0
I was wondering why smartphone/mobile device OSs are not written to allow dynamic languages as the language of choice? iPhone uses Objective-C, Google Android uses Java, Windows Mobile uses any manner of .NET language. What would be the reasoning behind a mobile OS being written in Python, Ruby, or any other dynamic language? I understand that at a low level they would not cut it but C or C++ would be fine for that and Python, for example, could be the layer on top to interact with it. I mean, there is Jython or CPython. I was just wondering why we do not see more dynamic language support in today's mobile OS's.
false
816,212
0
1
0
0
There are many reasons. Among them: business reasons, such as software lock-in strategies, efficiency: dynamic languages are usually perceived to be slower (and in some cases really are slower, or at least provide a limit to the amount of optimsation you can do. On a mobile device, optimising code is necessary much more often than on a PC), and tend to use more memory, which is a significant issue on portable devices with limited memory and little cache,, keeping development simple: a platform that supports say Python and Ruby and Java out of the box: means thrice the work to write documentation and provide support, divides development effort into three; it takes longer for helpful material to appear on the web and there are less developers who use the same language as you on your platform, requires more storage on the device to support all these languages, management need to be convinced. I've always felt that the merits of Java are easily explained to a non-technical audience. .Net and Obj-C also seem a very natural choice for a Microsoft and Apple platform, respectively.
0
3,120
0
10
2009-05-03T03:09:00.000
python,ruby,mobile,operating-system,dynamic-languages
Python/Ruby as mobile OS
0
9
13
816,266
1
1
0
I was wondering why smartphone/mobile device OSs are not written to allow dynamic languages as the language of choice? iPhone uses Objective-C, Google Android uses Java, Windows Mobile uses any manner of .NET language. What would be the reasoning behind a mobile OS being written in Python, Ruby, or any other dynamic language? I understand that at a low level they would not cut it but C or C++ would be fine for that and Python, for example, could be the layer on top to interact with it. I mean, there is Jython or CPython. I was just wondering why we do not see more dynamic language support in today's mobile OS's.
false
816,212
0.015383
1
0
1
Jailbroken iPhones can have python installed, and I actually use python very frequently on mine.
0
3,120
0
10
2009-05-03T03:09:00.000
python,ruby,mobile,operating-system,dynamic-languages
Python/Ruby as mobile OS
0
9
13
816,219
1
1
0
I was wondering why smartphone/mobile device OSs are not written to allow dynamic languages as the language of choice? iPhone uses Objective-C, Google Android uses Java, Windows Mobile uses any manner of .NET language. What would be the reasoning behind a mobile OS being written in Python, Ruby, or any other dynamic language? I understand that at a low level they would not cut it but C or C++ would be fine for that and Python, for example, could be the layer on top to interact with it. I mean, there is Jython or CPython. I was just wondering why we do not see more dynamic language support in today's mobile OS's.
false
816,212
0
1
0
0
I suspect the basic reason is a combination of security and reliability. You don't want someone to be easily able to hack the phone, and you want to have some control over what's being installed.
0
3,120
0
10
2009-05-03T03:09:00.000
python,ruby,mobile,operating-system,dynamic-languages
Python/Ruby as mobile OS
0
9
13
816,217
1
0
0
I'm beginner for the GUI programing using Tkinter, so who can tell me some useful sample codes which contains some useful codes.
false
818,458
0
0
0
0
You have the source for idle. That shows useful tkinter code.
0
1,839
0
2
2009-05-04T01:03:00.000
python,tkinter
How can I begin with Tkinter?
0
3
10
818,490
1
0
0
I'm beginner for the GUI programing using Tkinter, so who can tell me some useful sample codes which contains some useful codes.
false
818,458
0.059928
0
0
3
I used Manning's book on Tkinter, as someone else mentioned. The tutorials are very thorough, and you quickly get into the habit of thinking like a GUI coder. The New Mexico Tech worksheet is useful as a reference, but a bit too clumsy for a first resource.
0
1,839
0
2
2009-05-04T01:03:00.000
python,tkinter
How can I begin with Tkinter?
0
3
10
7,546,018
1
0
0
I'm beginner for the GUI programing using Tkinter, so who can tell me some useful sample codes which contains some useful codes.
false
818,458
0.039979
0
0
2
Mark Lutz's tome Programming Python deals at length with Tkinter. The Introduction to Tkinter ( effbot.org) and Tkinter reference: a GUI for Python (John Shipman, New Mexico Tech) are good summaries of the major features. I have read that the Tk/Tcl manual is a good reference but that might be for later.
0
1,839
0
2
2009-05-04T01:03:00.000
python,tkinter
How can I begin with Tkinter?
0
3
10
1,035,813
1
0
0
I'm learning wxPython so most of the libraries and classes are new to me. I'm creating a Preferences dialog class but don't know the best way to make sure the OK/Cancel (or Save/Close) buttons are in the correct order for the platform. This program is intended to run both on GNOME and Windows, so I want to make sure that the buttons are in the correct order for each platform. Does wxPython provide functionality that prevents me from doing a if platform.system() == 'Linux' kind of hack?
true
818,942
1.2
0
0
4
The appearance of a dialog can change only if you use stock dialogs (like wx.FileDialog), if you make your own the layout will stay the same on every platform. wx.Dialog has a CreateStdDialogButtonSizer method that creates a wx.StdDialogButtonSizer with standard buttons where you might see differences in layout on different platforms but you don't have to use that.
0
1,095
0
2
2009-05-04T06:04:00.000
python,user-interface,cross-platform,wxpython
WxPython: Cross-Platform Way to Conform Ok/Cancel Button Order
0
3
4
819,026
1
0
0
I'm learning wxPython so most of the libraries and classes are new to me. I'm creating a Preferences dialog class but don't know the best way to make sure the OK/Cancel (or Save/Close) buttons are in the correct order for the platform. This program is intended to run both on GNOME and Windows, so I want to make sure that the buttons are in the correct order for each platform. Does wxPython provide functionality that prevents me from doing a if platform.system() == 'Linux' kind of hack?
false
818,942
0
0
0
0
There's the GenericMessageDialog widget that should do the right thing depending on the platform (but I've never used it so I'm not sure it does). See the wxPython demo. You can also use the SizedControls addon library (it's part of wxPython). The SizedDialog class helps to create dialogs that conform to the Human Interface Guidelines of each platform. See the wxPython demo.
0
1,095
0
2
2009-05-04T06:04:00.000
python,user-interface,cross-platform,wxpython
WxPython: Cross-Platform Way to Conform Ok/Cancel Button Order
0
3
4
819,330
1
0
0
I'm learning wxPython so most of the libraries and classes are new to me. I'm creating a Preferences dialog class but don't know the best way to make sure the OK/Cancel (or Save/Close) buttons are in the correct order for the platform. This program is intended to run both on GNOME and Windows, so I want to make sure that the buttons are in the correct order for each platform. Does wxPython provide functionality that prevents me from doing a if platform.system() == 'Linux' kind of hack?
false
818,942
0
0
0
0
If you're going to use wx (or any other x-platform toolkit) you'd better trust that it does the right thing, mon!-)
0
1,095
0
2
2009-05-04T06:04:00.000
python,user-interface,cross-platform,wxpython
WxPython: Cross-Platform Way to Conform Ok/Cancel Button Order
0
3
4
819,110
1
0
0
I'm using wx.FileDialog in a wxPython 2.8.8.0 application, under Xubuntu 8.10.. My problem is that this dialog isn't network-aware, so I can't browse Samba shares. I see that this problem plagues other applications too (Firefox, Audacious...) so I'd like to ask where I could find informations on how to make it work. Is that dialog supposed to be already network-aware? Am I missing something? Some library maybe? Or should I write my own implementation? Many thanks!
true
825,724
1.2
0
0
0
Robin Dunn himself told me that It's using the "native" GTK file dialog, just like the other apps, so there isn't anything that wx can do about it. So as a workaround I ended up installing gvfs-fuse and browsing the network through $HOME/.gvfs.. A bit klunky but it works.
0
276
0
1
2009-05-05T16:22:00.000
linux,ubuntu,wxpython
Network-aware wx.FileDialog
1
1
1
876,524
1
0
0
I got the impression that Panel is better. Is that true? What advantage does one have over the other? What reason is there to use one over the other?
false
842,208
1
0
0
20
wx.Window is the base class for all widgets (not necessarily all windows - the name is misleading). wx.Panel is a subclass of wx.Window, which is more tailored towards containing widgets inside it. For example, it by default allows moving between widgets using "tab", and handles a focus event in a way that is more useful with child widgets.
0
3,627
0
4
2009-05-08T23:10:00.000
wxpython,wxwidgets
wxPython: What is the difference between a wx.Panel and a wx.Window?
0
1
1
843,023
1
0
0
I'm trying to make a vb.net application that has got 2 textboxes, 7 radio buttons and 2 buttons(one named compile and the other 'run'). How can I load the content of a C/C++(or any programming language) file into the 1st textbox and on clicking the compile button, i should be able to show the errors or the C/C++ program in the 2nd textbox. On clicking Run, I should be able to show the output in the 2nd textbox. In short, I want to use the 2nd textbox as a terminal/console. The radio buttons are 4 selecting the language C or C++ or python or C# or java or perl or vb. Are the compilers of all these languages present in .net? If so how can I call them?
false
847,860
0.099668
0
0
1
Compiling can be done by calling cl.exe which comes with Visual Studio. Of course you could also use GCC instead.
0
1,053
0
1
2009-05-11T12:24:00.000
c#,c++,python,c,vb.net
How to write a vb.net code to compile C/C++ programs?
0
1
2
847,883
1
1
0
I've wanted to get into Python development for awhile and most of my programming experience has been in .NET and no mobile development. I recently thought of a useful app to make for my windows mobile phone and thought this could be a great first Python project. I did a little research online and found PyCe which I think is what I would need to get started on the app? Can anyone with some experience in this area point me in the right direction? What to download to get started, what lightweight database I could use, etc? Thanks in advance!
false
864,887
0.197375
0
0
1
Can't help you much with Python\CE but if you want a great db for mobile devices SQLLite will do the job for you. If you do a quick google you'll find there are libraries for connecting to SQLLite with Python too.
0
1,216
0
0
2009-05-14T18:17:00.000
python,windows-mobile,mobile-phones
Beginning Windows Mobile 6.1 Development With Python
0
1
1
864,988
1
0
0
using Ruby or Python, does someone know how to draw on the screen, covering up any other window? Kind of like, press a key, and the program will show current weather or stock quote on the screen (using the whole screen as the canvas), and then press the key again, and everything restores to the same as before? (like Mac OS X's dash board).
false
872,737
0.066568
0
0
1
I would recommend PyGame.
0
179
0
1
2009-05-16T16:19:00.000
python,ruby,user-interface
does someone know how to show content on screen (covering up any window) using Ruby or Python?
0
2
3
873,925
1
0
0
using Ruby or Python, does someone know how to draw on the screen, covering up any other window? Kind of like, press a key, and the program will show current weather or stock quote on the screen (using the whole screen as the canvas), and then press the key again, and everything restores to the same as before? (like Mac OS X's dash board).
true
872,737
1.2
0
0
4
You could use the systems dashboard (desktop widgets, or whatever it's called) API. In order to do that you need bindings to it for Python or Ruby. Alternatively you could use some generic gui toolkit or application framework and just create a frameless window with transparent background. Then you need to be sure that the chosen toolkit supports 'always-on-top' options on your desired platform(s).
0
179
0
1
2009-05-16T16:19:00.000
python,ruby,user-interface
does someone know how to show content on screen (covering up any window) using Ruby or Python?
0
2
3
872,757
1
0
0
I'm sorry for the verbal description. I have a wxPython app in a file called applicationwindow.py that resides in a package called garlicsimwx. When I launch the app by launching the aforementioned file, it all works well. However, I have created a file rundemo.py in a folder which contains the garlicsimwx package, which runs the app as well. When I use rundemo.py, the app launches, however, when the main wx.Frame imports a sub-package of garlicsimwx, namely simulations.life, for some reason a new instance of my application is created (i.e., a new identical window pops out.) I have tried stepping through the commands one-by-one, and although the bug happens only after importing the sub-package, the import statement doesn't directly cause it. Only when control returns to PyApp.MainLoop the second window opens. How do I stop this?
false
874,856
0
0
0
0
You could create a global boolean variable like g_window_was_drawn and check it in the function that does the work of creating a window. The value would be false at the start of the program and would change to True when first creating a window. The function that creates the window would check if the g_window_was_drawn is already true, and if it is, it would throw an exception. Then You will have a nice stacktrace telling You who is responsible of executing this function. I hope that helps You find it. I'm sorry for the verbal solution ;)
0
223
0
0
2009-05-17T15:45:00.000
python,import,wxpython
wxPython launches my app twice when importing a sub-package
0
1
3
875,039
1
0
0
My PyQt application that uses matplotlib takes several seconds to load for the first time, even on a fast machine (the second load time is much shorter as the DLLs are kept in memory by Windows). I'm wondering whether it's feasible to show a splash screen while the matplotlib library is being loaded. Where does the actual loading take place - is it when the from line is executed? If so, how can I make this line execute during the splash screen and still be able to use the module throughout the code? A related dilemma is how to test this - can I ask Windows to load the DLLs for every execution and not cache them?
true
876,107
1.2
0
0
3
Yes, loading the module takes place at the line where the import statement is. If you create your QApplication and show your splash screen before that, you should be able to do what you want -- also you need to call QApplication.processEvents() whenever you need the splash screen to update with a new message.
0
3,080
0
4
2009-05-18T03:15:00.000
python,performance,matplotlib,pyqt
PyQt: splash screen while loading "heavy" libraries
0
1
1
876,151
1
0
0
I have a wxPython program with two processes: A primary and a secondary one (I'm using the multiprocessing module.) The primary one runs the wxPython GUI, the secondary one does not. However, there is something I would like to do from the secondary process: Given a string that describes a color, to check whether this would be legitimate color for wxPython. That means, whether I can create a wx.Pen(color_string) or not. How do I do this? (I tried making a wx.Pen and comparing its color to the null color, but that required to create a wx.App in the second process, and when I did create one the program raised an error in some special wxPython window.)
false
883,348
0.197375
0
0
1
You could make two Queues between the two processes and have the second one delegate wx-related functionality to the first one (by pushing on the first queue the parameters of the task to perform, and waiting for the result on the second one).
1
670
0
0
2009-05-19T15:09:00.000
python,wxpython,multiprocessing
wxPython + multiprocessing: Checking if a color string is legitimate
0
1
1
883,451
1
0
0
I am creating a custom wxPython dialog by subclassing wx.Dialog. When I press Enter while using it, (and while being focused on one of the form elements,) it just takes the focus to the next form element, while I want it to press the ok button. How do I solve this?
true
885,294
1.2
0
0
5
That should happen automatically if the button has the wx.ID_OK id. If that's impossible then the wx.StdDialogButtonSizer.SetAffirmativeButton() method could be a solution (using the StdDialogButtonSizer class will help with correct button placement and positioning on the different platforms), and there is also wx.Button.SetDefault().
0
1,846
0
3
2009-05-19T22:13:00.000
python,keyboard,wxpython
wxPython dialogs: "Enter" keyboard button would not "ok" the dialog
0
1
1
885,307
1
0
0
I posted this in the mailing list, but the reply I got wasn't too clear, so maybe I'll have better luck here. I currently have a grid with data in it. I would like to know if there is a way to give each generated row an ID, or at least, associate each row with an object. It may make it more clear if I clarify what i'm doing. It is described below. I pull data from an SQL table and display them in the grid. I am allowing for the user to add/delete rows and edit cells. Say the user is viewing a grid that has 3 rows(which is, in turn, a mysql table with 3 rows). If he is on the last row and presses the down arrow key, a new row is created and he can enter data into it and it will be inserted in the database when he presses enter. However, I need a way to find out which rows will use "insert" query and which will use "update" query. So ideally, when the user creates a new row by pressing the down arrow, I would give that row an ID and store it in a list(or, if rows already have IDs, just store it in a list) and when the user finishes entering data in the cells and presses enter, I would check if that row's ID is in the in the list. If it is, i would insert all of that row's cells values into the table, if not, i would update mysql with the values. Hope I made this clear.
false
901,704
0.291313
0
1
3
What I did when I encountered such a case was to create a column for IDs and set its width to 0.
0
1,026
0
2
2009-05-23T15:13:00.000
python,wxpython,wxwidgets
Give Wxwidget Grid rows an ID
0
1
2
901,806
1
0
0
How would I do this? The reason being I wanted to try some pygame out, but I have python 3 installed currently and have been learning with that. I'm also interested in trying out wxpython or something like that, but I haven't looked at their compatibilities yet. EDIT:: im on a windows vista 64-bit
false
913,204
0.028564
0
0
1
I would assume it'd be the same as running two versions of 2.x; as long as they're each in their own directory you should be OK.
1
1,819
0
3
2009-05-26T23:02:00.000
python,python-3.x
Is it possible to install python 3 and 2.6 on same PC?
0
6
7
913,212
1
0
0
How would I do this? The reason being I wanted to try some pygame out, but I have python 3 installed currently and have been learning with that. I'm also interested in trying out wxpython or something like that, but I haven't looked at their compatibilities yet. EDIT:: im on a windows vista 64-bit
false
913,204
0.028564
0
0
1
You certainly can. On Mac Ports, there's a tool called python_select that lets you switch among python versions; if nothing like it exists on Windows (momentary googling didn't reveal one), it could certainly be written.
1
1,819
0
3
2009-05-26T23:02:00.000
python,python-3.x
Is it possible to install python 3 and 2.6 on same PC?
0
6
7
913,222
1
0
0
How would I do this? The reason being I wanted to try some pygame out, but I have python 3 installed currently and have been learning with that. I'm also interested in trying out wxpython or something like that, but I haven't looked at their compatibilities yet. EDIT:: im on a windows vista 64-bit
false
913,204
0.085505
0
0
3
Typically python is installed with a name like python2.6, so you can have more than one. There may be a symlink from python to one of the numbered files. Quite workable.
1
1,819
0
3
2009-05-26T23:02:00.000
python,python-3.x
Is it possible to install python 3 and 2.6 on same PC?
0
6
7
913,225
1
0
0
How would I do this? The reason being I wanted to try some pygame out, but I have python 3 installed currently and have been learning with that. I'm also interested in trying out wxpython or something like that, but I haven't looked at their compatibilities yet. EDIT:: im on a windows vista 64-bit
false
913,204
0.057081
0
0
2
Yes, it is possible. I maintain 3 python installations (2.5, 2.6, 3.0). The only issue that could be confusing is figuring out which Python version takes precedence in PATH variable (if any) . To execute a script for a specific version, you would go into the python directory for that version C:\Python25\ , C:\Python26\, C:\Python30\, etc. Drop the file in there, and run "python.exe file.py" from command-line. You could even rename each python.exe to python25.exe python26.exe python30.exe and have each directory in PATH so it would be easy to execute any script on any version.
1
1,819
0
3
2009-05-26T23:02:00.000
python,python-3.x
Is it possible to install python 3 and 2.6 on same PC?
0
6
7
913,269
1
0
0
How would I do this? The reason being I wanted to try some pygame out, but I have python 3 installed currently and have been learning with that. I'm also interested in trying out wxpython or something like that, but I haven't looked at their compatibilities yet. EDIT:: im on a windows vista 64-bit
false
913,204
0.085505
0
0
3
Erm... yes. I just installed Python 3.0 on this computer to test it. You haven't specified your operating system, but I'm running Ubuntu 9.04 and I can explicitly specify the version of Python I want to run by typing python2.5 myscript.py or python3.0 myscript.py, depending on my needs.
1
1,819
0
3
2009-05-26T23:02:00.000
python,python-3.x
Is it possible to install python 3 and 2.6 on same PC?
0
6
7
913,223
1
0
0
How would I do this? The reason being I wanted to try some pygame out, but I have python 3 installed currently and have been learning with that. I'm also interested in trying out wxpython or something like that, but I haven't looked at their compatibilities yet. EDIT:: im on a windows vista 64-bit
true
913,204
1.2
0
0
9
If you are on Windows, then just install another version of Python using the installer. It would be installed into another directory. Then if you install other packages using the installer, it would ask you for which python installation to apply. If you use installation from source or easy_install, then just make sure that when you install, you are using the one of the proper version. If you have many packages installed in your current python-3, then just make a zip backup of your current installation just in case.
1
1,819
0
3
2009-05-26T23:02:00.000
python,python-3.x
Is it possible to install python 3 and 2.6 on same PC?
0
6
7
913,216
1
0
0
Would it be possible to write a 3D game as large as World of Warcraft in pure Python? Assuming the use of DirectX / D3D bindings or OpenGL bindings. If not, what would be the largest hold-up to doing such a project in Python? I know games tend to fall into the realm of C and C++ but sometimes people do things out of habit! Any information would help satisfy my curiosity. Edit: Would the GIL post a major issue on 3d client performance? And what is the general performance penalty for using say, OpenGL or DirectX bindings vs natively using the libraries?
false
916,663
0.076772
0
0
5
The answer to what I think your specific question is, "... in pure Python ..." the answer is NO. Python is not fast enough to call OpenGL or DirectX efficently enough to re-create World Of Warcraft at an exceptable frame rate. Like many others have answered, given some high level frame work, it would be possible to use Python has the scripting language but at a minimum you'd need some kind of graphics system written in another language like C++ to handle the graphics. For networking, given that WoW is not an action game, you might be able to get away with pure python but most likely that part as well would need to be some non-python library.
0
10,718
0
12
2009-05-27T16:16:00.000
python,3d,direct3d
Would it be possible to write a 3D game as large as World of Warcraft in pure Python?
0
9
13
1,360,670
1
0
0
Would it be possible to write a 3D game as large as World of Warcraft in pure Python? Assuming the use of DirectX / D3D bindings or OpenGL bindings. If not, what would be the largest hold-up to doing such a project in Python? I know games tend to fall into the realm of C and C++ but sometimes people do things out of habit! Any information would help satisfy my curiosity. Edit: Would the GIL post a major issue on 3d client performance? And what is the general performance penalty for using say, OpenGL or DirectX bindings vs natively using the libraries?
false
916,663
0.03076
0
0
2
As a technologist I know: If it can be written in C\C++ it can be written in assembly (though it will take longer). If it can be written in C\C++ and is not a low-level code - it can be written in any managed environment. WoW is a high-level program that is written in C\C++ python is a managed environment There for: WoW can be written in python and so any other MMORPG in 3D... The hardest part will be the 3d engine for it is the "heaviest" part of code - you will need to use an outside engine (written in C\C++\Assebly) or to write one and optimize it (not recommended)
0
10,718
0
12
2009-05-27T16:16:00.000
python,3d,direct3d
Would it be possible to write a 3D game as large as World of Warcraft in pure Python?
0
9
13
1,656,715
1
0
0
Would it be possible to write a 3D game as large as World of Warcraft in pure Python? Assuming the use of DirectX / D3D bindings or OpenGL bindings. If not, what would be the largest hold-up to doing such a project in Python? I know games tend to fall into the realm of C and C++ but sometimes people do things out of habit! Any information would help satisfy my curiosity. Edit: Would the GIL post a major issue on 3d client performance? And what is the general performance penalty for using say, OpenGL or DirectX bindings vs natively using the libraries?
false
916,663
0.061461
0
0
4
I have been trying my hand at writing 3D games in Python, and given a good rendering framework (my favourite is OGRE) and decent bindings, it is amazing what you can get away with. However, especially with games, you are always trying to squeeze as much as you can out of the hardware. The performance disadvantage of python eventually will make itself felt. The main problem I ran into using python is its massive call overhead. Calling python functions, even from other python functions is very expensive. In a way, it's the price you pay for the dynamic nature of python. When you use the function call operator "()" on a symbol, it has to work out whether it's a function or a class, look over the method resolution order, handle the keyword arguments, etc etc. All these things are done ahead of time in less dynamic (compiled) languages. I have seen people trying to overcome this problem by manually inlining function calls. I do not have to tell you that this medicine is worse than the ailment.
0
10,718
0
12
2009-05-27T16:16:00.000
python,3d,direct3d
Would it be possible to write a 3D game as large as World of Warcraft in pure Python?
0
9
13
1,656,654
1
0
0
Would it be possible to write a 3D game as large as World of Warcraft in pure Python? Assuming the use of DirectX / D3D bindings or OpenGL bindings. If not, what would be the largest hold-up to doing such a project in Python? I know games tend to fall into the realm of C and C++ but sometimes people do things out of habit! Any information would help satisfy my curiosity. Edit: Would the GIL post a major issue on 3d client performance? And what is the general performance penalty for using say, OpenGL or DirectX bindings vs natively using the libraries?
false
916,663
0.03076
0
0
2
Just because it might give an interesting read, Civilization is partly written using Python. A google on it returns interesting reading material.
0
10,718
0
12
2009-05-27T16:16:00.000
python,3d,direct3d
Would it be possible to write a 3D game as large as World of Warcraft in pure Python?
0
9
13
930,968
1
0
0
Would it be possible to write a 3D game as large as World of Warcraft in pure Python? Assuming the use of DirectX / D3D bindings or OpenGL bindings. If not, what would be the largest hold-up to doing such a project in Python? I know games tend to fall into the realm of C and C++ but sometimes people do things out of habit! Any information would help satisfy my curiosity. Edit: Would the GIL post a major issue on 3d client performance? And what is the general performance penalty for using say, OpenGL or DirectX bindings vs natively using the libraries?
false
916,663
0
0
0
0
Because Python is interpreted there would be a performance hit, as opposed to C/C++, but, you would want to use something like PyOpenGL instead of DirectX though, to run on more operating systems. But, I don't see why you couldn't write such a game in Python.
0
10,718
0
12
2009-05-27T16:16:00.000
python,3d,direct3d
Would it be possible to write a 3D game as large as World of Warcraft in pure Python?
0
9
13
916,693
1
0
0
Would it be possible to write a 3D game as large as World of Warcraft in pure Python? Assuming the use of DirectX / D3D bindings or OpenGL bindings. If not, what would be the largest hold-up to doing such a project in Python? I know games tend to fall into the realm of C and C++ but sometimes people do things out of habit! Any information would help satisfy my curiosity. Edit: Would the GIL post a major issue on 3d client performance? And what is the general performance penalty for using say, OpenGL or DirectX bindings vs natively using the libraries?
false
916,663
1
0
0
6
Yes, you could write it in assembly, or Java, or Python, or brainfuck. It's just how much time you are willing to put into it. Language performance's aren't a major issue anymore, it's more about which algorithms you use, not what language you use.
0
10,718
0
12
2009-05-27T16:16:00.000
python,3d,direct3d
Would it be possible to write a 3D game as large as World of Warcraft in pure Python?
0
9
13
916,704
1
0
0
Would it be possible to write a 3D game as large as World of Warcraft in pure Python? Assuming the use of DirectX / D3D bindings or OpenGL bindings. If not, what would be the largest hold-up to doing such a project in Python? I know games tend to fall into the realm of C and C++ but sometimes people do things out of habit! Any information would help satisfy my curiosity. Edit: Would the GIL post a major issue on 3d client performance? And what is the general performance penalty for using say, OpenGL or DirectX bindings vs natively using the libraries?
false
916,663
1
0
0
9
Technically, anything is possible in any Turing Complete programming language. Practically though, you will run into trouble making the networking stack out of a high level language, because the server will have to be VERY fast to handle so many players. The gaming side of things on the client, there should be no problem, because there is nothing too complicated about GUIs or quests or keyboard input and what have you. The problems will be in whatever is computationally intensive up on the server. Anything that happens in human-time like logging on will probably be just fine, but if somemthing needs to be instantaneous over ten thousand users, you might want to go for an external library done up in C. Now some Python guru is going to come out of the woodwork and rip my head off because, as I said at the top, technically, anything can be done with enough effort.
0
10,718
0
12
2009-05-27T16:16:00.000
python,3d,direct3d
Would it be possible to write a 3D game as large as World of Warcraft in pure Python?
0
9
13
916,701
1
0
0
Would it be possible to write a 3D game as large as World of Warcraft in pure Python? Assuming the use of DirectX / D3D bindings or OpenGL bindings. If not, what would be the largest hold-up to doing such a project in Python? I know games tend to fall into the realm of C and C++ but sometimes people do things out of habit! Any information would help satisfy my curiosity. Edit: Would the GIL post a major issue on 3d client performance? And what is the general performance penalty for using say, OpenGL or DirectX bindings vs natively using the libraries?
false
916,663
1
0
0
17
Yes. How it will perform is another question. A good development pattern would be to develop it in pure python, and then profile it, and rewrite performance-critical bottlenecks, either in C/C++/Cython or even python itself but with more efficient code.
0
10,718
0
12
2009-05-27T16:16:00.000
python,3d,direct3d
Would it be possible to write a 3D game as large as World of Warcraft in pure Python?
0
9
13
916,686
1
0
0
Would it be possible to write a 3D game as large as World of Warcraft in pure Python? Assuming the use of DirectX / D3D bindings or OpenGL bindings. If not, what would be the largest hold-up to doing such a project in Python? I know games tend to fall into the realm of C and C++ but sometimes people do things out of habit! Any information would help satisfy my curiosity. Edit: Would the GIL post a major issue on 3d client performance? And what is the general performance penalty for using say, OpenGL or DirectX bindings vs natively using the libraries?
false
916,663
0
0
0
0
Python is not interpreted - it is tokenized/'just in time' bytecode 'interpreted' and it doesn't have a VM like Java does. This means, in english, it can be daaaaaamnfast. Not all the time though, it depends on the problem and the libraries, but python is not slow, this is a common misconception even among knowledgable people (and that includes deep java engine folks who have just not gone and tried python).
0
10,718
0
12
2009-05-27T16:16:00.000
python,3d,direct3d
Would it be possible to write a 3D game as large as World of Warcraft in pure Python?
0
9
13
1,316,198
1
0
0
The tutorials I've found on WxPython all use examples from Linux, but there seem to be differences in some details. For example, in Windows a Panel behind the widgets is mandatory to show the background properly. Additionally, some examples that look fine in the tutorials don't work in my computer. So, do you know what important differences are there, or maybe a good tutorial that is focused on Windows? EDIT: I just remembered this: Does anybody know why when subclassing wx.App an OnInit() method is required, rather than the more logical __init__()?
false
916,987
0
0
0
0
EDIT: I just remembered this: Does anybody know why when subclassing wx.App an OnInit() method is required, rather than the more logical __init__()? I use OnInit() for symmetry: there's also an OnExit() method. Edit: I may be wrong, but I don't think using OnInit() is required.
0
2,618
0
1
2009-05-27T17:16:00.000
python,windows,linux,user-interface,wxpython
WxPython differences between Windows and Linux
0
2
3
917,040
1
0
0
The tutorials I've found on WxPython all use examples from Linux, but there seem to be differences in some details. For example, in Windows a Panel behind the widgets is mandatory to show the background properly. Additionally, some examples that look fine in the tutorials don't work in my computer. So, do you know what important differences are there, or maybe a good tutorial that is focused on Windows? EDIT: I just remembered this: Does anybody know why when subclassing wx.App an OnInit() method is required, rather than the more logical __init__()?
false
916,987
0
0
0
0
I find a number of small differences, but don't remember all of them. Here are two: 1) The layout can be slightly different, for example, causing things to not completely fit in the window in one OS when the do in the other. I haven't investigated the reasons for this, but it happens most often when I use positions rather than sizers to arrange things. 2) I have to explicitly call Refresh more in Windows. For example, if you place one panel over another, you won't see it the top panel in Windows until you call Refresh. I general, I write apps in Linux and run them in Windows, and things work similarly enough so this is a reasonable approach, but it's rare for me when something runs perfectly straight out of the gate after an OS switch.
0
2,618
0
1
2009-05-27T17:16:00.000
python,windows,linux,user-interface,wxpython
WxPython differences between Windows and Linux
0
2
3
935,519
1
0
0
I'm am trying to roll out a test application to test the feasibility of righting a Click Once Smart Client app that also uses a rules engine customizable by embedding IronPython. So far all users but me get this error (below) when invoking the script engine. Do I need to do something special to force deployment of the IronPython and Scripting assemblies? I thought that would be automatic because they were referenced in my project. Is this just not feasible in .NET 2.0? Thoughts? ************** Exception Text ************** System.MissingMethodException: Method not found: 'Void System.Reflection.Emit.DynamicMethod..ctor(System.String, System.Type, System.Type[], Boolean)'. at Microsoft.Scripting.Utils.Helpers.CreateDynamicMethod(String name, Type returnType, Type[] parameterTypes) at Microsoft.Linq.Expressions.Compiler.Snippets.CreateDynamicMethod(String name, Type returnType, Type[] parameterTypes) at Microsoft.Linq.Expressions.Compiler.LambdaCompiler.CreateDynamicLambdaCompiler(CompilerScope scope, String methodName, Type returnType, IList`1 paramTypes, IList`1 paramNames, Boolean closure, Boolean emitDebugSymbols, Boolean forceDynamic) at Microsoft.Linq.Expressions.Compiler.LambdaCompiler.CompileLambda(LambdaExpression lambda, Type delegateType, Boolean emitDebugSymbols, Boolean forceDynamic, MethodInfo& method) at Microsoft.Linq.Expressions.Compiler.LambdaCompiler.CompileLambda[T](LambdaExpression lambda, Boolean emitDebugSymbols) at Microsoft.Linq.Expressions.LambdaExpression.Compile[T](Boolean emitDebugSymbols) at Microsoft.Scripting.Runtime.OptimizedScriptCode.InvokeTarget(LambdaExpression code, Scope scope) at Microsoft.Scripting.SourceUnit.Execute(Scope scope, ErrorSink errorSink) at Microsoft.Scripting.Hosting.ScriptSource.Execute(ScriptScope scope) at UAP.UI.Form1.button1_Click(Object sender, EventArgs e) at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
false
922,681
0
1
0
0
If you right click your project and go to Properties theres a Publish tab, that allows you to specify prerequisite installs for your application. Presumably you can supply a path to the IronPython install executable here.
0
1,241
0
2
2009-05-28T19:14:00.000
c#,.net,scripting,ironpython
IronPython, Click Once, .NET 2.0 Error - thoughts?
0
2
2
922,701
1
0
0
I'm am trying to roll out a test application to test the feasibility of righting a Click Once Smart Client app that also uses a rules engine customizable by embedding IronPython. So far all users but me get this error (below) when invoking the script engine. Do I need to do something special to force deployment of the IronPython and Scripting assemblies? I thought that would be automatic because they were referenced in my project. Is this just not feasible in .NET 2.0? Thoughts? ************** Exception Text ************** System.MissingMethodException: Method not found: 'Void System.Reflection.Emit.DynamicMethod..ctor(System.String, System.Type, System.Type[], Boolean)'. at Microsoft.Scripting.Utils.Helpers.CreateDynamicMethod(String name, Type returnType, Type[] parameterTypes) at Microsoft.Linq.Expressions.Compiler.Snippets.CreateDynamicMethod(String name, Type returnType, Type[] parameterTypes) at Microsoft.Linq.Expressions.Compiler.LambdaCompiler.CreateDynamicLambdaCompiler(CompilerScope scope, String methodName, Type returnType, IList`1 paramTypes, IList`1 paramNames, Boolean closure, Boolean emitDebugSymbols, Boolean forceDynamic) at Microsoft.Linq.Expressions.Compiler.LambdaCompiler.CompileLambda(LambdaExpression lambda, Type delegateType, Boolean emitDebugSymbols, Boolean forceDynamic, MethodInfo& method) at Microsoft.Linq.Expressions.Compiler.LambdaCompiler.CompileLambda[T](LambdaExpression lambda, Boolean emitDebugSymbols) at Microsoft.Linq.Expressions.LambdaExpression.Compile[T](Boolean emitDebugSymbols) at Microsoft.Scripting.Runtime.OptimizedScriptCode.InvokeTarget(LambdaExpression code, Scope scope) at Microsoft.Scripting.SourceUnit.Execute(Scope scope, ErrorSink errorSink) at Microsoft.Scripting.Hosting.ScriptSource.Execute(ScriptScope scope) at UAP.UI.Form1.button1_Click(Object sender, EventArgs e) at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
false
922,681
0.379949
1
0
4
IronPython requiers .NET 2.0SP1 or later to run. This exception is happening due to an overload that was added in SP1.
0
1,241
0
2
2009-05-28T19:14:00.000
c#,.net,scripting,ironpython
IronPython, Click Once, .NET 2.0 Error - thoughts?
0
2
2
923,395
1
0
0
I want to code up a panel that will be used both in Linux and Windows. Ideally it will be written in Python using PyQT. What I've found so far is the QSystemTrayIcon widget, and while that is quite useful, that's not quite what I'm looking for. That widget lets you attach a menu to the left and right clicks of an icon on the system tray and then you can have a dialog open in certain situations. I'm looking for something that will let me write up something like the tools that Gnome lets you add to the taskbar (they call them panels). Such as a weather feed, or processor usage, right on the taskbar. And also not in the system tray area. I'm writing more of a tool than something reflects a status. I know that I could write this natively in both OSes using GTK and its ilk, but anyway to write in PyQT or WxWidget so I don't have to deal with dependancy issues?
false
923,701
0.462117
0
0
5
Widgets inside the GNOME panel are called applets, and to my knowledge it's not possible to write them with anything but Gtk, since you have to use the respective GNOME library libpanel-applet (in either C, C++ or Python). System tray icons are different, because they only allow icons to be displayed inside the notification area, since Windows only supports icons there. The panel mechanism on Windows (Vista, XP does only have the notification area) is quite different, I would assume. Unless somebody already wrote a library that abstracts the differences of the GNOME panel and the Vista side bar, you would have to do that yourself.
0
1,572
0
4
2009-05-28T23:28:00.000
python,qt4,pyqt
Python taskbar applet
0
1
2
923,757
1
1
0
I want to change the look of my Ironpython windows forms, Is it possible to change the style of the form and for example make it more like a Mac? thank you
false
931,580
0
0
0
0
As an interface designer, it's important to use an many standard windows controls as possible. The more your app looks like the microsoft ones users are used to, they will become more comfortable with it quicker. A good example is how out of place iTunes and Safari look in windows. My tip is to just keep it with the windows look.
0
706
0
0
2009-05-31T07:44:00.000
winforms,ironpython
Different styles for Windows forms in Ironpython
0
1
2
931,629
1
0
0
Is there any way besides Shoes to develop and distribute cross-platform GUI desktop applications written in Ruby? I come to believe that general bugginess of _why's applications is exceptionally crippling in case of Shoes, and anything more complex than a two-button form is a pain to maintain. RubyGTK, wxRuby, etc seem to be promising, but they do not solve the issue of distributing an app in a way that doesn't require Ruby pre-installed on users' computers — and libraries like ruby2exe seem to be horribly out-of-date and incomplete. Generally — what is the current fad? BTW: if there is a really easy solution to this in Python, I may consider redoing the stuff I'm up to in Python.
false
940,149
0
0
0
0
I don't think anyone really answered his question. As for me, I use VB to do Shell() calls to Ocra compiled Ruby scripts. It works pretty well and allows me to create apps that run in all modern OS. Linux testing is done by using Wine to run and ensuring that I use a pre .NET version of VB for the .exe compilation.
0
3,071
0
10
2009-06-02T15:15:00.000
python,ruby,user-interface,desktop,software-distribution
Distributing Ruby/Python desktop apps
0
3
7
976,069
1
0
0
Is there any way besides Shoes to develop and distribute cross-platform GUI desktop applications written in Ruby? I come to believe that general bugginess of _why's applications is exceptionally crippling in case of Shoes, and anything more complex than a two-button form is a pain to maintain. RubyGTK, wxRuby, etc seem to be promising, but they do not solve the issue of distributing an app in a way that doesn't require Ruby pre-installed on users' computers — and libraries like ruby2exe seem to be horribly out-of-date and incomplete. Generally — what is the current fad? BTW: if there is a really easy solution to this in Python, I may consider redoing the stuff I'm up to in Python.
false
940,149
0.057081
0
0
2
The state of affairs is pretty bad. The most reliable method at present is probably to use JRuby. I know that's probably not the answer you want to hear, but, as you say, ruby2exe is unreliable, and Shoes is a long way off (and isn't even intended to be a full-scale application). Personally, I dislike forcing users to install GTK or Qt or wxWidgets, but the JVM is fairly ubiquitous.
0
3,071
0
10
2009-06-02T15:15:00.000
python,ruby,user-interface,desktop,software-distribution
Distributing Ruby/Python desktop apps
0
3
7
940,214
1
0
0
Is there any way besides Shoes to develop and distribute cross-platform GUI desktop applications written in Ruby? I come to believe that general bugginess of _why's applications is exceptionally crippling in case of Shoes, and anything more complex than a two-button form is a pain to maintain. RubyGTK, wxRuby, etc seem to be promising, but they do not solve the issue of distributing an app in a way that doesn't require Ruby pre-installed on users' computers — and libraries like ruby2exe seem to be horribly out-of-date and incomplete. Generally — what is the current fad? BTW: if there is a really easy solution to this in Python, I may consider redoing the stuff I'm up to in Python.
false
940,149
-0.057081
0
0
-2
I've read about (but not used) Seattlerb's Wilson, which describes itself as a pure x86 assembler, but it doesn't sound like it'd be cross-platform or GUI.
0
3,071
0
10
2009-06-02T15:15:00.000
python,ruby,user-interface,desktop,software-distribution
Distributing Ruby/Python desktop apps
0
3
7
942,712
1
0
0
Is it possible to embed a 3-D editor inside my wxPython application? (I'm thinking Blender, but other suggestions are welcome.) My application opens a wxPython window, and I want to have a 3-D editor inside of it. Of course, I want my program and the 3-D editor to interact with each other. Possible? How?
false
950,145
0.07983
0
0
2
Blender has python plugins, you can write a plugin to interract with your program.
0
1,823
0
1
2009-06-04T12:13:00.000
python,3d,wxpython,embedding,blender
Embedding a 3-D editor (such as Blender) in a wxPython application
0
1
5
950,196
1
0
0
Continuing on with my Python learning, I just installed Komodo edit, are there any recommended add ins/extensions that I should include? Any recommendations on using it or another GUI designer (TkInter base)?
false
951,974
0
0
0
0
try using eclipse instead with PyDev.
0
1,483
0
3
2009-06-04T17:29:00.000
python,ide,komodo
Komodo Extension
0
2
5
952,842
1
0
0
Continuing on with my Python learning, I just installed Komodo edit, are there any recommended add ins/extensions that I should include? Any recommendations on using it or another GUI designer (TkInter base)?
false
951,974
0
0
0
0
I use to install MoreKomodo and TweakUI after putting Komodo on some machine for me.
0
1,483
0
3
2009-06-04T17:29:00.000
python,ide,komodo
Komodo Extension
0
2
5
7,241,975
1
0
0
I'm writing a macro generator/ keyboard remapper in python, for xubuntu. I've figured out how to intercept and record keystrokes, and send keystrokes I want to record, but I haven't figured out how to block keystrokes. I need to disable keyboard input to remap a key. For example, if I wanted to send 'a' when I press the 's' key, I can currently record the 'a' keystroke, and set it to playback when I press the 's' key. I cannot, however keep the 's' keystroke from being sent alongside it. I used the pyxhook module from an open source keyboard-logger for the hooks, and a again, the xtest fake input method from the python x library. I remember reading somewhere about somebody blocking all keyboard input by redirecting all keystrokes to an invisible window by using tkinter. If somebody could post that method that'd be great. I need something that will block all keystrokes, but not turn off my keyboard hooks.
false
958,491
0.099668
0
0
1
I think it's going to depend heavily on the environment: curses & the activestate recipe are good for command line, but if you want it to run in a DE, you'll need some hooks to that DE. You might look at Qt or GTK bindings for python, or there's a python-xlib library that might let you tie right into the X system. So I guess the answer is "it depends." Are you looking for console noecho functionality, or a text replacement program for a DE, or an xmodmap-style layout changer?
0
5,147
0
5
2009-06-05T22:51:00.000
python,keyboard
Python disable/redirect keyboard input
0
2
2
981,709
1
0
0
I'm writing a macro generator/ keyboard remapper in python, for xubuntu. I've figured out how to intercept and record keystrokes, and send keystrokes I want to record, but I haven't figured out how to block keystrokes. I need to disable keyboard input to remap a key. For example, if I wanted to send 'a' when I press the 's' key, I can currently record the 'a' keystroke, and set it to playback when I press the 's' key. I cannot, however keep the 's' keystroke from being sent alongside it. I used the pyxhook module from an open source keyboard-logger for the hooks, and a again, the xtest fake input method from the python x library. I remember reading somewhere about somebody blocking all keyboard input by redirecting all keystrokes to an invisible window by using tkinter. If somebody could post that method that'd be great. I need something that will block all keystrokes, but not turn off my keyboard hooks.
false
958,491
0
0
0
0
I've got a keyboard hook that detects X events. I'm looking for a way to globally prevent a single keyboard event from being sent to a window. Something that works by accessing the event queue and removing the keyboard event from it would be ideal. It looks like it should be possible using Python Xlib, but I can't figure it out.
0
5,147
0
5
2009-06-05T22:51:00.000
python,keyboard
Python disable/redirect keyboard input
0
2
2
993,251
1
0
0
Is there any reason why a QMenu cannot be added from the Qt Designer? I find it weird that you can add other widget types but not this.
false
960,467
0.197375
0
0
3
I have a single main window with a QGraphicsView and lots of QGraphicsItem objects. Each type of the Items have a different context menu. I find that not being able to create the contextMenu's, or at least the actions that are in them a serious limitation of QtDesigner. It means that I can create about 10% or so of the actions using the designer, and I have to create 90% programaticaly. Compare that with the Microsoft resource editor which allows all of these things to be created, and maintained effortlessly. I hope this will be addressed at some point.
0
3,989
0
1
2009-06-06T20:33:00.000
python,qt,widget,designer
how can I add a QMenu and QMenuItems to a window from Qt Designer
0
3
3
1,235,766
1
0
0
Is there any reason why a QMenu cannot be added from the Qt Designer? I find it weird that you can add other widget types but not this.
true
960,467
1.2
0
0
3
When you edit a QMainWindow you can right click the window and then choose "create menu bar". Or are you talking about a "context menu" aka "right click menu"?
0
3,989
0
1
2009-06-06T20:33:00.000
python,qt,widget,designer
how can I add a QMenu and QMenuItems to a window from Qt Designer
0
3
3
960,506
1
0
0
Is there any reason why a QMenu cannot be added from the Qt Designer? I find it weird that you can add other widget types but not this.
false
960,467
0
0
0
0
Adding menu editing for every widget in the designer would probably make a very awkward and inconvenient UI. There's really no place you can visualize it on. If you're editing a QMainWindow you can edit the menu bar and its popups because there's a proper place for them to be displayed in.
0
3,989
0
1
2009-06-06T20:33:00.000
python,qt,widget,designer
how can I add a QMenu and QMenuItems to a window from Qt Designer
0
3
3
960,479
1
0
0
I use gtk.EntryCompletion to implement the autocomletion function. But the list is so long that the pop-up window touches the bottom of screen. And I cant find the method of set the height of pop-up window in doc of pygtk. How to set the height of pop-up window in gtk.EntryCompletion?
false
961,735
0
0
0
0
I don't know if this applies to gtk.EntryCompletion widgets, but for cell like widgets you can control their height with the cell.set_fixed_height_from_font(True) method. Look at the gtk.CellRendererText API for details.
0
509
0
2
2009-06-07T11:19:00.000
python,gtk,pygtk
pygtk: How to set the height of pop-up window in gtk.EntryCompletion
0
2
2
962,054
1
0
0
I use gtk.EntryCompletion to implement the autocomletion function. But the list is so long that the pop-up window touches the bottom of screen. And I cant find the method of set the height of pop-up window in doc of pygtk. How to set the height of pop-up window in gtk.EntryCompletion?
false
961,735
0
0
0
0
Maybe you can solve the problem using gtk.EntryCompletion.set_minimum_key_length to prevent long list of suggestions.
0
509
0
2
2009-06-07T11:19:00.000
python,gtk,pygtk
pygtk: How to set the height of pop-up window in gtk.EntryCompletion
0
2
2
7,963,132
1
0
0
I'm thinking of trying to make some simple 2d games, but I've yet to choose a language. A lot of people recommend either C++ with SDL or python with pygame. I keep hearing that developement on C++ is fairly slow, and developement time with Python is fairly fast. Anyways, could anyone elaborate on this? What exactly makes development in C++ so time consuming? The programs I've made have been Project Euler-style in that they're very short and math-based, so I have no experience in larger projects.
false
977,404
1
1
0
13
I've heard these complaints before about C++, but the fact is, programming in any language with which you are unfamiliar is time consuming. A good C++ programmer can probably crank out the app much faster than an okay Python programmer and visa versa. I think C++ often gets a bad reputation because it allows you get much lower level - pointers, memory management, etc, and if you aren't used to thinking about such things, it can take a bit of time. If you are used to working in that environment, it can become second nature. Unless choice of language is something imposed upon you by your company, team, client, etc. I usually recommend that folks go with the language they are most comfortable with OR most interested in learning more about. If speed is the issue you are concerned with, look at the learning curve for each language and your past experience. C++ tends to have a higher learning curve, but that too depends on the person. Kindof a non-answer I know.
1
5,902
0
19
2009-06-10T18:33:00.000
c++,python
C++ slow, python fast? (in terms of development time)
0
11
13
977,443
1
0
0
I'm thinking of trying to make some simple 2d games, but I've yet to choose a language. A lot of people recommend either C++ with SDL or python with pygame. I keep hearing that developement on C++ is fairly slow, and developement time with Python is fairly fast. Anyways, could anyone elaborate on this? What exactly makes development in C++ so time consuming? The programs I've made have been Project Euler-style in that they're very short and math-based, so I have no experience in larger projects.
false
977,404
1
1
0
24
There are two things that are relevant between C++ and Python that will affect your time-to-develop any project including a game. There are the languages themselves and the libraries. I've played with the SDL to some extent and peeked at PyGame and for your specific instance I don't think the libraries are going to be much of a factor. So I'll focus on the languages themselves. Python is a dynamically-typed, garbage-collected language. C++ is a statically-typed, non-garbage-collected language. What this means is that in C++ a lot of your development time will be spent managing memory and dealing with your type structure. This affords you a lot of power, but the question is do you really need it? If you're looking to write a simple game with some basic graphics and some good gameplay, then I don't think you truly need all the power that C++ will give you. If you're looking to write something that will push the envelope, be the next A-list game, be the next MMO, fit on a console or a handheld device, then you will likely need the power that C++ affords.
1
5,902
0
19
2009-06-10T18:33:00.000
c++,python
C++ slow, python fast? (in terms of development time)
0
11
13
977,451
1
0
0
I'm thinking of trying to make some simple 2d games, but I've yet to choose a language. A lot of people recommend either C++ with SDL or python with pygame. I keep hearing that developement on C++ is fairly slow, and developement time with Python is fairly fast. Anyways, could anyone elaborate on this? What exactly makes development in C++ so time consuming? The programs I've made have been Project Euler-style in that they're very short and math-based, so I have no experience in larger projects.
false
977,404
0.03076
1
0
2
It's time consuming because in C++ you have to deal with more low-level tasks. In Python you are free to focus on the development of the actual game instead of dealing with memory management etc.
1
5,902
0
19
2009-06-10T18:33:00.000
c++,python
C++ slow, python fast? (in terms of development time)
0
11
13
977,412
1
0
0
I'm thinking of trying to make some simple 2d games, but I've yet to choose a language. A lot of people recommend either C++ with SDL or python with pygame. I keep hearing that developement on C++ is fairly slow, and developement time with Python is fairly fast. Anyways, could anyone elaborate on this? What exactly makes development in C++ so time consuming? The programs I've made have been Project Euler-style in that they're very short and math-based, so I have no experience in larger projects.
false
977,404
0
1
0
0
Some people would argue that development time is slower in C++ when compared to Python. Wouldn't it be the case that the time you saved in developing an application (or game) in python is the time you gonna use in improving performance after its developed? and in the later part when you have least options left? It largely depends upon the purpose for which you are going to develop the application. If you are thinking for an enterprise application in which case it is going to be hit by millions (web-app) or an application with focus on low-footprint, faster loading into memory, faster execution, then your choice is C++. If you are projecting your application for not being use at this level, surely Python is the choice to go for. Maintainability is considerable, but disciplined code can overcome this. Largely depends upon long term projections. On how serious and critical the application is going to be.
1
5,902
0
19
2009-06-10T18:33:00.000
c++,python
C++ slow, python fast? (in terms of development time)
0
11
13
4,546,946
1
0
0
I'm thinking of trying to make some simple 2d games, but I've yet to choose a language. A lot of people recommend either C++ with SDL or python with pygame. I keep hearing that developement on C++ is fairly slow, and developement time with Python is fairly fast. Anyways, could anyone elaborate on this? What exactly makes development in C++ so time consuming? The programs I've made have been Project Euler-style in that they're very short and math-based, so I have no experience in larger projects.
false
977,404
0
1
0
0
Why limit yourself to those two options? With C# or Java you get access to a huge collection of useful libraries plus garbage collection and (in the case of C#) JIT compiling. Furthermore, you're saying that you're looking to do game development, but from your task description it sounds like you're also looking at coding your own engine. Is that part of the exercise? Otherwise you should definitely take a look at the available Indie engines out there - lots are cheap of not free and open source. Needless to say, working from an existing engine is definitely faster than going from scratch :)
1
5,902
0
19
2009-06-10T18:33:00.000
c++,python
C++ slow, python fast? (in terms of development time)
0
11
13
1,079,100
1
0
0
I'm thinking of trying to make some simple 2d games, but I've yet to choose a language. A lot of people recommend either C++ with SDL or python with pygame. I keep hearing that developement on C++ is fairly slow, and developement time with Python is fairly fast. Anyways, could anyone elaborate on this? What exactly makes development in C++ so time consuming? The programs I've made have been Project Euler-style in that they're very short and math-based, so I have no experience in larger projects.
false
977,404
0.03076
1
0
2
It takes about the same amount of time to write the same code in pretty much all of the high level languages. The win is that in certain languages it is easier to use other peoples code. In a lot of Python/Ruby/Perl apps, you write 10% of the code and import libraries to do the other 90%. That is harder in C/C++ since the libraries have different interfaces and other incompatibilities. C++ vs Python is a pretty personal choice. Personally I feel I lose more time with not having the C/Java class system (more run time errors/debugging time, don't have anywhere near as good auto completion, need to do more documentation and optimization) than I gain (not having to write interfaces/stub function and being able to worry less about memory managment). Other people feel the exact opposite. In the end it probably depends on the type of game. If your processor intensive go to C++ (maybe with a scripting language if it makes sense). Otherwise use whatever language you prefer
1
5,902
0
19
2009-06-10T18:33:00.000
c++,python
C++ slow, python fast? (in terms of development time)
0
11
13
1,009,820
1
0
0
I'm thinking of trying to make some simple 2d games, but I've yet to choose a language. A lot of people recommend either C++ with SDL or python with pygame. I keep hearing that developement on C++ is fairly slow, and developement time with Python is fairly fast. Anyways, could anyone elaborate on this? What exactly makes development in C++ so time consuming? The programs I've made have been Project Euler-style in that they're very short and math-based, so I have no experience in larger projects.
false
977,404
0.046121
1
0
3
Python has some big advantages over programming languages like C++. I myself have programmed a lot with C++, C and other programming languages. Lately I am also programming in Python and I got to like it very much! You can have a quick start with Python. Since it is rather simple to learn (at least with some programming experience and enough abstract thinking), you can have fast successes. Also the script-like behaviour makes starting easy and it is also possible, to quickly test some things in the integrated shell. This can also be good for debugging. The whole language is packed with powerful features and it has a good and rather complete set of libraries. There was the argument that with the "right library" you can develop as quickly with C++ as with Python. This might (partly) be, but I myself have never experienced it, because such libraries are rare. I had also a big library at hand, but still lacked many valuable features in C++. The so called "standard template library" STL makes things even worse in my opinion. It is a really powerful library. But it is also that complex, that it adds the complexity of an additional programming language to C++. I really disliked it and in a company I worked in, much worktime was lost, because the compiler was not able to give useful error-output in case of errors in the STL. Python is different. Instead of putting the "speed of the programm" on the throne -- sacrificing all else (as C++ and especially the STL does) -- it puts "speed of development" first. The language gives you a powerful toolkit and it is accompanied by a huge library. When you need speed, you can also implement time critical things in C or C++ and call it from Python. There is also at least one big online Game implemented in Python.
1
5,902
0
19
2009-06-10T18:33:00.000
c++,python
C++ slow, python fast? (in terms of development time)
0
11
13
986,810
1
0
0
I'm thinking of trying to make some simple 2d games, but I've yet to choose a language. A lot of people recommend either C++ with SDL or python with pygame. I keep hearing that developement on C++ is fairly slow, and developement time with Python is fairly fast. Anyways, could anyone elaborate on this? What exactly makes development in C++ so time consuming? The programs I've made have been Project Euler-style in that they're very short and math-based, so I have no experience in larger projects.
false
977,404
0
1
0
0
Do you have any programming experience at all? If not, I would start with Python which is easier to learn, even if it is not a better tool for game development. If you decide you want to program games for living, you'll probably need to switch to C++ at some point.
1
5,902
0
19
2009-06-10T18:33:00.000
c++,python
C++ slow, python fast? (in terms of development time)
0
11
13
977,759
1
0
0
I'm thinking of trying to make some simple 2d games, but I've yet to choose a language. A lot of people recommend either C++ with SDL or python with pygame. I keep hearing that developement on C++ is fairly slow, and developement time with Python is fairly fast. Anyways, could anyone elaborate on this? What exactly makes development in C++ so time consuming? The programs I've made have been Project Euler-style in that they're very short and math-based, so I have no experience in larger projects.
false
977,404
0
1
0
0
Short Answer Yes python is faster in terms of development time. There are many case studies in real life that show this. However, you don't want to do a 3d graphics engine in Python.
1
5,902
0
19
2009-06-10T18:33:00.000
c++,python
C++ slow, python fast? (in terms of development time)
0
11
13
977,460
1
0
0
I'm thinking of trying to make some simple 2d games, but I've yet to choose a language. A lot of people recommend either C++ with SDL or python with pygame. I keep hearing that developement on C++ is fairly slow, and developement time with Python is fairly fast. Anyways, could anyone elaborate on this? What exactly makes development in C++ so time consuming? The programs I've made have been Project Euler-style in that they're very short and math-based, so I have no experience in larger projects.
false
977,404
0
1
0
0
I'd focus more on choosing a framework to build your game on than trying to pick a language. Unless the goal is to learn how games work inside and out, you're going to want to use a framework. Try out a couple, and pick the one that meets your requirements and feels nice to you. Once you've picked the framework, the language choice becomes easy - use the language for which the framework is written. There are many options for game frameworks in C++ - pygame works for python. There are many that work with other languages/tools as well (including .NET, Lua, etc.)
1
5,902
0
19
2009-06-10T18:33:00.000
c++,python
C++ slow, python fast? (in terms of development time)
0
11
13
977,452
1
0
0
I'm thinking of trying to make some simple 2d games, but I've yet to choose a language. A lot of people recommend either C++ with SDL or python with pygame. I keep hearing that developement on C++ is fairly slow, and developement time with Python is fairly fast. Anyways, could anyone elaborate on this? What exactly makes development in C++ so time consuming? The programs I've made have been Project Euler-style in that they're very short and math-based, so I have no experience in larger projects.
false
977,404
0.03076
1
0
2
there are many things that make c++ longer to develop in. Its lower level, has pointers, different libraries for different systems, the type system, and there are others I am sure I am missing.
1
5,902
0
19
2009-06-10T18:33:00.000
c++,python
C++ slow, python fast? (in terms of development time)
0
11
13
977,414
1
0
0
I have to write a desktop application to edit data stored in a XML file. The format is defined by a XML schema file (.xsd). The format is quite complex. Are there tools which can generate a basic GUI automatically? It's not yet decided which language to use. I have experience in Python and C++ using wxWidgets and C# (.NET 1) using Windows Forms.
false
983,399
0.028564
0
0
1
One solution could be to write an XSL transformation that converts the XML file into a XAML file.
0
19,538
0
15
2009-06-11T20:14:00.000
c#,c++,python,xml,schema
Create a GUI from a XML schema automatically
0
2
7
985,246
1
0
0
I have to write a desktop application to edit data stored in a XML file. The format is defined by a XML schema file (.xsd). The format is quite complex. Are there tools which can generate a basic GUI automatically? It's not yet decided which language to use. I have experience in Python and C++ using wxWidgets and C# (.NET 1) using Windows Forms.
false
983,399
0.028564
0
0
1
If the GUI will be simple and you don't bother about the geometry of the components(widgets) in the dialogs, Qt will be a good option. Actually I'm working on a similar task for my project, and my goal was to validate the form data by using an XML file. Using Qt, it is possible to access any widget on the dialog at run-time by using its object name. So that validation can be applied to the dialog contents. Creating any dialogs will be even easier, since you will have the widget type and certain information and using layouts, fascinating results can be obtained.
0
19,538
0
15
2009-06-11T20:14:00.000
c#,c++,python,xml,schema
Create a GUI from a XML schema automatically
0
2
7
1,015,238
1
0
0
I'm designing a simple text editor using WxPython, and I want to put the platform's native icons in the toolbar. It seems that the only way to make toolbars is with custom images, which are not good for portability. Is there some kind of (e.g.) GetSaveIcon()?
true
984,816
1.2
0
0
4
I don't think wxPython provides native images on each platform but just for consistency sake you can use wx.ArtProvider e.g. wx.ArtProvider.GetBitmap(wx.ART_FILE_OPEN)
0
1,725
0
2
2009-06-12T03:16:00.000
python,wxpython,icons
How to use standard toolbar icons with WxPython?
0
1
1
984,833
1
0
0
I'm trying to explicitly disable the compilation of the _tkinter module when compiling Python 2.4.3. It's easy enough to do by modifying the makefile but I'd rather just append a configuration option to avoid supplying a patch. I do not understand the complex interplay between Modules/Setup*, setup.py and their contribution to the generation of makefile.
true
994,278
1.2
0
0
5
Unfortunately I suspect you can't do it without editing some file or other -- it's not a configure option we wrote in as far as I recall (I hope I'm wrong and somebody else snuck it in while I wasn't looking but a quick look at the configure file seems to confirm they didnt'). Sorry -- we never thought that somebody (with all the tk libraries installed, otherwise tkinter gets skipped) would need to deliberately avoid building _tkinter:-(. In retrospect, we clearly were wrong, so I apologize.
0
672
0
3
2009-06-15T02:05:00.000
python,compilation,tkinter
How can I explicitly disable compilation of _tkinter.c when compiling Python 2.4.3 on CentOS 5?
0
1
1
994,311
1
0
0
I'm writing a basic program in python using the PyQt4 module. I'd like to be able to use my system theme's icons for things like the preference dialog's icon, but i have no idea how to do this. So my question is, how do you get the location of an icon, but make sure it changes with the system's icon theme? If it matters, i'm developing this under ubuntu 9.04, so i am using the gnome desktop.
false
997,904
0
0
0
0
I spent a decent amount of researching this myself not long ago, and my conclusion was that, unfortunately, Qt doesn't provide this functionality in a cross-platform fashion. Ideally the QIcon class would have defaults for file open, save, '+', '-', preferences, etc, but considering it doesn't you'll have to grab the appropriate icon for your desktop environment.
0
3,720
0
8
2009-06-15T19:25:00.000
python,icons,pyqt4
System theme icons and PyQt4
0
1
3
999,115
1
0
0
I'm looking for a Python framework that will enable me to play video as well as draw on that video (for labeling purposes). I've tried Pyglet, but this doesn't seem to work particularly well - when drawing on an existing video, there is flicker (even with double buffering and all of that good stuff), and there doesn't seem to be a way to get the frame index in the video during the per-frame callback (only elapsed time since the last frame).
false
1,003,376
0.132549
0
0
2
Qt (PyQt) has Phonon, which might help out. PyQt is available as GPL or payware. (Qt has LGPL too, but the PyQt wrappers don't)
0
2,361
0
4
2009-06-16T19:03:00.000
python,video,pyglet
Python Video Framework
0
1
3
1,003,439
1