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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | 0 | Can anyone tell me if its possible to redeclare a C# class in IronPython? If I have a C# class, would I be able to monkey-patch it from IronPython? | false | 1,008,686 | 0 | 1 | 0 | 0 | You can monkey-patch from IronPython, but IPy is the only environment that will respect your changes; i.e. if you tried to mock out File.Create from IronPython, this would work fine for any IPy code, but if you called a C# method which called File.Create, it would get the real one, not the mock. | 0 | 324 | 0 | 1 | 2009-06-17T18:08:00.000 | c#,ironpython,monkeypatching | Redeclare .net classes in IronPython | 0 | 2 | 3 | 1,040,151 | 1 |
1 | 0 | Can anyone tell me if its possible to redeclare a C# class in IronPython? If I have a C# class, would I be able to monkey-patch it from IronPython? | true | 1,008,686 | 1.2 | 1 | 0 | 0 | You cannot monkey patch from IronPython. IronPython treats all .NET classes just like CPython treats built-in types: they cannot be monkey patched. IronRuby on the other hand does support this. | 0 | 324 | 0 | 1 | 2009-06-17T18:08:00.000 | c#,ironpython,monkeypatching | Redeclare .net classes in IronPython | 0 | 2 | 3 | 3,155,159 | 1 |
0 | 0 | I have an interface that has two toolbars, one attached to the frame and one embedded in a notebook tab. The one in the frame dutifully shows longHelp strings in the statusbar, the one in the notebook tab
does not. How do I tell the one on the notebook tab where to display its help, or do I have to manage enter and lea... | false | 1,014,239 | 0 | 0 | 0 | 0 | from wxPython docs
"""
longHelpString
This string is shown in the statusbar (if any) of the parent frame when the mouse pointer is inside the tool
"""
so toolbar in notebook doesn't get any statusbar to display long help, so either thru src we should invertigate how it inquires abt status bar and supply a ref to main f... | 0 | 948 | 0 | 2 | 2009-06-18T17:57:00.000 | wxpython,wxwidgets | wxPython: how to make two toolbars use one statusbar for tooltips? | 0 | 1 | 3 | 1,021,396 | 1 |
0 | 0 | I have a program that sends and receives images to each other using sockets.
The server sends the image data using 'image.tostring()' and the client side receives it and turns it back into an image using 'Image.fromstring', then into a QImage using 'ImageQt.ImageQt(image)', turns it into a QPixmap using 'QPixmap.fromim... | false | 1,029,033 | 0 | 0 | 0 | 0 | It may be worth dumping the image data to a file and checking that you have all the data by loading it into an image viewer. If you get incomplete data, you may still be able to obtain a QImage and create a QPixmap, but it may be invalid. | 1 | 1,131 | 0 | 4 | 2009-06-22T19:38:00.000 | python,pyqt,qpixmap | "Python.exe" crashes when PyQt's setPixmap() is called with a Pixmap | 0 | 1 | 1 | 1,116,190 | 1 |
0 | 0 | How do I make any wxPython widget (like wx.Panel or wx.Button) automatically expand to fill its parent window? | false | 1,034,399 | 0 | 0 | 0 | 0 | In the case of a Button, to make a button fill its parent window when the parent window (a frame in my case) changes size, put button.SetSize(parent_window.GetSize()) in the parent window's OnSize event handling routine. | 0 | 3,216 | 0 | 4 | 2009-06-23T18:46:00.000 | python,user-interface,wxpython | wxPython: Making something expand | 0 | 1 | 3 | 5,628,847 | 1 |
0 | 0 | Python has a lot of GUI libraries: tkinter, wxWidgets, pyGTK etc. But all these GUIs need to be installed and quite heavyweight, so it's a bit complex to deploy end-user GUI python apps that relay on mentioned GUI libraries.
Recently, I have thought about python's built-in ctypes module. Theoretically, it's possible to... | false | 1,037,673 | 1 | 0 | 0 | 8 | Tkinter is part of the python standard distribution and is installed by default. Expect to find this on all python installs where there is a graphical display in the first place. | 0 | 5,803 | 0 | 9 | 2009-06-24T10:58:00.000 | python,tkinter,pyqt,pygtk,pyobjc | Pure python gui library? | 0 | 6 | 9 | 1,037,851 | 1 |
0 | 0 | Python has a lot of GUI libraries: tkinter, wxWidgets, pyGTK etc. But all these GUIs need to be installed and quite heavyweight, so it's a bit complex to deploy end-user GUI python apps that relay on mentioned GUI libraries.
Recently, I have thought about python's built-in ctypes module. Theoretically, it's possible to... | false | 1,037,673 | 1 | 0 | 0 | 6 | Notion of "pure python gui library" is wrong because ultimately you will be using system level calls and widgets, may be thru ctypes but that doesn't change the fact that if you start implementing your idea you will eventually become wxPython | 0 | 5,803 | 0 | 9 | 2009-06-24T10:58:00.000 | python,tkinter,pyqt,pygtk,pyobjc | Pure python gui library? | 0 | 6 | 9 | 1,038,265 | 1 |
0 | 0 | Python has a lot of GUI libraries: tkinter, wxWidgets, pyGTK etc. But all these GUIs need to be installed and quite heavyweight, so it's a bit complex to deploy end-user GUI python apps that relay on mentioned GUI libraries.
Recently, I have thought about python's built-in ctypes module. Theoretically, it's possible to... | false | 1,037,673 | 0.088656 | 0 | 0 | 4 | For one thing, all those libraries use different abstractions, so anything that worked with all of them is likely to wind up supporting a least-common-denominator set of functionality, or doing a LOT of work to use each to its fullest. | 0 | 5,803 | 0 | 9 | 2009-06-24T10:58:00.000 | python,tkinter,pyqt,pygtk,pyobjc | Pure python gui library? | 0 | 6 | 9 | 1,037,740 | 1 |
0 | 0 | Python has a lot of GUI libraries: tkinter, wxWidgets, pyGTK etc. But all these GUIs need to be installed and quite heavyweight, so it's a bit complex to deploy end-user GUI python apps that relay on mentioned GUI libraries.
Recently, I have thought about python's built-in ctypes module. Theoretically, it's possible to... | false | 1,037,673 | 0.088656 | 0 | 0 | 4 | Not really sure what you mean by "heavyweight."
wx uses native controls on each platform, and is about as easy to use in Python as I can imagine; after all, GUI APIs are complex because GUIs can get complex.
I think wx, for the effort required to build a window and the quality of what shows up on screen, is great. I d... | 0 | 5,803 | 0 | 9 | 2009-06-24T10:58:00.000 | python,tkinter,pyqt,pygtk,pyobjc | Pure python gui library? | 0 | 6 | 9 | 1,037,810 | 1 |
0 | 0 | Python has a lot of GUI libraries: tkinter, wxWidgets, pyGTK etc. But all these GUIs need to be installed and quite heavyweight, so it's a bit complex to deploy end-user GUI python apps that relay on mentioned GUI libraries.
Recently, I have thought about python's built-in ctypes module. Theoretically, it's possible to... | false | 1,037,673 | 0.044415 | 0 | 0 | 2 | I think it's about not inventig the wheel. It would work, but why should you do that? All the GUI libraries you mentioned are stable and more or less bullet proofen.
I could imagine that there are some experiments implementing a pure python library. But I never saw one. Everything about GUIs is hard work and a pure pyt... | 0 | 5,803 | 0 | 9 | 2009-06-24T10:58:00.000 | python,tkinter,pyqt,pygtk,pyobjc | Pure python gui library? | 0 | 6 | 9 | 1,037,705 | 1 |
0 | 0 | Python has a lot of GUI libraries: tkinter, wxWidgets, pyGTK etc. But all these GUIs need to be installed and quite heavyweight, so it's a bit complex to deploy end-user GUI python apps that relay on mentioned GUI libraries.
Recently, I have thought about python's built-in ctypes module. Theoretically, it's possible to... | true | 1,037,673 | 1.2 | 0 | 0 | 10 | The path of least effort and best results would be to learn what it takes to deploy an app using those existing GUI libraries. | 0 | 5,803 | 0 | 9 | 2009-06-24T10:58:00.000 | python,tkinter,pyqt,pygtk,pyobjc | Pure python gui library? | 0 | 6 | 9 | 1,037,722 | 1 |
1 | 0 | How to convert HTML CSS file to wxPython files? That is, how to create slidsheet in wxPython like HTML CSS files? | false | 1,038,182 | 0 | 0 | 0 | 0 | stylesheet, not slidesheet.
f = open('NAMEOFSTYLESHEET.css','w')
f.write('#ID{}\n.class{}') | 0 | 677 | 0 | 0 | 2009-06-24T12:54:00.000 | wxpython | HTML conversion | 0 | 1 | 3 | 14,180,592 | 1 |
0 | 0 | In my wx.Frame based wxpython application, I draw some lines on a panel when some events occur by creating wx.ClientDC instances when needed. The only problem is, if the window is minimized and then restored, the lines disappear! Is there some kind of method that I should override or event to bind to that will allow me... | false | 1,046,157 | 0 | 0 | 0 | 0 | When the window is restored it is (on some platforms) repainted using EVT_PAINT handler.
The solution is e.g. to draw the same lines in OnPaint(). Or buffer what you draw. See the wxBufferedDC class. | 0 | 541 | 0 | 1 | 2009-06-25T20:42:00.000 | python,wxpython | wxpython: How can I redraw something when a window is retored? | 0 | 1 | 2 | 1,046,259 | 1 |
0 | 0 | I am developing an student attendance application in wxpython and I need to know how to ensure that password field doesn't echo characters to the screen.
Forexample :if I give the name as moni means then it should be displayed as in format of **** | false | 1,048,446 | 0.197375 | 0 | 0 | 1 | You need to give your text control the TE_PASSWORD style.
(As Jørn's comment points out, this isn't "encryption" - I'm assuming you're only talking about the visual presentation of the password.) | 1 | 427 | 0 | 0 | 2009-06-26T10:44:00.000 | wxpython | Hiding characters typed into password field | 0 | 1 | 1 | 1,048,463 | 1 |
0 | 0 | I want to extend a large C project with some new functionality, but I really want to write it in Python. Basically, I want to call Python code from C code. However, Python->C wrappers like SWIG allow for the OPPOSITE, that is writing C modules and calling C from Python.
I'm considering an approach involving IPC or RP... | false | 1,056,051 | 0.022219 | 1 | 0 | 1 | I haven't used an IPC approach for Python<->C communication but it should work pretty well. I would have the C program do a standard fork-exec and use redirected stdin and stdout in the child process for the communication. A nice text-based communication will make it very easy to develop and test the Python program. | 0 | 79,185 | 0 | 52 | 2009-06-28T23:37:00.000 | python,c,interop,cross-domain | How do you call Python code from C code? | 0 | 3 | 9 | 1,056,105 | 1 |
0 | 0 | I want to extend a large C project with some new functionality, but I really want to write it in Python. Basically, I want to call Python code from C code. However, Python->C wrappers like SWIG allow for the OPPOSITE, that is writing C modules and calling C from Python.
I'm considering an approach involving IPC or RP... | false | 1,056,051 | 0 | 1 | 0 | 0 | apparently Python need to be able to compile to win32 dll, it will solve the problem
In such a way that converting c# code to win32 dlls will make it usable by any development tool | 0 | 79,185 | 0 | 52 | 2009-06-28T23:37:00.000 | python,c,interop,cross-domain | How do you call Python code from C code? | 0 | 3 | 9 | 1,621,442 | 1 |
0 | 0 | I want to extend a large C project with some new functionality, but I really want to write it in Python. Basically, I want to call Python code from C code. However, Python->C wrappers like SWIG allow for the OPPOSITE, that is writing C modules and calling C from Python.
I'm considering an approach involving IPC or RP... | false | 1,056,051 | 1 | 1 | 0 | 7 | Have you considered just wrapping your python application in a shell script and invoking it from within your C application?
Not the most elegant solution, but it is very simple. | 0 | 79,185 | 0 | 52 | 2009-06-28T23:37:00.000 | python,c,interop,cross-domain | How do you call Python code from C code? | 0 | 3 | 9 | 1,056,087 | 1 |
0 | 0 | I've made a small tool that parses a chunk of text, does some simple processing (retrieves values from a dictionary, a few regex, etc.) and then spits the results.
In order to make easier to read the results, I made two graphic ports, one with tkInter and other with wxPython, so the output is nicely displayed in a Text... | false | 1,059,214 | 0 | 0 | 0 | 0 | It kind of avoids the question slightly, but could you use wxStyledTextCtrl instead? | 0 | 1,031 | 0 | 0 | 2009-06-29T16:26:00.000 | python,performance,wxpython,tkinter,richtextediting | wxPython RichTextCtrl much slower than tkInter Text? | 0 | 2 | 2 | 1,070,836 | 1 |
0 | 0 | I've made a small tool that parses a chunk of text, does some simple processing (retrieves values from a dictionary, a few regex, etc.) and then spits the results.
In order to make easier to read the results, I made two graphic ports, one with tkInter and other with wxPython, so the output is nicely displayed in a Text... | true | 1,059,214 | 1.2 | 0 | 0 | 1 | I'm copying here the comment that solved the problem:
Have you tried using Freeze() and
Thaw() to only update the display
after you are done appending the
coloured text? – mghie Jun 30 at 7:20 | 0 | 1,031 | 0 | 0 | 2009-06-29T16:26:00.000 | python,performance,wxpython,tkinter,richtextediting | wxPython RichTextCtrl much slower than tkInter Text? | 0 | 2 | 2 | 1,189,222 | 1 |
0 | 0 | I have been reading through this wonderful website regarding the recommended Python IDEs and have narrowed it down to either
WingIDE
KomodoIDE
which you guys will recommend for the purpose of developing Pylons apps? I know that most questions have been asked pertaining to Python IDEs but how about Python web framewor... | false | 1,065,964 | 0.022219 | 0 | 0 | 1 | Try Aptana Studio... It's eclipse+pydev+web stuff, it doesnt have any specific pylons stuff or mako support. But eclipse+pydev alone is great + all the nice jscript+html+css stuff aptana adds. | 0 | 4,484 | 0 | 8 | 2009-06-30T20:46:00.000 | python,ide,pylons | Recommended IDE for developing Pylons apps | 0 | 4 | 9 | 3,596,813 | 1 |
0 | 0 | I have been reading through this wonderful website regarding the recommended Python IDEs and have narrowed it down to either
WingIDE
KomodoIDE
which you guys will recommend for the purpose of developing Pylons apps? I know that most questions have been asked pertaining to Python IDEs but how about Python web framewor... | false | 1,065,964 | 0 | 0 | 0 | 0 | Wow, I've also been looking for a good Pylons web app IDE. Seems like KomodoIDE 5.1 kicks some serious ass. I love the support for Mako and that it supports pretty much all of the SCMs.
I've been using Textmate, but KomodoIDE will take over from now onwards | 0 | 4,484 | 0 | 8 | 2009-06-30T20:46:00.000 | python,ide,pylons | Recommended IDE for developing Pylons apps | 0 | 4 | 9 | 2,364,669 | 1 |
0 | 0 | I have been reading through this wonderful website regarding the recommended Python IDEs and have narrowed it down to either
WingIDE
KomodoIDE
which you guys will recommend for the purpose of developing Pylons apps? I know that most questions have been asked pertaining to Python IDEs but how about Python web framewor... | false | 1,065,964 | 0.022219 | 0 | 0 | 1 | +1 for Spyder. Never heard of it before reading this page. Working great so far. | 0 | 4,484 | 0 | 8 | 2009-06-30T20:46:00.000 | python,ide,pylons | Recommended IDE for developing Pylons apps | 0 | 4 | 9 | 4,134,659 | 1 |
0 | 0 | I have been reading through this wonderful website regarding the recommended Python IDEs and have narrowed it down to either
WingIDE
KomodoIDE
which you guys will recommend for the purpose of developing Pylons apps? I know that most questions have been asked pertaining to Python IDEs but how about Python web framewor... | true | 1,065,964 | 1.2 | 0 | 0 | 0 | after very very careful comparison, KomodoIDE 5.1 is most suitable for my purposes.
Reasons:
Extensibility
Support for Mako and YUI (required by me)
Native interface support (no GTK unfamiliarity)
Support for Mercurial SCM (required by me)
thats all I guess. I am extremely satisfied with KomodoIDE and have just shell... | 0 | 4,484 | 0 | 8 | 2009-06-30T20:46:00.000 | python,ide,pylons | Recommended IDE for developing Pylons apps | 0 | 4 | 9 | 1,085,987 | 1 |
0 | 0 | I want to use Python to access MFC document files generically? Can CArchive be used to query a file and view the structure, or does Python, in opening the document, need to know more about the document structure in order to view the contents? | true | 1,070,932 | 1.2 | 0 | 0 | 0 | I think that the Python code needs to know the document structure.
Maybe you should make a python wrapper of your c++ code.
In this case, I would recommend to use http://sourceforge.net/projects/pycpp/>pycpp which is my opinion a great library for making python extensions in c++. | 0 | 216 | 0 | 1 | 2009-07-01T19:37:00.000 | python,windows,mfc,file | How To: View MFC Doc File in Python | 0 | 1 | 1 | 1,071,011 | 1 |
0 | 0 | Developing a project of mine I realize I have a need for some level of persistence across sessions, for example when a user executes the application, changes some preferences and then closes the app. The next time the user executes the app, be it after a reboot or 15 minutes, I would like to be able to retain the pref... | true | 1,077,649 | 1.2 | 0 | 0 | 3 | I would advice to do it in two steps.
First step is to save your prefs. as
string, for that you can
a)
Use any xml lib or output xml by
hand to output string and read
similarly from string
b) Just use pickle module to dump your prefs object as a string
c) Somehow generate a string from prefs which you can read b... | 1 | 729 | 0 | 1 | 2009-07-03T03:24:00.000 | python,windows,wxpython | Windows Application Programming & wxPython | 0 | 1 | 2 | 1,077,697 | 1 |
0 | 0 | What's the correct way to prevent invoking (creating an instance of) a C type from Python?
I've considered providing a tp_init that raises an exception, but as I understand it that would still allow __new__ to be called directly on the type.
A C function returns instances of this type -- that's the only way instances o... | false | 1,079,690 | 0 | 0 | 0 | 0 | There is a fantastically bulletproof way. Let people create the object, and have Python crash. That should stop them doing it pretty efficiently. ;)
Also you can underscore the class name, to indicate that it should be internal. (At least, I assume you can create underscored classnames from C too, I haven't actually e... | 1 | 339 | 0 | 2 | 2009-07-03T14:49:00.000 | python,cpython | Preventing invoking C types from Python | 0 | 1 | 4 | 1,080,330 | 1 |
0 | 0 | So I can use PIL to grab a screenshot of the desktop, and then use pywin32 to get its rectangle and crop out the part I want. However, if there's something in front of the window I want, it'll occlude the application I wanted a screenshot of. Is there any way to get what windows would say an application is currently di... | false | 1,080,719 | 0.057081 | 0 | 0 | 2 | There is a way to do this, using the PrintWindow function. It causes the window to redraw itself on another surface. | 0 | 12,921 | 0 | 6 | 2009-07-03T20:22:00.000 | python,windows,screenshot | Screenshot an application, regardless of what's in front of it? | 0 | 4 | 7 | 3,586,035 | 1 |
0 | 0 | So I can use PIL to grab a screenshot of the desktop, and then use pywin32 to get its rectangle and crop out the part I want. However, if there's something in front of the window I want, it'll occlude the application I wanted a screenshot of. Is there any way to get what windows would say an application is currently di... | false | 1,080,719 | 0.028564 | 0 | 0 | 1 | Maybe you can position the app offscreen, then take the screenshot, then put it back? | 0 | 12,921 | 0 | 6 | 2009-07-03T20:22:00.000 | python,windows,screenshot | Screenshot an application, regardless of what's in front of it? | 0 | 4 | 7 | 1,270,114 | 1 |
0 | 0 | So I can use PIL to grab a screenshot of the desktop, and then use pywin32 to get its rectangle and crop out the part I want. However, if there's something in front of the window I want, it'll occlude the application I wanted a screenshot of. Is there any way to get what windows would say an application is currently di... | false | 1,080,719 | 0.028564 | 0 | 0 | 1 | If you can, try saving the order of the windows, then move your app to the front, screenshot, and move it back really quickly. Might produce a bit of annoying flicker, but it might be better than nothing. | 0 | 12,921 | 0 | 6 | 2009-07-03T20:22:00.000 | python,windows,screenshot | Screenshot an application, regardless of what's in front of it? | 0 | 4 | 7 | 1,080,741 | 1 |
0 | 0 | So I can use PIL to grab a screenshot of the desktop, and then use pywin32 to get its rectangle and crop out the part I want. However, if there's something in front of the window I want, it'll occlude the application I wanted a screenshot of. Is there any way to get what windows would say an application is currently di... | false | 1,080,719 | 0 | 0 | 0 | 0 | IIRC, not in Windows pre-vista - with Aero each window has it's own buffer, but before that, you would just use your method, of getting the rectangle. I'm not sure if pywin32 has Aero support or not. | 0 | 12,921 | 0 | 6 | 2009-07-03T20:22:00.000 | python,windows,screenshot | Screenshot an application, regardless of what's in front of it? | 0 | 4 | 7 | 1,080,733 | 1 |
0 | 0 | I have neglected my programming skills since i left school and now i want to start a few things that are running around in my head. Qt would be the toolkit for me to use but i am undecided if i should use Python (looks to me like the easier to learn with a few general ideas about programming) or C++ (the thing to use w... | true | 1,084,935 | 1.2 | 0 | 0 | 25 | Being an expert in both C++ and Python, my mantra has long been "Python where I can, C++ where I must": Python is faster (in term of programmer productivity and development cycle) and easier, C++ can give that extra bit of power when I have to get close to the hardware or be extremely careful about every byte or machin... | 1 | 4,290 | 0 | 8 | 2009-07-05T22:13:00.000 | c++,python,qt | C++ or Python as a starting point into GUI programming? | 0 | 1 | 4 | 1,084,958 | 1 |
0 | 0 | I'm writing a game in python with pygame and need to render text onto the screen.
I want to render this text in one colour with an outline, so that I don't have to worry about what sort of background the the text is being displayed over.
pygame.font doesn't seem to offer support for doing this sort of thing directly, a... | false | 1,109,498 | 0.379949 | 0 | 0 | 4 | A quick and dirty way would be to render your text multiple times with the outline color, shifted by small amounts on a circle around the text position:
1
8 | 2
\ | /
\|/
7----*----3
/|\
/ | \
6 | 4
5
Edit: Doh you've been faster ! I wont d... | 0 | 2,637 | 0 | 7 | 2009-07-10T13:24:00.000 | python,fonts,pygame | What's a good way to render outlined fonts? | 0 | 1 | 2 | 1,109,553 | 1 |
0 | 0 | What would you use for a brand new cross platform GUI app, CPython or IronPython ?
What about
- license / freedom
- development
- - doc
- - editors
- - tools
- libraries
- performances
- portability
What can you do best with one or the other ?
- networking
- database
- GUI
- system
- multi threa... | false | 1,149,692 | 0.197375 | 0 | 0 | 4 | if you like/need to use .net framework, use ironpython, else CPython it's your choice
(or you can try PyPy :)) | 0 | 5,086 | 0 | 7 | 2009-07-19T11:21:00.000 | python,ironpython,cpython | CPython or IronPython? | 0 | 4 | 4 | 1,149,740 | 1 |
0 | 0 | What would you use for a brand new cross platform GUI app, CPython or IronPython ?
What about
- license / freedom
- development
- - doc
- - editors
- - tools
- libraries
- performances
- portability
What can you do best with one or the other ?
- networking
- database
- GUI
- system
- multi threa... | true | 1,149,692 | 1.2 | 0 | 0 | 4 | Use CPython, with IronPython you are bound to .Net platform which do not have much cross platform support, mono is there on linux but still for a cross platform app, I wouldn't recommend .Net.
So my suggestion is use CPython, for GUI use a framework like wxPython/PyQT and you would be happy. | 0 | 5,086 | 0 | 7 | 2009-07-19T11:21:00.000 | python,ironpython,cpython | CPython or IronPython? | 0 | 4 | 4 | 1,149,762 | 1 |
0 | 0 | What would you use for a brand new cross platform GUI app, CPython or IronPython ?
What about
- license / freedom
- development
- - doc
- - editors
- - tools
- libraries
- performances
- portability
What can you do best with one or the other ?
- networking
- database
- GUI
- system
- multi threa... | false | 1,149,692 | 0.099668 | 0 | 0 | 2 | cpython is native runtime based python,,,it has a thin runtime level to the hosting os,
ironpy is soft vm based python,,,it has a heavy soft interpter embeded in the dotnet vm,,which is called clr
overall,,,cpython is made to be a scripting language natively,,it focus on the language,while ironpy is made to accomplishe... | 0 | 5,086 | 0 | 7 | 2009-07-19T11:21:00.000 | python,ironpython,cpython | CPython or IronPython? | 0 | 4 | 4 | 11,117,032 | 1 |
0 | 0 | What would you use for a brand new cross platform GUI app, CPython or IronPython ?
What about
- license / freedom
- development
- - doc
- - editors
- - tools
- libraries
- performances
- portability
What can you do best with one or the other ?
- networking
- database
- GUI
- system
- multi threa... | false | 1,149,692 | 0.099668 | 0 | 0 | 2 | I can only think of about one "cross platform" GUI app that's remotely tolerable (firefox), and people are complaining wildly about it everywhere I look.
If you want to do cross platform, build a nice, solid model that can do the work you need done and build platform-specific GUIs that use it.
I don't know how tolerabl... | 0 | 5,086 | 0 | 7 | 2009-07-19T11:21:00.000 | python,ironpython,cpython | CPython or IronPython? | 0 | 4 | 4 | 1,150,371 | 1 |
0 | 0 | Can anybody help me out in how to activate 'close' button of askquestion() of tkMessageBox?? | true | 1,151,770 | 1.2 | 0 | 0 | 0 | By 'activate', do you mean make it so the user can close the message box by clicking the close ('X') button?
I do not think it is possible using tkMessageBox. I guess your best bet is to implement a dialog box with this functionality yourself.
BTW: What should askquestion() return when the user closes the dialog box? | 0 | 1,575 | 0 | 1 | 2009-07-20T05:00:00.000 | python,tkmessagebox | tkMessageBox | 0 | 1 | 1 | 1,151,900 | 1 |
0 | 0 | I am having some issues with the size of qt4 widgets when their content changes.
I will illustrate my problems with two simple scenarios:
Scenario 1:
I have a QLineEdit widget. Sometimes, when I'm changing its content using QLineEdit.setText(), the one-line string doesn't fit into the widget at its current size anymore... | false | 1,153,714 | 1 | 0 | 0 | 8 | I'm answering in C++ here, since that's what I'm most familiar with, and your problem isn't specific to PyQt.
Normally, you just need to call QWidget::updateGeometry() when the sizeHint() may have changed, just like you need to call QWidget::update() when the contents may have changed.
Your problem, however, is that th... | 0 | 12,735 | 0 | 12 | 2009-07-20T13:53:00.000 | c++,python,qt,qt4,pyqt4 | PyQt: how to handle auto-resize of widgets when their content changes | 0 | 2 | 5 | 1,166,388 | 1 |
0 | 0 | I am having some issues with the size of qt4 widgets when their content changes.
I will illustrate my problems with two simple scenarios:
Scenario 1:
I have a QLineEdit widget. Sometimes, when I'm changing its content using QLineEdit.setText(), the one-line string doesn't fit into the widget at its current size anymore... | false | 1,153,714 | 0 | 0 | 0 | 0 | Ok implement sizeHint() method. And every time your content change size call updateGeometry()
When content change without changing size use update(). (updateGeometry() automatically call update()). | 0 | 12,735 | 0 | 12 | 2009-07-20T13:53:00.000 | c++,python,qt,qt4,pyqt4 | PyQt: how to handle auto-resize of widgets when their content changes | 0 | 2 | 5 | 1,813,475 | 1 |
0 | 0 | I have a tkinter GUI that downloads data from multiple websites at once. I run a seperate thread for each download (about 28). Is that too much threads for one GUI process? because it's really slow, each individual page should take about 1 to 2 seconds but when all are run at once it takes over 40 seconds. Is there any... | false | 1,155,404 | 0 | 0 | 0 | 0 | You can try using processes instead of threads. Python has GIL which might cause some delays in your situation. | 0 | 373 | 0 | 0 | 2009-07-20T19:20:00.000 | python,user-interface,multithreading,download,tkinter | Python accessing multiple webpages at once | 0 | 2 | 3 | 1,155,479 | 1 |
0 | 0 | I have a tkinter GUI that downloads data from multiple websites at once. I run a seperate thread for each download (about 28). Is that too much threads for one GUI process? because it's really slow, each individual page should take about 1 to 2 seconds but when all are run at once it takes over 40 seconds. Is there any... | false | 1,155,404 | 0.066568 | 0 | 0 | 1 | A process can have hundreds of threads on any modern OS without any problem.
If you're bandwidth-limited, 1 to 2 seconds times 28 means 40 seconds is about right. If you're latency limited, it should be faster, but with no information, all I can suggest is:
add logging to your code to make sure it's actually running ... | 0 | 373 | 0 | 0 | 2009-07-20T19:20:00.000 | python,user-interface,multithreading,download,tkinter | Python accessing multiple webpages at once | 0 | 2 | 3 | 1,155,498 | 1 |
0 | 0 | Is there any way to detect which keys are currently pressed using Tkinter? I don't want to have to use extra libraries if possible. I can already detect when keys are pressed, but I want to be able to check at any time what keys are pressed down at the moment. | true | 1,181,027 | 1.2 | 0 | 0 | 4 | I think you need to keep track of events about keys getting pressed and released (maintaining your own set of "currently pressed" keys) -- I believe Tk doesn't keep track of that for you (and Tkinter really adds little on top of Tk, it's mostly a direct interface to it). | 0 | 2,295 | 0 | 2 | 2009-07-25T02:38:00.000 | python,tkinter,keylistener | How can you check if a key is currently pressed using Tkinter in Python? | 0 | 1 | 1 | 1,181,037 | 1 |
0 | 0 | I've been seeing some examples of Python being used with c++, and I'm trying to understand why would someone want to do it. What are the benefits of calling C++ code from an external language such as Python?
I'd appreciate a simple example - Boost::Python will do | false | 1,181,462 | 0.085505 | 1 | 0 | 3 | Here's two possibilities:
Perhaps the C++ code is already written & available for use.
It's likely the C++ code is faster/smaller than equivalent Python | 0 | 522 | 0 | 4 | 2009-07-25T07:14:00.000 | c++,python | Practical point of view: Why would I want to use Python with C++? | 0 | 6 | 7 | 1,181,468 | 1 |
0 | 0 | I've been seeing some examples of Python being used with c++, and I'm trying to understand why would someone want to do it. What are the benefits of calling C++ code from an external language such as Python?
I'd appreciate a simple example - Boost::Python will do | false | 1,181,462 | 0.057081 | 1 | 0 | 2 | Here's a real-life example: I've written a DLL in C to interface with some custom hardware for work. Then for the very first stage of testing, I was writing short programs in C to verify that the different commands were working properly. The process of write, compile, run took probably 3-5 times as long as when I fi... | 0 | 522 | 0 | 4 | 2009-07-25T07:14:00.000 | c++,python | Practical point of view: Why would I want to use Python with C++? | 0 | 6 | 7 | 1,182,301 | 1 |
0 | 0 | I've been seeing some examples of Python being used with c++, and I'm trying to understand why would someone want to do it. What are the benefits of calling C++ code from an external language such as Python?
I'd appreciate a simple example - Boost::Python will do | false | 1,181,462 | 0 | 1 | 0 | 0 | One nice thing about using a scripting language is that you can reload new code into the application without quitting the app, then making changes, recompile, and then relaunching the app. When people talk about quicker development times, some of that refers to this capability.
A downside of using a scripting language... | 0 | 522 | 0 | 4 | 2009-07-25T07:14:00.000 | c++,python | Practical point of view: Why would I want to use Python with C++? | 0 | 6 | 7 | 1,182,051 | 1 |
0 | 0 | I've been seeing some examples of Python being used with c++, and I'm trying to understand why would someone want to do it. What are the benefits of calling C++ code from an external language such as Python?
I'd appreciate a simple example - Boost::Python will do | false | 1,181,462 | 0.085505 | 1 | 0 | 3 | Because C++ provides a direct way of calling OS services, and (if used in a careful way) can produce code that is more efficient in memory and time, whereas Python is a high-level language, and is less painful to use in those situations where utter efficiency isn't a concern and where you already have libraries giving ... | 0 | 522 | 0 | 4 | 2009-07-25T07:14:00.000 | c++,python | Practical point of view: Why would I want to use Python with C++? | 0 | 6 | 7 | 1,181,481 | 1 |
0 | 0 | I've been seeing some examples of Python being used with c++, and I'm trying to understand why would someone want to do it. What are the benefits of calling C++ code from an external language such as Python?
I'd appreciate a simple example - Boost::Python will do | false | 1,181,462 | 0.141893 | 1 | 0 | 5 | Generally, you'd call C++ from python in order to use an existing library or other functionality. Often someone else has written a set of functions that make your life easier, and calling compiled C code is easier than re-writing the library in python.
The other reason is for performance purposes. Often, specific funct... | 0 | 522 | 0 | 4 | 2009-07-25T07:14:00.000 | c++,python | Practical point of view: Why would I want to use Python with C++? | 0 | 6 | 7 | 1,181,476 | 1 |
0 | 0 | I've been seeing some examples of Python being used with c++, and I'm trying to understand why would someone want to do it. What are the benefits of calling C++ code from an external language such as Python?
I'd appreciate a simple example - Boost::Python will do | false | 1,181,462 | 0 | 1 | 0 | 0 | Performance :
From my limited experience, Python is about 10 times slower than using C.
Using Psyco will dramatically improve it, but still about 5 times slower than C.
BUT, calling c module from python is only a little faster than Psyco.
When you have some libraries in C.
For example, I am working heavily on SIP. I... | 0 | 522 | 0 | 4 | 2009-07-25T07:14:00.000 | c++,python | Practical point of view: Why would I want to use Python with C++? | 0 | 6 | 7 | 1,181,567 | 1 |
0 | 0 | The Python manual says that you can create modules for Python in both C and C++. Can you take advantage of things like classes and templates when using C++? Wouldn't it create incompatibilities with the rest of the libraries and with the interpreter? | false | 1,185,878 | 0.148885 | 1 | 0 | 3 | The boost folks have a nice automated way to do the wrapping of C++ code for use by python.
It is called: Boost.Python
It deals with some of the constructs of C++ better than SWIG, particularly template metaprogramming. | 1 | 567 | 0 | 6 | 2009-07-26T23:30:00.000 | c++,python,c,python-c-api,python-c-extension | Can I use C++ features while extending Python? | 0 | 2 | 4 | 1,185,954 | 1 |
0 | 0 | The Python manual says that you can create modules for Python in both C and C++. Can you take advantage of things like classes and templates when using C++? Wouldn't it create incompatibilities with the rest of the libraries and with the interpreter? | true | 1,185,878 | 1.2 | 1 | 0 | 9 | It doesn't matter whether your implementation of the hook functions is implemented in C or in C++. In fact, I've already seen some Python extensions which make active use of C++ templates and even the Boost library. No problem. :-) | 1 | 567 | 0 | 6 | 2009-07-26T23:30:00.000 | c++,python,c,python-c-api,python-c-extension | Can I use C++ features while extending Python? | 0 | 2 | 4 | 1,185,907 | 1 |
0 | 0 | I have a PyShell, which is supposed to be derived from wx.stc.StyledTextCtrl. How do I change the color scheme that it currently uses? | false | 1,211,380 | 0 | 0 | 0 | 0 | You can use
styledTextCtrl.StyleSetSpec(wx.stc.STC_STYLE_INDENTGUIDE, "fore:#CDCDCD")
(Bunch of .StyleSetSpec properties)
...
...
...
styCtrl.SetCaretForeground("BLUE")
styCtrl.SetSelBackground(True, wx.SystemSettings_GetColour(wx.SYS_COLOUR_HIGHLIGHT))
styCtrl.SetSelForeground(True, wx.SystemSettings_GetColour(wx.SYS... | 0 | 828 | 0 | 1 | 2009-07-31T08:51:00.000 | python,user-interface,wxpython,color-scheme | wxPython: Changing the color scheme of a wx.stc.StyledTextCtrl | 0 | 1 | 1 | 1,272,807 | 1 |
0 | 0 | I'm using pygtk with PIL. I've already figured out a way to convert PIL Images to gtk.gdk.Pixbufs. What I do to display the pixbuf is I create a gtk.gdk.Image, and then use img.set_from_pixbuf. I now want to draw a few lines onto this image. Apparently I need a Drawable to do that. I've started looking through the docs... | false | 1,213,090 | 0.039979 | 0 | 0 | 1 | You should connect to the expose-event (GTK 2) or draw (GTK 3) signal. In that handler, simply use image.window to get the widget's gtk.gdk.Window; this is a subclass of gtk.gdk.Drawable, so you can draw on it. | 0 | 5,113 | 0 | 3 | 2009-07-31T15:10:00.000 | python,gtk,drawing,pygtk | pygtk: Draw lines onto a gtk.gdk.Pixbuf | 0 | 1 | 5 | 6,578,903 | 1 |
0 | 0 | I would like to be warned when user selects the whole row in a wxGrid but I do not see an event that handles this.What is the best way to do it? | false | 1,215,846 | 0.099668 | 0 | 0 | 1 | Actually, I figured it out. There are events like EVT_GRID_LABEL_LEFT_CLICK and then I test event.GetCol() == -1, to make sure the click is on a whole row, not a whole column. | 0 | 3,008 | 0 | 3 | 2009-08-01T04:40:00.000 | events,wxpython | Detect row selection in wxGrid | 0 | 1 | 2 | 1,263,720 | 1 |
0 | 0 | I'm currently working on a game engine written in pygame and I wanted to add OpenGL support.
I wrote a test to see how to make pygame and OpenGL work together, and when it's running in windowed mode, it runs between 150 and 200 fps. When I run it full screen (all I did was add the FULLSCREEN flag when I set up the wind... | false | 1,217,939 | 0 | 0 | 0 | 0 | If you are not changing your clock.tick() when you change between full screen and windowed mode this is almost certainly a vsync issue. If you are on an LCD then it's 100% certain.
Unfortunately v-sync can be handled in many places including SDL, Pyopengl, your display server and your video drivers. If you are using wi... | 0 | 3,949 | 0 | 2 | 2009-08-02T01:22:00.000 | python,fullscreen,pygame,pyopengl | PyOpenGL + Pygame capped to 60 FPS in Fullscreen | 0 | 1 | 3 | 1,218,011 | 1 |
0 | 0 | I'm using pyGTK. I want to layout a large element with 2 smaller ones on each side. For aesthetic reasons, I want the 2 smaller ones to be the same size. As it is, they differ by a few pixels, and the middle element is not centered as a result.
I tried using gtk.Table with 3 cells, but having homogeneous=True doesn't h... | true | 1,229,933 | 1.2 | 0 | 0 | 6 | You should use GtkSizeGroup for this. Create a GtkSizeGroup, add both widgets to it. This will ensure that both widgets have the same size. If you want that widget have the same size in only one direction (width or height), set the "mode" property of SizeGroup. | 0 | 238 | 0 | 1 | 2009-08-04T21:04:00.000 | python,layout,gtk,pygtk | How to make two elements in gtk have the same size? | 0 | 1 | 1 | 1,229,981 | 1 |
0 | 0 | For example, graying out the "X" on windows systems. | false | 1,235,417 | 0.379949 | 0 | 0 | 4 | Just call the set_deletable with False on the window in question. It will work as long as GTK can convince the window manager to make the window unclosable. | 0 | 721 | 0 | 4 | 2009-08-05T19:59:00.000 | python,windows,gtk,pygtk | In GTK, how do I make a window unable to be closed? | 0 | 1 | 2 | 1,235,424 | 1 |
0 | 0 | Various examples always use alloc_color() and stuff like gtk.color.parse('red'), etc. I just do gtk.gdk.Color(65535,0,0), and that seems to work. What's the need for alloc_color? | true | 1,242,541 | 1.2 | 0 | 0 | 2 | If you're running on a system that uses a palette display (as opposed to a true-colour display), then you must allocate new colours in the palette before you can use them. This is because palette-based displays can only display a limited number of colours at once (usually 256 or sometimes 65536).
Most displays these da... | 0 | 236 | 0 | 1 | 2009-08-07T02:03:00.000 | python,gtk,colors,pygtk | What's the point of alloc_color() in gtk? | 0 | 1 | 1 | 1,242,550 | 1 |
0 | 0 | I am assisting with Windows support for a PyGTK app that appears as a system tray applet, but am not so strong on the GTK+ gooey stuff...
We have it so when you left-click the systray icon, the window appears right by your tray icon no matter where your system tray is--and on Linux this works great, using the results o... | false | 1,246,552 | 0.066568 | 0 | 0 | 1 | Gtk provides function gtk_status_icon_position_menu that can be passed into gtk_menu_popup as a GtkPositionFunc.
This seems to provide the requested functionality. | 0 | 1,237 | 0 | 4 | 2009-08-07T19:27:00.000 | python,windows,gtk,pygtk | Getting the position of the gtk.StatusIcon on Windows | 0 | 2 | 3 | 1,247,303 | 1 |
0 | 0 | I am assisting with Windows support for a PyGTK app that appears as a system tray applet, but am not so strong on the GTK+ gooey stuff...
We have it so when you left-click the systray icon, the window appears right by your tray icon no matter where your system tray is--and on Linux this works great, using the results o... | false | 1,246,552 | 0 | 0 | 0 | 0 | The behavior i experienced in windows with gtk_status_icon_position_menu was that it spawns the window at the location the user clicked in the statusicon | 0 | 1,237 | 0 | 4 | 2009-08-07T19:27:00.000 | python,windows,gtk,pygtk | Getting the position of the gtk.StatusIcon on Windows | 0 | 2 | 3 | 1,874,016 | 1 |
0 | 0 | I've just started working with pygame and I'm trying to make a semi-transparent sprite, and the sprite's source file is a non-transparent bitmap file loaded from the disk. I don't want to edit the source image if I can help it. I'm sure there's a way to do this with pygame code, but Google is of no help to me. | false | 1,247,921 | 0.049958 | 0 | 0 | 1 | you might consider switching to using png images where you can do any kind of transparency you want directly in the image. | 0 | 7,546 | 0 | 4 | 2009-08-08T03:51:00.000 | python,graphics,sprite,pygame | How to make translucent sprites in pygame | 0 | 1 | 4 | 1,247,984 | 1 |
0 | 0 | How to create a non-editable text box with no cursor in wxPython to dump text in? | true | 1,254,819 | 1.2 | 0 | 0 | 7 | wx.StaticText
You could also use a regular TextCtrl with the style TE_READONLY but that shows a cursor and the text looks editable, but it isn't. | 0 | 4,502 | 0 | 5 | 2009-08-10T13:16:00.000 | python,textbox,wxpython,wxwidgets | Non-editable text box in wxPython | 0 | 1 | 1 | 1,254,881 | 1 |
0 | 0 | How to change only hight of an object in wxPython, leaving its width automatic? In my case it's a TextCtrl.
How to make the height of the window available for change and lock the width? | true | 1,265,821 | 1.2 | 0 | 0 | 6 | For the width or height to be automatically determined based on context you use for it the value of -1, for example (-1, 100) for a height of 100 and automatic width.
The default size for controls is usually (-1, -1).
If a width or height is specified and the sizer item for the control doesn't have wx.EXPAND flag set (... | 0 | 258 | 0 | 2 | 2009-08-12T12:22:00.000 | python,wxpython,size | Changing height of an object in wxPython | 0 | 1 | 1 | 1,265,988 | 1 |
0 | 0 | In GTK, how can I scale an image? Right now I load images with PIL and scale them beforehand, but is there a way to do it with GTK? | false | 1,269,320 | -0.033321 | 0 | 0 | -1 | actually when we use
gdk_pixbuf_scale_simple(pb,700,700,GDK_INTERP_BILINEAR); this function causes memory leakage (If we monitor task manager the memory requirement goes on increasing till it kills the process) when used with a timer event. How to solve that | 0 | 18,745 | 0 | 22 | 2009-08-12T23:44:00.000 | python,user-interface,image,gtk,pygtk | Scale an image in GTK | 0 | 1 | 6 | 64,004,356 | 1 |
0 | 0 | I am working on a top-down view 2d game at the moment and I am learning a ton about sprites and sprite handling. My question is how to handle a set of sprites that can be rotated in as many as 32 directions.
At the moment a given object has its sprite sheet with all of the animations oriented with the object pointing a... | true | 1,275,482 | 1.2 | 0 | 0 | 1 | Typically you will sacrifice either processor time or memory, and you need to balance between the two. Unless you've got some great limit to your processor or you're computing a lot of expensive stuff, there's no real reason to put all that into the memory. Rotating a few sprites with a transform is cheap enough that i... | 0 | 1,381 | 0 | 2 | 2009-08-14T00:47:00.000 | python,pygame,sprite | What is the best way to handle rotating sprites for a top-down view game | 0 | 2 | 3 | 1,296,881 | 1 |
0 | 0 | I am working on a top-down view 2d game at the moment and I am learning a ton about sprites and sprite handling. My question is how to handle a set of sprites that can be rotated in as many as 32 directions.
At the moment a given object has its sprite sheet with all of the animations oriented with the object pointing a... | false | 1,275,482 | 0.26052 | 0 | 0 | 4 | The 32 directions for the sprite translate into 32 rotations by 11.25 degrees.
You can reduce the number of precalculated images to 8 you only calculate the first 90 degrees (11.25, 22.5, 33.75, 45.0, 56.25, 67.5, 78.75, 90.0) and use the flip operations dynamically. Flips are much faster because they essentially only... | 0 | 1,381 | 0 | 2 | 2009-08-14T00:47:00.000 | python,pygame,sprite | What is the best way to handle rotating sprites for a top-down view game | 0 | 2 | 3 | 1,277,181 | 1 |
1 | 0 | I am familiar with both Python and C++ as a programmer. I was thinking of writing my own simple web application and I wanted to know which language would be more appropriate for server-side web development.
Some things I'm looking for:
It has to be intuitive. I recognize that Wt exists and it follows the model of Qt. ... | false | 1,289,941 | 0 | 0 | 0 | 0 | Having looked several ones, like django, pylos, web2py, wt. My recommendation is web2py. It's a python version of "ruby on rails" and easy to learn. | 0 | 10,487 | 0 | 12 | 2009-08-17T19:33:00.000 | c++,python,wt | Web Application Frameworks: C++ vs Python | 0 | 2 | 7 | 1,475,164 | 1 |
1 | 0 | I am familiar with both Python and C++ as a programmer. I was thinking of writing my own simple web application and I wanted to know which language would be more appropriate for server-side web development.
Some things I'm looking for:
It has to be intuitive. I recognize that Wt exists and it follows the model of Qt. ... | false | 1,289,941 | 0.028564 | 0 | 0 | 1 | I think you better go firt python in your case, meanwhile you can extend cppCMS functionalities and write your own framework arround it.
wt was a good idea design, but somehow not that suitable. | 0 | 10,487 | 0 | 12 | 2009-08-17T19:33:00.000 | c++,python,wt | Web Application Frameworks: C++ vs Python | 0 | 2 | 7 | 1,290,620 | 1 |
0 | 0 | I have a wx.Frame that has only a single child. While setting up the child's wx.Sizer, I can use the wx.SHAPED flag, which keeps the aspect ratio of the child locked. However, the Frame still has complete freedom in it's aspect ratio, and will leave a blank space in the area that is left unused by the child.
How can I ... | true | 1,291,991 | 1.2 | 0 | 0 | 5 | Sizers cannot be applied to top-level windows (in order to define properties of the windows themselves as opposed to their contents), so unfortunately there is no "true" way to lock in the aspect ratio. Your best bet would be to catch your window's OnSize event, get the size that the user wants the window to be (which ... | 0 | 5,993 | 0 | 2 | 2009-08-18T05:37:00.000 | wxpython,resize,wxwidgets,frame,aspect-ratio | wxwidgets/wxPython: Resizing a wxFrame while keeping aspect ratio | 0 | 1 | 2 | 1,292,083 | 1 |
0 | 0 | I have two PNGs that I am trying to combine into a PDF using ReportLab 2.3 on Python 2.5. When I use canvas.drawImage(ImageReader) to write either PNG onto the canvas and save, the transparency comes out black. If I use PIL (1.1.6) to generate a new Image, then paste() either PNG onto the PIL Image, it composits just... | false | 1,308,710 | 0.132549 | 0 | 0 | 2 | I've found that mask='auto' has stopped working for me with reportlab 3.1.8. In the docs it says to pass the values that you want masked out. So what works for me now is mask=[0, 2, 0, 2, 0, 2, ]. Basically it looks like this `mask=[red_start, red_end, green_start, green_end, blue_start, blue_end, ]
The mask parameter... | 0 | 11,462 | 0 | 29 | 2009-08-20T20:45:00.000 | python,python-imaging-library,reportlab | Transparency in PNGs with reportlab 2.3 | 0 | 2 | 3 | 28,385,327 | 1 |
0 | 0 | I have two PNGs that I am trying to combine into a PDF using ReportLab 2.3 on Python 2.5. When I use canvas.drawImage(ImageReader) to write either PNG onto the canvas and save, the transparency comes out black. If I use PIL (1.1.6) to generate a new Image, then paste() either PNG onto the PIL Image, it composits just... | false | 1,308,710 | 0.066568 | 0 | 0 | 1 | ReportLab uses PIL for managing images. Currently, PIL trunk has patch applied to support transparent PNGs, but you will have to wait for a 1.1.6 release if you need stable package. | 0 | 11,462 | 0 | 29 | 2009-08-20T20:45:00.000 | python,python-imaging-library,reportlab | Transparency in PNGs with reportlab 2.3 | 0 | 2 | 3 | 1,311,056 | 1 |
0 | 0 | I started using Wing IDE and it's great. I'm building a wxPython app, and I noticed that Wing IDE catches exceptions that are usually caught by wxPython and not really raised. This is usually useful, but I would like to disable this behavior occasionally. How do I do that? | true | 1,323,361 | 1.2 | 0 | 0 | 0 | There is a Ignore this exception location check box in the window where the exception is reported in wing, or you could explicitly silence that specific exception in you code with a try except block. | 1 | 175 | 0 | 0 | 2009-08-24T16:21:00.000 | python,wxpython,wing-ide | Getting Wing IDE to stop catching the exceptions that wxPython catches | 0 | 1 | 1 | 1,323,458 | 1 |
0 | 0 | I am using IronPython studio to create IronPython scripts and convert them into executables. When converted to executables, it creates a Main exe and two dlls (IronMath.dll and IronPython.dll). Is it possible to create the executables without IronPython studio. I tried PYC downloaded from codeplex.com. It creates an ex... | false | 1,327,105 | 0.066568 | 0 | 0 | 1 | I maybe don't understand the question well but copying IronMath.dll and IronPython.dll to the folder with main.exe and main.dll should work for Ironpython 1.x. These .dlls are different for IronPython 2.x.
Edit: Well, I tried PYC with IP 1.1 and it does not work. That means you have to use it with at least IP 2.0.2 (it... | 1 | 3,879 | 0 | 0 | 2009-08-25T09:25:00.000 | ironpython,ironpython-studio | Generating EXE out of IronPython script | 0 | 3 | 3 | 1,330,323 | 1 |
0 | 0 | I am using IronPython studio to create IronPython scripts and convert them into executables. When converted to executables, it creates a Main exe and two dlls (IronMath.dll and IronPython.dll). Is it possible to create the executables without IronPython studio. I tried PYC downloaded from codeplex.com. It creates an ex... | false | 1,327,105 | 0 | 0 | 0 | 0 | A DLL is a dynamically linked library. It's required for your application to run properly. All applications written in .NET use them. You just don't know it, because support is built into the .NET framework, which most everyone has installed on their systems. Yay, way to go Microsoft. The DLR (Dynamic Language Runtime)... | 1 | 3,879 | 0 | 0 | 2009-08-25T09:25:00.000 | ironpython,ironpython-studio | Generating EXE out of IronPython script | 0 | 3 | 3 | 1,344,862 | 1 |
0 | 0 | I am using IronPython studio to create IronPython scripts and convert them into executables. When converted to executables, it creates a Main exe and two dlls (IronMath.dll and IronPython.dll). Is it possible to create the executables without IronPython studio. I tried PYC downloaded from codeplex.com. It creates an ex... | true | 1,327,105 | 1.2 | 0 | 0 | 2 | I have created a C# application that uses the IronPython.dll and IronMath.dll to convert the IronPython scripts to executables. This doesn't require IronPython studio to be present. Only the DLLs are enough. The behavior of exe is same as that created by IronPython studio(Integrated with VS2008) | 1 | 3,879 | 0 | 0 | 2009-08-25T09:25:00.000 | ironpython,ironpython-studio | Generating EXE out of IronPython script | 0 | 3 | 3 | 1,389,659 | 1 |
0 | 0 | I want main window to "gray, freeze, stop working", when some other window is opened. Is there some default way to do it? Pretty much the same as gtk.Dialog is working.
EDIT: Currently I'm just replacing all contents by a text line, but I guess there should be better way. | true | 1,329,076 | 1.2 | 0 | 0 | 3 | You really shouldn't try to make a program become unresponsive.
If what you want to do is stop the user from using the window, make the dialog modal: gtk.Dialog.set_modal(True) | 0 | 310 | 0 | 0 | 2009-08-25T15:33:00.000 | python,window,pygtk,freeze | How to freeze/grayish window in pygtk? | 0 | 1 | 1 | 1,329,140 | 1 |
0 | 0 | Quick question.
I'm using Linux and I want to try making a GUI with Python. I've heard about something like Qt, GTK+ and PyGTK but I don't know what they are exactly and what the difference between them is.
Is there any difference on how they work with different DEs like GNOME, KDE, XFCE etc.? Is there any IDE that all... | false | 1,355,918 | 0.07983 | 0 | 0 | 2 | Each desktop environment uses a specific toolkit to build it's components. For example, KDE uses Qt and GNOME uses Gtk.
Your use of a toolkit will be dependent upon what type of desktop environment you're targeting at, and if you want to target a wide range of desktops then use a toolkit which will work on many deskto... | 1 | 48,034 | 0 | 14 | 2009-08-31T05:25:00.000 | python,linux,user-interface,gtk,pygtk | Creating GUI with Python in Linux | 0 | 1 | 5 | 1,355,948 | 1 |
0 | 0 | I am creating a simple tool to add album cover images to mp3 files in python. So far I am just working on sending a request to amazon with artist and album title, and get the resulting list, as well as finding the actual images for each result. What I want to do is to display a simple frame with a button/link for each ... | false | 1,356,255 | -0.099668 | 0 | 0 | -1 | For displaying jpgs in Python check out PIL | 0 | 7,084 | 0 | 5 | 2009-08-31T07:32:00.000 | python,tkinter | Display jpg images in python | 0 | 1 | 2 | 1,356,882 | 1 |
0 | 0 | I am about to start my A-Level Computing project (High School Level) which will hopefully be a point-of-sale application for Mac OS. Unfortunately, Objective-C is a little out of my league at the moment and should I get stuck with it in the project I have no one to help out so I would fail the section of the course an... | true | 1,359,227 | 1.2 | 0 | 0 | 18 | Allow me to echo what has already been said. I too am a student who just started a Cocoa development project, and at the beginning I thought "Well, I already know Python, I'll just use PyObjC and save myself from having to learn Objective-C, which looks beyond my grasp." I learned quickly that it can't be done. You can... | 1 | 4,914 | 0 | 12 | 2009-08-31T20:19:00.000 | python,cocoa,xcode,osx-snow-leopard,pyobjc | PyObjc and Cocoa on Snow Leopard | 0 | 4 | 6 | 1,359,605 | 1 |
0 | 0 | I am about to start my A-Level Computing project (High School Level) which will hopefully be a point-of-sale application for Mac OS. Unfortunately, Objective-C is a little out of my league at the moment and should I get stuck with it in the project I have no one to help out so I would fail the section of the course an... | false | 1,359,227 | 0.132549 | 0 | 0 | 4 | And as one of the Checkout developers I'll weigh in too (hi Quinn!). From what we've seen PyObjC runs fairly well on Snow Leopard. We've built one of the latest SVN revisions 2.2b with some customizations on Leopard and just moved over the site-packages folder.
Theoretically you should be able to use the built in Pytho... | 1 | 4,914 | 0 | 12 | 2009-08-31T20:19:00.000 | python,cocoa,xcode,osx-snow-leopard,pyobjc | PyObjc and Cocoa on Snow Leopard | 0 | 4 | 6 | 1,359,575 | 1 |
0 | 0 | I am about to start my A-Level Computing project (High School Level) which will hopefully be a point-of-sale application for Mac OS. Unfortunately, Objective-C is a little out of my league at the moment and should I get stuck with it in the project I have no one to help out so I would fail the section of the course an... | false | 1,359,227 | 0.099668 | 0 | 0 | 3 | I'm a long time python developer who's been doing iPhone apps for awhile now (and only using my python knowledge to package up build files for the apps in run scripts), then who started making some PyObjC apps.
I'd have to say, PyObjC is pretty much STILL having to learn objective C (which I already know via iPhone dev... | 1 | 4,914 | 0 | 12 | 2009-08-31T20:19:00.000 | python,cocoa,xcode,osx-snow-leopard,pyobjc | PyObjc and Cocoa on Snow Leopard | 0 | 4 | 6 | 1,905,283 | 1 |
0 | 0 | I am about to start my A-Level Computing project (High School Level) which will hopefully be a point-of-sale application for Mac OS. Unfortunately, Objective-C is a little out of my league at the moment and should I get stuck with it in the project I have no one to help out so I would fail the section of the course an... | false | 1,359,227 | 0.099668 | 0 | 0 | 3 | I hardly use PyObjC myself, but I believe you need to run the Xcode installer on the Snow Leopard DVD in order to use PyObjC.
Also, as Quinn said, you will need to understand at least some Objective-C in order to use a Cocoa bridge like PyObjC without tearing your hair out. It just doesn't insulate you that completely. | 1 | 4,914 | 0 | 12 | 2009-08-31T20:19:00.000 | python,cocoa,xcode,osx-snow-leopard,pyobjc | PyObjc and Cocoa on Snow Leopard | 0 | 4 | 6 | 1,359,428 | 1 |
0 | 0 | I want to have a text control that only accepts numbers. (Just integer values like 45 or 366)
What is the best way to do this? | true | 1,369,086 | 1.2 | 0 | 0 | 5 | IntCtrl, Masked Edit Control, and NumCtrl are all designed to do just this, with different levels of control. Checkout the wx demo under "More Windows/Controls" to see how they work.
(Or, if you're instead really looking forward to doing this directly with a raw TextCtrl, I think you'd want to catch EVT_CHAR events, t... | 0 | 11,475 | 0 | 10 | 2009-09-02T17:27:00.000 | wxpython,textctrl | Is it possible to limit TextCtrl to accept numbers only in wxPython? | 0 | 2 | 7 | 1,370,281 | 1 |
0 | 0 | I want to have a text control that only accepts numbers. (Just integer values like 45 or 366)
What is the best way to do this? | false | 1,369,086 | -0.028564 | 0 | 0 | -1 | Please check "Validator.py" script in wxpython demo. it is exactly what you need | 0 | 11,475 | 0 | 10 | 2009-09-02T17:27:00.000 | wxpython,textctrl | Is it possible to limit TextCtrl to accept numbers only in wxPython? | 0 | 2 | 7 | 23,052,986 | 1 |
0 | 0 | I'm currently working on an application written in C#, which I'm embedding IronPython in. I generally have no problems about it, but there's one thing that I don't know how to deal with.
I want to import an external module into the script. How can I do that? Simple import ext_lib doesn't work. Should I add a path to t... | false | 1,371,994 | 0.197375 | 1 | 0 | 3 | If you have installed IronPython from NuGet packages and you want modules from the CPython Standard Library then the best way to do it is by installing the IronPython.StdLib NuGet package which is from the same authors of IronPython. | 1 | 34,961 | 0 | 20 | 2009-09-03T07:50:00.000 | python,import,ironpython | Importing external module in IronPython | 0 | 1 | 3 | 67,905,932 | 1 |
0 | 0 | I would like to remove border on a gtk.Button and also set its size fixed. How can I accomplish that?
My button looks like that:
b = gtk.Button()
b.set_relief(gtk.RELIEF_NONE)
Thanks!
p.d: I'm using pygtk | false | 1,383,663 | -0.099668 | 0 | 0 | -1 | I don't think the EventBox can send button events like "activated" and "clicked". | 0 | 2,081 | 0 | 0 | 2009-09-05T16:01:00.000 | python,gtk,pygtk | remove inner border on gtk.Button | 0 | 1 | 2 | 1,507,847 | 1 |
0 | 0 | I'm developing on Windows, and I've searched everywhere without finding anyone talking about this kind of thing.
I made a C++ app on my desktop that embedded Python 3.1 using MSVC. I linked python31.lib and included python31.dll in the app's run folder alongside the executable. It works great. My extension and embeddin... | true | 1,387,906 | 1.2 | 0 | 0 | 24 | In addition to pythonxy.dll, you also need the entire Python library, i.e. the contents of the lib folder, plus the extension modules, i.e. the contents of the DLLs folder. Without the standard library, Python won't even start, since it tries to find os.py (in 3.x; string.py in 2.x). On startup, it imports a number of ... | 1 | 11,259 | 0 | 23 | 2009-09-07T06:56:00.000 | python,c++,dll,embed | C++ with Python embedding: crash if Python not installed | 0 | 2 | 4 | 1,387,977 | 1 |
0 | 0 | I'm developing on Windows, and I've searched everywhere without finding anyone talking about this kind of thing.
I made a C++ app on my desktop that embedded Python 3.1 using MSVC. I linked python31.lib and included python31.dll in the app's run folder alongside the executable. It works great. My extension and embeddin... | false | 1,387,906 | 1 | 0 | 0 | 6 | A zip of the Python standard library worked for me with Python27.
I zipped the contents of Lib and dll, and made sure there was no additional python27-subfolder or Lib or dll subfolder. i.e. just a zip named python27.zip containing all the files.
I copied that zip and the python27.dll alongside the executable. | 1 | 11,259 | 0 | 23 | 2009-09-07T06:56:00.000 | python,c++,dll,embed | C++ with Python embedding: crash if Python not installed | 0 | 2 | 4 | 9,115,925 | 1 |
0 | 0 | How do you embed a vpython plot (animated) within your Qt GUI? so that it has its own display area and would not need to created a new window anymore. | false | 1,397,553 | 0.099668 | 0 | 0 | 1 | I contacted maintainer of VPython and he confirmed, that he is not aware of any working solution where Visual is embedded into QT window.
That turned me to try VTK and so far I'm pretty happy, no problem with using VTK within PyQT framework. | 0 | 1,265 | 0 | 2 | 2009-09-09T04:40:00.000 | python,user-interface,qt | embedding plot within Qt gui | 0 | 1 | 2 | 1,414,819 | 1 |
1 | 0 | I am using a wxPython wx.html.HtmlWindow to display part of my interface. The user can scroll down a list of links in a window smaller than the list. When they click on a link, I need to repaint the web page, but I want to return the page position back to where they clicked it.
I've tried MouseEvent.GetLogicalPosition... | false | 1,400,179 | 0 | 0 | 0 | 0 | Usually, click events are trigged by MouseUp events. If you track the mouse position by capturing any MouseDown events, you will know where the last click (MouseUp) happened, and that should allow you to reconstruct things.
For this particular problem, you might have to do a bit more work in MouseDown like checking if ... | 0 | 1,216 | 0 | 2 | 2009-09-09T14:45:00.000 | python,wxpython | How do I scroll a wxPython wx.html.HtmlWindow back down to where it was when the user clicked a link? | 0 | 1 | 4 | 1,579,014 | 1 |
0 | 0 | I'm starting to study Python, and for now I like it very much. But, if you could just answer a few questions for me, which have been troubling me, and I can't find any definite answers to them:
What is the relationship between Python's C implementation (main version from python.org) and IronPython, in terms of languag... | false | 1,403,103 | 1 | 0 | 0 | 18 | 1) IronPython and CPython share nearly identical language syntax. There is very little difference between them. Transitioning should be trivial.
2) The libraries in IronPython are very different than CPython. The Python libraries are a fair bit behind - quite a few of the CPython-accessible libraries will not work (... | 0 | 3,658 | 0 | 15 | 2009-09-10T02:30:00.000 | python,excel,vba,ironpython,python.net | Python - IronPython dilemma | 0 | 2 | 5 | 1,403,134 | 1 |
0 | 0 | I'm starting to study Python, and for now I like it very much. But, if you could just answer a few questions for me, which have been troubling me, and I can't find any definite answers to them:
What is the relationship between Python's C implementation (main version from python.org) and IronPython, in terms of languag... | false | 1,403,103 | 0.039979 | 0 | 0 | 1 | 1) The language implemented by CPython and IronPython are the same, or at most a version or two apart. This is nothing like the situation with Java and Javascript, which are two completely different languages given similar names by some bone-headed marketing decision.
2) 3rd-party libraries implemented in C (such as n... | 0 | 3,658 | 0 | 15 | 2009-09-10T02:30:00.000 | python,excel,vba,ironpython,python.net | Python - IronPython dilemma | 0 | 2 | 5 | 1,403,118 | 1 |
0 | 0 | I'm using pygame with python 2.6 right now, But I want to use python 3.1.1 instead. The normal pygame only works with 2.x, but the subversion ones work with 3.x I think. But what about pgreloaded? Is that useable yet? The normal pygame actually works with 3.1 too, but not for os x (at least there isn't a download). Doe... | true | 1,414,258 | 1.2 | 0 | 0 | 1 | Just stick with Python 2.6. | 0 | 1,917 | 0 | 3 | 2009-09-12T04:16:00.000 | python,python-3.x,pygame | Should I use pgreloaded? Or subversion of pygame? | 0 | 1 | 4 | 1,416,509 | 1 |
0 | 0 | I have a computer game I'm working on, and I'm wanting to give the user an option to turn off alpha compositing for speed purposes. Rather than doing checks everywhere, does Pygame have a global option to say "Don't use alpha" such that it would just ignore all my calls to set_alpha and the likes? | true | 1,424,734 | 1.2 | 0 | 0 | 1 | Considering the pygame docs I would say "no, there is no global way to disable alpha".
However there are at least two 'local' ways to do it:
First would be to subclass pygame.Surface and provide your own implementation of set_alpha
which in turn could honor your global alpha settings.
Second one is a bit more tr... | 0 | 570 | 0 | 1 | 2009-09-15T01:49:00.000 | python,pygame,alphablending | Turn off Pygame alpha | 0 | 1 | 2 | 1,429,443 | 1 |
0 | 0 | I am embedding a c++ library (binding done with SIP) in my python application. Under certain circonstances (error cases), this library uses exit(), which causes my entire application to exit.
Is there a way to catch this event, or do I need to modify the library to handle error cases differently ?
Thank you very much... | false | 1,439,533 | 0 | 1 | 0 | 0 | You can override the library linking with LD_LIBRARY_PATH and make your own exit function. Works fine. | 0 | 1,407 | 0 | 7 | 2009-09-17T15:19:00.000 | python,exception,binding,exit | How to catch exit() in embedded C++ module from python code? | 0 | 2 | 2 | 8,099,938 | 1 |
0 | 0 | I am embedding a c++ library (binding done with SIP) in my python application. Under certain circonstances (error cases), this library uses exit(), which causes my entire application to exit.
Is there a way to catch this event, or do I need to modify the library to handle error cases differently ?
Thank you very much... | true | 1,439,533 | 1.2 | 1 | 0 | 7 | You must modify the source of the library. There is no "exception handling" in C and exit() does not return to the calling code under any circumstances. | 0 | 1,407 | 0 | 7 | 2009-09-17T15:19:00.000 | python,exception,binding,exit | How to catch exit() in embedded C++ module from python code? | 0 | 2 | 2 | 1,439,585 | 1 |
0 | 0 | I have a wx.TextCtrl that I am using to represent a display with a fixed number of character rows and columns. I would like to hide the vertical scrollbar that is displayed to the right of the text pane since it is entirely unnecessary in my application. Is there a way to achieve this?
Also...I would like to hide the b... | true | 1,441,502 | 1.2 | 0 | 0 | 4 | How about setting the style wx.TE_NO_VSCROLL for the wx.TxtCtrl? | 0 | 2,839 | 0 | 4 | 2009-09-17T21:47:00.000 | python,wxpython,wxtextctrl | Hiding Vertical Scrollbar in wx.TextCtrl | 0 | 1 | 1 | 1,442,312 | 1 |
0 | 0 | Accelerators on wxPython do not seem to work with nested panels. In other words:
-----------------------------------------------
| Main panel |
| ----------------- ----------------- |
| | Subpanel 1 | | Subpanel 2 | |
| | accelerator | | ac... | false | 1,446,672 | 0 | 0 | 0 | 0 | If the main panel has the accelerator table with Alt+b, this should work. Maybe the sub-panels have their own accelerator tables that are conflicting? You might try inactivating these with subpanel.SetAcceleratorTable(wx.NullAcceleratorTable) for each subpanel. | 0 | 336 | 0 | 2 | 2009-09-18T20:28:00.000 | wxpython | wxPython, nested panels and accelerators | 0 | 1 | 1 | 1,483,678 | 1 |
0 | 0 | I'm new to Python and I'm trying to create a simple GUI using Tkinter.
So often in many user interfaces, hitting the tab button will change the focus from one Text widget to another. Whenever I'm in a Text widget, tab only indents the text cursor.
Does anyone know if this is configurable? | false | 1,450,180 | -1 | 0 | 0 | -5 | It is really simple in PyQt4 simply use this one single line below and you will be able to change focus by pressing tab button:
self.textEdit.setTabChangesFocus(True) | 0 | 13,443 | 0 | 15 | 2009-09-20T03:06:00.000 | python,tkinter | Change the focus from one Text widget to another | 0 | 1 | 3 | 41,727,157 | 1 |
0 | 0 | I'm far from a python expert but I hear this one all the time, about its C/C++ bindings. How does this concept work, and how does Python (and Java) bind to C-based APIs like OpenGL? This stuff has always been a mystery to me. | false | 1,475,637 | 1 | 0 | 0 | 12 | Interpreters Written in C89 with Reflection, Who Knew?
I have a feeling you are looking for an explanation of the mechanism and not a link to the API or instructions on how to code it. So, as I understand it . . .
The main interpreter is typically written in C and is dynamically linked. In a dynamically linked environ... | 0 | 3,183 | 0 | 16 | 2009-09-25T05:55:00.000 | java,python,binding | How do you bind a language (python, for example) to another (say, C++)? | 0 | 1 | 6 | 1,475,717 | 1 |
0 | 0 | I am trying to display search result data quickly. I have all absolute file paths for files on my network drive(s) in a single, ~50MB text file. The python script makes a single pass over every line in this file [kept on the local drive] in a second or less, and that is acceptable. That is the time it takes to gather ... | false | 1,507,075 | 0 | 0 | 0 | 0 | Are people really going to read (or need) all 10MB in a text control? Probably not.
Suggest that, you load on demand by paging in portions of the data.
Or better still, provide some user search functionality that narrows down the results to the information of interest. | 0 | 1,831 | 0 | 0 | 2009-10-01T23:44:00.000 | python,file-io,wxpython,wxwidgets,mmap | wx.TextCtrl.LoadFile() | 0 | 1 | 2 | 1,507,087 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.