Web Development int64 0 1 | Data Science and Machine Learning int64 0 1 | Question stringlengths 35 6.31k | is_accepted bool 2
classes | Q_Id int64 5.14k 40.5M | Score float64 -1 1.2 | Other int64 0 1 | Database and SQL int64 0 1 | Users Score int64 -6 163 | Answer stringlengths 19 4.91k | Python Basics and Environment int64 0 1 | ViewCount int64 12 475k | System Administration and DevOps int64 0 1 | Q_Score int64 0 346 | CreationDate stringlengths 23 23 | Tags stringlengths 6 68 | Title stringlengths 12 138 | Networking and APIs int64 0 1 | Available Count int64 1 31 | AnswerCount int64 1 35 | A_Id int64 5.3k 72.3M | GUI and Desktop Applications int64 1 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 0 | I have heard of Python's GIL problem, which states that there can only be one Python thread executing the Python bytecode at one time in a multicore machine. So a multithreaded Python program is not a good idea.
I am wondering if I can write a C extension that uses pthread to potentially boost the performance of my pro... | false | 12,635,762 | 0.066568 | 0 | 0 | 1 | The Python interpreter is not aware of C launched threads in any way, so they can happily churn their own CPU time.
However I doubt this is a correct solution for your performance problems. First try using multiple processes with multiprocess module. If interprocess IO is too much after that you can result trickery lik... | 1 | 1,191 | 0 | 7 | 2012-09-28T07:45:00.000 | python,multithreading,gil | Could a C extension for multithreaded Python boost performance? | 0 | 3 | 3 | 12,636,228 | 1 |
0 | 0 | I have heard of Python's GIL problem, which states that there can only be one Python thread executing the Python bytecode at one time in a multicore machine. So a multithreaded Python program is not a good idea.
I am wondering if I can write a C extension that uses pthread to potentially boost the performance of my pro... | true | 12,635,762 | 1.2 | 0 | 0 | 2 | To answer your original question:
Yes, C extensions can be immune from the GIL, provided they do not call any Python API functions without the GIL held. So, if you need to communicate with the Python app, you'd need to acquire the GIL to do so. If you don't want to get your hands too dirty with the C API, you can use c... | 1 | 1,191 | 0 | 7 | 2012-09-28T07:45:00.000 | python,multithreading,gil | Could a C extension for multithreaded Python boost performance? | 0 | 3 | 3 | 12,636,279 | 1 |
0 | 0 | I have heard of Python's GIL problem, which states that there can only be one Python thread executing the Python bytecode at one time in a multicore machine. So a multithreaded Python program is not a good idea.
I am wondering if I can write a C extension that uses pthread to potentially boost the performance of my pro... | false | 12,635,762 | 0 | 0 | 0 | 0 | Provided one thread runs CPU bound while the other runs IO bound, I don't see a problem.
The IO bound thread will call IO routines which usually release the GIL while doing their stuff, effectively allowing the other thread to run.
So give the "simple" solution a try and switch only if it really doesn't work the way yo... | 1 | 1,191 | 0 | 7 | 2012-09-28T07:45:00.000 | python,multithreading,gil | Could a C extension for multithreaded Python boost performance? | 0 | 3 | 3 | 12,636,431 | 1 |
0 | 0 | I am designing a Copy/Paste Application for Windows os using Python.Now I want to a Register my application with hotkey for "Ctrl+V" So that when any one press "Ctrl+V" Paste is done through my application and not through windows default Copy/Paste application.But I don't know how to get the list of files path which ar... | true | 12,659,719 | 1.2 | 0 | 0 | 4 | When someone presses the Ctrl+C key in Explorer, Explorer calls OleSetClipboard() with an IDataObject containing various formats, which may include CF_FILES, CFSTR_FILECONTENTS and CFSTR_SHELLIDLIST. | 0 | 339 | 0 | 1 | 2012-09-30T08:08:00.000 | python,windows,winapi,python-2.7,pywin32 | Windows:What actually happens when Ctrl+C is pressed in windows explorer | 0 | 1 | 1 | 12,659,846 | 1 |
0 | 0 | My question is about the easiness of distributing the GUI app across the platforms (Mac/Linux/Windows), and I want to know the one that makes the user's job easiest.
My current understanding is that Tkinter app is the easiest for the users (to install) because as long as the user has installed a Python in her box, my a... | true | 12,666,278 | 1.2 | 0 | 0 | 8 | If you're running Ubuntu, PyQt will be installed by default. Most linux distros will have one of PyGtk or PyQt installed by default. WxPython was most likely installed in your Ubuntu box as a dependency for some other package in your system.
If your target market is Linux, you can just create a deb or rpm package and... | 0 | 4,379 | 0 | 8 | 2012-10-01T00:22:00.000 | python,user-interface,wxpython,pyqt,tkinter | Python GUI App Distribution: written in wxPython, TKinter or QT | 0 | 2 | 3 | 12,667,986 | 1 |
0 | 0 | My question is about the easiness of distributing the GUI app across the platforms (Mac/Linux/Windows), and I want to know the one that makes the user's job easiest.
My current understanding is that Tkinter app is the easiest for the users (to install) because as long as the user has installed a Python in her box, my a... | false | 12,666,278 | 0.26052 | 0 | 0 | 4 | Tkinter is the only one that's included with Python. wxPython and pyQT need both the wxWindows or QT libraries and the wxPython or pyQT libraries to be installed on the system.
However, Tk does not look very nice. If you're already making the user install Python, you could just as well have them install the libraries t... | 0 | 4,379 | 0 | 8 | 2012-10-01T00:22:00.000 | python,user-interface,wxpython,pyqt,tkinter | Python GUI App Distribution: written in wxPython, TKinter or QT | 0 | 2 | 3 | 12,666,368 | 1 |
0 | 0 | Simple question. I'd like to use F2 or Enter for rename, and double click to open a file.
Using self.treeView.doubleClicked.connect(self.doubleclick) I can do things in my self.doubleClick method, but the renaming is still triggered.
The model is not read-only (model.setReadOnly(False)). | false | 12,670,874 | 1 | 0 | 0 | 9 | I don't know if you have this in python versions, but in C++ Qt you just set the edit triggers in the QAbstractItemView:
void setEditTriggers ( EditTriggers triggers ) | 0 | 3,516 | 0 | 4 | 2012-10-01T09:45:00.000 | python,pyqt,double-click,qtreeview,qfilesystemmodel | How to disable the double click file renaming behavior on QTreeView and QFileSystemModel in PyQt? | 0 | 1 | 2 | 15,352,784 | 1 |
0 | 0 | Ok, I am new to python and my code calls some library (which is wrapping some C++ code) and I pass it a callback function on my side (as library needs to). The strange thing is that if I insert a breakpoint in my other part of the code, it will hit and deugger stops in eclipse but none of my breakpoints in the callbac... | true | 12,718,216 | 1.2 | 0 | 0 | 1 | Try importing pdb and just manually setting breakpoints in the code with pdb.set_trace(). This won't work in all multi-threaded cases, but I find that it works in many of them and is a big improvement over the native Eclipse/PyDev debugger. | 1 | 736 | 0 | 1 | 2012-10-03T23:16:00.000 | python | In Pydev setting a breakpoint, but breakpoint not hit on callbacks only | 0 | 1 | 1 | 12,727,999 | 1 |
0 | 0 | I want to use ironpython inside my C# App, but I am afraid that it will cause a security issue, I don't want the end user to use all the available DLLs of my App, instead I want to provide custom classes that user can use in python.
My question is how to secure my dlls from being used in ironpython.
the end user may ad... | false | 12,721,998 | 0 | 0 | 0 | 0 | The trick is to run IronPython in its own AppDomain and only provide the assemblies you want the user to be able to call to that AppDomain, and then set the security policy to prevent them from referencing more. | 1 | 97 | 0 | 0 | 2012-10-04T07:09:00.000 | c#,security,ironpython | Secure and protect classes or DLLs in .NET from being used in IronPython | 0 | 1 | 1 | 12,730,482 | 1 |
0 | 0 | I see that all tutorials about the pyopengl implements pygame, is posible use PyOpengl without pygame?. and if is so, then, is most faster without pygame or not? | false | 12,737,366 | 0 | 0 | 0 | 0 | PyGame's only relation to PyOpenGL is that PyGame can provide a window for PyOpenGL to render on.
Your question now is whether PyGame's windowing environment is faster than another.
In my experience, GLUT can be very slightly faster than PyGame for windowing (by comparing GLUT and SDL). wxWidgets I think is a bit slow... | 0 | 1,388 | 0 | 3 | 2012-10-04T23:17:00.000 | python-3.x,pygame,pyopengl | PyOpengl without PyGame | 0 | 1 | 2 | 12,755,970 | 1 |
1 | 0 | I am trying to make a android apps using Dojo toolkit and GeoDjango. Its a project based on GPS work. Can anyone help in this issue? I want to have the staring steps? I have some source code and SDK installed in my computer. But still confused about the staring. can Anyone help?
How I will make it possible to create th... | true | 12,750,731 | 1.2 | 0 | 0 | 0 | I suggest to take a look at PhoneGap. I use it to embed JQuery mobile inside a Android application. PhoneGap makes it easy to embed javascript inside an Android application. Just try the PhoneGap tutorial.
Edit: PhoneGap let u use the GPS sensor through javascript | 0 | 197 | 0 | 1 | 2012-10-05T16:53:00.000 | android,python,django,dojo | Android apps with Dojo and geodjango | 0 | 1 | 1 | 12,750,812 | 1 |
0 | 0 | I'm writing a 2D Elite-style game in Python+Pygame, and I need to move the starmap about so the player can look at the whole thing.
The way I've done this sort of thing before is to just add the coordinates of the 'camera' to the coordinates of everything else when drawing. However, I notice Pygame has a function to mo... | true | 12,767,315 | 1.2 | 0 | 0 | 0 | Well for starters, one huge bitmap is not really good, since it eats away resources.
What I do, is divide the map into size of camera, and end up with having 9 tiles displayed at a time, moving the camera shifts the map, and draws only the ones that are seen.
There isn't a huge improvement though.
You can always try ... | 0 | 676 | 0 | 2 | 2012-10-07T08:39:00.000 | python,optimization,graphics,pygame | Is Surface.scroll() the right way to implement a movable 2D viewpoint in Pygame? | 0 | 1 | 1 | 12,767,902 | 1 |
0 | 0 | I have a poorly designed and big (> 300 public functions, >200 numeric constants defined with #define in the header file) that I have to wrap in Python. I have the dll and the h file. The library is updated yearly, till now in a backwards compatible way (i.e. just functions were added, a constant keep their numerical v... | false | 12,770,077 | 0 | 0 | 0 | 0 | Maintaining a Python library with a ctypes backend isn't an unmanageable approach. Obviously the initial investment is larger than using automated tools, but the API you are left with should be much better.
If you do take that route, aim to separate the Python API entirely from the C library though. Supporting multiple... | 1 | 249 | 0 | 7 | 2012-10-07T15:21:00.000 | python,dll,wrapper,ctypes | Maintainability of a python wrapping of a C library | 0 | 1 | 2 | 12,996,919 | 1 |
0 | 0 | I recently discovered how easy and convenient using wxPython is for writing GUI applications. Unfortunately installing wxPython is a giant throbbing pain in the neck. I consider myself pretty tech-savvy but it took me almost an hour to get a working setup of wxPython on a Pythonbrew install on an Ubuntu machine. On my ... | true | 12,788,394 | 1.2 | 0 | 0 | 1 | wx has to be compiled for each target plattform. Binaries are always OS dependent, so no, there cannot be a portable wx version. | 0 | 298 | 0 | 1 | 2012-10-08T19:44:00.000 | python,wxpython | Can I embed wxPython in my project, saving users the trouble of installing it? | 0 | 1 | 2 | 12,788,472 | 1 |
0 | 0 | Is there any way to disable the editing of specific cells by the user when using ListCtrl with TextEditMixin?
I guess there's some way that Vetos the editing event, however I can't find it. | false | 12,806,542 | 0.066568 | 0 | 0 | 1 | As I recall, you have to bind to EVT_LIST_BEGIN_LABEL_EDIT. Then in your event handler you just check what column you're in and if you're in a column that you want to be editable, then you do "event.Allow()", otherwise you veto. | 0 | 2,303 | 0 | 7 | 2012-10-09T18:53:00.000 | python,listview,wxpython | wx.ListCtrl with TextEditMixin - Disable Editing of Selected Cells | 0 | 2 | 3 | 12,807,804 | 1 |
0 | 0 | Is there any way to disable the editing of specific cells by the user when using ListCtrl with TextEditMixin?
I guess there's some way that Vetos the editing event, however I can't find it. | false | 12,806,542 | 0.132549 | 0 | 0 | 2 | In wxPython version 4.0.0 the line:
if event.m_col == 1
does not work. Use
if event.GetColumn() == 1
instead. | 0 | 2,303 | 0 | 7 | 2012-10-09T18:53:00.000 | python,listview,wxpython | wx.ListCtrl with TextEditMixin - Disable Editing of Selected Cells | 0 | 2 | 3 | 45,455,459 | 1 |
0 | 0 | I am using GtkMenuToolButton and it has a button and a menu. When you click on the arrow the menu is opened. I'd like to make the button open that same menu as well. Simply emitting "show-menu" in the "clicked" callback did not work. Please help how to make this work. | false | 12,818,397 | 0.099668 | 0 | 0 | 1 | I have currently ended up doing this:
Instead of GtkMenuToolButton I have GtkToolItem with custom content
In custom content I have GtkMenuButton
Inside that one, I delete the default GtkArrow and replace it with 1x2 GtkGrid which has a Label + GtkArrow
As a whole it does what I want =) | 0 | 213 | 0 | 1 | 2012-10-10T11:35:00.000 | python,gtk | How to make GtkMenuToolButton open the same menu when 'clicked' signal is emitted? | 0 | 1 | 2 | 12,827,853 | 1 |
0 | 0 | I am having some issues making 'bigger than simple scripts and stuff' applications in Python. I have a class called WinMain, a class called Engine, one called State and another called Element. It's laid out like this:
WinMain is the main class of the program, it has a mainLoop function and various other things.
Engine... | true | 12,848,684 | 1.2 | 0 | 0 | 4 | Engine is an object that contains data like images and rendering code
This sounds like a God class: they're common in GUI code, and the problem you're having is a common effect of that.
What is the conceptual relationship between different stuff in Engine? Does it need to be tightly coupled, or could the Engine just ... | 0 | 467 | 0 | 3 | 2012-10-11T21:19:00.000 | python,oop,structure | Python structural issue: Giving an 'engine' class to everything | 0 | 1 | 3 | 12,849,650 | 1 |
0 | 0 | I'm trying to create a simple read/write application for a fairly simple USB device, but it's turning out to be not so simple at all.
I'm using WinUSB and SetupAPI DLLs and working from scratch since I can't seem to find anything that actually works for what I need. PyWinUSB and PyUSB and so on and so forth came close,... | false | 12,852,084 | 0 | 0 | 0 | 0 | There is a SetupDiGetClassDevsA and SetupDiGetClassDevsW. The Ex versions allow connecting to a remote machine. The A version takes a byte string for the second parameter, while the W version takes a Unicode string. The return value is a handle to a device information set.
The device information set has to be iterat... | 0 | 1,154 | 0 | 0 | 2012-10-12T04:06:00.000 | python-2.7,ctypes,windows-7-x64,setupapi,pywinusb | Calling SetupDiGetClassDevs from Python only returns an integer value | 0 | 1 | 1 | 12,862,740 | 1 |
0 | 0 | I'm looking for a framework to write a GUI in python, the GUI will also include 3D graphics. I would like the development time to be really short, and the framework easy to get started with.
What do you recommend?
I'm considering PyQt but it doesn't seems to have good 3D support.
Another alternative would be a browser ... | false | 12,853,267 | 0.197375 | 0 | 0 | 1 | In our company we have been working with the combination, Python, PyQt and OpenGL. It has not been super easy to integrate, but it was the best solution we found around 4 years ago. | 0 | 1,682 | 0 | 0 | 2012-10-12T06:13:00.000 | python,user-interface,3d | 3D & GUI for python | 0 | 1 | 1 | 12,854,078 | 1 |
0 | 0 | I am writing a Tkinter App which does some long running operation. In order to prevent Tkinter window from hanging, i am introducing threading :- one thread for performing long running operation, second thread will be for updating GUI based on the QUEUE which will be filled by long running operation. Now I am thinking ... | true | 12,861,495 | 1.2 | 0 | 0 | 1 | It is my understanding that tk needs to be run in the main thread. | 1 | 688 | 0 | 0 | 2012-10-12T14:43:00.000 | python,tkinter | Python Tkinter in thread or in main app? | 0 | 1 | 1 | 12,863,076 | 1 |
0 | 0 | I am attempting to teach myself python and have hit a rough spot once it has come to recursion. I have done the classic recursive functions (factorial, fibonacci numbers...) but I am going back over old code and trying to convert most of my iterative functions to recursive functions for practice.
This is the wall that ... | false | 12,867,465 | 0.099668 | 0 | 0 | 1 | I find it helps a LOT to express recursions in words. What the algorithm says is basically "what's visible at radius N is what's visible from radius N-1". Like, uh, the edge gets bigger. | 1 | 241 | 0 | 0 | 2012-10-12T21:38:00.000 | python,recursion | Recursive Function To Help Clear Tiles (Field Of View) | 0 | 1 | 2 | 12,869,565 | 1 |
0 | 0 | I know FUSE has bindings for C, C++, Python etc. Which effectively means that I can develop FUSE filesystems using those languages.
I wish to use Cython, as it offers much faster speeds as compared to pure Python. That is stressed in a filesystem. Is it possible to produce a FUSE filesystem by coding in Cython?
As far ... | false | 12,875,660 | 0 | 0 | 0 | 0 | You should use it as a Python Fuse System, then you can write your cython stuff in it's own module and just import that module in your python code. Usually file system related operations are IO bound and not CPU bound so I'm not sure how much of a speedup you would get with cython, but I guess try out and compare the r... | 1 | 173 | 1 | 0 | 2012-10-13T18:18:00.000 | python,c,cython,fuse | can I use FUSE with Cython bindings | 0 | 1 | 1 | 12,875,850 | 1 |
0 | 0 | Is it possible to control the position of elements in a wx.MenuBar()? I can't find it in the docs, but it seems like it should be an option. By default, menu elements, like file, view, edit, etc.. are at the left most position, and then each additional element extends to the right. I have a very simple gui, and thus on... | false | 12,878,695 | 0.197375 | 0 | 0 | 2 | Really you have methods to place menu to position that you want:
Append(menu, title)
Add menu to the end of MenuBar (i.e. place it as most right element). title is a title of a new menu. If succed returns True, otherwise - False.
Insert(pos, menu, title)
Insert menu in pos position (after that GetMenu(pos)==menu wi... | 0 | 231 | 0 | 0 | 2012-10-14T02:02:00.000 | python,wxpython | Is there a position the menu elements of a wx MenuBar? | 0 | 1 | 2 | 12,884,118 | 1 |
0 | 0 | I wrote my program to spawn a process of the main application. When I run the pyinstaller packaged exe it says no Module name pygame.base. But if I keep the app in the main thread it doesn't do that.
I need the process to detect closure, because GLUT doesn't have an event for the upper right hand exit button and I can... | false | 12,880,380 | 0 | 0 | 0 | 0 | The [x] button fires for me, when event.type == pygame.QUIT on windows. | 1 | 751 | 0 | 2 | 2012-10-14T08:05:00.000 | python,opengl,multiprocessing,pygame,pyinstaller | No Module name pygame.base | 0 | 1 | 1 | 12,885,990 | 1 |
0 | 0 | I'm considering creating a wxPython application that I'll deploy for Windows and OSX. I want to include Flash objects like YouTube embeds and Twitch.tv embeds in the application. Is that possible? Are there any resources out there that addresses the issue? | true | 12,892,263 | 1.2 | 0 | 0 | 1 | You can try the WebView widget that was mentioned or download the separate webkit port and try that (search the wxPython mailing list for a link to that). Otherwise, the only truly supported wxPython widget that does this is "ActiveX_FlashWindow" and I'm pretty sure that's Windows-only. | 0 | 146 | 0 | 0 | 2012-10-15T08:59:00.000 | python,flash,wxpython | Can I create a cross-platform wxPython application that uses Flash embeds? | 0 | 1 | 1 | 12,896,608 | 1 |
0 | 0 | i'm using IronPython and i want to create some windows form,
i want to create a windows form with some button, and i want to do this in visual studio with iron python,
i'm using visual studio 2012 integrated edition,
each time i create an "ironpython windows form" project, when i want to run it, it says:
The project ... | false | 12,906,249 | 1 | 0 | 0 | 6 | I got the same error and resolved it with these steps:
I changed the project properties
General>Interpreter to IronPython 2.7
Debug>Launch mode to IronPython(.NET) launcher
At first I didn't see IronPython as an interpreter option to select from. I added the path to IronPython installation to my Path System variable, r... | 1 | 4,656 | 0 | 5 | 2012-10-16T01:15:00.000 | python,clr,visual-studio-2012,ironpython | Cpython interpretter / IronPython interpretter No module named clr | 0 | 1 | 3 | 13,183,325 | 1 |
0 | 0 | I'm trying to make a simple piano keyboard for my programming class. I've made it in pygame because it's nice and simple to use. I've managed to get it working by making a mouse rect and individual rects for each note on the piano and having the note play by linking it to a mousebuttondown event. So it's working pretty... | false | 12,939,379 | 0.099668 | 0 | 0 | 1 | The MOUSEBUTTONDOWN event has two attributes:
pos
button
If you use event.pos instead of mouse.get_pos() you should be able to pick up the coordinates where the click occurred even if you have more than one mouse. | 0 | 880 | 0 | 0 | 2012-10-17T16:53:00.000 | python,mouse,pygame | Multiple mouse position | 0 | 1 | 2 | 12,940,103 | 1 |
0 | 0 | I am creating CFUNCTYPE objects in my script and passing them as callbacks to c.
If I make them local they are destroyed immediately and I am getting access violaton errors
Tried to gc.disable(), it doesnt help.
Today Im making global lists and putting/removing FUNCTYPE objects when needed.
Is there better solution? | true | 12,995,925 | 1.2 | 0 | 0 | 1 | The easiest way is to attach the CFUNCTYPE objects to a module or class. I've found it useful to have a Python wrapper module - in essence a separate file that keeps everything at the ctypes level in one namespace.
You could add and remove your callbacks from there as necessary. | 1 | 265 | 0 | 1 | 2012-10-21T07:40:00.000 | python,ctypes | How to prevent FUNCTYPE from being collected | 0 | 1 | 2 | 12,996,825 | 1 |
0 | 0 | What is the class-name in which I should use to style a TreeView's rows?
I've tried GtkCellRendererText, but it doesn't work. | false | 13,036,605 | 0 | 0 | 0 | 0 | Silly me, just use GtkTreeView:Hover or GtkTreeView:Selected | 0 | 467 | 0 | 0 | 2012-10-23T18:12:00.000 | python,gtk,pygtk | Styling TreeView's row using CSS | 0 | 1 | 1 | 13,037,240 | 1 |
0 | 0 | I'm trying to get a wxPython app working as an exe. I've heard that PyInstaller is now superior to py2exe. I'd like to include my .ico and two .png files that the script requires to run. What would the spec file for this look like? I can't seem to find a decent example anywhere. I have PyInstaller installed, but I can'... | false | 13,059,316 | 0.066568 | 0 | 0 | 1 | Checking for sys.frozen is a really good approach. You can also look into img2py which will let you load the binary data for images into a .py file. Later, instead of having to open files, they can be imported. | 1 | 2,693 | 0 | 2 | 2012-10-24T23:18:00.000 | python,wxpython,exe,pyinstaller | wxPython to exe with PyInstaller? | 0 | 1 | 3 | 13,059,522 | 1 |
0 | 0 | I'm coding a game where the viewport follows the player's ship in a finite game world, and I am trying to make it so that the background "wraps" around in all directions (you could think of it as a 2D surface wrapped around a sphere - no matter what direction you travel in, you will end up back where you started).
I ha... | false | 13,059,891 | 0 | 0 | 0 | 0 | I don't think so, I have an idea though. I'm guessing your background wraps horizontally and always to the right, then you could attach part of the beginning to the end of the background.
Example, if you have a 10,000px background and your viewport is 1000px, attach the first 1000px to the end of the background, so you... | 0 | 1,379 | 0 | 2 | 2012-10-25T00:26:00.000 | python,scroll,pygame,geometry-surface | Wrapping a pygame surface around a viewport | 0 | 3 | 3 | 13,068,085 | 1 |
0 | 0 | I'm coding a game where the viewport follows the player's ship in a finite game world, and I am trying to make it so that the background "wraps" around in all directions (you could think of it as a 2D surface wrapped around a sphere - no matter what direction you travel in, you will end up back where you started).
I ha... | false | 13,059,891 | 0 | 0 | 0 | 0 | I was monkeying around with something similar to what you described that may be of use. I decided to try using a single map class which contained all of my Tiles, and I wanted only part of it loaded into memory at once so I broke it up into Sectors (32x32 tiles). I limited it to only having 3x3 Sectors loaded at once. ... | 0 | 1,379 | 0 | 2 | 2012-10-25T00:26:00.000 | python,scroll,pygame,geometry-surface | Wrapping a pygame surface around a viewport | 0 | 3 | 3 | 13,096,965 | 1 |
0 | 0 | I'm coding a game where the viewport follows the player's ship in a finite game world, and I am trying to make it so that the background "wraps" around in all directions (you could think of it as a 2D surface wrapped around a sphere - no matter what direction you travel in, you will end up back where you started).
I ha... | true | 13,059,891 | 1.2 | 0 | 0 | 0 | Thanks everyone for the suggestions. I ended up doing something a little different from the answers provided. Essentially, I made subsurfaces of the main surface and used them as buffers, displaying them as appropriate whenever the viewport included coordinates outside the world. Because the scrolling is omnidirectiona... | 0 | 1,379 | 0 | 2 | 2012-10-25T00:26:00.000 | python,scroll,pygame,geometry-surface | Wrapping a pygame surface around a viewport | 0 | 3 | 3 | 13,131,429 | 1 |
0 | 0 | My question is not specific to Python/PyQt4 but it's the language and api I'm currently using. I want to know if there is a library to automatically generate GUI forms from public parameters of an object. It would be very useful for automatic settings generation. | false | 13,090,222 | 0 | 0 | 0 | 0 | There is no need for searching fully suited library. Also, i think, it is unnecessary and waste of time. There are lots of frustrating issue, such as localization settings, number format settings, validation issue etc.
I recommend, use Qt designer form layout to create quickly a form.
Then use pyqt4/QValidation and u ... | 0 | 70 | 0 | 1 | 2012-10-26T15:51:00.000 | python,user-interface,pyqt4 | Best practice to generate the settings view of an UI | 0 | 1 | 1 | 14,197,531 | 1 |
0 | 0 | I current am making a GUI using tk, I have implemented a ttk notebook to have two separate tabs, each of these tabs hold data but call the same functions to interact with this data, is that a sane way to do this? Or should I just make more functions to call them separately? They need to know which tab is currently sele... | true | 13,090,227 | 1.2 | 0 | 0 | 1 | okay, this might not be the best way, but for each widget in the tabs, pass through a variable in the functions which will then be used in an if statement to check which tab is currently selected, as you're only using two this could be Boolean? if more is needed more complex step will be needed, but that is a simple wa... | 0 | 1,005 | 0 | 4 | 2012-10-26T15:52:00.000 | python,user-interface,tkinter,ttk | Two tabs using ttk notebook, but separate functions for the two? | 0 | 1 | 2 | 13,090,292 | 1 |
0 | 0 | I'm working on an astronomy project, making one of those gravity simulator programs. I have a Uni class, which represents a universe filled with celestial bodies (instances of the Body class).
This Uni class is capable of updating itself, adding new bodies, and removing bodies by their id. It's completely math-based, a... | true | 13,099,963 | 1.2 | 0 | 0 | 1 | Instead of body ID's why not add the Bodys themselves to the dictionary of pygame objects instead of an ID? After all, a Python variable is just a label, so the renderer wouldn't need to know about what the variable represents. And it might save you having to look-up IDs.
A related option is to add one or multiple view... | 1 | 396 | 0 | 1 | 2012-10-27T11:56:00.000 | python,oop,class,decoupling,astronomy | How to properly decouple computation from rendering | 0 | 1 | 1 | 13,100,096 | 1 |
0 | 0 | I have a Widget that is huge (80,000 px long maybe? 800 elements at 100px each) because it lays out many smaller widgets. I've put the huge widget into a QScrollArea. But the scroll area still renders the entire widget. This causes manipulation of the widget to be choppy, and I want things to be smoother.
Instead I wan... | true | 13,101,486 | 1.2 | 0 | 0 | 1 | Have you considered using a QGraphicsView? This allows scrolling in addition to efficient rendering of only the visible objects (and plenty of other benefits such as hit testing). | 0 | 194 | 0 | 0 | 2012-10-27T15:25:00.000 | python,pyqt | How can I limit the rendering done by QScrollArea? | 0 | 1 | 1 | 13,101,822 | 1 |
0 | 0 | I've been trying for over a week now to make a .exe of a wxPython script. I still have a number of questions, and the process of creating an exe is still quite unclear.
Which utility should be used? I've heard to use py2exe, pyinstaller, gui2exe, some combination of gui2exe and some shady .bat file, etc. Which is best... | true | 13,111,899 | 1.2 | 0 | 0 | 1 | I use pyinstaller as it is very easy to use and the applications run without any problems
Some Windows DDLs are needed for the included Python Compiler and for the maybe win32 api calls
With Pyinstaller you can bundle everything needed (except config files and dbs of course) using the -F flag. | 1 | 2,794 | 0 | 0 | 2012-10-28T18:50:00.000 | python,wxpython,exe | Creating wxPython GUI .exe? | 0 | 1 | 2 | 13,111,965 | 1 |
0 | 0 | I cannot get emacs to evaluate my buffer. I put it into python mode and started the interpreter but C-c C-c does not seem to do anything. I also tried C-c C-l to load the file but after selecting the file nothing happens. Typing directly into the python shell does work.
I tried it out in linux and everything worked fin... | false | 13,112,473 | 0 | 0 | 0 | 0 | here output arrives in a buffer *Python*, which is not displayed by default unfortunately. M-x list-buffers should mention it. | 0 | 201 | 0 | 1 | 2012-10-28T20:00:00.000 | python,windows,windows-7,emacs,python-3.3 | Python Pyglet application not working in Windows Emacs | 0 | 1 | 1 | 13,112,953 | 1 |
0 | 0 | I am just getting started with pymunk, and I have a problem that I wasn't able to find a solution to in the documentation.
I have a character body that changes shape during a specific animation. I know how to attach shapes to a physics body, but how do I change them? Specifically, I need to change the box to a smalle... | true | 13,127,381 | 1.2 | 0 | 0 | 1 | There are a couple of unsafe methods to modify a shape. Right now (v3.0) pymunk only supports updates of the Circle shape and the Segment shapes. However, I just committed a method to update the Poly shape as well, available in latest trunk of pymunk.
If you dont want to run latest trunk I suggest you instead just rep... | 0 | 898 | 0 | 1 | 2012-10-29T18:16:00.000 | python,chipmunk,pymunk | Changing the shape of a pymunk/Chipmunk physics body | 0 | 1 | 1 | 13,130,409 | 1 |
0 | 0 | I have looked at similar questions that may answer my question but I am still very unclear on how to go about the following:
I can create programs to run in the Python Shell in Idle and I can also set up windows with widgets in Tkinter, but whatever I create in Tkinter is pointless because I cannot figure out how to ta... | false | 13,128,466 | 0 | 0 | 0 | 0 | What you create with Tkinter is not pointless. It sounds to me like you're trying to compile a stand-alone program in Python, using the Tkinter library to provide the GUI. Once you have a script working, you can use a program to compile into a standalone program. Look into using py2app on a mac, or py2exe on Windows. G... | 0 | 1,228 | 0 | 0 | 2012-10-29T19:41:00.000 | python,tkinter | Porting a Python Shell Program to a Tkinter GUI | 0 | 1 | 2 | 13,129,010 | 1 |
0 | 0 | Is there a way to use android.py module without installing SL4A?
I mean I have Python running on android successfully from Terminal Emulator.
Can I use that module without installing that layer (or if I can't install it anymore)? | true | 13,137,341 | 1.2 | 1 | 0 | 2 | No, because the SL4A package provides the facade to make device API calls, acting as a middleman. Without it you might be able to import it, but you could not be able to make any API calls. | 0 | 1,256 | 0 | 2 | 2012-10-30T10:46:00.000 | android,python,sl4a,android-scripting | Using Python android.py module without SL4A | 0 | 1 | 1 | 13,215,655 | 1 |
0 | 0 | When trying to install Shapely on my Windows 64bit computer, I cannot get the GEOS library to work.
So far, I have run the OSGeo4W installer from which I installed GDAL (I believe the geos library is included in that package). After that, I checked and I have geos_c.dll on my C:\OSGeo4W\bin directory, but either I hav... | false | 13,144,158 | 0.066568 | 0 | 0 | 2 | I tried the method of @jozef but failed even I imported the folder to the path.
A straightforward solution: add geos_c.dll, geos.dll to the library folder of your python environment. Then it works. | 0 | 49,925 | 0 | 23 | 2012-10-30T17:05:00.000 | python,gis,geospatial,shapely | Python, GEOS and Shapely on Windows 64 | 0 | 2 | 6 | 63,239,049 | 1 |
0 | 0 | When trying to install Shapely on my Windows 64bit computer, I cannot get the GEOS library to work.
So far, I have run the OSGeo4W installer from which I installed GDAL (I believe the geos library is included in that package). After that, I checked and I have geos_c.dll on my C:\OSGeo4W\bin directory, but either I hav... | false | 13,144,158 | 0.033321 | 0 | 0 | 1 | I used the command below and it did work;
pip install Shapely==1.3.0 | 0 | 49,925 | 0 | 23 | 2012-10-30T17:05:00.000 | python,gis,geospatial,shapely | Python, GEOS and Shapely on Windows 64 | 0 | 2 | 6 | 59,217,091 | 1 |
0 | 0 | A part of a small project I am working on involves 'calibrating' the coordinates of the screen of which to take a screen capture of.
By the 'screen', I refer to the entire desktop, not my GUI window.
The coordinates are calibrated when a QDialog window appears (which I've subclassed).
The user is prompted to click seve... | true | 13,150,497 | 1.2 | 0 | 0 | 0 | I've assumed this isn't possible and am instead using pyHook,
letting Qt pump the messages. | 0 | 2,065 | 0 | 0 | 2012-10-31T02:39:00.000 | python,user-interface,mouseevent,pyqt4,global | PyQt4 - detect global mouse click | 0 | 1 | 2 | 13,151,661 | 1 |
0 | 0 | My friend has an application written in C that comes with a GUI made using GTK under Linux. Now we want to rewrite the GUI in python (wxpython or PyQT).
I don't have experience with Python and don't know how to make Python communicate with C. I'd like to know if this is possible and if yes, how should I go about implem... | false | 13,173,029 | 0 | 0 | 0 | 0 | If you have an option between C or C#(Sharp) then go with C# and use visual studio, you can build the GUI by dragging and dropping components easy. If you want to do something in python look up wxPython. Java has a built in GUI builder known as swing. You'll need some tutorials, but unless this program doesn't need to ... | 0 | 4,672 | 0 | 6 | 2012-11-01T07:52:00.000 | python,c,wxpython,pyqt | Can C programs have Python GUI? | 0 | 1 | 3 | 13,175,997 | 1 |
0 | 0 | I am making a project in pharo that will extend it and make it more visual for also further extending the 3d application Blender. Blender uses mainly python for extensions called "Addons" , to be precise python 3.2. So what I want is to make a bridge between pharo (smalltalk) and blender (python).
For now I have focus... | false | 13,208,657 | 0.039979 | 0 | 0 | 1 | I remember a ruby->dotNet bridge which was ported to some smalltalk as far as I remember.
(Ruby/.Net Bridge / 2004 Benjamin Schroeder and John R. Pierce). It covered passing of exceptions, callbacks etc. May make a good starting point for your work. Don't know where and how to get it, though. | 0 | 415 | 0 | 3 | 2012-11-03T11:19:00.000 | python,sockets,smalltalk | Making a bridge for communication between python and smalltalk | 0 | 2 | 5 | 13,605,902 | 1 |
0 | 0 | I am making a project in pharo that will extend it and make it more visual for also further extending the 3d application Blender. Blender uses mainly python for extensions called "Addons" , to be precise python 3.2. So what I want is to make a bridge between pharo (smalltalk) and blender (python).
For now I have focus... | true | 13,208,657 | 1.2 | 0 | 0 | 2 | WebSockets sending JSON messages between Smalltalk and Python could be the bleeding edge yet long-term quite a promising way to go. Smalltalk has quite good WebSockets support, I suppose Python as well. | 0 | 415 | 0 | 3 | 2012-11-03T11:19:00.000 | python,sockets,smalltalk | Making a bridge for communication between python and smalltalk | 0 | 2 | 5 | 13,210,746 | 1 |
0 | 0 | I want to write a tool in Python that will help me create isometric tiles from 3D-models. You see, I'm not a very proficient artist and free 3D-models are plentisome, and creating something like a table or chair is much easer in 3D than in painting.
This script will load a 3D model in orthographic projection and take p... | false | 13,208,743 | 0.099668 | 0 | 0 | 1 | I found this code:
www.pygame.org/wiki/OBJFileLoader
It let me load and display an .obj file of a cube from Blender with ease. It runs PyOpenGL so it should let me do everything OpenGL can. Never knew OpenGL was so low-level, didn't realize I'd have to write my own loaders and everything.
Anyway, I'm pretty sure I can ... | 0 | 1,835 | 0 | 0 | 2012-11-03T11:32:00.000 | python,3d,isometric | Render 3D model orthographically in Python | 0 | 1 | 2 | 13,214,374 | 1 |
0 | 0 | I am looking for version (custom/beta?) of portable python that is python 3.x and includes pygame. I know pygame hasn't been fully converted to 3.x yet, but for what I need it for it works perfectly. | true | 13,219,237 | 1.2 | 0 | 0 | 1 | Install Pygame, then take your entire Python folder and put it where you want it to go.
If you mean you want to be able to use python (filename).py on the terminal, then you will have to change the PATH variable in the terminal, or add the shebang line #!usr\bin\python onto your programs. | 0 | 2,264 | 0 | 0 | 2012-11-04T14:06:00.000 | python,python-3.x,pygame,portable-executable | portable python 3.x and pygame | 0 | 1 | 3 | 13,242,922 | 1 |
0 | 0 | I have created a program that takes pictures with your webcam.
I used Pygame and VideoCapture. It all works fine as .pyw file, but after it is compiled with py2exe it is just doesn't work.
From my research, the error is coming from trying to compile the VideoCapture module.
PLEEASSEE HELP ME!!!
(The Same error occurs ... | false | 13,219,380 | 0.099668 | 0 | 0 | 1 | have you tried compiling with cx_freeze? | 1 | 165 | 0 | 4 | 2012-11-04T14:25:00.000 | python,pygame,py2exe | py2exe not compiling VideoCapture correctly | 0 | 1 | 2 | 13,646,270 | 1 |
0 | 0 | Hello fellow python users, I bring forth a question that I have been wondering for a while. I love python, and have made many programs with it. Now what I want to do is (or know how to do) make a python program, but run it in a window with buttons that you click on instead of typing in numbers to elect things. I woul... | false | 13,222,607 | 0 | 0 | 0 | 0 | You can do this, the library is called tkinter. | 1 | 336 | 0 | 0 | 2012-11-04T20:33:00.000 | python,user-interface,window | Can you run python as a windowed program? | 0 | 2 | 3 | 13,222,646 | 1 |
0 | 0 | Hello fellow python users, I bring forth a question that I have been wondering for a while. I love python, and have made many programs with it. Now what I want to do is (or know how to do) make a python program, but run it in a window with buttons that you click on instead of typing in numbers to elect things. I woul... | false | 13,222,607 | 0 | 0 | 0 | 0 | There are many GUI libraries to choose from, but I like Tkinter because it's easy and there's nothing to install (it comes with Python).
But some people prefer wxPython or others, such as PyQT. You'll have to decide which you like, or just go with Tkinter if you don't want to go through the trouble of installing librar... | 1 | 336 | 0 | 0 | 2012-11-04T20:33:00.000 | python,user-interface,window | Can you run python as a windowed program? | 0 | 2 | 3 | 13,222,783 | 1 |
0 | 0 | If this is possible, can you show some code example? Thanks in advance. | true | 13,248,848 | 1.2 | 0 | 0 | 1 | ObjectListView is just a nice wrapper around the ListCtrl. To my knowledge, the ListCtrl does not support the embedding of other widgets. You could create a popup dialog when double-clicking a cell and do it that way. Otherwise, you would have to use the UltimateListCtrl. That widget DOES allow widget embedding because... | 0 | 203 | 0 | 0 | 2012-11-06T10:15:00.000 | python-2.7,wxpython,wxwidgets | Can we embedd a ComboBox or a TextCtrl on the ObjectListView of wxPython? | 0 | 1 | 1 | 13,254,838 | 1 |
0 | 0 | Where would be a good place start learning to program a clipboard manager in python. i want to be able to copy selected text with a keyboard macro and set it to a slot identified ny the key combo "ctrl+alt+c+1", "ctrl+alt+c+2" storing more than one thing, also so would be got to be able to contaminate on to what is in ... | true | 13,258,448 | 1.2 | 0 | 0 | 0 | Clipboards are framework specific. So a good place would be to select a GUI framework, and look at it's documentation for how to deal with cut and paste. | 0 | 964 | 0 | 0 | 2012-11-06T19:59:00.000 | python-3.x,clipboardmanager | Python clipboard manager? | 0 | 1 | 1 | 13,261,057 | 1 |
0 | 0 | Where does boost python register from python converters for builtin types such as from PyLong_Type to double?
I want to define a converter that can take a numpy.float128 from python and returns a long double for functions in C++. I already did it the other way round, the to_python converter. For that I tweaked builtin_... | true | 13,267,912 | 1.2 | 1 | 0 | 1 | The from python conversion is in fact done in builtin_converters.cpp and not in the header part of the library. I Copied this file and deleted everything except the converter for long double, which I was then able to modify. | 0 | 300 | 0 | 2 | 2012-11-07T10:36:00.000 | c++,python,boost-python | From python converter for builtin types | 0 | 1 | 2 | 13,363,934 | 1 |
0 | 0 | I'm working on a project in Python using tkinter that will allow for geolocation of IP addresses. I have the raw conversions down, and I can take an IP address and know city, state, country, longitude, latitude, etc. I'm wondering if there's any way to embed Google Maps or something similar into my program to offer a... | false | 13,295,331 | 0.099668 | 0 | 0 | 1 | Most GUI Frameworks have a way to embed a web browser frame, with a way to execute javascript from the python code. If this is available to you, you could use the Google Maps JavaScript API v3 to display a map.
If you let us know which GUI framework you're using, we might be able to help more. | 1 | 7,845 | 0 | 5 | 2012-11-08T18:25:00.000 | python,google-maps,tkinter | How can I embed google maps into my Python program? | 0 | 1 | 2 | 13,311,950 | 1 |
0 | 0 | I have created a QTreeWidget and set animation to true (setAnimated(true)).
When I'm clicking on a mark (triangle) at the left of item it expands smoothly, but when I'm double clicking on the item it expands too fast (almost like there is no "animated" flag set).
I want smooth animation on double click too. How can I s... | false | 13,304,136 | 0.099668 | 0 | 0 | 1 | You need to override the click behaviour. Check the event if it's a double click or not and then you can redirect the event to the appropriate call. You should check the state if it's already clicked or not to prevent a second animation which might happen. | 0 | 1,404 | 0 | 4 | 2012-11-09T07:49:00.000 | python,qt4,python-2.7,pyside,qtreewidget | QTreeWidget expand animation on double click | 0 | 1 | 2 | 15,232,509 | 1 |
1 | 0 | I am doing an application with GUI using WPF/XAML with Ironpython and SharpDevelop, until now it works fine, when I'm in the development environment I can see the errors in console and know what is wrong.
But when I build and deploy the app for us on other system or I ran it outside of the development environment and... | true | 13,347,378 | 1.2 | 0 | 0 | 1 | You could put in some code to catch the error and log it to a file.
Something possibly simpler is to compile your application as a Console Application. This can be done via Project Options - Application - Output type. Then you will get a console window when you run your WPF application and any exception that happens at... | 0 | 240 | 0 | 0 | 2012-11-12T16:22:00.000 | wpf,xaml,ironpython,sharpdevelop | Ironpython: How to see when a WPF application fails? | 0 | 1 | 1 | 13,352,605 | 1 |
0 | 0 | I am new to Mac, have always used windows and I am confused on how to install wxPython. I downloaded the .dmg file from the website, and it contained three files:
a pkg file, a readme, and an uninstall.py
I opened the pkg file, went through the steps, and Im not sure where it installed after it said "Installation Compl... | true | 13,354,317 | 1.2 | 0 | 0 | 2 | At least for development, I would suggest to install (python and) wx using homebrew. It will install version 2.9 and you're ensured that Apple-provided system libraries remain untouched. | 0 | 363 | 0 | 0 | 2012-11-13T01:22:00.000 | macos,installation,wxpython | Install wxpython on mac | 0 | 1 | 2 | 13,357,833 | 1 |
0 | 0 | This might be a bit foolish but I'm trying to use ctypes to call a function that receives a complex vector as a paramter. But in ctypes there isn't a class c_complex.
Does anybody know how to solve this?
edit: I'm refering to python's ctypes, in case there are others.... | false | 13,373,291 | -0.039979 | 0 | 0 | -1 | If c_complex is a C struct and you have the definition of in documentation or a header file you could utilize ctypes to compose a compatible type. It is also possible, although less likely, that c_complex is a typdef for a type that ctypes already supports.
More information would be needed to provide a better answer..... | 0 | 2,911 | 0 | 4 | 2012-11-14T04:59:00.000 | python,ctypes,complex-numbers | Complex number in ctypes | 0 | 1 | 5 | 13,373,641 | 1 |
0 | 0 | I'm writing a multi-threaded application that utilizes QThreads. I know that, in order to start a thread, I need to override the run() method and call that method using the thread.start() somewhere (in my case in my GUI thread).
I was wondering, however, is it required to call the .wait() method anywhere and also am I ... | true | 13,376,448 | 1.2 | 0 | 0 | 1 | Both answers depend on what your code is doing and what you expect from the thread.
If your logic which uses the thread needs to wait synchronously for the moment QThread finishes, then yes, you need to call wait(). However such requirement is a sign of sloppy threading model, except very specific situations like appli... | 1 | 438 | 0 | 1 | 2012-11-14T09:52:00.000 | python,multithreading,qt,thread-safety,qthread | Do I need to manually call .quit() method when QThread() stops running (Python)? | 0 | 1 | 1 | 13,381,623 | 1 |
0 | 0 | I have got a python function that takes a few parameters and executes a few tasks (let's call it theFunc). While theFunc runs, internal variable resultingMessage is getting more and more lines, and I show it on GUI at the end of the execution. Ideally, I would like resultingMessage to be shown and updated on GUI as the... | false | 13,417,553 | 0.099668 | 0 | 0 | 1 | You would want to use threads. wxPython provides several thread-safe methods such as wx.CallAfter, wx.CallLater and wx.PostEvent. You can combine those with pubsub to send messages too! In your case, I think passing a wx method to wx.CallAfter with whatever text you wish to display would work just fine. | 1 | 487 | 0 | 1 | 2012-11-16T13:26:00.000 | python,user-interface,wxpython,auto-update | Updating GUI while execution a python function while keeping this function GUI-independent | 0 | 1 | 2 | 13,418,479 | 1 |
0 | 0 | In Pygame, how can I get graphical input(e.g. clicking exit button) and also get input from the a terminal window simultaneously?
To give you context, my game has a GUI but gets its game commands from a "input()" command. How can I look for input from the command line while also handling graphics?
I'm not sure if this... | true | 13,450,878 | 1.2 | 0 | 0 | 1 | You can't do that, unless you use the input command in a different thread, but then you have to deal with syncronization (which might be what you want or don't want to do).
The way I'd implement this is to create a kind of in-game console. When a special key (e.g. '\') is pressed you make the console appear, and when y... | 0 | 906 | 0 | 2 | 2012-11-19T09:28:00.000 | python,input,pygame | Pygame: Graphical Input + Text Input | 0 | 1 | 1 | 13,451,666 | 1 |
0 | 0 | I created a main app with a mdiArea for loading map graphics with Qt Designer *.ui and coded with pyQt4 using uic.loadUi() in python.
I also created a separate *.ui file and tested the dockWidget successfully in a separate python script file.
I wish to combine these 2 UI so that the main_app window will have the mdiAre... | false | 13,466,072 | 0 | 0 | 0 | 0 | I've worked on some software where every different pane is done as a separate. Ui file, so that they can be changed independently without requiring merges. It worked fine. Can you turn the map and dock parts into widgets, and then make a new "main window" ui, and then give that a layout and add the other two as child w... | 0 | 719 | 0 | 1 | 2012-11-20T03:15:00.000 | python,pyqt4 | Combining 2 UI as one main app window in python | 0 | 1 | 1 | 13,470,421 | 1 |
0 | 0 | I use Python 3 and unofficial PIL module. My code works fine. But after using cx_freeze I get exception "_imaging c module is not installed".
What can I do with this problem? All solutions that I found were about Python 2.X and Linux OS. I need the solution for Windows and Python 3. | false | 13,470,611 | 0 | 0 | 0 | 0 | The only reason i know of that that can happen is if the _imagingtk.pyd is not for your python version.
Oh, could you post the link to the unofficial version? I've been searching for it for awhile. | 1 | 348 | 0 | 1 | 2012-11-20T09:55:00.000 | windows,python-3.x,cx-freeze | After using cx_freeze I get exception _imaging c module is not installed | 0 | 1 | 3 | 13,814,960 | 1 |
0 | 0 | I have a title ("cadeau check 50 €") in a form value that I want to write to a background image with arial.ttf. My text is correct but for the euro sign. I have 2 [] in place. I don't know where the problem is coming from. Is this an encoding problem in PIL, or have I a problem with the font? | false | 13,476,383 | 0 | 0 | 0 | 0 | Maybe use Unicode strings?? Like u'cadeau check 50 €' ... Now, does also your font have the corresponding glyphs? | 1 | 785 | 0 | 2 | 2012-11-20T15:23:00.000 | python,python-imaging-library,python-unicode | PIL: how to draw € on an image with draw.text? | 0 | 1 | 2 | 13,476,705 | 1 |
0 | 0 | I got a tkMEssagebox.showerror showing up in a python tkinter application,
when somebody failed to login with the application.
Is it possible to have a url link in the tkMessageBox.showerror?
ie.
tkMessageBox.showerror("Error","An error occured please visit
www.blahblubbbb.com")
and I want the www.blahblubbbb.com t... | true | 13,508,043 | 1.2 | 0 | 0 | 3 | Short answer: "No!" message is a simple string, no interpretation like in some widgets of other frameworks is done.
Longer answer: You could e.g. subclass+monkeypatch, to provide such feature. | 0 | 2,245 | 0 | 6 | 2012-11-22T07:51:00.000 | python,python-2.7,tkinter,tkmessagebox | tkinter tkMessageBox html link | 0 | 1 | 1 | 13,508,222 | 1 |
0 | 0 | Is there any way to change the width of the block which is moving on gtk.ProgressBar.pulse()? | false | 13,525,032 | 0 | 0 | 0 | 0 | Not on PyGTK. If you are using GTK 3 then there is a CSS class, GtkProgressBar:pulse, but I can't find any documentation on how to change the width. It might be possible if you do some digging. | 0 | 216 | 0 | 1 | 2012-11-23T07:57:00.000 | python,pygtk | ProgressBar: set the width of the pulse block | 0 | 1 | 1 | 13,541,432 | 1 |
0 | 0 | I am developing Ubuntu app using the Unity tools (PyGTK + Python). I can change label font-size with no problem, but I cannot find same thing for button. How can I change button font-size?
The purpose of this is, i am developing an on-screen keypad, so the numerical text needs to be bigger so that it is easier to be se... | true | 13,538,069 | 1.2 | 0 | 0 | 1 | The button contains a label, which you can access with get_child() and related functions. You can change the label's font size using the normal method. | 0 | 2,417 | 0 | 1 | 2012-11-24T03:50:00.000 | python,pygtk | Glade + PyGTK Change Button Font Size | 0 | 1 | 1 | 13,541,300 | 1 |
0 | 0 | I read few Boost.Python tutorials and I know how to call C++ function from Python. But what I want to do is create C++ application which will be running in the background all the time and Python script that will be able to call C++ function from that instance of C++ application. The C++ application will be a game serve... | false | 13,553,174 | 0.379949 | 1 | 0 | 2 | Boost python is useful for exposing C++ objects to python.
Since you're talking about interacting with an already running application from python, and the lifetime of the script is shorter than the lifetime of the game server, I don't think boost python is what you're looking for, but rather some form of interprocess ... | 0 | 426 | 0 | 1 | 2012-11-25T16:51:00.000 | c++,python,boost,boost-python | Boost.Python - communication with running C++ program | 0 | 1 | 1 | 13,558,179 | 1 |
0 | 0 | I want to create an application that is capable of loading plugins. The twist is that I want to be able to create plugins in both C/C++ and Python.
So I've started thinking about this and have a few questions that I'm hoping people can help me with.
My first question is whether I need to use C/C++ for the "core" of the... | false | 13,555,278 | 0.197375 | 1 | 0 | 1 | Write your application in Python, then you can have a folder for your plugins.
Your application searches for them by checking the directory/traversing the plugin tree.
Then import them via "import" or use ctypes for a .so/.dll, or even easier: you can use boost::python for creating a .so/.dll that you can 'import' lik... | 0 | 648 | 0 | 0 | 2012-11-25T20:40:00.000 | c++,python,c,plugins,shared-libraries | Application that can load both C/C++ and Python plugins | 0 | 1 | 1 | 13,555,348 | 1 |
0 | 1 | PyOpenGL docs say:
Because of the way OpenGL and ctypes handle, for instance, pointers, to array data, it is often necessary to ensure that a Python data-structure is retained (i.e. not garbage collected). This is done by storing the data in an array of data-values that are indexed by a context-specific key. The fun... | true | 13,584,900 | 1.2 | 0 | 0 | 1 | Are there any scenarios I'm missing?
Buffer mappings obtained through glMapBuffer | 0 | 176 | 0 | 1 | 2012-11-27T13:04:00.000 | python,opengl,ctypes,pyopengl | What is PyOpenGL's "context specific data"? | 0 | 1 | 1 | 13,585,375 | 1 |
0 | 0 | I have a simple tkinter window. It consists of a small window, a timer, and a button to set timer. I don't want to go in details with the code.
I want to change the background of all the widgets in my window(buttons, label, Etc.).
My first thought is to use a global variable which I will set to "red" for example, and a... | false | 13,588,908 | 0.197375 | 0 | 0 | 3 | The background colors will not automatically change. Tkinter has the ability to do such a thing with fonts but not with colors.
You will have to write some code to iterate over all of the widgets and change their background colors. | 0 | 21,940 | 0 | 9 | 2012-11-27T16:41:00.000 | python,tkinter | Dynamically change widget background color in Tkinter | 0 | 1 | 3 | 13,590,474 | 1 |
0 | 0 | Can I set application icon using clean Python 3?
I have .ico file in same directory and want to add into application.
(Without tkinter) | true | 13,632,479 | 1.2 | 0 | 0 | 1 | Short answer: No, you can not. The application icon is set in completely different ways in different environments. Usually it is a setting on the shortcut.
Longer answer: It also depends on what you mean with "Application Icon".
If you mean the icon for the menu entry in the Applcartions/Start/Whatever menu, then you c... | 1 | 156 | 0 | 0 | 2012-11-29T18:39:00.000 | python-3.x,icons | Application Icon in Python 3 | 0 | 1 | 1 | 13,632,646 | 1 |
0 | 0 | This is for a computer science assignment using Python, does anybody know where I would begin to create an algorithm to create a square or box that rolls across the screen? And I do indeed mean roll, not slide. It does not necessarily have to be using python, I just need a general idea as to how the coordinates would w... | true | 13,639,219 | 1.2 | 0 | 0 | 2 | If a unit square starts out with one side resting on the x-axis, and the lower right corner at (xs, 0), then after a quarter turn clockwise it will again have one side resting on the x-axis, and the lower right corner now at (xs+1, 0). Before it turns, label the lower left corner a; the upper left, b; and the upper ri... | 1 | 244 | 0 | 0 | 2012-11-30T04:52:00.000 | python,algorithm,graphics | Create a square that rolls across the screen | 0 | 2 | 3 | 13,639,414 | 1 |
0 | 0 | This is for a computer science assignment using Python, does anybody know where I would begin to create an algorithm to create a square or box that rolls across the screen? And I do indeed mean roll, not slide. It does not necessarily have to be using python, I just need a general idea as to how the coordinates would w... | false | 13,639,219 | 0 | 0 | 0 | 0 | You could alternatively completely break the spirit of the assignment by using pybox2d, pymunk or another physics engine to do all the calculations for you. Then you could have lots of boxes rolling around and bouncing off each other :D | 1 | 244 | 0 | 0 | 2012-11-30T04:52:00.000 | python,algorithm,graphics | Create a square that rolls across the screen | 0 | 2 | 3 | 13,639,761 | 1 |
0 | 0 | I'm writing a document based application in wxPython, by which I mean that the user can have open multiple documents at once in multiple windows or tabs. There are multiple kinds of documents, and the documents can all be in different "states", meaning that there should be different menu options available in the main m... | false | 13,655,152 | 0 | 0 | 0 | 0 | Probably the only way to do it with the standard wx.Menu is to destroy and recreate the entire menubar. You might be able to Hide it though. Either way, I think it would be easiest to just put together a set of methods that creates each menubar on demand. Then you can destroy one and create the other.
You might also ta... | 0 | 2,119 | 0 | 1 | 2012-12-01T00:34:00.000 | python,wxpython | How do I manage a dynamic, changing main menu in wxPython? | 0 | 1 | 2 | 13,687,868 | 1 |
0 | 0 | Basically I want to do this:
when the user presses a button, the application should open a dialog with a spinner inside of it, while some tasks are executed in background. When this tasks are finished, this dialog should be destroyed, and a new dialog should be opened.
I'm working with python and gtk
How can I do it?
t... | true | 13,672,316 | 1.2 | 0 | 0 | 2 | Basically there are two ways. The difference is who is the "main" program. If you want gtk to be in charge, you just create your dialog, and set up an callback for use when idle (gobject.idle_add). This job should make sure that it doesn't take long every step, so gtk can update the gui (you probably want gobject.timeo... | 0 | 340 | 0 | 0 | 2012-12-02T18:24:00.000 | python,gtk | gtk loading dialog while performing task | 0 | 1 | 1 | 13,672,419 | 1 |
0 | 0 | I'm trying to find a way to rapidly develop (or rather eventually reach a point where I can rapidly develop) very nice looking cross platform GUI desktop apps that have a very small footprint on disk and in memory, launch very fast (much faster, for example, than even a bare bones wxPython window) (for a good example, ... | false | 13,681,305 | 0 | 0 | 0 | 0 | You can take the openoffice way on windows platform and write a launcher that simply tries to access the file needed by your software, so that they will end up in the memory cache, speeding up the startup time (but creating useless things in the cache, in case the user doesn't want to open your program). | 0 | 722 | 0 | 2 | 2012-12-03T10:27:00.000 | python,c,user-interface,cross-platform | Should I embed or extend python to create high quality, high speed GUI programs? | 0 | 1 | 2 | 13,681,502 | 1 |
0 | 0 | I am creating guis with wxPython then compiling them using pyInstaller and finally using inno to set them up.
seeing as i am new to all of this i would like to know, do i need to use UPX to compress just the final compiled exe? or all of the stuff the exe needs to run aswell?
thanks, sorry for being a noob. | true | 13,688,815 | 1.2 | 0 | 0 | 0 | I don't think you can compress the files before the exe or you'll run into issues of Python not being able to read the zip files. You might be able to use eggs here, but I don't believe eggs are compressed. I would just try compressing the exe with UPX and see how it goes.
I personally don't worry about it. The exe's u... | 1 | 325 | 0 | 0 | 2012-12-03T17:45:00.000 | python,wxpython,inno-setup,pyinstaller,upx | Compressing a compiled wxPython program with UPX | 0 | 1 | 1 | 13,690,799 | 1 |
0 | 0 | I cannot get my code to run on my win8 laptop. I am working with a combination of:
Stackless Python 2.7.2
Qt 4.8.4
PySide 1.1.2
Eclipse/Pydev and WingIDE
This works well on my Win7 PC, but now i have bought a demo laptop with windows 8. As far as I know all is installed the same way as on my PC.
When i run my program... | false | 13,702,106 | 0.099668 | 0 | 0 | 1 | I had the same problem with Pyside 1.1.2 and Qt 4.8.4. The solution for me was to set the compatibility mode of the Python executable to Windows 7 via right click on the executable -> Properties -> Compatiblity -> Run this program in compatibility mode for: Windows 7
Hope that helps. | 1 | 2,146 | 0 | 2 | 2012-12-04T11:42:00.000 | python,qt,windows-8,pyside,stackless | windows 8 incompatibility? | 0 | 2 | 2 | 16,126,325 | 1 |
0 | 0 | I cannot get my code to run on my win8 laptop. I am working with a combination of:
Stackless Python 2.7.2
Qt 4.8.4
PySide 1.1.2
Eclipse/Pydev and WingIDE
This works well on my Win7 PC, but now i have bought a demo laptop with windows 8. As far as I know all is installed the same way as on my PC.
When i run my program... | false | 13,702,106 | 0 | 0 | 0 | 0 | try using Hyper-V however Hyper-V is not installed by default in Windows 8. You need to go "Turn Windows features on or off." | 1 | 2,146 | 0 | 2 | 2012-12-04T11:42:00.000 | python,qt,windows-8,pyside,stackless | windows 8 incompatibility? | 0 | 2 | 2 | 13,881,726 | 1 |
0 | 0 | Am working on a pyqt app, done the ui via qt-designer 4.8.1, and generated the corresponding py file using pykdeuic4 (available on OpenSuse 12.2), but can't find an equivalent for pyrcc4 to hadle the *.qrc files.
what's the equivalent tool/command?
Edit:
Most of the documentation on using QtDesigner with PyQt, indicat... | false | 13,727,279 | 0 | 0 | 0 | 0 | Well, turns out all I needed was to install the extra package python-qt4-utils ontop of the existing python-qt4. Now, I have the sought after utilities in place. | 0 | 452 | 0 | 1 | 2012-12-05T15:58:00.000 | python,pyqt4,opensuse,kde-plasma,pyrcc | Equivalent of pyrcc4 on KDE | 0 | 1 | 2 | 13,730,501 | 1 |
0 | 0 | Is there a single command to clean the screen of the Python Interpreter every time one runs a code in PyScripter?
thanks, | true | 13,738,301 | 1.2 | 0 | 0 | 6 | Goto pyscripter menus and check the box for clear output before run.
Tools>Options > IDE options > Python interpreter > Clear output before run.
Very useful in interactive sessions. | 1 | 2,810 | 0 | 3 | 2012-12-06T06:44:00.000 | python,pyscripter | Command to clean screen in PyScripter? | 0 | 1 | 3 | 15,842,157 | 1 |
0 | 0 | I'm developing a GUI with PyQt. The GUI has a qListWidget, a qTableWidget, and a plot implemented with Mayavi. The list refers to shapes that are plotted (cylinders and cones for example). When a shape is selected in the list, I want the shape's properties to be loaded into the table (from a dictionary variable) and... | false | 13,771,694 | 0 | 0 | 0 | 0 | If you disable the entire event loop, the app becomes unresponsive. And, even if the user doesn't notice, the OS might, and put up some kind of "hang" notification (like OS X's brightly-colored spinning beachball, which no user will ever miss).
You might want to disable repaints without disabling the event loop entirel... | 0 | 13,515 | 0 | 9 | 2012-12-07T22:01:00.000 | python,pyqt,pyqt4,qtablewidget | Turn off PyQt Event Loop While Editing Table | 0 | 1 | 3 | 13,772,005 | 1 |
0 | 0 | I have installed Qt designer 4.8.2, Pyside, and Python 3.3. When I create a form with Qt designer I am not able to see the code when clicking on view code. The error message is:"Unable to launch C:\Qt\4.8.2\bin\uic".
I have the pyuic under C:\Python33\Lib\site-packages\PyQt4\uic. Please help. | false | 13,792,502 | 0.141893 | 0 | 0 | 5 | Just create a directory where it search for uic.exe file and copy existing uic.exe file to that directory.
My example :
When I clicked View Code it shows Error asking for file uic.exe in path
C:\python374\Lib\site-packages\pyqt5_tools\Qt\bin\bin
But I found uicexe file is in C:\python374\Lib\site-packages\pyqt5_tools... | 0 | 22,091 | 0 | 6 | 2012-12-09T22:25:00.000 | python-3.x,qt4,pyside | Unable to Launch Qt uic | 0 | 1 | 7 | 57,644,204 | 1 |
0 | 0 | So I want to practice python on my Android. Is there a way I can get the interpreter or an interpreter emulator on my device? | false | 13,793,158 | 0 | 0 | 0 | 0 | Download PyDroid 3 from Playstore and if you like it buy the pro version. It costs around 2$ but you have all you need to do Python 3 programming | 0 | 28,974 | 0 | 7 | 2012-12-09T23:49:00.000 | android,python | Python Interpreter on Android | 0 | 1 | 4 | 54,814,139 | 1 |
0 | 0 | In one of my software, I use AuiManager to manage all the different parts of the UI. Now, I start to use FoldPanelBar in one of the AuiPane. At first, I changed part of the Panel to use FoldPanelBar, and the bar is layout with others using BoxSizer. But it doesn't function correctly as the window is resized. Then I mov... | false | 13,815,107 | 0 | 0 | 0 | 0 | After some investigation, I have solved this problem by myself. Though FoldPanelBar doesn't play well with others in a Sizer, if it's the only one in a sizer, it works. weird. | 0 | 109 | 0 | 0 | 2012-12-11T06:55:00.000 | wxpython | Resize FoldPanelBar in AuiManager | 0 | 1 | 1 | 13,878,574 | 1 |
0 | 0 | My wx GUI shows thumbnails, but they're slow to generate, so:
The program should remain usable while the thumbnails are generating.
Switching to a new folder should stop generating thumbnails for the old folder.
If possible, thumbnail generation should make use of multiple processors.
What is the best way to do this? | true | 13,830,557 | 1.2 | 0 | 0 | 4 | Putting the thumbnail generation in a background thread with threading.Thread will solve your first problem, making the program usable.
If you want a way to interrupt it, the usual way is to add a "stop" variable which the background thread checks every so often (e.g., once per thumbnail), and the GUI thread sets when ... | 1 | 155 | 0 | 0 | 2012-12-11T23:57:00.000 | python,multithreading,user-interface,wxpython | Python: Interruptable threading in wx | 0 | 1 | 1 | 13,830,881 | 1 |
0 | 0 | I got curious and have been reading about GUI development using Python for the past hour. After reading documentation of wxPython, PyQt, Nokia's Python bindings for Qt along with Tkinter a question came to my mind.
When I create a console application with Python, it runs using the embedded Python interpreter (which I a... | true | 13,867,475 | 1.2 | 0 | 0 | 8 | This is just a really generalized high-level explanation about "GUI toolkits"...
Lets say you decide to use the Qt framework. This framework is written in C++. There are two different python bindings that can be used, allowing one to write a GUI application in python against the same API as the C++ version.
The python ... | 0 | 1,387 | 0 | 3 | 2012-12-13T19:58:00.000 | python,user-interface,wxpython,tkinter,pyside | How is Python interpreted with wxPython, PyQt, PySide or Tkinter? | 0 | 1 | 1 | 13,867,619 | 1 |
0 | 0 | I want to write a program that asks the user a series of questions in different dialog boxes. Each box shows up one at a time, and goes to the next box if the button next is clicked. My question is do I create a class for each Dialog and just call the next class once the button next is clicked? Or is there a more elega... | false | 13,873,190 | 0 | 0 | 0 | 0 | Are you sure you have to create a class for a Dialog? Isn't Tkinter built-in dialog class ok?
You could provide an iterator of Dialogs to a next() function, which every Next button would call when clicked. Did you mean something like that? | 0 | 1,732 | 0 | 2 | 2012-12-14T05:27:00.000 | python,user-interface,python-2.7,tkinter,gui-designer | How to design GUI sequence in Tkinter with Python 2.7 | 0 | 1 | 2 | 13,875,940 | 1 |
0 | 0 | I am using Windows 7 (32bit).
As a programming exercise, I have to make a reminder using tkinter.
To be more specified :
My main project is to help people who suffer from alzheimer disease.
So, one of my targets is to make a reminder for helping them do the necessary activities/things.
For example,
At 14:00 o'clock, cr... | false | 13,875,641 | 0 | 0 | 0 | 0 | At first thought you can have a tk config dialog, where you can add new rules, edit messagebox strings etc. Then you will have in which you will use the time module. From there you can access the system time.
If you want to display windows messageboxes, you can find them in the ctypes libary. | 1 | 292 | 0 | 3 | 2012-12-14T09:13:00.000 | python,time,tkinter | Reminder Using Tkinter | 0 | 1 | 2 | 13,875,712 | 1 |
0 | 0 | Is it possible to run my program inside Tkinter?
I have a program which fits the curves. I want to make it GUI and looking for the ways to insert it into Tkinter.
I want my program to run after clicking a BUTTON widget. Is there a option in Tkinter to run another file.py? | false | 13,877,727 | 0 | 0 | 0 | 0 | To run another file, you can import it, or load the data with
file = open("filename.txt", "r")
then use
exec(string)
to run the program inside it. | 0 | 2,372 | 0 | 2 | 2012-12-14T11:23:00.000 | python,tkinter | Run my program inside Tkinter program | 0 | 1 | 2 | 13,877,837 | 1 |
0 | 0 | How can I have the wxPython notebooks tabs be center on the top?
EXTRA TEXT TO MAKE IT LOOK LONGER EVER THOUGH IT IS A SIMPLE QUESTION. | true | 13,898,391 | 1.2 | 0 | 0 | 1 | Notebook tabs always start off in the top left for the native widget. The only thing you can change is which side the tabs appear on (i.e. top, left, bottom or right). You cannot control where on the side they appear.
You might be able to take FlatNotebook and hack it a bit to add this functionality since it is written... | 0 | 106 | 0 | 0 | 2012-12-16T03:38:00.000 | wxpython | wxPython notebook have tabs be center top? | 0 | 1 | 1 | 13,918,810 | 1 |
0 | 0 | I want to get the content of DataWindow from PBL (PowerBuilder Library) file and edit it in place. The idea is to read the pbl file, and access individual DataWindows to modify source code. Somehow, I have managed to do the first part with PblReader .NET library using IronPython. It allows me to read PBL files, and acc... | true | 13,920,682 | 1.2 | 0 | 0 | 1 | A PowerBuilder application can load a DataWindow from a PBL (doesn't have to be in the library path), modify it, and save it back to the PBL. I've written a couple of tools that do that. PowerBuilder will allow you to modify the DataWindow according to its object model using the modify method. I don't know why anyone w... | 1 | 3,599 | 0 | 1 | 2012-12-17T19:19:00.000 | python,.net,powerbuilder | idea/solution how to edit PBL (PowerBuilder Library) files? | 0 | 1 | 1 | 13,943,263 | 1 |
0 | 0 | This is my first question ever so bear with me!
Currently in my program, I have a parent widget which acts as a canvas. The user can add or remove widgets to the parent at run-time. Those widgets are then given an absolute position, that is, they are not positioned by a layout. Once added, a widget can be moved around ... | true | 13,924,980 | 1.2 | 0 | 0 | 3 | If you had used QGraphicsScene instead of rolling your own, you could have used the items(..) methods to very efficiently find your children in a particular area.
It's only possible in QGraphicsScene because it uses a BSP spatial acceleration structure, so if you cannot migrate to QGraphicsScene in a reasonable amount... | 0 | 493 | 0 | 3 | 2012-12-18T01:26:00.000 | python,qt,pyqt | Qt: get all children within region of the parent | 0 | 1 | 1 | 13,928,629 | 1 |
0 | 0 | I`m using pyPdf to crop pdf pages.
And the only thing i miss, is GUI for this script.
I picked up tkinter module to do the GUI, but i cannot find whether it is possible to display pdf pages with GUI created with tkinter.
Any thoughts ?
Thank you. | false | 13,934,268 | 0.099668 | 0 | 0 | 1 | Tkinter has no support for displaying pdf. | 0 | 2,722 | 0 | 1 | 2012-12-18T13:39:00.000 | python,python-2.7,tkinter,pypdf | display pdf pages with GUI on tkinter | 0 | 1 | 2 | 13,934,811 | 1 |
0 | 0 | I've wrapped a C++ class using Boost.Python. These Objects have strong references (boost::shared_ptr) on the C++-side, and there may be intermittent strong references in Python as well. So far, everything works well. However, if I create a python weak reference from one of the strong references, this weak reference is ... | false | 13,956,055 | 0.197375 | 1 | 0 | 1 | How are you holding a "C++ strong reference" to the wrapped class ?
I'm quite rusty on boost python, but I believe it's the boost::shared_ptr's deleter presence which ensures lifetime management.
If that isn't the problem, you probably need to hold the instance in C++ in a boost::python::object. | 0 | 241 | 0 | 6 | 2012-12-19T15:49:00.000 | c++,python,boost-python | Boost.Python: Getting a python weak reference to a wrapped C++ object | 0 | 1 | 1 | 13,989,547 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.