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've incorporated IronPython into my XNA game on Windows, but, of course, that won't work on the compact framework since the DLR stuff isn't available. Are there any scripting object implementations available that will work with the compact framework? It's really convenient to be able to tweak the system real-time with...
false
4,556,096
0.197375
0
0
1
Most things in IronRuby will work on the compact framework (it runs on Windows Phone today). You may need to deploy the DLR yourself but because it's just an additional library it is possible to run it. IronPython could be made to work but it'll require some work to avoid doing code generation where it does today whi...
0
446
0
1
2010-12-29T17:05:00.000
ironpython,xbox360,xna-4.0
XNA - scripting on XBOX?
0
1
1
4,566,611
1
0
0
Is there a way to check if part or an entire window is over/under another window in python? I have two windows and I'd like to make them not appear over each other. This is in Windows, using Tkinter.
true
4,566,330
1.2
0
0
1
You can use the methods winfo_rootx and winfo_rooty to get the x/y in the upper left corner. You can use winfo_width and winfo_height to get the width and height of the window. From that it's just a little math to figure out if two windows overlap. You can then use the geometry method to position the windows anywhere ...
1
79
0
1
2010-12-30T21:15:00.000
python,tkinter
Making windows not appear over each other
0
1
1
4,570,554
1
1
0
I want to create a somehow complex application: It is a game level editor. You can put in tiles and other objects for a level. Then "compress" the level data into a file. With another application, it will read the file's data and play the game. The application is for Windows mainly. Other platforms are yet to be consid...
false
4,577,156
0.099668
1
0
1
I've never used Ruby but I'm sure there is virtually no difference between the 2 when it comes to libraries. I know what you want can be done with Python using wxPython or pygame (or the combination of two). But I'm sure there are similar libs for Ruby. So just look at both languages and use the one you like better.
0
955
0
0
2011-01-02T04:38:00.000
python,ruby,user-interface
Making a somehow complex application: Ruby vs Python
0
2
2
4,577,169
1
1
0
I want to create a somehow complex application: It is a game level editor. You can put in tiles and other objects for a level. Then "compress" the level data into a file. With another application, it will read the file's data and play the game. The application is for Windows mainly. Other platforms are yet to be consid...
true
4,577,156
1.2
1
0
4
Python + PyGame. Hands down. You will benefit from: Good docs for both the language and PyGame GUI, sprites, and audio all in one, again with PyGame Better Windows support than Ruby (you can install both Python and PyGame from .exes) Desktop applications (esp. for Windows) aren't really Ruby's sweet spot. PyGame will...
0
955
0
0
2011-01-02T04:38:00.000
python,ruby,user-interface
Making a somehow complex application: Ruby vs Python
0
2
2
4,577,168
1
0
0
I'd like to try my hand at some PC game development. I keep hearing that python is slow compared to C++. Is this something I should be worried about? I am more familiar with python than C++. If I'm looking to make some games, should I take the time to learn C++ or just stick with Python?
false
4,578,307
0.158649
1
0
4
The kind of game matters immensely. High performance games like the big name PC or console games are almost exclusively the domain of C++. Casual games can be written in almost any language, including slower languages like Python. If you're a garage type developer who gets his hands wet with some simple game developmen...
1
13,393
0
8
2011-01-02T12:15:00.000
python,performance
How "slow" is python for game development?
0
4
5
4,578,373
1
0
0
I'd like to try my hand at some PC game development. I keep hearing that python is slow compared to C++. Is this something I should be worried about? I am more familiar with python than C++. If I'm looking to make some games, should I take the time to learn C++ or just stick with Python?
false
4,578,307
1
1
0
6
Elebenty-seven. No, really, it's fast enough for most things, and can drop to C when you really need speed. Profile twice, optimize once.
1
13,393
0
8
2011-01-02T12:15:00.000
python,performance
How "slow" is python for game development?
0
4
5
4,578,311
1
0
0
I'd like to try my hand at some PC game development. I keep hearing that python is slow compared to C++. Is this something I should be worried about? I am more familiar with python than C++. If I'm looking to make some games, should I take the time to learn C++ or just stick with Python?
false
4,578,307
-0.119427
1
0
-3
C++ is much more easier for object orientation. When you're doing things, it's easier to keep track of everything, because most IDEs for C++ are more based on projects, were as IDLE is more based on single files. The bottom line is for game development, use what you're comfortable with using. I mean, game developme...
1
13,393
0
8
2011-01-02T12:15:00.000
python,performance
How "slow" is python for game development?
0
4
5
15,419,304
1
0
0
I'd like to try my hand at some PC game development. I keep hearing that python is slow compared to C++. Is this something I should be worried about? I am more familiar with python than C++. If I'm looking to make some games, should I take the time to learn C++ or just stick with Python?
false
4,578,307
0.07983
1
0
2
Many if not most top-end commercial games these days include some kind of scripting engine for game logic. Game logic decisions, for the most part, aren't particularly performance-sensitive in the way that e.g. the rendering engine is. BTW - I'm not claiming any insider knowledge of game development - this is fairly we...
1
13,393
0
8
2011-01-02T12:15:00.000
python,performance
How "slow" is python for game development?
0
4
5
4,578,381
1
0
0
Is there a PyQt3 (Or 4) Windows binary installer for Python 2.3? I've googled around for an hour now but to no avail. Why am I using version 2.3? With my project file size is paramount. Without the interface, un-needed modules and compressing using UPX the resulting .exe size is a mear 750KB's. Just need to add the int...
false
4,588,045
0.291313
0
0
3
Python 2.3 is extremely old. You really shouldn't be using it at all. I seriously doubt there's any qt bindings for it that would even compile. Why do you think using python 2.3 will save you so much file size? Adding pyqt will probably increase your file size by 10s of megabytes at least. Just use python at least 2.6....
1
209
0
0
2011-01-03T20:24:00.000
python,pyqt,python-2.3
PyQt & Python2.3
0
1
2
4,588,075
1
0
0
I am building a window application written in C++. I'd like to utilize several python libraries. I don't need any fancy Python interop here. My method is like this: Open a thread to run Python interpreter. Send commands from C++ to the Python interpreter. The C++ may need to write some intermediate files for the int...
false
4,596,013
0.099668
0
0
2
ActivePython (http://www.activestate.com/activepython/downloads) installs itself as an ActiveScript engine.The ProgID is Python.AXScript.2 . So you can use it with COM via the Windows standard IActiveScript interface. Read up on it. Distribution is another matter. Either you require that customers have it, or you could...
1
1,517
1
4
2011-01-04T16:38:00.000
c++,python,winapi,api
Embed a Python interpreter in a (Windows) C++ application
0
1
4
4,596,102
1
0
0
I am trying to display a simple graph using pydot. My question is that is there any way to display the graph without writing it to a file as currently I use write function to first draw and then have to use the Image module to show the files. However is there any way that the graph directly gets printed on the screen ...
true
4,596,962
1.2
0
0
0
I'm afraid pydot uses graphviz to render the graphs. I.e., it runs the executable and loads the resulting image. Bottom line - no, you cannot avoid creating the file.
0
27,874
0
28
2011-01-04T18:19:00.000
python,pydot
Display graph without saving using pydot
0
1
7
4,597,838
1
0
0
I've created a little screensaver-type program with Python, and I'd like to get it working properly under gnome-screensaver. The documentation is all written for C, and there don't appear to be libraries for Python. Is there any way to get this working?
true
4,597,080
1.2
0
0
2
gnome-screensaver doesn't integrate with the screensavers any more than with a small config file that sets the name, some other properties, and a command to execute to start the screensaver. This is documented in the gnome-screensaver FAQ. The program that gets started needs to get the Window ID from the environment (X...
0
567
0
2
2011-01-04T18:34:00.000
python,gnome,screensaver
Gnome-Screensaver with Python?
0
1
1
4,597,542
1
0
0
Is there any way to get what lines are currently visible in a Tkinter text widget? I'm trying to make a scrollbar. Currently I'm trying to coordinate my scroll bar with the other methods of scrolling (ie, the arrow keys and scroll wheel). So that when I scroll with the arrow keys or mouse, my bar scrolls too.
true
4,610,074
1.2
0
0
4
You can get the character (and thus, the line number) at a pixel position using an index of @x,y (eg: @0,0 for the top-left-most visible character). Since you know the width and height of the widget (using the winfo_width and winfo height methods) you can calculate what lines are at the bottom of the widget too. You ca...
0
1,674
0
1
2011-01-05T22:59:00.000
python,tkinter
Visible lines in Tkinter text widget
0
1
3
4,611,229
1
0
0
i am trying below code still it is giving me horizontal line..i am missing something? self.ln = wx.StaticLine(self,-1,wx.Point(620,0), wx.Size(687,7),wx.LI_VERTICAL) self.ln.SetForegroundColour(wx.Colour(255,0,255))
false
4,623,031
0
0
0
0
thanks for ur reply got it now..i was missing style keyword ..earliar it has not given error thats why didnot found it self.ln = wx.StaticLine(self, -1, size=(4,479),style=wx.LI_VERTICAL)
0
6,448
0
4
2011-01-07T06:24:00.000
wxpython
How to draw vertical line using wxpython
0
1
2
4,623,890
1
0
0
Simply, I'm developing a wireless ECG (electrocardiogram, or EKG from the German Elektrokardiogramm) and I need to choose the best language for a desktop application that allows the following: wireless transmission of data over WiFi real-time graphing of ECG data signal a good DSP library Thanks.
false
4,623,047
0.197375
1
0
1
From the viewpoint of a normal program (i.e., not a device driver) a Wi-Fi connection is just a network connection -- not noticeably different from (for example) a wired Ethernet connection. Real-time graphing and digital signal processing libraries are probably a little less common, but not much. "Real time" is one of...
0
883
0
1
2011-01-07T06:26:00.000
c#,java,c++,python,c
ECG/EKG software language advice
0
1
1
4,623,129
1
0
0
i' have downloaded boost 1.45.0, installed Python 3.1.3 on my mac. I have the build Boost with Python succesfully. For this i had to edit my "project-config.jam" and add "using python : 3.1 : /Library/Frameworks/Python.framework/Versions/3.1;" into it. At this point all seems to be allright. Now when i try to use this ...
true
4,623,930
1.2
0
0
0
I'v finally found this error. buid boost python with ./bjam toolset=darwin-4.2 architecture=x86 address-model=32 link=static threading=multi runtime-link=static did the job, as i am on i86 arch.
1
380
0
0
2011-01-07T09:01:00.000
xcode,boost-python
Linker issue with boost python on Xcode
0
1
1
4,627,509
1
0
0
Is there a way to draw to ttkinter.Canvas like javascript or .NET canvas? I.E drawline() without storing an object for that line which can be manipulated later.
false
4,625,108
0.099668
0
0
1
I'm not sure what you mean by "storing an object". The canvas gives each thing you draw an id, but you don't have to store it. You can't prevent the canvas from assigning an id to the object but are free to completely ignore it. What problem are you trying to solve where you perceive this to be an issue? [edit] To clar...
0
248
0
1
2011-01-07T11:38:00.000
python,python-3.x,tkinter
Using tkinter.Canvas stateless-ly
0
1
2
4,625,172
1
0
1
i want to implement 1024x1024 monochromatic grid , i need read data from any cell and insert rectangles with various dimensions, i have tried to make list in list ( and use it like 2d array ), what i have found is that list of booleans is slower than list of integers.... i have tried 1d list, and it was slower than 2d ...
false
4,637,190
0
0
0
0
One thing I might suggest is using Python's built-in array class (http://docs.python.org/library/array.html), with a type of 'B'. Coding will be simplest if you use one byte per pixel, but if you want to save memory, you can pack 8 to a byte, and access using your own bit manipulation.
0
651
0
3
2011-01-09T01:31:00.000
python,bitmap,performance
Python Fast monochromatic bitmap
0
2
3
4,637,207
1
0
1
i want to implement 1024x1024 monochromatic grid , i need read data from any cell and insert rectangles with various dimensions, i have tried to make list in list ( and use it like 2d array ), what i have found is that list of booleans is slower than list of integers.... i have tried 1d list, and it was slower than 2d ...
false
4,637,190
0.132549
0
0
2
Raph's suggestin of using array is good, but it won't help on CPython, in fact I'd expect it to be 10-15% slower, however if you use it on PyPy (http://pypy.org/) I'd expect excellent results.
0
651
0
3
2011-01-09T01:31:00.000
python,bitmap,performance
Python Fast monochromatic bitmap
0
2
3
4,637,284
1
0
0
I am having problem with drawing in pydot. The problem lies in defining the layout of the nodes created. Currently everything is drawn vertically and is not spread. This gives me the problem of going down to see the nodes created. Is there any way I can define the nodes to be created horizontally whenever they are ver...
true
4,638,806
1.2
0
0
0
I found out that writing the string in unicode representation shows mathematical symbols as edges... For example you can write node = pydot.Node("ε",shape = "ellipse", style="filled", fillcolor="turquoise") Using this we get epsilon as label of the node.... Similarly we can get rest of the mathematical symbols....
0
419
0
1
2011-01-09T11:07:00.000
python,pydot
changing layout and inserting mathematical symbols with pydot
0
1
1
4,844,143
1
0
0
I have a wxPython application that is almost done & I would like to place it in my portfolio. I have to consider when someone attempts to run my app that they may not have Python, or wxPython, so if they just click the main script/python file its not going to run, right? How should I distribute my app (how do you distr...
false
4,643,247
0.066568
0
0
1
I suggest both, script for all platforms and frozen binary for lazy windows users. To answer your latest question, you don't compile python. Python is an interpreted language, it gets compiled on the fly when run. A python frozen binary is actually the python interpreter with your script hardcoded in it. And frozen bin...
0
1,685
1
3
2011-01-10T02:33:00.000
python,wxpython
Releasing a wxPython App: Give out scripts or compile in Exe, etc?
0
1
3
4,643,279
1
0
0
My cocoa app runs background tasks, which I would like to stop when the user becomes idle (no keyboard/mouse input) and then resume when the user becomes active again. Is there a way to register for idle-state notifications?
false
4,643,579
0.049958
0
0
1
I used a different approach. Subclassing UIApplication I override the sendEvent method filtering touches (actually you can filter any kind of event, acceleration, touches, etc.). Using a shared variable and a background timer I managed the "idle". Every time the user touch the screen the variable is set with current t...
0
3,011
0
7
2011-01-10T03:59:00.000
objective-c,time,python-idle
Objective C: Get notifications about a user's idle state
0
1
4
9,402,960
1
0
0
is it possible to convert a Python program to C/C++? I need to implement a couple of algorithms, and I'm not sure if the performance gap is big enough to justify all the pain I'd go through when doing it in C/C++ (which I'm not good at). I thought about writing one simple algorithm and benchmark it against such a conve...
false
4,650,243
1
1
0
163
If the C variant needs x hours less, then I'd invest that time in letting the algorithms run longer/again "invest" isn't the right word here. Build a working implementation in Python. You'll finish this long before you'd finish a C version. Measure performance with the Python profiler. Fix any problems you find. C...
0
475,467
0
202
2011-01-10T18:46:00.000
c++,python,c,code-generation
Convert Python program to C/C++ code?
0
2
8
4,650,953
1
0
0
is it possible to convert a Python program to C/C++? I need to implement a couple of algorithms, and I'm not sure if the performance gap is big enough to justify all the pain I'd go through when doing it in C/C++ (which I'm not good at). I thought about writing one simple algorithm and benchmark it against such a conve...
false
4,650,243
1
1
0
12
I know this is an older thread but I wanted to give what I think to be helpful information. I personally use PyPy which is really easy to install using pip. I interchangeably use Python/PyPy interpreter, you don't need to change your code at all and I've found it to be roughly 40x faster than the standard python interp...
0
475,467
0
202
2011-01-10T18:46:00.000
c++,python,c,code-generation
Convert Python program to C/C++ code?
0
2
8
37,192,125
1
1
0
I am working on a project that is based on Urdu language in Ubuntu platform. I'm using Python language and have almost achieved my task. The problem is that, the Urdu text is rendered in reverse order. For example, consider the word کام (which means work) consisting of the three letters: ک , ا , and م The output is re...
false
4,668,985
-0.099668
0
0
-1
Use a toolkit that isn't terrible, such as PyQt, PyGTK, or wxPython.
1
824
0
2
2011-01-12T12:50:00.000
python,linux,fonts,tkinter,right-to-left
Reverse rendering of Urdu fonts
0
1
2
4,669,402
1
0
0
I'm trying to use clr.AddReference to add sqlite3 functionality to a simple IronPython program I'm writing; but everytime I try to reference System.Data.SQLite I get this error: Traceback (most recent call last): File "", line 1, in IOError: System.IO.IOException: Could not add reference to assembly System.Data...
false
4,682,960
0.197375
0
1
1
My first guess is that you're trying to load the x86 (32-bit) System.Data.SQLite.dll in a x64 (64-bit) process, or vice versa. System.Data.SQLite.dll contains the native sqlite3 library, which must be compiled for x86 or x64, so there is a version of System.Data.SQLite.dll for each CPU. If you're using the console, ipy...
0
1,695
0
1
2011-01-13T17:11:00.000
ado.net,ironpython,system.data.sqlite
Adding System.Data.SQLite reference in IronPython
0
1
1
4,696,478
1
0
0
I'm having a database (sqlite) of members of an organisation (less then 200 people). Now I'm trying to write an wx app that will search the database and return some contact information in a wx.grid. The app will have 2 TextCtrls, one for the first name and one for the last name. What I want to do here is make it possi...
false
4,698,933
0
0
0
0
If you are searching for a string matching the start using LIKE, eg 'abc%' (rather than anywhere in the string - '%abc%'), the search should be quite fast if you have an index on the field, as the db can use the index to help find the matches.
0
697
0
0
2011-01-15T09:49:00.000
python,sqlite,tuples
Searching a list of tuples in python
0
2
3
4,699,909
1
0
0
I'm having a database (sqlite) of members of an organisation (less then 200 people). Now I'm trying to write an wx app that will search the database and return some contact information in a wx.grid. The app will have 2 TextCtrls, one for the first name and one for the last name. What I want to do here is make it possi...
false
4,698,933
0.132549
0
0
2
I think that generally, you shouldn't be afraid of giving tasks to a database. It's quite possible that the LIKE clause will be very fast. Sqlite is implemented in fairly robust C code, and will happily deal with queries like this. If you're worried about sending too many requests, why not send a query once a user has ...
0
697
0
0
2011-01-15T09:49:00.000
python,sqlite,tuples
Searching a list of tuples in python
0
2
3
4,698,981
1
0
0
If I have a Python package that depends on some C libraries (like say the Gnu Scientific Library (GSL) for numerical computations), is it a good idea to bundle the library with my code? I'd like to make my package as easy to install as possible for users and I don't want them to have to download C libraries by hand and...
false
4,700,178
0
0
0
0
You could have two separate branches of the src, one containing the libraries and another that doesn't. That way you can explicitly warn your users in case they have installed the libraries. Another solution could be (if the licences of the libraries allow you) is to wrap 'em up in a single file. I think there's no uni...
1
629
0
7
2011-01-15T14:47:00.000
python,c,distutils
Should I bundle C libraries with my Python application?
0
1
3
4,700,264
1
0
0
I am thinking about to learn new language or framework. Now I deal with C# and WPF, WCF, Winforms. I have some free time so I would like get new skills. But I have dilema, start with some C++ framework (such as Platinum, Reason, Evocosm, ACF) or try Python / python framework. I you are on my place which possibility you...
true
4,708,482
1.2
1
0
0
Personally I prefer Python, but profesionally, that is if you want a good job C++ is a better choice.
1
438
0
3
2011-01-16T22:20:00.000
c++,python,frameworks
Start with some C++ framework or python
0
4
6
4,708,502
1
0
0
I am thinking about to learn new language or framework. Now I deal with C# and WPF, WCF, Winforms. I have some free time so I would like get new skills. But I have dilema, start with some C++ framework (such as Platinum, Reason, Evocosm, ACF) or try Python / python framework. I you are on my place which possibility you...
false
4,708,482
0.033321
1
0
1
I recommend you to keep learning C++. Before you started looking for framework learn some popular search algorithm and try implement them. After that try implement some structures, like queues, list, stack, binary trees and some operation on them. Meanwhile play with I/O (for example, try write your stack to file and r...
1
438
0
3
2011-01-16T22:20:00.000
c++,python,frameworks
Start with some C++ framework or python
0
4
6
4,708,519
1
0
0
I am thinking about to learn new language or framework. Now I deal with C# and WPF, WCF, Winforms. I have some free time so I would like get new skills. But I have dilema, start with some C++ framework (such as Platinum, Reason, Evocosm, ACF) or try Python / python framework. I you are on my place which possibility you...
false
4,708,482
0
1
0
0
Well. Learning Python basics will take a week, and you will save the time spent in a year since it is such a good language for small hacks and scripts. So I suggest you learn it first. Learning C++ well will take you five to ten years, so there is not the same immediate benefit :)
1
438
0
3
2011-01-16T22:20:00.000
c++,python,frameworks
Start with some C++ framework or python
0
4
6
4,708,899
1
0
0
I am thinking about to learn new language or framework. Now I deal with C# and WPF, WCF, Winforms. I have some free time so I would like get new skills. But I have dilema, start with some C++ framework (such as Platinum, Reason, Evocosm, ACF) or try Python / python framework. I you are on my place which possibility you...
false
4,708,482
0
1
0
0
I'd pick C++ for the sole reason that it's nothing like the languages you already know, even though it shares some syntax.
1
438
0
3
2011-01-16T22:20:00.000
c++,python,frameworks
Start with some C++ framework or python
0
4
6
4,708,606
1
0
0
I have a main window and I want that when I maximize it the widgets inside it should automatically be resized .... Is there any way I can do that ????
true
4,712,705
1.2
0
0
2
Yes. Use layout objects (such as QHBoxLayout or QGridLayout) to organize your widgets inside, and set the widgets' resize modes accordingly. Note that standard Qt-supplied widgets support resizing by default.
0
1,134
0
1
2011-01-17T11:39:00.000
python,pyqt4
PyQt4 - Maximize window along with inside widgets
0
2
2
4,712,851
1
0
0
I have a main window and I want that when I maximize it the widgets inside it should automatically be resized .... Is there any way I can do that ????
false
4,712,705
0.099668
0
0
1
If you want to save you a lot of work, don't hand-code the ui. Use Qt Creator to create a ui file and then load this file dynamically using PyQt4.uic module. There is also a "static" approach that generates python code from Qt Creator ui files.
0
1,134
0
1
2011-01-17T11:39:00.000
python,pyqt4
PyQt4 - Maximize window along with inside widgets
0
2
2
4,713,335
1
0
0
I'm trying to create a menu bar in wxPython 2.8.11.0 and Python 2.7 where most of the menus are left aligned (as normal) but one is - ideally - right aligned, or at least separated in some way from the rest. Is this possible? EDIT: This needs to be a cross-platform solution.
false
4,730,785
0.197375
0
0
1
If the native menubar doesn't support it, then wxPython probably won't either. There is a pure Python implementation of the menubar though. It's called FlatMenu. I would try that. If it doesn't work, at least you can hack it or submit a patch in Python code rather than trying to figure out the C++ for fixing wxWidgets.
0
608
0
2
2011-01-19T01:08:00.000
python,menu,cross-platform,wxpython,menubar
Is it possible to align a menu to the right of the menu bar using wxPython?
0
1
1
4,763,966
1
0
0
I am working on Qtdesigner for generating a GUI for my python app. The problem is that I had manually made the widgets and then compiled it to py. But then I found out that the components did not resize when maximised. So I opened the .ui file in designer and selected the group box for my widgets and chose layout in gr...
true
4,737,324
1.2
0
0
0
To have the widgets resized with the window, you must apply a layout to your top-level object (usually QMainWindow), and then place your new widgets where you want in the layout (and maybe other layouts for a more complicated window). NOTE: the menu items allowing to apply a layout on the main window will be available ...
0
316
0
0
2011-01-19T15:47:00.000
python,qt,pyqt4,qt-designer
Help in designing layout with qtdesigner for python
0
1
1
4,741,509
1
0
0
HI, guys, I am using wxpython to develop a GUI for software configuration, launching and interaction. I want something like a CLI shell window (like pycrust) embedded inside the GUI to interact with a long-term running background process. I could give the input via this shell window and print the output on this window....
false
4,747,944
0.066568
0
0
1
In our product we have a console made up of two edit windows, separated by a thin line. The upper window is the output window, it is read-only. The lower window is editable. Once you have written a command in it and submitted it, the command is removed from the lower window and goes to the upper window, along with comm...
0
1,237
0
1
2011-01-20T13:53:00.000
shell,formatting,input,wxpython,wxwidgets
output readonly, input editable with wx.textctrl?
0
2
3
4,748,126
1
0
0
HI, guys, I am using wxpython to develop a GUI for software configuration, launching and interaction. I want something like a CLI shell window (like pycrust) embedded inside the GUI to interact with a long-term running background process. I could give the input via this shell window and print the output on this window....
false
4,747,944
0.066568
0
0
1
Just keep track of the location of the prompt each time you display it. Intercept all keypresses and releases, and if anything causes text before the prompt to change, veto that event. It's not that hard, it just takes a little attention to detail and some diligence to capture all text-modification events.
0
1,237
0
1
2011-01-20T13:53:00.000
shell,formatting,input,wxpython,wxwidgets
output readonly, input editable with wx.textctrl?
0
2
3
4,764,075
1
0
0
We are building an app where in there will be a need to display the updates/notification (ex : like status updates/wall posts on FB). These needs to be displyed at the lower right corner of the window(like any other notifications). So was trying on some alternatives to best display the updates. Some option explored are...
false
4,755,963
0
0
0
0
I second the ToasterBox suggestion. You can also create your own Dialog though and position it by grabbing the screen resolution and the size of the dialog and setting its position. I've done the latter for a custom popup. On Macs, you can access Growl through a Python API that's mentioned on their website.
0
2,743
0
4
2011-01-21T06:16:00.000
python,user-interface,wxpython
wxPython PopUp notifications
0
1
3
4,763,861
1
0
0
Considering the following requirementes: Must be supported on Windows. Preferably works also on other platforms. Must support multi threading. By that I mean that the engine can work in parallel in multiple threads. Readability is important. License must be compatible with closed-source projects. I like Python for ...
false
4,756,544
0.016665
0
0
1
Im pretty sure Stackless Python is going to be the only one supporting multithreading out the box. Stackless Python was chosen by CCP for their MMO: Eve-Online specifically because the stackless nature of the code allowed them to schedule the continuations on any OS thread they needed once they'd built the necessary pr...
1
4,208
0
17
2011-01-21T07:51:00.000
javascript,python,ruby,windows,lua
Which scripting language is better for embedding in multi-threaded C/C++ application
0
5
12
4,774,036
1
0
0
Considering the following requirementes: Must be supported on Windows. Preferably works also on other platforms. Must support multi threading. By that I mean that the engine can work in parallel in multiple threads. Readability is important. License must be compatible with closed-source projects. I like Python for ...
false
4,756,544
0
0
0
0
Entirely preference-based. Most languages have a way to embed in C with options for exports into the scripting environment. If it were me, I'd go with V8 Javascript.
1
4,208
0
17
2011-01-21T07:51:00.000
javascript,python,ruby,windows,lua
Which scripting language is better for embedding in multi-threaded C/C++ application
0
5
12
4,855,161
1
0
0
Considering the following requirementes: Must be supported on Windows. Preferably works also on other platforms. Must support multi threading. By that I mean that the engine can work in parallel in multiple threads. Readability is important. License must be compatible with closed-source projects. I like Python for ...
false
4,756,544
0
0
0
0
By "multithreaded" I'm assuming you mean "can effectively exploit multiple cores"? If your system only has a single CPU, then you're only going to be done one thing at a time regardless of the scripting language you choose. If you do decide to go the CPython route, then there the main thing to remember is that it is on...
1
4,208
0
17
2011-01-21T07:51:00.000
javascript,python,ruby,windows,lua
Which scripting language is better for embedding in multi-threaded C/C++ application
0
5
12
4,859,076
1
0
0
Considering the following requirementes: Must be supported on Windows. Preferably works also on other platforms. Must support multi threading. By that I mean that the engine can work in parallel in multiple threads. Readability is important. License must be compatible with closed-source projects. I like Python for ...
false
4,756,544
1
0
0
11
I've been in the same dilemma an choose Lua over Python and JScript. The thing which Lua does best is the great interop with C/C++ code using libraries like luabridge and luabind. That is, you can call lua from C++ and have the script call back into C++ without a problem, access c++ data from the script and vice versa...
1
4,208
0
17
2011-01-21T07:51:00.000
javascript,python,ruby,windows,lua
Which scripting language is better for embedding in multi-threaded C/C++ application
0
5
12
4,769,506
1
0
0
Considering the following requirementes: Must be supported on Windows. Preferably works also on other platforms. Must support multi threading. By that I mean that the engine can work in parallel in multiple threads. Readability is important. License must be compatible with closed-source projects. I like Python for ...
false
4,756,544
1
0
0
12
Lua is the best choice. Python, Ruby and JavaScript are big languages and they are not designed for to embed. But Lua is different, designed to embed. You should consider the "restriction" more than any other things for your script language. Embed scripts can use for hack (bad meaning) easily. For example, by default L...
1
4,208
0
17
2011-01-21T07:51:00.000
javascript,python,ruby,windows,lua
Which scripting language is better for embedding in multi-threaded C/C++ application
0
5
12
4,808,596
1
0
0
I want to draw a Grid World (similar to a table), where cells may contain robots or obstacles. A dot/arrow would do to represent the robot and colouring the cells in black for examples could represent the obstacles. I am not looking for anything complicated, just a simple python library that would help me do this. Any...
true
4,783,462
1.2
0
0
1
tkinter has a canvas widget that is pretty easy to work with. It has primitives for lines and filled polygons and circles and so on. And with the event loop its pretty easy to do simple animations.
1
3,612
0
3
2011-01-24T14:59:00.000
python,grid,draw
How to draw Grid World using Python
0
1
1
4,784,164
1
0
0
I have made an application using Python and recently i found that i can use py2exe to make executables for windows. The problem is that a library i am using (xmpppy) produces this error DeprecationWarning: the md5 module is deprecated; use hashlib instead and when i try to run the executable a dialog appears saying t...
false
4,793,250
-0.197375
0
0
-2
when a python script .py has any error it shows in console but when you run python .exe file it genrates .exe.log file when error accured.so go to your folder and see that there is a .exe.log file is there showing errors.
1
974
0
0
2011-01-25T12:03:00.000
python,pyqt4,xmpppy
PyQt4 - "See the log file for details" error
0
1
2
50,261,727
1
0
0
I am trying to build my first wx application I have a browse button in my panel, the user adds his file. i do some processing on the file. Now i want to show the information in a TextCtrl so that the user may modify it. Then i need to write it in a file. But I dont know how many TextCtrl box is needed before processing...
false
4,802,134
0
0
0
0
If all you're doing is showing one file, then all you need is one TextCtrl. I would give the widget the wx.TE_MULTILINE style and add it to a sizer with an EXPAND flag: sizer.Add(myTxtCtrl, 0, wx.EXPAND) Then the user can see the file and you can save the data with a Save button or menu item. The handler for that would...
0
439
0
0
2011-01-26T07:10:00.000
wxpython,textctrl
wxPython: TextCtrl problem
0
1
1
4,807,514
1
0
0
I'm using python 3 / tkinter if that matters. In looking at code samples I noticed that the main loop is typically in the GUI part of the code, and the rest of the code provides callbacks for GUI to call when needed. But my simulation runs independently of the user interaction; the UI is there to provide a view, from t...
false
4,812,323
0.066568
0
0
1
Write your own main loop that calls the functions that check for and process GUI events.
0
816
0
2
2011-01-27T03:02:00.000
python,design-patterns,user-interface,tkinter
Can the main loop of a program be moved out of GUI?
0
2
3
4,812,333
1
0
0
I'm using python 3 / tkinter if that matters. In looking at code samples I noticed that the main loop is typically in the GUI part of the code, and the rest of the code provides callbacks for GUI to call when needed. But my simulation runs independently of the user interaction; the UI is there to provide a view, from t...
true
4,812,323
1.2
0
0
2
Why not seperate your logic and presentation. Write your sim backend to respond to a single text based protcol to receive cmds and send back results, and then just talk to it from your gui program over e.g. unix sockets.
0
816
0
2
2011-01-27T03:02:00.000
python,design-patterns,user-interface,tkinter
Can the main loop of a program be moved out of GUI?
0
2
3
4,812,403
1
0
0
I'm using the pyBluez module on Python 2.6 on WindowsXP. I'd like to get the RSSI of other bluetooth devices around. I foudn some code but it makes use of _bluetooth, which I cannto find anywhere for Windows. Is it available / is there another way to circumvent the problem, getting the RSSI without using _bluetooth? Th...
false
4,815,088
0
1
0
0
The _bluetooth module is a part of PyBluez. If you have installed a Windows release of PyBluez, it should work. I don't know enough about Bluetooth to even know what "getting the RSSI without using it" means or why it should be a problem, so can't help you there. :)
0
1,917
0
1
2011-01-27T10:17:00.000
python,windows,bluetooth,rssi
RSSI with pyBluez on WindowsXP
0
1
3
4,815,494
1
0
0
I am currently taking a course on Compilers. I don't like the idea of blindly memorising facts without any sort of place to apply them to. I want to learn by hands-on doing. So, I would like to have the complete code of 3-4 compilers, possibly for languages with different syntax rules (python,c, c++, java) while worki...
false
4,818,779
0.066568
0
0
2
You can grab code for the Lua compiler from lua.org, they distribute full source, and you could also get GCC's source code, which is both C and C++ compiling.
1
1,318
0
1
2011-01-27T16:11:00.000
java,c++,python,parsing,compiler-construction
Good source code for compiler components
0
2
6
4,818,927
1
0
0
I am currently taking a course on Compilers. I don't like the idea of blindly memorising facts without any sort of place to apply them to. I want to learn by hands-on doing. So, I would like to have the complete code of 3-4 compilers, possibly for languages with different syntax rules (python,c, c++, java) while worki...
false
4,818,779
0
0
0
0
Your course on compilers should be giving you the pieces that will eventually lead to a full blown compiler. For example, the section on lexical analysis can lead to a component called the Lexer. If you keep an eye open to generics and re-usability, you can turn this into a component that can be used later in your c...
1
1,318
0
1
2011-01-27T16:11:00.000
java,c++,python,parsing,compiler-construction
Good source code for compiler components
0
2
6
4,820,418
1
0
0
I am trying to create a small application for Symbian mobile phones using Python. Being a beginner i am having some trouble in setting up the environment for development. I installed Symbian3 SDK,PyS60 Application Manager ( for creating the .sis files to be installed on phones) and python 2.5.2 . I created a small hell...
true
4,825,055
1.2
1
0
1
Open Application Manager on your Symbian phone, go to settings and select Software installation. Change it from Signed to All. This will allow you to install applications which don't have a certificate, such as the SIS file you just packaged. Also note that PythonForS60 2.0 works only with Python 2.5.
0
900
0
1
2011-01-28T05:11:00.000
python,symbian,pys60
Certificate Error on installing PythonForS60
0
1
1
4,825,096
1
0
0
I am trying to optimize the interaction between two scripts I have. Two things I thought of are the c++ program not terminating unless you manually kill it, or generating all info in python before feeding it to c++. Explanation of the problem: What the scripts do: C++ program (not made by me, and I can't program in c++...
false
4,826,896
0.039979
1
0
1
Firstly, just to be pedantic, there are no C++ scripts in normal use. C++ compiles, ultimately, to machine code, and the C++ program is properly referred to as a "program" and not a "script". But to answer your question, you could indeed set up the C++ program to stay in memory, where it listens for connections and sen...
0
2,200
0
1
2011-01-28T09:59:00.000
c++,python,optimization,interaction
Python and C++ script interaction
0
1
5
4,827,083
1
0
0
I need a QCombox which Items are filtered based on the text input. If I set the QCombobox editable, the user can insert text and the QCompleter is automatically created. But the items are not filtered and I don’t want the user to add new Items. Is there any possibility to add this functionality to the QCombobox?
false
4,827,207
0.197375
0
0
5
Both answers posted are correct, however they have a small bug wherein filtering the options in the combobox by typing then clicking a selection doesn't cause an activation signal to fire. You can fix this by placing self.activated[str].emit(self.itemText(index)) in on_completer_activated, on the line after self.setCur...
0
15,195
0
13
2011-01-28T10:32:00.000
python,qt,pyqt,qcombobox
How do I Filter the PyQt QCombobox Items based on the text input?
0
1
5
8,198,846
1
0
0
I want to draw arrows (that change size dynamically) within a Label or any other widget. I have these arranged as a grid. How can I do this? Would I need a Canvas? (not used yet ... currently just a grid of labels). I am using Python & Tkinter Gui library.
false
4,830,180
0
0
0
0
Tkinter does not support drawing on top of widgets. Your only choice for drawing arrows is to use a canvas. Your only other option is to draw directly on a image that is used by a label or button, but there's no support for that other than to set the value of individual pixels. Your only practical choice is to use a c...
0
1,937
0
0
2011-01-28T15:51:00.000
python,tkinter
Python Tkinter: Draw arrows within Label
0
1
3
4,840,199
1
0
0
I am quite confused about the stdin and the key_events of GUI widget. Usually in my mind, I thought stdin is the ordinary way to get the keyboard input for a process. E.g., If I have a process, then I could use stdin to have the keyboard inputs. And this is usually used to make I/O direction for the subprocess to get k...
true
4,854,486
1.2
0
0
2
When you type, the input comes from the GUI event mechanism, not from stdin. You asked how to get the "keyboard stdin", and the answer to that is the same as for any other type of program: you read it (but it will almost certainly be empty). It's important to realize that the GUI probably doesn't have a stdin if it was...
0
405
0
0
2011-01-31T18:18:00.000
user-interface,redirect,event-handling,wxpython,stdin
key_events of GUI widget and stdin
0
1
1
4,854,744
1
0
0
I can't seem to find the answer to this question anywhere. I realize that you have to use PyOpenGL or something similar to do OpenGL stuff, but I was wondering if its possible to do very basic 3D graphics without any other dependencies.
false
4,865,636
1
0
0
16
Well, if you can do 2d you can always do 3d. All 3d really is is skewed 2 dimensional surfaces giving the impression you're looking at something with depth. The real question is can it do it well, and would you even want to. After browsing the pyGame documentation for a while, it looks like it's just an SDL wrapper....
0
40,558
0
34
2011-02-01T17:08:00.000
python,3d,pygame
Does PyGame do 3d?
0
5
14
4,865,764
1
0
0
I can't seem to find the answer to this question anywhere. I realize that you have to use PyOpenGL or something similar to do OpenGL stuff, but I was wondering if its possible to do very basic 3D graphics without any other dependencies.
false
4,865,636
0
0
0
0
If you want to stick with a python-esque language when making games, Godot is a good alternative with both 2D and 3D support, a large community, and lots of tutorials. Its custom scripting language(gdscript) has some minor differences, but overall its mostly the same. It also has support for c# and c++, and has much mo...
0
40,558
0
34
2011-02-01T17:08:00.000
python,3d,pygame
Does PyGame do 3d?
0
5
14
66,323,924
1
0
0
I can't seem to find the answer to this question anywhere. I realize that you have to use PyOpenGL or something similar to do OpenGL stuff, but I was wondering if its possible to do very basic 3D graphics without any other dependencies.
false
4,865,636
0
0
0
0
Pygame is just a library for changing the color of pixels (and some other useful stuff for programming games). You can do this by blitting images to the screen or directly setting the colors of pixels. Because of this, it is easy to write 2D games with pygame, as the above is all you really need. But a 3D game is just ...
0
40,558
0
34
2011-02-01T17:08:00.000
python,3d,pygame
Does PyGame do 3d?
0
5
14
51,124,080
1
0
0
I can't seem to find the answer to this question anywhere. I realize that you have to use PyOpenGL or something similar to do OpenGL stuff, but I was wondering if its possible to do very basic 3D graphics without any other dependencies.
false
4,865,636
0.042831
0
0
3
Python Soya can render 3d graphics on pygame surfaces.
0
40,558
0
34
2011-02-01T17:08:00.000
python,3d,pygame
Does PyGame do 3d?
0
5
14
8,702,727
1
0
0
I can't seem to find the answer to this question anywhere. I realize that you have to use PyOpenGL or something similar to do OpenGL stuff, but I was wondering if its possible to do very basic 3D graphics without any other dependencies.
false
4,865,636
0.014285
0
0
1
It is easy to make 3D driver for PyGame. PyGame has some assets for 3D game development. I am developing Py3D driver using PyGame now. When I finish, I'll show you link to download Py3D. I tried to make 3D game with PyGame, and I needed just small addon for PyGame. It is wrong you think you must use SDL, PyOpenGL, Open...
0
40,558
0
34
2011-02-01T17:08:00.000
python,3d,pygame
Does PyGame do 3d?
0
5
14
50,873,427
1
0
0
I'm trying to create a little web server that loads, using webkit, an URL to extract some data from the web page (eg: title, images sizes...). I'm using PyQt4 to access from python to webkit. For each request, I'm creating a QThread that: - creates an QWebPage object, - run an event loop - when the loading of the webpa...
false
4,876,649
0.379949
0
0
2
I've managed to fix the issue: creating the QWebPage in the GUI thread (the thread of QApplication event loop) fixes the issue. It seems the second time a QWebPage is used, it tries to access to the browser cache (even if it has been disabled by configuration). But if the first QWebPage was not created in the main GUI ...
0
628
0
2
2011-02-02T15:54:00.000
python,qt,qt4,pyqt4,qtwebkit
Unable to use in the same application a QWebPage twice
0
1
1
4,885,477
1
0
0
I am trying to use PyQt4. I have downloaded its LINUX version and trying to install it with Cygwin(because I have windows on my PC and I want to use linux, therefore I am using Cygwin). I don't know how to install it ? please guide me . There is no such file like setup.py, install....what should I do??
false
4,877,959
0.379949
0
0
2
PyQt4 and Qt are cross-platform. If you write cross-platform code, you don't need to develop on any specific OS. Testing on different platforms from time to time is a good idea, but good cross-platform code will usually just work. Don't use any Windows-specific features, Windows-specific code. In particular, don't use ...
1
526
0
1
2011-02-02T17:53:00.000
python,linux,pyqt4
pyqt4 on Linux environment
0
1
1
4,878,854
1
0
0
I would like to know if it is possible to minimise my python program to the system tray. Basically what it does is at every hour it takes a screenshot but I don't want it to stay on the task bar taking space. Could I make it go to the system tray area next to the clock but keep it running? I am not using tkinter or any...
false
4,878,093
0
0
0
0
As opposed to having the program running continuously, why don't you use your system's scheduler? (Cron under *nix, Task Scheduler under windows). There might be a bit more overhead since it has to spin up Python each time, but it would be easier than hooking up a notification icon. Since you refer to it as the task ba...
1
2,796
0
2
2011-02-02T18:05:00.000
python
Minimize python to system tray in Windows (Vista)
0
2
3
4,878,220
1
0
0
I would like to know if it is possible to minimise my python program to the system tray. Basically what it does is at every hour it takes a screenshot but I don't want it to stay on the task bar taking space. Could I make it go to the system tray area next to the clock but keep it running? I am not using tkinter or any...
true
4,878,093
1.2
0
0
2
Since you are running on Windows, you may simply want to rename your script to have a .pyw extension, so there is no console window. If you try to make a system tray application, you will need to pick a GUI toolkit like you've suggested, and your simple script will become a LOT bigger and far more complicated.
1
2,796
0
2
2011-02-02T18:05:00.000
python
Minimize python to system tray in Windows (Vista)
0
2
3
4,878,236
1
0
0
Is there an equivalent to Tkinter's place geometry manager in wxPython? For those those that don't know, place allows the positioning of widgets based on x y or relative x y coordinates. I'm a fan of this geometry manager simply because it offers a lot of control over widget positioning.
false
4,885,296
-0.099668
0
0
-1
The GridBagSizer or FlexGridSizer are kind of like Tkinter's place. Of course, wx also supports absolute positions, although I do not recommend that.
0
231
0
1
2011-02-03T11:00:00.000
python,geometry,wxpython
Equivalent to Tkinter's place geometry manager in wxPython
0
2
2
4,888,025
1
0
0
Is there an equivalent to Tkinter's place geometry manager in wxPython? For those those that don't know, place allows the positioning of widgets based on x y or relative x y coordinates. I'm a fan of this geometry manager simply because it offers a lot of control over widget positioning.
true
4,885,296
1.2
0
0
1
I think the best answer is "no, there is no equivalent". You can use absolute positioning with the "pos" keyword argument in the constructor, but that doesn't come close to the power of place.
0
231
0
1
2011-02-03T11:00:00.000
python,geometry,wxpython
Equivalent to Tkinter's place geometry manager in wxPython
0
2
2
4,888,233
1
0
0
I have created a gtk window in init and then I process a new function and i append the values from new function to the gtk window till the second function completes, the window gets unresponsive and can become responsive when second function completes. can anyone tell me whet should i do for the same?
false
4,886,652
0.379949
0
0
2
Windows become unresponsive in gtk (and in windowing systems in general) when you call a function within the Event Loop, which is the thread in charge of keeping the window responsive (this thread repaints the window, handles mouse clicks, etc.). If the function you call returns immediately, you won't notice the unresp...
0
142
0
1
2011-02-03T13:17:00.000
python,gtk
python gtk problem
0
1
1
4,886,782
1
0
0
The idea is that I would have two or three different windows and I would like to open and close them automatically by calling a function (separate functions to open and close each window). The program itself would be running in the background but when a certain event happens it would call the window opening function. O...
false
4,890,257
0.197375
0
0
1
In wxWindows you just call the .destroy() method on the dialog/window to delete it. You don't have to move the mouse over it. That would make wxWindows apps very annoying. I suspect your problem is more related to trying to do something outside the wx event framework. Most GUIs are event driven, so if you've got other ...
0
149
0
0
2011-02-03T18:39:00.000
python
Opening and closing windows by calling a function?
0
1
1
4,890,390
1
0
0
I'm about to undertake a .NET project: We need to create a create a program that utilize some existing C# code, and I'm hoping to use IronPython. (I'm an experienced Python programmer, but a bit of a .NET newbie). My question is: Is IronPython a good fit for using mostly C# code, or would it be better just to use C#? ...
false
4,890,407
0.099668
0
0
1
If you are in a Windows environment for reasons beyond your control, there are a lot of advantages in using IronPython. Its just like Python, only .NET. Once you learn the idosyncratic elements of how to reference an assembly, how to instantiate objects, browse objects, etc. it is really nice. You don't need Visual ...
1
801
0
3
2011-02-03T18:54:00.000
c#,.net,python,ironpython
Using C# code in IronPython
0
2
2
4,892,791
1
0
0
I'm about to undertake a .NET project: We need to create a create a program that utilize some existing C# code, and I'm hoping to use IronPython. (I'm an experienced Python programmer, but a bit of a .NET newbie). My question is: Is IronPython a good fit for using mostly C# code, or would it be better just to use C#? ...
true
4,890,407
1.2
0
0
5
You'll need to compile the C# code into an assembly (DLL) you can use within IronPython. Once you do this, IronPython can use this just like any other .NET assembly. This is a common usage scenario for IronPython.
1
801
0
3
2011-02-03T18:54:00.000
c#,.net,python,ironpython
Using C# code in IronPython
0
2
2
4,890,442
1
0
0
I'm trying to develop a C-based application which embeds one or more Python interpreters. I'm using gtk-things in the C-parts, and logically calling gtk_main() within that. The Python interpreters are created in separate pthreads using Py_NewInterpreter(), and basically running forever (a 'while True' loop is added to ...
false
4,896,434
0
0
0
0
This is a situation where you are better off making one more Python interpreter and doing all your GTK work by sending Python snippets to that special GTK helper interpreter. That way your C code never uses GTK directly and you only need to worry about coordinating between the Python threads.
0
285
0
2
2011-02-04T09:30:00.000
python,c,multithreading,gtk,pygtk
pygtk and native gtk_main(); mixing
0
2
2
4,911,145
1
0
0
I'm trying to develop a C-based application which embeds one or more Python interpreters. I'm using gtk-things in the C-parts, and logically calling gtk_main() within that. The Python interpreters are created in separate pthreads using Py_NewInterpreter(), and basically running forever (a 'while True' loop is added to ...
false
4,896,434
0
0
0
0
This looks like a pretty long stack, and some of the functions called look the same. (For example, g_signal_emit is called repeatedly from itself via g_closure_invoke.) It looks to me like you may be causing a stack overflow, possibly by emitting a signal inside your callback that handles the signal, thus infinitely r...
0
285
0
2
2011-02-04T09:30:00.000
python,c,multithreading,gtk,pygtk
pygtk and native gtk_main(); mixing
0
2
2
4,911,173
1
0
0
I'm a 2nd year university student, and I thought it would be a good idea to expand my abilities. I will be using python later this year to complete a gui for a C program (using Tkinter), but I want to make a side project as well, and python seems like a great language to do it with. I want a project which has multipl...
false
4,898,747
0.066568
0
0
2
Writing a program will help you learn the language, but IMHO joining the development team of an open-source python project would help you learn even more, as reading high-quality code written by other developers will disclose to you features of the language that you would never discover alone. So, my suggestion is to h...
0
9,115
0
2
2011-02-04T13:57:00.000
python,project,pygtk
A good side-project for learning python?
0
2
6
4,898,798
1
0
0
I'm a 2nd year university student, and I thought it would be a good idea to expand my abilities. I will be using python later this year to complete a gui for a C program (using Tkinter), but I want to make a side project as well, and python seems like a great language to do it with. I want a project which has multipl...
true
4,898,747
1.2
0
0
10
Considering I have no python experience, but I do have a strong background in C and Java, are there going to be any difficulties which will unexpectedly stop me? Yes. I have never made a music application before, and I am not sure whats involved in keeping a music library, for example. That will stop you. Want adv...
0
9,115
0
2
2011-02-04T13:57:00.000
python,project,pygtk
A good side-project for learning python?
0
2
6
4,898,770
1
0
0
i've built a com component which utilizes libxml2 python bindings , the build is successfull but when i try to register the component i get "specified module could not be found , unable to load python dll" this is the error i get when the component is built using the bundle files option set as 1 if i build the componen...
false
4,899,158
0.197375
1
0
1
Most likely, regsvr32.exe which registers you COM component couldn't find a DLL that your COM component needs. I'm not familiar with Python COM components but is there some way you can run depends.exe on it? This is the usual way to track down binary dependency problems.
0
240
0
0
2011-02-04T14:33:00.000
python,com
python com component does not register when using libxml2 on win7
0
1
1
4,899,486
1
0
0
In order to indicate activity, some applications (e.g. Pidgin) highlight their entry in GNOME's Window List panel widget (e.g. via bold font or flashing color). This indication is reset automatically when the window is activated. I have a terminal application for which I would like to achieve the same thing (preferably...
false
4,906,424
0.099668
0
0
1
I'm not really into GTK programming, but as far as i know you want to set an "URGENT"-Flag for the Window which should be highlighted. Maybe this will get you any further. :)
0
495
1
1
2011-02-05T10:51:00.000
python,perl,gtk
highlighting a window in GNOME's window list
0
1
2
4,906,739
1
0
0
How can i set up icon for my existing program.exe and icon.ico ( in the same folder ) using some sort of hidden (settings) file ? Edit: i am aware of py2exe CustomIcon option, also about WinRar Sfx ... Question is: it is possible in this specific way i described ?
false
4,915,202
0
0
0
0
do it like this: If you dont have winrar then install it! Then right click on your program.exe and select "Add to archive...", under "Archiving options" select "Create SFX Archive". Now go to tab "Advanced" and click on "SFX Options" on "General tab" setup all you need and add "Run after extraction" (yourprogram.exe) u...
1
1,915
0
0
2011-02-06T18:22:00.000
python,icons,exe,ico
How to set up icon for a program?
0
1
2
4,915,328
1
0
1
I'm writing a program in Python. The first thing that happens is a window is displayed (I'm using wxPython) that has some buttons and text. When the user performs some actions, a plot is displayed in its own window. This plot is made with R, using rpy2. The problem is that the plot usually pops up on top of the mai...
true
4,938,556
1.2
0
0
5
Plot to a graphics file using jpeg(), png() or another device, then display that file on your wxWidget.
0
757
0
3
2011-02-08T21:17:00.000
python,r,plot,rpy2
How do I control where an R plot is displayed, using python and rpy2?
0
1
2
4,938,599
1
0
0
I have an image wiht gtk.gdk. I want to make it look grayed out, so I wanna do something like draw a gray rectangle over it with 50% alpha value. How would I do this? The docs are so confusing.
false
4,947,341
0
0
0
0
i just thought of a way taking half of the color's highest values and taking half of the number directly between them and putting that on the lowest number (Eg: 0,255,255 to 127,255,255 or 0,127,255 to 96,127,255) or taking the second highest number and the highest number, finding the 50%, putting that as the second h...
0
246
0
0
2011-02-09T16:03:00.000
python,pygtk,gtk,gdk
gtk.gdk: make image 50% grayer
0
1
1
22,739,002
1
0
0
I want to read data from a text field. The name of the text field is not defined of found in the other class with methods of reading the text field. The textfield is defined in the Design class. now how do I access this field from another class, so I can read data from it. Thanks!! Edit: I have 2 Classes: FeatureImport...
false
4,967,179
0
0
0
0
If the field's an ordinary attribute called text and your Design instance is called design, you can access (read/write) it from anywhere as design.text.
1
179
0
0
2011-02-11T09:01:00.000
python,pyqt
Python Referencing
0
2
2
4,968,555
1
0
0
I want to read data from a text field. The name of the text field is not defined of found in the other class with methods of reading the text field. The textfield is defined in the Design class. now how do I access this field from another class, so I can read data from it. Thanks!! Edit: I have 2 Classes: FeatureImport...
false
4,967,179
0
0
0
0
1. if object of FeatureImportCommonWidget class is created inside of MetaDataBrowser class, you can access your text field anywhere inside MetaDataBrowser class like this: FeatureImportCommonWidgetObjectName.placesGroupBox.text() 2 if object of FeatureImportCommonWidget class is created before MetaDataBrowser class,...
1
179
0
0
2011-02-11T09:01:00.000
python,pyqt
Python Referencing
0
2
2
17,676,533
1
0
0
Just wondering whether there is any provision/method to bind clicks on images/(or include a button) to result into some events. Also is there any kind of way to draw a StaticLine kind of thing in a RichTextCtrl in wxPython.
false
4,967,307
0
0
0
0
You can bind to a button if you like, you could use a bitmapbutton instead, or bind mouse events to your static bitmap. The wxPython demo has examples for all of these methods. With regards to the "StaticLine kinda thing", are you trying to resize the richtextctrl on demand? You might want to look at the ExpandoTextCtr...
0
239
0
1
2011-02-11T09:15:00.000
python,user-interface,wxpython,wxtextctrl,wx.textctrl
wxpython RichtextCtrl event bindings on buttons/images
0
1
1
5,696,978
1
0
0
Is there a fast python way to save all data in all widgets to file before app is close? And of course read it and restore after app is re-run?
true
4,972,429
1.2
0
0
4
QWidget.saveGeometry saves the geometry of an widget. QMainWindow.saveState saves the window's toolbars and dockwidgets. To save other things you can use pickle.
0
2,185
0
3
2011-02-11T18:01:00.000
python,pyqt
PyQt 4 - save all data in window to file on app close
0
1
2
4,974,374
1
0
0
I'd like to create a PyThreadState since there doesn't appear to be one for the current thread. How do I get the current PyInterpreterState to pass to PyThreadState_New(...), or is that something that I should only do if I'm embedding an interpreter (and thus have created it), rather than calling into a library from py...
true
4,987,579
1.2
0
0
1
It turns out that not having a PyThreadState in the main thread is a fatal error. It was caused for me by two different python versions both being linked at the same time, so this question is somewhat moot.
1
1,482
0
2
2011-02-13T23:16:00.000
python,c,multithreading,python-c-api
How do I get the current PyInterpreterState?
0
1
3
5,002,035
1
0
0
As a hobbyists who has a little experience making 2D games using PyGame, and has ventured into using C++ with the SDL library (in Visual Studio), I'm curious. Is the library used professionally?
false
4,993,101
0.291313
0
0
3
SDL is used professionally and some great games were made with it. Many times it is used as a cross-platform window creation system to initialize openGL (as I assume it is used for Doom3, UT, etc...). It is also used for as "raw" 2d graphics API (for example in Battle For Wesnoth).
1
769
0
4
2011-02-14T14:08:00.000
c++,python,sdl,pygame
Is C++ SDL and (Python PyGame) used by people other than hobbyists?
0
1
2
4,993,955
1
0
0
I'm writing a small cross-platform wxPython app, however on every platform I need to use some platform-specific API. On Mac OS it can be done using PyObjC. I'm searching for tutorial on how to use PyObjC. However, all I found so far were tutorials with Xcode. I want my app to be able to run on mac/win/lin, without cha...
false
4,994,058
0
0
0
0
What do you need Xcode for? If you need it for the windows/gui (*.nib, *.xib files), then you should perhaps search for 'creating *.nib, *xib without Xcode'. That's only a search hint and no satisfying answer.
1
3,791
0
6
2011-02-14T15:39:00.000
python,macos,wxpython,pyobjc
PyObjC tutorial without Xcode
0
1
2
5,071,853
1
0
0
I'm trying to make a small game that supports Python scripting. I've no problems with using the Python C-API, but I don't know how to ensure that the game will run on a computer with no Python installed. I know I need pythonXY.dll -- what else is there? When I try to run the program it tells me it cannot find encodings...
true
4,995,336
1.2
1
0
0
You need the encodings/__init__.py file, otherwise encodings is a folder and not a python package. Chances are that you'll need a lot of stuff from within the python standard library. To make everything just work you'll need to include the entire standard library along with your program. You can make this a bit better ...
1
258
0
2
2011-02-14T17:40:00.000
python,embed,python-c-api
C++ Python embedding: Run on machine with no Python?
0
1
1
4,995,435
1
0
0
I want to write a python script to convert PNG's into 2-page pdfs (i.e. 2 PNGs per PDF). The software needs to run on both a Mac and Windows 7. My current solution is using ReportLab, but that doesn't install easily on a Mac. According to its website, it only has a compiled version for Windows. It has a cross-platform ...
false
4,999,660
0.049958
0
0
1
PyCairo could be a good alternative. You'll have full control and less dependencies, but reportlab is a lot simplier.
1
8,947
0
6
2011-02-15T03:36:00.000
python,pdf-generation,reportlab
Using python to convert PNG's into PDF's
0
1
4
7,099,416
1
0
0
Have downloaded VLC.py, and placed it in my VLC install directory, where libvlc.dll is also present On typing import vlc I get the following error Traceback (most recent call last): File "C:\Program Files (x86)\VideoLAN\VLC\vlc.py", line 88, in dll = ctypes.CDLL('libvlc.dll') File "C:\Python27\lib\cty...
true
5,007,455
1.2
0
0
3
Reposting my comment as an answer, since it fixed the problem: I'm going to guess that the problem is trying to load a 32-bit DLL from a 64-bit process. You may be able to fix it by using a 32-bit Python build.
0
2,520
0
0
2011-02-15T17:55:00.000
python,vlc
VLC Python Bindings -- Error 193
0
1
1
5,033,072
1
0
0
What's the best way to draw rotated text rendered with fonts with pygame? I can just draw the font then rotozoom it, but it seems better result would be gotten if it were possible to draw the glyphs directly rotated, especially taking AA into account?
false
5,007,478
0
0
0
0
You can use a pyOpenGL surface in pygame, if that simplifies it for you. Pyglet also uses OpenGL. (for pygame surfaces) You can cache the rendered text, using that to rotate. Or pre-cache all 32 directions. [ see other answer ]
0
2,142
0
0
2011-02-15T17:57:00.000
python,fonts,rotation,render,pygame
draw rotated font with pygame
0
1
2
5,691,673
1
0
0
I have a wxPython app with one frame and one panel. On that panel are a number of static boxes, each of which has buttons and textboxes. I have just begun reading about sizers, but they seem like they might be more than what I need, or it could that they are exactly what I need but I don't know how to use them correct...
false
5,012,257
0.197375
0
0
1
For complex layouts, I sketch it out on a piece of paper. Then I draw boxes around the widgets in different ways to decide what sizers to use. You can nest pretty much any sizer inside another one. If the controls naturally fit in a grid, then using a grid sizer of some sort is probably alright. If not, then use BoxSiz...
0
301
0
1
2011-02-16T03:31:00.000
python,wxpython,boxsizer
Simple wxPython Frame Contents Resizing - Ratio?
0
1
1
5,018,264
1
0
0
Im currently working on a project with pygame and am in need of being able to view part of a surface, moving around, zooming in and out ect Can anyone recommend a way of achieving this efficently, i have it working in a convoluted method at the moment but it is too slow and reduces the game to about 1fps when zoomed ou...
false
5,014,993
0
0
0
0
For a game that I have never finished I used trigonometry to get the new drawing positions with a freely zoomed and turned camera (bit complicated). It didn't really take to much time to calculate but I think it is more efficient to use other libraries. But if you want some examples just ask.
0
7,328
0
5
2011-02-16T10:02:00.000
python,scroll,zooming,transform,pygame
Pygame zooming/scrolling window
0
2
3
13,349,846
1
0
0
Im currently working on a project with pygame and am in need of being able to view part of a surface, moving around, zooming in and out ect Can anyone recommend a way of achieving this efficently, i have it working in a convoluted method at the moment but it is too slow and reduces the game to about 1fps when zoomed ou...
false
5,014,993
0
0
0
0
You can use pygame with OpenGL, since you are already familiar with pygame. Otherwise pyglet is a similar opengl library.
0
7,328
0
5
2011-02-16T10:02:00.000
python,scroll,zooming,transform,pygame
Pygame zooming/scrolling window
0
2
3
7,509,780
1
0
0
I am trying automatically generate buttons to a menu using PIL in python. The button should be small rectangular and have a little gradient from one color to another, and a little text in it. Is PIL the best way to do this, or is Cairo a better alternative? Any suggestion to how I can accomplish this without having a i...
true
5,022,891
1.2
0
0
1
You can do this entirely with PIL if you start with a single pre-made white-to-black gradient image (that you've made in some other program) and then use the ImageChops module to manipulate this together with your primary image to get what you want. For example to if you want to fade from red to blue: multiply red by t...
0
413
0
1
2011-02-16T22:25:00.000
python,python-imaging-library,cairo
Generating a shaded button using PIL
0
1
2
5,024,687
1
0
0
For a computer architecture assignment, I am trying to replace a C++ library called "Sim" with something in Python. I am already using MyHDL for the simulator, but the C++ program has a nice interactive feature that lets students see the components connected together (gates, inputs, outputs, flip flops, etc.) and toggl...
false
5,038,022
0
0
0
0
wxPython and PyQt both are good option. I find Qt easy as compare to wxPython.
0
441
0
3
2011-02-18T05:40:00.000
python,wxpython,computer-architecture
Is wxPython good for a Hardware Simulator?
0
2
3
5,039,125
1
0
0
For a computer architecture assignment, I am trying to replace a C++ library called "Sim" with something in Python. I am already using MyHDL for the simulator, but the C++ program has a nice interactive feature that lets students see the components connected together (gates, inputs, outputs, flip flops, etc.) and toggl...
false
5,038,022
0.066568
0
0
1
wxPython or pyside (Qt python bindings) are both ideal for this. wx is a little better if you have any MFC experience, Qt is perhaps a more modern design.
0
441
0
3
2011-02-18T05:40:00.000
python,wxpython,computer-architecture
Is wxPython good for a Hardware Simulator?
0
2
3
5,038,058
1
0
0
I need to listen for certain keypresses in a python terminal program without pausing execution with raw_input. I've seen people use a few windows specific ways of listening for keystrokes and I've seen people use large modules like tkinter and pygame which I want to avoid. Is there a lightweight module out there that d...
false
5,044,073
1
0
0
6
Short answer: no Keypresses are system-dependent. They are interrupt-driven. They one of the basic things built into most modern OSes. They have different philosophies that can't be unified in a generic way without losing functionality. you might try- termios = unix, posix-style file-descriptor driven curses = por...
0
20,515
0
21
2011-02-18T16:48:00.000
python,keyboard-events
Python cross-platform listening for keypresses?
0
1
4
5,047,120
1