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
for python2.x py2app will do the work. But for python3 code which one is alternate to go ahead? Or is there any other way to get single .app file?
false
3,307,083
0
0
0
0
py2app claims to support Python 3, so you should be able to use it.
1
231
0
1
2010-07-22T08:38:00.000
python,macos,python-3.x
How to convert python3-pyqt code into .app file for mac os x?
0
1
1
5,049,583
1
0
0
When I compiled Python using PCBuild\build.bat I discovered that several Python external projects like ssl, bz2, ... were not compiled because the compiler did not find them. I did run the Tools\Buildbot\external.bat and it did download them inside \Tools\ but it looks that the build is not looking for them in this lo...
true
3,307,813
1.2
0
0
2
Tools\buildbot\external.bat must be run from py3k root, not from Tools\buildbot\ subdir as you did. Also to build release version of python with Tkinter support you have to edit or copy Tools\buildbot\external.bat to remove DEBUG=1 so it can build tclXY.dll/tkXY.dll (without -g suffix).
0
872
0
1
2010-07-22T10:20:00.000
python
How to compile Python with all externals under Windows?
0
1
1
3,683,128
1
0
0
Could someone tell me which is better of the two for bundling Python applications — cx_Freeze or PyInstaller? I'm looking for a comparison based on factors such as: Popularity (i.e. larger user base) Footprint of the built binary Cross platform compatibility Ease of use
false
3,307,966
1
0
0
26
I tried both for a current project and decided to use cx_freeze. I found it easier to get started. It has an option to bundle dependencies in a zip archive, which makes it easy to check that everything was properly included. I had trouble getting PyInstaller to include certain egg dependencies. It couldn't handle condi...
1
20,447
0
37
2010-07-22T10:45:00.000
python,pyinstaller,cx-freeze
Which is better - PyInstaller or cx_Freeze?
0
1
2
3,368,456
1
0
0
I am compiling on Ubuntu 10.04 LTS. The Perforce Python API uses their C++ API for some of it. So, I point the setup.py at the C++'s API directory using the --apidir= they say to use. When it starts to compile the C++, I get a whole load of errors (temporary error list link is now gone). No one else has had these error...
true
3,324,490
1.2
1
0
0
Woops! Forgot I still needed to install python-dev...
0
290
0
0
2010-07-24T09:08:00.000
c++,python,perforce
Perforce P4Python API Bug
0
1
1
3,324,560
1
0
0
Is there any difference in speed of copying files from one location to another betwen python or delphi or c++ ? I guess that all 3 laguages uses same or similar win api calls and that there is not much performance difference.
false
3,324,870
0.197375
1
0
1
Pythons shutil module does not use the Windows API, but instead uses an open/read/write loop. This may or may not be slower than using CopyFile(Ex). Please measure it, everything else is just guessing.
0
78
0
0
2010-07-24T11:17:00.000
python,windows,performance,comparison
python file copying
0
1
1
3,324,905
1
0
0
I'm a developer on a software project for Linux that uses Python and PyGTK. The program we are writing depends on a number of third-party packages that are available through all mayor distro repositories. One of these is a python binding (written in C) that allows our program to chat with a common C library. Unfortunat...
false
3,325,161
0.53705
0
0
3
As long as the ugly hack works, use it. It will have drawbacks local to your package. Additionally, you can phase it out (significantly) later by requiring a bug-free version of your dependency, when it is released and is available for some time so that distros have a chance to start shipping it.
0
115
0
2
2010-07-24T12:54:00.000
python,linux,repository,packaging
Bug in third-party dependency creates python packaging dilemma
0
1
1
3,325,182
1
0
0
I know how to make an image a button in Tkinter, now how do I make th image a toggle button similar to a radio button?
true
3,327,799
1.2
0
0
2
Use a checkbutton with "indicatoron" set to False. This will turn off the little checkbox so you only see the image (or text), and the relief will toggle between raised and sunken each time it is clicked. Another way is to use a label widget and manage the button clicks yourself. Add a binding for <1> and change the r...
0
1,795
0
0
2010-07-25T02:49:00.000
python,radio-button,toggle,tkinter
Making a Toggle Button with an image in Tkinter
0
1
2
3,327,963
1
0
0
I have a gtk TextView in a maximized window and I want to know how many characters a line can fit before you have to scroll.
false
3,328,241
0
0
0
0
(Friendly reminder, please stop putting answers in the comments, people.) To summarize: It depends on the size of the TextView, size of the window, size of the font, and as Alex Martelli said, the particular font and the usage of letters..."i" is a narrow letter, "m" is a wide letter, thus you can fit more "i"s than yo...
0
214
0
0
2010-07-25T06:03:00.000
python,gtk,pygtk
Get the length in characters of a PyGTK TextView
0
1
1
8,647,405
1
0
0
What are the usable tools? I am aware of wxformbuilder and wxGlade, but none of them seems to be complete yet.
false
3,329,762
0.132549
0
0
2
Here are a few of the most popular wxPython related GUI builders: Boa Constructor (mostly dead) wxGlade wxFormBuilder XRCed wxDesigner (not FOSS) Dabo - one of their videos shows a way to interactively design an app... I personally just use a Python IDE to hand code my applications. My current favorite IDE is Wing...
0
831
0
2
2010-07-25T15:30:00.000
python,wxpython,wxwidgets
What are the existing open-source Python WxWidgets designers?
0
2
3
3,345,554
1
0
0
What are the usable tools? I am aware of wxformbuilder and wxGlade, but none of them seems to be complete yet.
false
3,329,762
0.066568
0
0
1
afaik... none. I'll follow the answers to see if someone has one and try it of course but I'm not convinced this will be THAT useful. When using wxPython, you usually work with sizers (at least I think the results are better) so you don't really need to "place" the controls on the frame and I think a GUI "design" would...
0
831
0
2
2010-07-25T15:30:00.000
python,wxpython,wxwidgets
What are the existing open-source Python WxWidgets designers?
0
2
3
3,330,832
1
0
0
I am new to this post as well as to python GUI programming.I want to make a realtime graphical GUI in wxpython.My requirement is that i have to catch signals from a device and i have to display the data in graphical as well as in textual form.The system should be accurate and be specific with the time constraints.Pleas...
false
3,332,263
0
0
0
0
If you can connect to this mysterious device and receive data from it from Python, then you can display said data with wxPython or any other GUI toolkit. You don't really say what kind of data it is or what you want to display? Lines? Graphs? Or what? If it's just tabular data, use the wx.ListCtrl (or ObjectListView) w...
0
179
0
0
2010-07-26T04:48:00.000
user-interface,wxpython,real-time
Help : Realtime graphical interface in wxpython
0
1
1
5,598,605
1
0
0
I have an application where my DataFetch() class "Wraps" around my HBHTray() class for the purpose of interacting with the functions/variables of that class. Unfortunately, I can't seem to be able to get the code to continue execution after my DataFetch() class makes a instance of HBHTray and calls it, and on the Start...
true
3,336,457
1.2
0
0
0
Turns out the problem was that I couldn't find a working solution because I was utilizing the Thread module the wrong way and calling run() directly when I should have been calling start(). Because of that, I was thinking that nothing I did worked (especially with no error or complaint from anything) and figured it was...
0
356
0
0
2010-07-26T15:42:00.000
python,multithreading,pygtk,wrapper
Continuing code execution after a pygtk.main() in python
0
2
2
3,337,085
1
0
0
I have an application where my DataFetch() class "Wraps" around my HBHTray() class for the purpose of interacting with the functions/variables of that class. Unfortunately, I can't seem to be able to get the code to continue execution after my DataFetch() class makes a instance of HBHTray and calls it, and on the Start...
false
3,336,457
0
0
0
0
gobject.threads_init() does not magically put your things into separate threads. It only tells the library that you're going to use threads, and sets up some locking. You'll still have to create the threads yourself.
0
356
0
0
2010-07-26T15:42:00.000
python,multithreading,pygtk,wrapper
Continuing code execution after a pygtk.main() in python
0
2
2
3,336,490
1
0
0
I'm thinking of making some kind of experimental IDE for digital hardware design. So I can't decide witch platform to choose. I'm going to have text-editor with syntax highlighting, some vector graphics and lots of tabbed windows. My goals: 1. to make GUI using as less custom components as possible. 2. to make it as cr...
false
3,337,725
0.124353
0
0
5
Well, Mono does not come with the base of most Linux distributions. It's not a terribly lightweight dependency either, and I think Java is considerably more likely for people to already have. Would you plan on using "Winforms" with Mono? If so, and you don't have experience with Winforms, read about what others have...
1
6,247
0
9
2010-07-26T18:19:00.000
python,user-interface,ironpython,jython,cpython
CPython vs. Jython vs. IronPython for cross-platform GUI development
0
5
8
3,337,830
1
0
0
I'm thinking of making some kind of experimental IDE for digital hardware design. So I can't decide witch platform to choose. I'm going to have text-editor with syntax highlighting, some vector graphics and lots of tabbed windows. My goals: 1. to make GUI using as less custom components as possible. 2. to make it as cr...
false
3,337,725
0.049958
0
0
2
Take a look at comparable GUI's written in python/jython/ironpython. Look for programs that you like and find out what they use. I guess most if not all will be written in cpython + gtk or cpython + qt. I think all gui toolkits in python are cross platform.
1
6,247
0
9
2010-07-26T18:19:00.000
python,user-interface,ironpython,jython,cpython
CPython vs. Jython vs. IronPython for cross-platform GUI development
0
5
8
3,337,760
1
0
0
I'm thinking of making some kind of experimental IDE for digital hardware design. So I can't decide witch platform to choose. I'm going to have text-editor with syntax highlighting, some vector graphics and lots of tabbed windows. My goals: 1. to make GUI using as less custom components as possible. 2. to make it as cr...
false
3,337,725
0.124353
0
0
5
I'd say that if cross-platform is a goal, forget IronPython. A lot of people hate the dependency hell it causes so it'll be too much work to get it up in running in some OSes/distributions. Jython will suffer this also, albeit to a lesser degree.
1
6,247
0
9
2010-07-26T18:19:00.000
python,user-interface,ironpython,jython,cpython
CPython vs. Jython vs. IronPython for cross-platform GUI development
0
5
8
3,337,744
1
0
0
I'm thinking of making some kind of experimental IDE for digital hardware design. So I can't decide witch platform to choose. I'm going to have text-editor with syntax highlighting, some vector graphics and lots of tabbed windows. My goals: 1. to make GUI using as less custom components as possible. 2. to make it as cr...
false
3,337,725
0.049958
0
0
2
Java is the most portable platform. Jython is written in 100% pure Java. 'Nuff said. BTW I just switched a CPython/GTK project to Jython (trying to remove as much unmanaged code as possible), the only problem is that Jython is at 2.5 still, which kind of sucks when you're used to 2.6/2.7/3 :)
1
6,247
0
9
2010-07-26T18:19:00.000
python,user-interface,ironpython,jython,cpython
CPython vs. Jython vs. IronPython for cross-platform GUI development
0
5
8
3,341,283
1
0
0
I'm thinking of making some kind of experimental IDE for digital hardware design. So I can't decide witch platform to choose. I'm going to have text-editor with syntax highlighting, some vector graphics and lots of tabbed windows. My goals: 1. to make GUI using as less custom components as possible. 2. to make it as cr...
false
3,337,725
0.024995
0
0
1
There are plenty of answers already, but I'd like to add one important thing - regardless of which library you learn, most of the principles will be the same when you move to another library. I don't know about Qt, but for most graphics programs (in PyGTK or Tkinter) the best thing to do, as far as editing goes, is to ...
1
6,247
0
9
2010-07-26T18:19:00.000
python,user-interface,ironpython,jython,cpython
CPython vs. Jython vs. IronPython for cross-platform GUI development
0
5
8
3,337,836
1
0
0
i was wondering how to update a StaticText dynamically in wxpython? I have a script that goes every five minutes and reads a status from a webpage, then prints using wxpython the status in a static input. How would i dynamically, every 5 minutes update the statictext to reflect the status? thanks alot -soule
false
3,339,263
0.099668
0
0
1
Call the SetLabel method in your static text instance. So you don't run into conflict with the size, make sure your StaticText instance is created with enough space to write the future labels you'll want to write to it.
0
12,769
0
5
2010-07-26T21:50:00.000
python,wxpython,refresh
Dynamically update wxPython staticText
0
1
2
3,339,765
1
0
0
Just wondering if there is any kind of framework or method of making a Gui that will override (Stay on top of) all other windows in python. Including Games or other programs that seem to "Take over" the computers Graphical processes. Any point in the right direction would be much appreciated... PS. The OS in question i...
false
3,340,639
0
0
0
0
For a cross-platform solution, you could use wxPython with a wxSTAY_ON_TOP style bit in a main window. I believe that this will give you the behavior you desire on Mac and Unix GUIs as well as Microsoft Windows ones.
1
99
0
0
2010-07-27T03:55:00.000
python,user-interface
GUI's Over Running Programs in python
0
1
2
3,340,779
1
0
0
What's a good way to handle fatal errors - missing packages, .ui files not compiled, Qt DLLs or shared objects not found, etc. - in a PyQt app (or other Python app)? Displaying a cross-platform message box without Qt DLLs or shared objects seems like a lot of work. Dumping a message to the console seems not very helpf...
true
3,358,759
1.2
0
0
1
The distutils model handles installing a python app correctly, or there is a third party setuptools package that is even easier for end users.
1
67
0
0
2010-07-29T01:04:00.000
python,installation,error-handling,pyqt,packages
Handling missing packages or DLLs in a PyQt app
0
1
1
3,358,864
1
0
0
I was wondering how to hide/delete a StaticText in wxPython?
false
3,367,986
0
0
0
0
statictext.Show to show and statictext.Hide to hide
0
3,670
0
4
2010-07-30T00:37:00.000
python,wxpython,hide
Hide/Delete a StaticText in wxPython
0
3
3
22,358,518
1
0
0
I was wondering how to hide/delete a StaticText in wxPython?
true
3,367,986
1.2
0
0
5
Have you tried control.Hide() or control.Show(False)?
0
3,670
0
4
2010-07-30T00:37:00.000
python,wxpython,hide
Hide/Delete a StaticText in wxPython
0
3
3
3,368,074
1
0
0
I was wondering how to hide/delete a StaticText in wxPython?
false
3,367,986
0.321513
0
0
5
The widget's Hide/Show methods should work. If the widget is in a sizer, then you can use the sizer's Detach method to "hide" it but not destroy it. Otherwise, the sizer has a Remove method that will remove the widget and destroy it. And there's the widget's own Destroy method.
0
3,670
0
4
2010-07-30T00:37:00.000
python,wxpython,hide
Hide/Delete a StaticText in wxPython
0
3
3
3,371,640
1
1
0
Are there any examples how to authenticate your desktop Facebook application using PyQT and embedded webkit? This is to provide better user experience than opening Facebook authentication page in a separate browser window.
true
3,371,549
1.2
0
0
0
I don't believe you can open an "authentication page" in a separate window under Facebook's terms (I used to work for Zynga, and we couldn't then, so I don't know how you'd achieve this now legally). Second, you're looking into the QWebkit backwards I believe. From a UI perspective this is supposed to provide access t...
0
640
0
4
2010-07-30T12:51:00.000
python,facebook,webkit,pyqt
pyqt, webkit and facebook authentication?
0
1
1
5,099,848
1
0
0
i have a scene with a multiple (QGraphicsTextItem)s, and i need to have control over their colors , so how to change a color of a QGraphicsTextItem ? is it possible anyway? i've been trying for 3 days until now . please help thanks in advance
false
3,377,439
0.197375
0
0
2
setDefaultTextColor(col) "Sets the color for unformatted text to col." The documentation is not clear about what "unformatted text" means. I think it means: "all portions of the contents of the item that have not been styled." The contents is a QTextDocument. You style a part of a document using a QTextCursor. You ca...
0
8,684
0
10
2010-07-31T08:52:00.000
python,qt,qt4,pyqt
how to change the color of a QGraphicsTextItem
0
1
2
12,565,371
1
0
0
I have a WxPython app that, among other things, has a integrated file-browser. I want to be able to create a system-default file context menu (e.g. what you get if you right-click on a file in windows explorer) when a user right clicks on one of the items within my application. Note: I already know how to create my own...
false
3,380,986
0
0
0
0
If you have python win32 installed, then look under the directory <PYTHON>/lib/site-packages/win32comext/shell/demos/servers. This contains a file context_menu.py which has sample code for creating a shell extension. Update: I think you want the folder_view.py sample.
0
741
0
0
2010-08-01T06:20:00.000
python,user-interface,windows-xp,wxpython
Create Explorer.exe's File - Context Menu in WxPython application
0
1
1
3,380,995
1
0
0
I hope to load .net dll in ironpython. But one of static functions in .net dll, has some Named and Optional Arguments. like, Draw(weight:w,height:h, Area=1) Only can I use full arguments?
true
3,384,989
1.2
0
0
6
Named and optional parameters are fully supported. .NET has had these for a long time for VB.NET support and so IronPython has supported that same way to do them since the beginning. The new C# syntax maps to the same underlying metadata as the old VB support. For calling you use f(x = 42) which is Python's named par...
1
1,159
0
3
2010-08-02T04:28:00.000
.net,ironpython,optional-parameters,named-parameters
Can I use Named and Optional Arguments in ironpython
0
1
2
3,401,635
1
0
0
Im planing to do some GUI development using pyqt4 pykde and python3.1 on Kubuntu 10.4. In the research I did I found out that most of the things are available as packages in repositories and some of the packages are preinstalled. Only thing is I'm not able to figure out what to install and what not to. Can someone plea...
false
3,385,013
0
0
0
0
I guess you need python-qt4 qt4-designer qt4-dev-tools.
1
333
0
2
2010-08-02T04:35:00.000
python,linux,pyqt4,kubuntu
pyqt installation question
0
1
2
3,460,599
1
0
0
I'm working on a project using Tkinter and Python. In order to have native theming and to take advantage of the new widgets I'm using ttk in Python 2.6. My problem is how to allow the user to scroll through the tabs in the notebook widget (a la firefox). Plus, I need a part in the right edge of the tabs for a close but...
false
3,386,098
0
0
0
0
I've never used these widgets so I have no idea how possible this is, but what I would try is something akin to the grid_remove() method. If you can move the tabs to an invisible widget, or just make them invisible without losing content, that's what I'd look for/try.
0
1,350
0
1
2010-08-02T08:20:00.000
python,user-interface,tkinter,ttk
Using the ttk (tk 8.5) Notebook widget effectively (scrolling of tabs)
0
2
2
3,389,225
1
0
0
I'm working on a project using Tkinter and Python. In order to have native theming and to take advantage of the new widgets I'm using ttk in Python 2.6. My problem is how to allow the user to scroll through the tabs in the notebook widget (a la firefox). Plus, I need a part in the right edge of the tabs for a close but...
true
3,386,098
1.2
0
0
2
The notebook widget doesn't do scrolling of tabs (or multiple layers of them either) because the developer doesn't believe that they make for a good GUI. I can see his point; such GUIs tend to suck. The best workaround I've seen is to have a panel on the side that allows the selection of which pane to display. You can ...
0
1,350
0
1
2010-08-02T08:20:00.000
python,user-interface,tkinter,ttk
Using the ttk (tk 8.5) Notebook widget effectively (scrolling of tabs)
0
2
2
3,650,157
1
0
0
I'm working for small company, which operates in the automation industry. The boss hired me because he wants to sell/give some desktop applications to his current costumers. He imposes me to use the Netbeans Platform (a generic desktop application framework). A software engineer friend of his advised him to choose this...
false
3,386,377
0.066568
0
0
3
First, results speak for themselves: if you can piece together another version of one of your applications in pyqt, and tell him how long it took, it might be motivation enough. Or, next time you're starting a project, you could prototype four or five different versions of the interface in pyqt in the morning, ask his ...
0
874
0
5
2010-08-02T09:07:00.000
java,python,netbeans,pyqt
How to convince boss to substitute Java/Netbeans Platform for Python/PyQt?
0
9
9
3,386,409
1
0
0
I'm working for small company, which operates in the automation industry. The boss hired me because he wants to sell/give some desktop applications to his current costumers. He imposes me to use the Netbeans Platform (a generic desktop application framework). A software engineer friend of his advised him to choose this...
false
3,386,377
0
0
0
0
Just use Netbeans as an IDE and he'll never notice :P Speaking more seriously: a side by side comparison of strong and weak points behind each of technologies will certianly be more convincing. Just don't cheat too much in favor of Python ;)
0
874
0
5
2010-08-02T09:07:00.000
java,python,netbeans,pyqt
How to convince boss to substitute Java/Netbeans Platform for Python/PyQt?
0
9
9
3,386,403
1
0
0
I'm working for small company, which operates in the automation industry. The boss hired me because he wants to sell/give some desktop applications to his current costumers. He imposes me to use the Netbeans Platform (a generic desktop application framework). A software engineer friend of his advised him to choose this...
true
3,386,377
1.2
0
0
12
If your selling skills are not working in discussion format I highly suggest that you document it. Some managers/bosses really respond well to this. Make a matrix of all the metrics that you yourself use to grade the two frameworks (I leave the level of objectivity to you there: for example if objective it should analy...
0
874
0
5
2010-08-02T09:07:00.000
java,python,netbeans,pyqt
How to convince boss to substitute Java/Netbeans Platform for Python/PyQt?
0
9
9
3,386,436
1
0
0
I'm working for small company, which operates in the automation industry. The boss hired me because he wants to sell/give some desktop applications to his current costumers. He imposes me to use the Netbeans Platform (a generic desktop application framework). A software engineer friend of his advised him to choose this...
false
3,386,377
0.022219
0
0
1
Perhaphs showing him a)Time spent in developing in Python and Java b)lines of code in Python and Java with these two metrics maybe you can make your case stronger
0
874
0
5
2010-08-02T09:07:00.000
java,python,netbeans,pyqt
How to convince boss to substitute Java/Netbeans Platform for Python/PyQt?
0
9
9
3,386,699
1
0
0
I'm working for small company, which operates in the automation industry. The boss hired me because he wants to sell/give some desktop applications to his current costumers. He imposes me to use the Netbeans Platform (a generic desktop application framework). A software engineer friend of his advised him to choose this...
false
3,386,377
0.110656
0
0
5
The basic problem here is that your non-technical boss is getting conflicting advice from you and from the friend who advised him in the first place. If you want him to take your advice seriously you need to prove that your advice is likely to be trustworthy. And that will only come with taking the lead and being suc...
0
874
0
5
2010-08-02T09:07:00.000
java,python,netbeans,pyqt
How to convince boss to substitute Java/Netbeans Platform for Python/PyQt?
0
9
9
3,386,477
1
0
0
I'm working for small company, which operates in the automation industry. The boss hired me because he wants to sell/give some desktop applications to his current costumers. He imposes me to use the Netbeans Platform (a generic desktop application framework). A software engineer friend of his advised him to choose this...
false
3,386,377
0.022219
0
0
1
I would guess a lot, in terms of risk management, would depend on the separation/isolation of the various softwares you develop, and their life cycle. If you don't need to further a central set of libraries, or have (or can develop) Python bindings for those, and the projects are relatively self contained, say a turn a...
0
874
0
5
2010-08-02T09:07:00.000
java,python,netbeans,pyqt
How to convince boss to substitute Java/Netbeans Platform for Python/PyQt?
0
9
9
3,387,150
1
0
0
I'm working for small company, which operates in the automation industry. The boss hired me because he wants to sell/give some desktop applications to his current costumers. He imposes me to use the Netbeans Platform (a generic desktop application framework). A software engineer friend of his advised him to choose this...
false
3,386,377
0.022219
0
0
1
Have you emphasised the point of the lower development time. Any person that doesn't want a shorter turn around time is an idiot. This is the only main issue i can think for the change. Or what you could do is develop it on the side and when you have errors say this is what i have been doing in my spare time(have a wor...
0
874
0
5
2010-08-02T09:07:00.000
java,python,netbeans,pyqt
How to convince boss to substitute Java/Netbeans Platform for Python/PyQt?
0
9
9
3,386,396
1
0
0
I'm working for small company, which operates in the automation industry. The boss hired me because he wants to sell/give some desktop applications to his current costumers. He imposes me to use the Netbeans Platform (a generic desktop application framework). A software engineer friend of his advised him to choose this...
false
3,386,377
1
0
0
8
The problem is that development time is usually nothing compared to maintenance. Who cares if it takes two days instead of four if the app has a 1-5 year lifetime? You'll have to convince him that if you get hit by a truck or leave the company (perhaps to work for somebody who uses Python exclusively) that he won't be...
0
874
0
5
2010-08-02T09:07:00.000
java,python,netbeans,pyqt
How to convince boss to substitute Java/Netbeans Platform for Python/PyQt?
0
9
9
3,386,487
1
0
0
I'm working for small company, which operates in the automation industry. The boss hired me because he wants to sell/give some desktop applications to his current costumers. He imposes me to use the Netbeans Platform (a generic desktop application framework). A software engineer friend of his advised him to choose this...
false
3,386,377
0.044415
0
0
2
Some people will tell you to try to convince your boss verbally. Others will tell you to document the time savings you think you can make. My opinion is that you just go ahead and do it. Do it in your own time if you strongly believe its in your best interests. I'm yet to meet a software manager who turned down a worki...
0
874
0
5
2010-08-02T09:07:00.000
java,python,netbeans,pyqt
How to convince boss to substitute Java/Netbeans Platform for Python/PyQt?
0
9
9
3,387,872
1
0
0
HI all I am trying to use SWIG to export C++ code to Python. The C sample I read on the web site does work but I have problem with C++ code. Here are the lines I call swig -c++ -python SWIG_TEST.i g++ -c -fPIC SWIG_TEST.cpp SWIG_TEST_wrap.cxx -I/usr/include/python2.4/ gcc --shared SWIG_TEST.o SWIG_TEST_wrap.o -o _SWIG...
true
3,387,663
1.2
1
0
4
It looks like you aren't linking to the Python runtime library. Something like adding -lpython24 to your gcc line. (I don't have a Linux system handy at the moment).
0
886
0
2
2010-08-02T12:20:00.000
c++,python,swig
using SWIG with C++
0
1
3
3,393,617
1
0
0
I'd like to implement my own key command. However when I do, it does both what I tell it and the default command. How do I disable the default command, so that my command is the only one that runs? This is on Windows 7, BTW.
true
3,400,622
1.2
0
0
2
Put return 'break' at the end of your event handling function. This tells Tkinter not to propagate the event to default handlers.
0
226
0
0
2010-08-03T20:44:00.000
python,windows,keyboard-shortcuts,tkinter
How do I disable default Tkinter key commands?
0
1
1
3,401,235
1
0
0
If I call QApplication's init without arguments i get TypeError: arguments did not match any overloaded call: QApplication(list-of-str): not enough arguments QApplication(list-of-str, bool): not enough arguments QApplication(list-of-str, QApplication.Type): not enough arguments QApplication(Display, int visual...
true
3,419,282
1.2
0
0
3
TypeError is just another Exception. You can take *args **kwargs, check those, and raise a TypeError yourself, specify the text displayed - e.g. listing the expected call. That being said, PyQt is a bunch of .pyd == native python extension, written in C or C++ (using Boost::Python). At least the latter supports "real" ...
1
1,044
0
1
2010-08-05T21:24:00.000
python,overloading
Python method overload based on argument count?
0
2
2
3,419,420
1
0
0
If I call QApplication's init without arguments i get TypeError: arguments did not match any overloaded call: QApplication(list-of-str): not enough arguments QApplication(list-of-str, bool): not enough arguments QApplication(list-of-str, QApplication.Type): not enough arguments QApplication(Display, int visual...
false
3,419,282
0
0
0
0
It's quite possible that its init is simply using __init__(self, *args, **kwargs) and then doing its own signature testing against the args list and kwargs dict.
1
1,044
0
1
2010-08-05T21:24:00.000
python,overloading
Python method overload based on argument count?
0
2
2
3,419,307
1
0
0
I have a Panel with a bunch of pictures placed on it in a GridSizer layout. How can I draw a highlighted color around the edge of an image or its border to show that it has been selected upon a mouse click event?
false
3,431,154
0
0
0
0
You could put each picture in a panel, and use SetBackgroundColour()to set the background color of the panel.
0
233
0
1
2010-08-07T16:25:00.000
python,wxpython
wxPython: Highlight item in GidSizer upon mouse click
0
1
2
3,431,426
1
0
0
I'm working on a form using wxPython where I want want listctrl's list of values to change based on the selection of another listctrl. To do this, I'm using methods linked to the controlling object's EVT_LIST_ITEM_SELECTED and EVT_LIST_ITEM_DESELECTED events to call Publisher.sendMessage. The control to be changed ha...
false
3,441,991
0
0
0
0
You can try EVT_LIST_ITEM_RIGHT_CLICK. That should work. Otherwise you'd want to use a flag and check said flag every time the selection event fires to see if it needs to query the database or not. There's also the UltimateListCtrl, a pure python widget, that you can probably hack to do this too.
0
940
0
3
2010-08-09T16:12:00.000
python,wxpython,listctrl
Respond to Listctrl change exactly once
0
1
3
3,442,559
1
0
0
I made a GUI with Tkinter, now how do I make it so when a key command will execute a command even if the Tkinter window is not in focus? Basically I want it so everything is bound to that key command. Example: Say I was browsing the internet and the focus was on my browser, I then type Ctrl + U. An event would then r...
false
3,445,867
0.379949
0
0
2
Tkinter, on its own, cannot grab keystrokes that (from the OS's/WM's viewpoint) were directed to other, unrelated windows -- you'll need to instruct your window manager, desktop manager, or "operating system", to direct certain keystrokes differently than it usually does. So, what platform do you need to support for t...
0
515
0
1
2010-08-10T03:43:00.000
python,binding,tkinter
Key commands in Tkinter
0
1
1
3,445,919
1
0
0
OK, I'm trying to explain what I want to achieve in another way. Here's an example: Say if it's an anti virus program, and user can choose between two ways to run the program, choice one, automatically start to scan disks for virus when the program starts up, choice two, hit the start button to make the program scan di...
false
3,450,525
0
0
0
0
In your init or OnInit method, do some kind of check to see if the program should run the startup process on startup (i.e. check a config file or some such). If yes, call the "scan" method using wx.CallAfter or wx.CallLater or call it after you Show() the frame.
0
372
0
0
2010-08-10T15:19:00.000
python,event-handling,wxpython
Is there a wxpython event like program_start?
0
2
3
3,451,727
1
0
0
OK, I'm trying to explain what I want to achieve in another way. Here's an example: Say if it's an anti virus program, and user can choose between two ways to run the program, choice one, automatically start to scan disks for virus when the program starts up, choice two, hit the start button to make the program scan di...
false
3,450,525
0.066568
0
0
1
Why don't you run it just in module code? This way it will be run only once, because code in module is run only once per program instance.
0
372
0
0
2010-08-10T15:19:00.000
python,event-handling,wxpython
Is there a wxpython event like program_start?
0
2
3
3,450,557
1
0
0
Is it possible to customize ProgressDialog in wxPython? For instance, I would like to make the progressbar slimmer, and the window size wider. SetSize() method doesn't appear to have any effect.
true
3,452,986
1.2
0
0
1
The wx.ProgressDialog isn't customizable its just a wrapper around the native ProgressDialog, the the easiest solution would be to roll your own by extending the wx.Dialog class and using a wx.Gauge
0
352
0
0
2010-08-10T20:09:00.000
python,wxpython,progress-bar
How to customize wx.ProgressDialog?
0
1
1
3,453,038
1
0
0
suppose a C++ class has several constructors which are overloaded according the number and type and sequences of their respective parameters, for example, constructor(int x, int y) and constructor(float x, float y, float z), I think these two are overloaded methods, which one to use depends on the parameters, right? So...
false
3,476,387
0.148885
0
0
3
Usually, you're fine with any combination of slightly altered design default arguments (def __init__(self, x = 0.0, y = 0.0, z = 0.0)) use of polymorphism (in a duck-typed language, you don't need an overload for SomeThing vs SomeSlightlyDifferentThing if neither inherits from the other one, as long as their interface...
1
251
0
1
2010-08-13T11:35:00.000
c++,python,constructor,overloading
C++ methods overload in python
0
1
4
3,476,486
1
0
0
I want the text of the ListBox to be centered, is that possible?
true
3,483,179
1.2
0
0
1
No, the default ListBox won't work for that. Try the VListBox instead.
0
434
0
0
2010-08-14T12:03:00.000
python,listbox,wxpython,center,alignment
How to align the text in a wx.ListBox using wxPython?
0
1
1
3,506,756
1
0
0
Is it possible to use PyQt from IronPython? From what I've read IronPython should work with CPython compatible libraries but out of the box it doesn't seem to work. If it is possible, will code completion work?
false
3,483,492
0.132549
0
0
2
Hope someone else who spent more time messing around with this comes by and gives you qualified, ambiguous answer, but here is some questionable insight from my personal experience: PyQt relates to cPython in a way that is very different than .Net relates to IronPython. While IronPython is built on TOP of .Net, PyQt is...
0
2,411
0
2
2010-08-14T13:25:00.000
ironpython,pyqt
Using PyQt from IronPython
0
1
3
3,490,601
1
0
0
I'm working on a GUI program in which I already bind a start button with one event, and when I click the start button, the event runs as I like. My question is, if I want my program to start the event immediately after the GUI program starts, which means the start button is immediately being "clicked" once the program ...
false
3,483,675
0
0
0
0
In the __init__( ) for your main frame put this: wx.CallAfter( func_name )
0
205
0
0
2010-08-14T14:11:00.000
python,event-handling,wxpython
How to make a event run immediately after a GUI program starts in wxpython?
0
2
2
41,389,878
1
0
0
I'm working on a GUI program in which I already bind a start button with one event, and when I click the start button, the event runs as I like. My question is, if I want my program to start the event immediately after the GUI program starts, which means the start button is immediately being "clicked" once the program ...
true
3,483,675
1.2
0
0
1
In the main frame constructor set a one-shot timer with interval 0 that fires the event.
0
205
0
0
2010-08-14T14:11:00.000
python,event-handling,wxpython
How to make a event run immediately after a GUI program starts in wxpython?
0
2
2
3,483,688
1
0
0
How do I get a widget's "name"? When I define a GUI using Glade, I can "name" the widgets of the window but how do I recover that property when I have a widget object instance? I've tried get_property(), get_name() and $widget.name to no avail. Update: I am using GtkBuilder file format (i.e. XML format). Resolution: a ...
false
3,489,520
0
0
0
0
Given the widget w, what does w.get_name() return? If None, that means the widget has no name property. Maybe you want gtk.glade.get_widget_name(w) instead? (I'm not sure if the name property of the widget and the name for it in the Glade XML from which it was created are the same thing...).
0
4,906
0
10
2010-08-15T22:25:00.000
python,gtk
Python GTK+ widget name
0
1
3
3,489,566
1
0
0
What is the format of the parameter activate_time in Python GTK+ when using Gtk.Menu.popup() method? I have tried using int(time.time()) but I get a traceback saying an integer is required...
true
3,494,587
1.2
0
0
1
I found out I can use gtk.get_current_event_time() to get a reasonable timestamp matching what Gtk looks like it expects.
0
132
0
0
2010-08-16T15:22:00.000
python,gtk
Format of activate_time in Gtk.Menu
0
1
2
3,495,112
1
0
0
I render a huge SVG file with a lot of elements with Cairo, OpenGL and rsvg. I draw svg on cairo surface via rsvg and create an OpenGL texture to draw it. Everything is fine. And now I have to interact with elements from SVG. For example, I want to guess an element by coordinates. And I want to change the background of...
false
3,501,215
0
0
0
0
I had to do the same (changing element color for instance), and had to modify rsvg library because all those nice features exist but they are hidden. You have to make a new interface to link to the nice features.
0
3,978
0
3
2010-08-17T09:51:00.000
python,opengl,svg,cairo,rsvg
SVG interaction in python with cairo, opengl and rsvg
0
1
3
37,703,846
1
0
0
I'm writing an e-book reader in Python + wxPython, and I'd like to find out how many lines of text can be displayed in a given RichTextCtrl with the current formatting without scrolling. I thought of using and dividing the control's height by RichTextCtrl.GetFont().GetPixelSize(), but it appears that the pixel size pa...
false
3,504,383
0
0
0
0
Did you try calling the GetNumberOfLines() method? According to Robin Dunn, that should work, although it doesn't take wrapped lines into account.
0
445
0
2
2010-08-17T15:52:00.000
python,wxpython,resolution-independence
Finding out how many lines can be displayed in wx.richtext.RichTextCtrl without scrolling
0
1
2
3,526,358
1
0
0
I would like to know how i can select a pixel with a mouse click in an image (QImge) and get pixel position and value. Thanks
false
3,504,522
0.132549
0
0
2
First you have to draw the image. You can do this my making a QLabel widget and call setPixmap. You need to convert your QImage to QPixmap before doing this (you can use QPixmap.fromImage(img)). You can get mouse clicks by subclassing the QImage and intercepting mousePressEvent. Look up the pixel value with QImage.pixe...
0
19,296
0
9
2010-08-17T16:05:00.000
python,image,pyqt,selection,pixel
Pyqt get pixel position and value when mouse click on the image
0
1
3
3,543,483
1
0
0
Here is what I would like to do, and I want to know how some people with experience in this field do this: With three POST requests I get from the http server: widgets and layout and then app logic (minimal) data Or maybe it's better to combine the first two or all three. I'm thinking of using pyqt. I think I can loa...
true
3,517,841
1.2
0
0
1
Your desire to send "app logic" from the server to the client without sending "code" is inherently self-contradictory, though you may not realize that yet -- even if the "logic" you're sending is in some simplified ad-hoc "language" (which you don't even think of as a language;-), to all intents and purposes your Pytho...
0
1,647
0
0
2010-08-19T00:33:00.000
python,qt,networking,pyqt,thin
how to implement thin client app with pyqt
1
1
2
3,517,886
1
0
0
I made a frame that asks the user to put in a bunch of information in several text control fields. How can I make it so that when you hit the 'tab' key your cursor moves to the next text control?
false
3,525,005
0.379949
0
0
2
If you put a wx.Panel as the only child of the ScrolledWindow and put the other widgets on the panel, then it should work automatically. You could also use ScrolledPanel instead.
0
595
0
3
2010-08-19T18:29:00.000
python,wxpython
wxPython: switching text control focus on tab press
0
1
1
3,525,652
1
0
0
I'm displaying some data as a TreeView. How can I detect a click on a particular tree-view cell, so that I know which column of which row was clicked on? This is what I want to do, so maybe there's a better way: Part of the data is a series of True/False values indicating a particular set of options. For example, the o...
true
3,534,127
1.2
0
0
6
The row-activated signal is sent when a GTK TreeView row is double-clicked.
0
4,742
0
5
2010-08-20T19:17:00.000
python,user-interface,gtk,pygtk
gtk: detect click on a cell in a TreeView
0
1
2
3,534,190
1
0
0
What Python-related code (PyGTK, Glade, Tkinter, PyQT, wxPython, Cairo, ...) could you easily use to create a GUI to do some or all of the following? Part of the GUI has an immovable square grid. The user can press a button to create a resizable rectangle. The user can drag the rectangle anywhere on the grid, and it w...
false
3,538,769
0
0
0
0
Those actions are not that difficult. All you really need for that is hit detection, which is not hard (is the cursor over the correct area? Okay, perform the operation then). The harder part is finding an appropriate canvas widget for the toolkit in use.
0
5,729
0
7
2010-08-21T20:09:00.000
python,user-interface,pygtk,tkinter,glade
How do you draw a grid and rectangles in Python?
0
1
3
3,538,804
1
0
0
I'm currently in the process of making my Nintendo Wiimote (Kinda sad actually) to work with my computer as a mouse. I've managed to make the nunchuk's stick control actually move the mouse up and down, left and right on the screen! This was so exciting. Now I'm stuck. I want to left/right click on things via python wh...
false
3,545,230
0.049958
0
0
2
Open your terminal and goto cd /usr/share/pyshared/twisted/protocols/mice may this __init__.py mouseman.py python script will work for you,check them out.
0
65,052
0
40
2010-08-23T06:42:00.000
python,linux,mouse,mouse-cursor,wiimote
Simulate Mouse Clicks on Python
0
1
8
9,583,583
1
0
0
I want to add images to wx.Dialog (and then sizer) some like wx.ImageList and display it dynamically. But I don't want to change already displayed image, I want to add next. How can I resolve this problem?
false
3,555,065
0.379949
0
0
2
I don't think a dialog is a good choice for a growing list of images, but if you have a good argument for that... Anyway, you should be able to display your images using the wx.StaticBitmap widget. To add another one, use your sizer's Add method, then call the dialog's Layout() method and maybe its Refresh() method. If...
0
883
0
1
2010-08-24T09:21:00.000
python,image,wxpython
How to add images/bitmaps to wx.Dialog
0
1
1
3,557,437
1
0
0
Assume i want to create 500 wxWidget like (some panels , color buttons and text ctrl etc), I have to create all this at single time but this will freeze my main thread, so i put this creation part in child thread and show some gif anim in main thread. But i was not able to get all these wxWidget object those created on...
false
3,574,714
0
0
0
0
You can send them back over a queue, or this all takes place in one instance of a class, assign the widgets to some known place in the instance for the main thread to pick them up. Signal via semaphore.
0
649
0
1
2010-08-26T11:42:00.000
python,wxpython
Get object created in child thread back in main thread
0
1
2
3,574,976
1
0
0
So, for example I draw some objects on wx.PaintDC, such as lines and rectangles. Now I want next: on mouse click I wont know which object was clicked. Of course, I can see what object is the closest, but what about more exact answer? Maybe even not standart wx.DC, but such things as FloatCanvas or something like this. ...
false
3,576,071
0
0
0
0
Does calling event.GetEventObject() in your event handler give you the object you need?
0
100
0
0
2010-08-26T14:24:00.000
python,user-interface,wxpython
What is the best solution to bind objects in wx.DC?
0
1
2
3,579,195
1
0
0
I would like to implement a button "New" that would work the same as File>New in most applications - that is: resets all the labels, treeviews, etc. to the original state. Thank you, Tomas
true
3,577,335
1.2
0
0
1
The widgets don't remember their original state; you have to set them all back one by one. Give labels their original text, clear the tree views by setting their model to None. Perhaps it is better to destroy your window and rebuild it from your Glade file if you have one?
0
263
0
0
2010-08-26T16:39:00.000
python,gtk,pygtk
How do I restore default settings of an application in Gtk (set all the widgets to the state as if the application was restarted)?
0
1
1
3,580,114
1
0
0
I have made an application using Glade and Python and I would like to make several localizations. I know how to localize strings that are in the Python code, I just encapsule all the strings that are supposed to be localized with _() and than specify the translation of the string in a .po file. But how do I tell a stri...
true
3,586,071
1.2
0
0
4
You should be able to create a *.pot file from a *.glade file using intltool-extract --type=gettext/glade foo.glade, and intltool supposedly knows what is translatable. Also, I suggest you look into GtkBuilder if you didn't do that already (you can save GtkBuilder interface files from recent Glade 3 versions, and you w...
0
1,203
0
7
2010-08-27T16:05:00.000
python,user-interface,pygtk,gettext,glade
Localization of GUI built with Glade and Python (Gtk)
0
1
1
3,588,790
1
0
0
I want to make a PyQt4 program that supports plugins. Basically I want the user to be able to write QWidget subclasses in PyQt4 and add/remove them from the main application window via a GUI. How would I do that, especially the plugin mechanism?
false
3,588,915
0
0
0
0
Have a directory for the plugins, define an interface for those plugins, and walk the directory importing them. I've never done this in Python, but in C the way I did it was to define a number of functions that the plugin needed to implement. The basic key elements that are necessary is the name of the things in the p...
0
834
0
2
2010-08-28T00:28:00.000
python,qt,plugins,pyqt4,pluggable
Pluggable Python program
0
1
2
3,588,947
1
0
0
Is there a command similar to "wm_overrideredirect" for Ubuntu? I want My program to be displayed without the standard window.
true
3,589,185
1.2
0
0
3
Ubuntu's desktop manager is Gnome, which should support wm_overrideredirect as well as any other. What's going wrong for you when you try that? Can you show (by editing your Q) some as-tiny-as-possible Python/Tkinter script that does not behave the way you want, and tell us how it does behave and how you'd like to be...
0
182
0
0
2010-08-28T02:26:00.000
python,ubuntu,window,tkinter
Tkinter removing standard window in Ubuntu
0
1
2
3,589,200
1
0
0
I have an existing python script and I want to wrap it in a GUI. Since I already have tkinter installed I would like to use it if possible. At the moment my script has many places where it asks for user input using raw_input(). I would like to replace these with either a modal pop-up asking for user input or (prefer...
true
3,589,817
1.2
0
0
2
UI toolkits usually have an event-driven model where the main loop is in the toolkit itself. This is probably different from your current synchronous, interactive model (where the program just pauses while waiting for input) The best would be to try to refactor your program and factor-out the view part (look up the mod...
0
1,228
0
0
2010-08-28T07:08:00.000
python,user-input,tkinter
Creating a gui around a python script using Tkinter
0
1
1
3,589,984
1
0
0
I am new to the world of GUI programming and I am writing a little GUI app using IronPython and WinForms. It reads values from an external device and displays them in a ListView component (name, value). I want to periodically perform the reading and updating of the ListView component at a certain fixed rate. I had the ...
true
3,595,236
1.2
0
0
3
Personally, I'd have one thread that's responsible for reading values out of the device and storing the data in a data structure, and then a System.Windows.Forms.Timer (there's 3 Timers in .NET, this is the only one that ticks in the thread that's safe to update your controls) to read values out of that data structure ...
0
1,455
0
2
2010-08-29T15:03:00.000
c#,winforms,ironpython
Pattern for periodically updating screen data
0
1
3
3,595,266
1
0
0
I was wondering if there is a good library for python for decoding QR code. Basically what I would like is to give library image with QR code on it and the library would output contents saved in image.
true
3,602,645
1.2
0
0
2
I've looked before with no success. Two problems are that native c code can't be compiled and you can't get access to the file system. pyqrcode didn't work out and neither did zxing.
0
3,926
0
4
2010-08-30T17:15:00.000
python,google-app-engine,qr-code
Google app engine QR code decoder
0
1
4
3,602,758
1
0
0
I'm trying to write a simple GTD-style todo list app with python and gtk to learn python. I want a container that can select an individual list from a lot of choices. It would be something like the list of notebooks area in tomboy. Not a combobox. As you can probably tell I'm a beginner and the terminology is probab...
false
3,604,357
0
0
0
0
You mean a widget to filter a large collection into multiple subsets / views? I would guess you have to implement this yourself - a list of options on the left and filtered results on the right, I don't know of any existing (gtk) widgets.
1
256
0
1
2010-08-30T21:28:00.000
python,user-interface,gtk
Python PyGTK. What's this component?
0
1
3
3,604,511
1
0
0
I don't get what Clyther is or how to use it. My stuff: ATI OpenCl SDK (just dl'd) clyther beta (just dl'd) windows 7 pro 64 bit active python 3.1.2 Xfxs Ati radeon 5850 video card I downloaded the ATI OpenCl SDK and the clyther beta from sourceforge. Then I tooke the sample 'reduce' function from the sourc...
false
3,612,410
0.197375
0
0
2
Clyther is a Python package for High-Performance Computing (HPC) using, for example, video cards with multiple Graphics Packaging Units (GPUs) or (less frequently) multi-core processors. Clyther is for parallel processing of algorithms or data sets that would normally take a lot of time to process serially. Meaning, ...
0
507
0
2
2010-08-31T19:18:00.000
python,python-3.x,gpu
Clyther-how to get started?
0
2
2
10,986,086
1
0
0
I don't get what Clyther is or how to use it. My stuff: ATI OpenCl SDK (just dl'd) clyther beta (just dl'd) windows 7 pro 64 bit active python 3.1.2 Xfxs Ati radeon 5850 video card I downloaded the ATI OpenCl SDK and the clyther beta from sourceforge. Then I tooke the sample 'reduce' function from the sourc...
false
3,612,410
0.099668
0
0
1
When you name the file .py (the file extension associated with python.exe) and double-click it, how is windows supposed to know it's supposed to run the file with CLyther? Is naming the file .py wrong? I guess clyther is its own lqnguage and not really python? Documentation compares it with Cython - so I suppose it's...
0
507
0
2
2010-08-31T19:18:00.000
python,python-3.x,gpu
Clyther-how to get started?
0
2
2
3,612,526
1
0
0
I have a python script bundled into a application (I'm on a mac) and have the application set to be able to open .zip files. But when I say "open foo.zip with bar.py" how do I access the file that I have passed to it? Additional info: Using tkinter. What's a good way to debug this, as there is no terminal to pass info...
false
3,614,609
0
0
0
0
If I'm not greatly mistaken, it should pass the name of the file as the first argument to the script - sys.argv[1].
1
310
0
0
2010-09-01T02:17:00.000
python,macos,tkinter
Python: open a file *with* script?
0
1
2
3,614,650
1
0
0
I have a widget that measures elapsed time, then after a certain duration it does a command. However, if the widget is left I want I want it to abort this function call and not do the command. How do I go about this?
false
3,621,111
0
0
0
0
Why not use threads and stop that? I don't think it's possible to intercept a function call in a single threaded program (if not with some kind of signal or interrupt). Also, with your specific issue, you might want to introduce a flag and check that in the command.
0
88
0
1
2010-09-01T18:38:00.000
python,tkinter,abort
Is there a way to write a command so that it aborts a running function call?
0
2
3
3,621,138
1
0
0
I have a widget that measures elapsed time, then after a certain duration it does a command. However, if the widget is left I want I want it to abort this function call and not do the command. How do I go about this?
false
3,621,111
0
0
0
0
No idea about python threads, but in general the way you interrupt a thread is by having some sort of a threadsafe state object that you can set from the widget, and the logic in thread code to check for the change in state object value and break out of the thread loop.
0
88
0
1
2010-09-01T18:38:00.000
python,tkinter,abort
Is there a way to write a command so that it aborts a running function call?
0
2
3
3,621,195
1
0
0
Is it possible to bind all widgets to one command, with a single line? It would be nice if I could type in one line as opposed to doing each widget individually.
false
3,630,664
-0.099668
0
0
-2
If you have a list that contains all your widgets, you could iterate over them and assign the events.
0
9,705
0
7
2010-09-02T19:49:00.000
python,binding,widget,tkinter,global
Tkinter Global Binding
0
2
4
3,630,691
1
0
0
Is it possible to bind all widgets to one command, with a single line? It would be nice if I could type in one line as opposed to doing each widget individually.
false
3,630,664
-0.148885
0
0
-3
You could also just define a function that calls on all your widgets, and call that function. Or better yet create a class that call on your widgets in init and import the class...
0
9,705
0
7
2010-09-02T19:49:00.000
python,binding,widget,tkinter,global
Tkinter Global Binding
0
2
4
3,630,962
1
0
0
I have a python program that has no windows frame and doesn't show up in the taskbar because of self.overrideredirect(1). This program has an options menu (a top level widget) that allows for the alpha to be adjusted with self.attributes("-alpha", 0.85). However when I close out of the options menu my program shows up ...
true
3,644,113
1.2
0
0
0
If you change the override redirect flag you need to withdraw and then deiconify the window to give the window manager a chance to make the change. You might try that. Also, when you say "close out" the option menu top-level, what exactly do you mean? Are you sure destroying this second top-level window?
0
2,723
0
0
2010-09-04T21:43:00.000
python,windows,transparency,tkinter,alpha
Help with Tkinter Alpha
0
1
2
3,644,372
1
0
0
I'm trying to retrieve the row data from a treemodel when the row_activated callback is fired. When row_activated is called, the 'path' variable it passes is a tuple. How do I easily use this tuple to retrieve an iter and ultimately the data itself? The treemodel class has a function to convert a string into an iter, b...
true
3,644,777
1.2
0
0
2
Answering my own question, it makes sense after 45 minutes of googling I solve my own problem 30 seconds after posting on StackOverflow. I needed to use the get_iter function, not the get_iter_from_string function.
0
262
0
1
2010-09-05T02:32:00.000
python,pygtk
PyGTK treeview and row_activated callback
0
1
1
3,644,788
1
0
0
I am starting to use python,more. Is there a good way to keep python disk access to a minimum. Seems to me that everytime a *.py file runs, it hits a hard disk. Is there way to avoid hitting the harddisk, and keep *.py file in memory and access it there. Would creating a small gui using Wxframe, keep code in memory...
true
3,647,368
1.2
0
0
2
If you run a .py file from the harddisk, the harddisk will be accessed. In your GUI, just import your code and it will be loaded once and you can access it later.
0
181
0
0
2010-09-05T19:08:00.000
python,wxpython
Python Software design
0
3
3
3,647,374
1
0
0
I am starting to use python,more. Is there a good way to keep python disk access to a minimum. Seems to me that everytime a *.py file runs, it hits a hard disk. Is there way to avoid hitting the harddisk, and keep *.py file in memory and access it there. Would creating a small gui using Wxframe, keep code in memory...
false
3,647,368
0.132549
0
0
2
Modern operating systems cache file access pretty efficiently, as long as there is enough spare RAM available. You most likely won't notice any difference, fi you're not loading thousand of python files at once. And as always, before trying to optimize one aspect, make sure that this is really the bottleneck. Chances a...
0
181
0
0
2010-09-05T19:08:00.000
python,wxpython
Python Software design
0
3
3
3,647,570
1
0
0
I am starting to use python,more. Is there a good way to keep python disk access to a minimum. Seems to me that everytime a *.py file runs, it hits a hard disk. Is there way to avoid hitting the harddisk, and keep *.py file in memory and access it there. Would creating a small gui using Wxframe, keep code in memory...
false
3,647,368
0
0
0
0
I think if you took the time to measure how much time it takes to load your python code from disk you would end up with a very, very tiny number unless you are doing something very wrong. And if you are doing something really wrong, solving that problem will be a better use of your time. Using wxpython to create a guy ...
0
181
0
0
2010-09-05T19:08:00.000
python,wxpython
Python Software design
0
3
3
3,647,549
1
1
0
I'm having a right old nightmare with JPype. I have got my dev env on Windows and so tried installing it there with no luck. I then tried on Ubunto also with no luck. I'm getting a bit desperate now. I am using Mingw32 since I tried installing VS2008 but it told me I had to install XP SP2 but I am on Vista. I tried VS2...
false
3,649,577
0.066568
0
1
1
Edit the Setup.py and remove the /EHsc option.
0
3,736
0
3
2010-09-06T06:54:00.000
java,python
JPype compile problems
0
1
3
6,258,169
1
0
0
I'm working on a wxPython app which has multiple frames and a serial connection. I need to be able to exit the app cleanly, closing the serial connection as the app terminates. What is the best way to do this? Should this be handled by a subclass of wxApp? Thanks, Josh
false
3,673,418
0
0
0
0
I usually use my close button's event handler to close connections and what-not before closing the frame. If you want to catch the upper right "x" button, then you'll need to bind to EVT_CLOSE. Unfortunately, when you do that, you need to call your frame's Destroy() method rather than its Close() method or you'll end u...
0
1,263
0
2
2010-09-09T02:43:00.000
python,wxpython
Terminating a wxPython app cleanly
0
1
2
3,677,070
1
0
0
There are a lot of games that can generally be viewed as a bunch of objects spread out through space, and a very common operation is to pick all objects in a sub-area. The typical example would be a game with tons of units across a large map, and an explosion that affects units in a certain radius. This requires pickin...
false
3,691,278
0.066568
0
0
1
The first step to writing a practical program is accepting that choices for some constants come from real-world considerations and not transcendent mathematical truths. This especially applies to game design/world simulation type coding, where you'd never get anywhere if you persisted in trying to optimally model the r...
0
293
0
2
2010-09-11T14:08:00.000
python,c,containers
A container for accessing contents by 2d/3d coordinates
0
2
3
3,691,446
1
0
0
There are a lot of games that can generally be viewed as a bunch of objects spread out through space, and a very common operation is to pick all objects in a sub-area. The typical example would be a game with tons of units across a large map, and an explosion that affects units in a certain radius. This requires pickin...
false
3,691,278
0
0
0
0
I don't know anything about games programming, but I would imagine (based on intuition and what I've read in the past) that a complete grid will get very inefficient for large spaces; you'll lose out in both storage, and also in time, because you'll melt the cache. STL containers are fundamentally one-dimensional. Yes...
0
293
0
2
2010-09-11T14:08:00.000
python,c,containers
A container for accessing contents by 2d/3d coordinates
0
2
3
3,691,977
1
0
0
How can I place an image in a Tkinter GUI using the python standard library?
false
3,698,900
0
0
0
0
You can Built-In the images on the code encoding it on Base64
0
543
0
0
2010-09-13T08:45:00.000
python,tkinter
Putting images in a Tkinter
0
1
2
3,713,622
1
0
0
In my application i have text control. I want my text ctrl should be read only but when some one right click on this he is able to copy the value from that ctrl and he can paste that value in other text control. If i made my text control read only with wx.TE_READONLY then copy/paste is not working. Is there any require...
false
3,710,751
0.066568
0
0
1
We should bind wx.EVT_TEXT_COPY and wx.EVT_TEXT_PASTE with text control. one can copy and paste data from text ctrl although text ctrl is read only mode.
0
8,427
0
1
2010-09-14T16:13:00.000
python,wxpython
how to create read only text ctrl but support copy paste event
0
1
3
3,716,517
1
0
0
How is Python able to call C++ objects when the interpreter is C and has been built w/ a C compiler?
false
3,712,125
0.132549
1
0
2
C++ can interoperate with C by extern "C" declarations.
1
1,508
0
8
2010-09-14T19:16:00.000
c++,python,boost-python
How does Boost.Python work?
0
1
3
3,712,249
1
0
0
I have a Python/wxPython program where the GUI is the main thread and I use another thread to load data from a file. Sometimes the files are big and slow to load so I use a wxPulse dialog to indicate progress. As I load the file, I count the number of lines that have been read in the counting thread, and I display thi...
false
3,714,613
0.119427
0
0
3
In normal python this will be safe as all access to variables are protected by the GIL(Global Interpreter Lock) this means that all access to a variable are syncronised so only one thread can do this at a time. The only issue is as @Eloff noted if you need to read more than one value and need them to be consistent - yo...
1
2,094
0
6
2010-09-15T04:12:00.000
python,thread-safety
Python: safe to read values from an object in a thread?
0
5
5
3,716,794
1
0
0
I have a Python/wxPython program where the GUI is the main thread and I use another thread to load data from a file. Sometimes the files are big and slow to load so I use a wxPulse dialog to indicate progress. As I load the file, I count the number of lines that have been read in the counting thread, and I display thi...
false
3,714,613
0.039979
0
0
1
It's quite safe. When the count increases from n to n+1 the "n+1 object" is created and then count is switched from referring to the "n object" to the new "n+1 object". There is no stage that count is referring to something other than the "n object" or the "n+1 object"
1
2,094
0
6
2010-09-15T04:12:00.000
python,thread-safety
Python: safe to read values from an object in a thread?
0
5
5
3,714,773
1
0
0
I have a Python/wxPython program where the GUI is the main thread and I use another thread to load data from a file. Sometimes the files are big and slow to load so I use a wxPulse dialog to indicate progress. As I load the file, I count the number of lines that have been read in the counting thread, and I display thi...
true
3,714,613
1.2
0
0
8
Generally as long as... You only have one thread writing to it, and... It's not important that the count be kept precisely in sync with the displayed value... it's fine.
1
2,094
0
6
2010-09-15T04:12:00.000
python,thread-safety
Python: safe to read values from an object in a thread?
0
5
5
3,714,627
1
0
0
I have a Python/wxPython program where the GUI is the main thread and I use another thread to load data from a file. Sometimes the files are big and slow to load so I use a wxPulse dialog to indicate progress. As I load the file, I count the number of lines that have been read in the counting thread, and I display thi...
false
3,714,613
0.07983
0
0
2
This is fine because you have only one writer thread. Read only operations are always thread-safe. The exception to this arises when you are reading more than one related value and expecting some form of consistency between them. Since writes can happen at any time, reads of multiple values may not be consistent and in...
1
2,094
0
6
2010-09-15T04:12:00.000
python,thread-safety
Python: safe to read values from an object in a thread?
0
5
5
3,714,663
1
0
0
I have a Python/wxPython program where the GUI is the main thread and I use another thread to load data from a file. Sometimes the files are big and slow to load so I use a wxPulse dialog to indicate progress. As I load the file, I count the number of lines that have been read in the counting thread, and I display thi...
false
3,714,613
0
0
0
0
It's safe only because it's not especially critical. Weird things like the value not updating when it should won't matter. It is very hard to get a definitive answer on what happens when you pretend a single int that's being read and written to is "atomic", as it depends on the exact architecture and a bunch of other...
1
2,094
0
6
2010-09-15T04:12:00.000
python,thread-safety
Python: safe to read values from an object in a thread?
0
5
5
3,714,667
1