Web Development
int64
0
1
Data Science and Machine Learning
int64
0
1
Question
stringlengths
35
6.31k
is_accepted
bool
2 classes
Q_Id
int64
5.14k
40.5M
Score
float64
-1
1.2
Other
int64
0
1
Database and SQL
int64
0
1
Users Score
int64
-6
163
Answer
stringlengths
19
4.91k
Python Basics and Environment
int64
0
1
ViewCount
int64
12
475k
System Administration and DevOps
int64
0
1
Q_Score
int64
0
346
CreationDate
stringlengths
23
23
Tags
stringlengths
6
68
Title
stringlengths
12
138
Networking and APIs
int64
0
1
Available Count
int64
1
31
AnswerCount
int64
1
35
A_Id
int64
5.3k
72.3M
GUI and Desktop Applications
int64
1
1
0
0
I'm trying to maintain 2 python projects. one of them is using PyQt4 and another one is using PyQt5. So I created 2 virtualenv as follow. 1) installed virtualenv and virtualenvwrapper by sudo 2) logout from root(sudo) 3) created virtualenv at /home/thura/workspace/python/virtualenv 4) mkvirtualenv gui_pyqt4 under /h...
false
20,833,826
0
0
0
0
You need to activate the appropriate virtual environment and then use the command pip install PyQt4or pip install PyQt5. Since you are using virtualenvwrapper, the virtual environment is activated automatically. Otherwise, use workon virtualenv_name to activate the environment.Do tell if the problem still persists.
1
1,320
0
0
2013-12-30T05:27:00.000
python,python-2.7
How to install PyQt4 and PyQt5 at different virtualenv?
0
1
2
47,946,736
1
0
0
I have two objects troll and pig. I'm detecting collisions between these two characters with Pygame's colliderect function. collisions for this works perfectly, however I am unable to remove the object from the screen when a collision occurs. When a troll collideswith a pig, I want the pig to disappear from the screen....
false
20,839,246
0
0
0
0
Can't you just stop drawing the pig? Each frame you fill the screen with the background, so it won't be visible.
0
489
0
0
2013-12-30T12:07:00.000
python,pygame,sprite
remove object after collision
0
1
1
20,843,239
1
0
0
I'm looking for some advice mainly here. I'm working on an application, where the main processing (stored on a server) is carried out in C++ and the GUI (front-end) is carried out in Python. These two programs will communicate with each other. The Python will send across the files needed for the C++ program to work, a...
false
20,839,944
0
0
0
0
I would go for named pipes, would be readily available in your circumstance because it is just similar to reading and writing to file, but it also has features similar to sockets i.e. you can make them communicate on a network (different hosts)
0
3,600
0
4
2013-12-30T12:50:00.000
c++,python,sockets
Sending/Receiving data between two different programs
0
1
4
20,840,334
1
1
0
I want to publish an Android application that I have developed but have a minor concern. The application will load with a database file (or sqlite3 file). If updates arise in the future and these updates are only targeting the application's functionality without the database structure, I wish to allow users to keep the...
false
20,856,465
0
0
1
0
if you're using local sqlite then you have to embed the database file within the app as failure to do so it means there's no database, in case for updates database have version numbers where as it can not upgrade the database provided the version number is the same as the previous app updates
0
487
0
4
2013-12-31T11:14:00.000
android,python-2.7,sqlite,apk,kivy
Update apk file on Google Play
0
2
2
20,856,571
1
1
0
I want to publish an Android application that I have developed but have a minor concern. The application will load with a database file (or sqlite3 file). If updates arise in the future and these updates are only targeting the application's functionality without the database structure, I wish to allow users to keep the...
false
20,856,465
0
0
1
0
I had the same issue when I started my app but since kivy has no solution for this I tried to create a directory outside my app directory in android with a simple os.mkdir('../##') and I put all the files there. Hope this helps!
0
487
0
4
2013-12-31T11:14:00.000
android,python-2.7,sqlite,apk,kivy
Update apk file on Google Play
0
2
2
46,767,741
1
0
0
I want to call a python/pygame program from inside another. I do this with the os.startfile(minigame1) command. But when the program launches it first runs a python command line window and then opens the minigame in a seperate window. How can I make both programs share the same pygame window? Thank you in advance
false
20,861,890
0
0
0
0
If it is at all possible for two instances of a Pygame program to share a common display, then try using pygame.display.get_surface() to get the display surface- this will return None if the display isn't already initialized. Another issue you will have to overcome in your project is the fact that calling pygame.event....
0
296
0
0
2013-12-31T18:41:00.000
python,pygame
Two python/pygame programs to run in the same window
0
1
1
20,862,261
1
0
0
I'm very new in the python world I know some about command line commands and gui commands. I've already succeeded in writing a working python script for Abaqus and now I want to add some GUI in it instead of changing the parameters in the text file everytime. I discovered GUI Toolkit but it seems to difficult, for two ...
false
20,883,944
0
0
0
0
I have used tk GUIs with Abaqus but I find they don't ingrate that well and end up causing all sorts of strange errors (eg ignoring text input, windows hanging etc). If you are used to tk its not that much of a leap with the FX & AFX routines. I didnt know about RSG though and just had a quick play, liking it.
0
3,171
0
0
2014-01-02T13:20:00.000
python,user-interface
Is it possible to use python GUI instead of Abaqus GUI Toolkit?
0
2
3
29,543,626
1
0
0
I'm very new in the python world I know some about command line commands and gui commands. I've already succeeded in writing a working python script for Abaqus and now I want to add some GUI in it instead of changing the parameters in the text file everytime. I discovered GUI Toolkit but it seems to difficult, for two ...
false
20,883,944
0.197375
0
0
3
I am no expert in the topic, but I do have some experience with writing plug-ins for Abaqus. You may want to look into using the RSG (Really Simple GUI) Dialogue Builder. It is under the plug-ins options on the Abaqus toolbar. The RSG is a GUI for building GUIs based on Abaqus's customized version of the FOX Toolkit....
0
3,171
0
0
2014-01-02T13:20:00.000
python,user-interface
Is it possible to use python GUI instead of Abaqus GUI Toolkit?
0
2
3
24,072,899
1
0
0
I installed the SimpleCv on my raspberryPi and the driver to use the camera board with it (uv4l driver) and now I'd like to play with it. When I type on simpleCV shell "Camera(0).getImage().save("foo.jpg") " , on the screen appears the camera preview and I am not able to type other command because this preview covers ...
true
20,891,900
1.2
1
0
3
Try the nopreview option pkill uv4l uv4l --driver raspicam --auto-video_nr --encoding yuv420 --width 320 --height 240 --nopreview export LD_PRELOAD=/usr/lib/uv4l/uv4lext/armv6l/libuv4lext.so Hope that helps
0
3,614
0
0
2014-01-02T21:07:00.000
python,linux,opencv,raspberry-pi,simplecv
How remove camera preview to raspberry pi
0
1
2
20,910,789
1
0
0
There's one file which is run with Python33, it has this line of code: `os.startfile(r'rungame\xsim.py')` That opens up a file in Python32, called xsim.py, and that works fine. However, xsim, which uses pygame modules, does not run as it would usually run. It cannot load its images when accessed this way, the first im...
false
20,914,146
0
0
0
0
The problem has been fixed. The current working directory was the location of the first file, not the file in need of the pictures which was inside the folder 'rungame', so that is where it looked for winp.png when no path was specified.
0
56
0
0
2014-01-03T22:50:00.000
python,path,pygame
Pygame image loading error when accessing Python through another Python file
0
1
1
20,914,612
1
0
0
Not sure what else to call 'active'. Is it possible to have the scrollbar, once clicked on to remain 'active'? Another words once I click on the scrollbar I would like to be able to move the scrollbar with the keyboard(left/right arrow keys) or the mouse. Is this possible? If so what do I have to do to accomplish i...
false
20,939,891
0.099668
0
0
1
Technically it should be possible, by giving the scrollbar the keyboard focus and then adding some custom bindings. That's a fairly unusual thing to do. Since the scrollbars are drawn with native widgets on Windows and the Mac, it might be impossible on those platforms. What you probably want to do instead is set some...
0
536
0
0
2014-01-05T22:13:00.000
python,tkinter
Python tkinter scrollbar active state
0
1
2
20,940,725
1
0
0
I am looking for a PyQt5 tutorial. It is rather complicated to start GUI development with Python for the first time without a tutorial. I only found some PyQt4 tutorials so far, and since something changed from Qt4 to Qt5, for example the fact SIGNAL and SLOT are no more supported in Qt5, it would be nice to have speci...
false
20,996,193
1
0
0
29
Been looking for PyQt5 tutorials for some time? Look no further! You won't find many around the internet. Not really tutorials, but pretty self-explanatory basic scripts under the following path: /python/lib/site-packages/PyQt5/examples you will find about 100 examples in 30 folders ranging from beginner to advance...
0
57,823
0
65
2014-01-08T12:51:00.000
python,user-interface,qt5,pyqt5
Is there a tutorial specifically for PyQt5?
0
1
3
21,359,084
1
0
0
I downloaded the sources for Android NDK from the git repository, I noticed that the sources for perl and python are bundled with the other dependencies: what are this 2 interpreters for ? Does this means that I can build python for Android with the NDK ? Or that if I have a python application I can port it to Android ...
true
21,006,620
1.2
1
0
2
Python and perl are used internally by NDK tools to make the cross-compile environment more friendly. You only need them on the host. NDK can be built for Windows, Mac, or Linux. So the git repository contains all opensource that is required to compile NDK for any of these platforms.
1
155
0
1
2014-01-08T21:12:00.000
android,python,git,perl,android-ndk
Why do I get python and perl with the NDK sources?
0
1
1
21,015,004
1
0
0
I need to get the channel of wx.bitmap. I use the function GetDepth. It return 24 all the time , even if I pass a 8depth gray image
true
21,013,186
1.2
0
0
0
I use PIL(python image library)'s mode to judge the channels
0
38
0
0
2014-01-09T06:35:00.000
python,wxpython
How to get the channel of a image by wx.bitmap
0
1
1
21,225,163
1
0
0
The question is pretty much in the title, not much to add here. I'm trying to allow the user to dynamically size multi-line text controls just as they can re-size the panel (I set the default, but they are free to change it). Can this be done?
false
21,047,039
0.197375
0
0
2
Take a look at wx.lib.resizewidget and the ResizeWidget sample in the demo.
0
119
0
0
2014-01-10T14:37:00.000
python,wxpython
Is there a way to allow the user to re size a text control in wxPython?
0
1
2
21,067,422
1
0
0
I am reading through "Making games with Python & Pygame" and I have noticed that because the author uses lots of functions with drawing in to break his code up, he uses lots of globals such as GRIDSIZE or BACKGROUNDCOLOR. I was always told that globals were generally bad, but without them, every drawing function would...
false
21,054,775
0.039979
0
0
1
Example code in books is not the same as production code Code in books and articles explaining things do things to keep to the point and not inundate the reader with what might be noise or tangents to the specific topic. The author is taking short cuts to keep the code as specific to the problem they are explaining as ...
1
189
0
2
2014-01-10T21:32:00.000
python,pygame
Globals vs Parameters for Functions with the Same Parameters
0
4
5
21,054,996
1
0
0
I am reading through "Making games with Python & Pygame" and I have noticed that because the author uses lots of functions with drawing in to break his code up, he uses lots of globals such as GRIDSIZE or BACKGROUNDCOLOR. I was always told that globals were generally bad, but without them, every drawing function would...
false
21,054,775
0.039979
0
0
1
Constant globals can be OK, despite whatever general warnings you may have heard. In Python "constant" means "named in capital letters as a hint that nobody should modify them", and "globals" means "module-level variables", but the principle still applies. So hopefully GRIDSIZE and BACKGROUNDCOLOR are constant for the ...
1
189
0
2
2014-01-10T21:32:00.000
python,pygame
Globals vs Parameters for Functions with the Same Parameters
0
4
5
21,056,248
1
0
0
I am reading through "Making games with Python & Pygame" and I have noticed that because the author uses lots of functions with drawing in to break his code up, he uses lots of globals such as GRIDSIZE or BACKGROUNDCOLOR. I was always told that globals were generally bad, but without them, every drawing function would...
false
21,054,775
0.039979
0
0
1
In Python you don't have as big a problem with globals, because Python globals are at the module level. (So global is a bit of a misnomer anyway.) It's fine to use module-level globals under many circumstances where true globals would be inappropriate.
1
189
0
2
2014-01-10T21:32:00.000
python,pygame
Globals vs Parameters for Functions with the Same Parameters
0
4
5
21,054,846
1
0
0
I am reading through "Making games with Python & Pygame" and I have noticed that because the author uses lots of functions with drawing in to break his code up, he uses lots of globals such as GRIDSIZE or BACKGROUNDCOLOR. I was always told that globals were generally bad, but without them, every drawing function would...
false
21,054,775
0
0
0
0
It depends on the situation. Globals are not generally bad, but should be avoided if not absolutely necessary. For example, constants are perfectly ok as globals, while configuration data should be bundled (encapsulated) as much as possible. If you concentrate all such data onto one (or few) objects, you either might w...
1
189
0
2
2014-01-10T21:32:00.000
python,pygame
Globals vs Parameters for Functions with the Same Parameters
0
4
5
21,054,871
1
0
0
At the moment I'm using Visual Studio 2012 Professional with Python Tools to program application for my Raspberry Pi. For the moment this is a brilliant combination, because the application can also run on a Windows computer and debug it while in development. After I'm at a point that the application can run on my Pi t...
false
21,064,985
-0.379949
1
0
-2
The nusbio device can give 8 gpios for your Windows machine directly avaialble for .NET languages.
0
3,513
0
1
2014-01-11T16:45:00.000
python,visual-studio,raspberry-pi,gpio
Program Raspberry PI GPIO on Windows
0
1
1
34,752,703
1
0
0
I have a form (wx.Frame) in which the widest element is the toolbar (created with toolbar = self.CreateToolbar() and toolbar.Realize()). I want the width of the form to be such that every toolbar item is shown. I don't see the toolbar changing after creation, but I'd prefer if that could be handled. Any suggestions? (I...
false
21,074,285
0
0
0
0
You'll have to figure out what the width of a toolbar item is. Then you can take that number and multiply it by the number of toolbar items and set the frame's size appropriately. Then when you add or remove a toolbar item, part of that process will be to update the size of the frame (SetSize()). You will probably nee...
0
135
0
0
2014-01-12T11:52:00.000
python-2.7,user-interface,wxpython
Set width of wxPython Frame based on toolbar width
0
1
1
21,093,804
1
0
0
I have a listbox on a GUI in Tkinter. I would like to implement a routine where if a listbox item is selected a function is called (based on this selection) to modify the gui (add another adjacent listbox). Then if that selection changes, the gui reverts back to its default view. Can this be done? Seems you would need ...
true
21,078,720
1.2
0
0
0
The listbox will fire the virtual event <<ListboxSelect>> whenever the selection changes. If you bind to it, your function will be called whenever the selection changes, even if it was changed via the keyboard.
0
1,733
0
0
2014-01-12T18:40:00.000
python,listbox,tkinter
Calling a function based on a Listbox current selection "curselection()" in Tkinter
0
1
2
21,079,948
1
0
0
It looks like developing GUI applications in HTML+JS with python in the background would be really nice. I see node-webkit. I also see that there are python bindings for webkit. It just seems like it's an order of magnitude more difficult to set up than python/tkinter - and I couldn't find win7 support.
true
21,114,655
1.2
0
0
2
Maybe what you are looking for is Pyjs, is not entirely build to do that, but that's the nearest thing to it I have found.
0
1,465
0
7
2014-01-14T13:23:00.000
python,node-webkit
Is there a python version of node-webkit
0
1
2
21,965,786
1
0
0
A quick question that may seem out of the ordinary. (in reverse) Instead of calling native code from an interpreted language; is there a way to compile Java or Python code to a .dll/.so and call the code from C/C++? I'm willing to accept even answers such as manually spawning the interpreter or JVM and force it to read...
false
21,171,607
0
1
0
0
You can also look into Lua, while not as widely used as a lot of other scripting languages, it was meant to be embedded easily into executables. It's relatively small and fast. Just another option. If you want to call other languages from your c/c++ look into SWIG.
0
253
0
0
2014-01-16T19:58:00.000
java,python,c++,c,dll
Dynamic Link Library for Java/Python to access in C/C++?
0
1
3
21,177,883
1
0
0
How do you get width and height of an image imported into pygame. I got the size using: Surface.get_size , but I dont know how to get the width and height.
true
21,209,496
1.2
0
0
5
There are 2 methods available for getting the width and height of a surface. The first one is get_size(), it returns a tuple (width,height). To access width for instance, you would do: surface.get_size()[0] and for height surface.get_size()[1]. The second method is to use get_width(), and get_height(), which return the...
0
7,226
0
1
2014-01-18T20:31:00.000
python-3.x,pygame
Getting width and height of an image in Pygame
0
1
1
21,209,675
1
1
0
The issue: I have written a ton of code (to automate some pretty laborious tasks online), and have used the mechanize library for Python to handle network requests. It is working very well, except now I have encountered a page which I need javascript functionality... mechanize does not handle javascript. Proposed Solut...
true
21,221,141
1.2
0
0
0
Since nobody answered, I will post my work-around. Basically, wanted to "transfer" my session from Mechanize (the python module) to the QtWebKits QWebView (PyQt4 module) because the vast majority of my project was automated headless, but I had encountered a road block where I had no choice but to have the user manually...
0
384
0
1
2014-01-19T18:57:00.000
javascript,python,asp.net,pyqt,qtwebkit
Python - Transferring session between two browsers
0
1
1
21,532,850
1
0
0
How can I set a suitable fps number in pygame for any kind of monitor running my game? I know I can set fps using pygame.time.Clock().tick(fps) but how can I set suitable fps? Please post example python code along with answer.
false
21,234,884
0.197375
0
0
2
I'm not entirely sure that I understand the question being asked, but I think you will just have to experiment with different numbers and find out what works for you. I find that around 50-100 is a good range. If what you are trying to do is make game events only update a certain number of times per second while rende...
1
603
0
0
2014-01-20T13:02:00.000
python-2.7,pygame,frame-rate
How to set fps in pygame in order to prevent lag?
0
1
2
21,239,429
1
0
0
I have recently published an Android application on Google Play written in Python/Kivy. Normally the "build.py" script would wrap the whole project files into one single folder that is the application package folder. But if i check the content of this package on my phone after the installation of the apk i can find the...
true
21,252,729
1.2
0
0
3
I have recently published an Android application on Google Play written in Python/Kivy Congratulations. May I ask what app it is? My question is: is this safe to expose the source code files or is there something that i am missing in the compilation of my project ? What is annoying me more are the temporary files .kv...
0
1,365
0
3
2014-01-21T08:24:00.000
android,python,kivy
How to hide python code file and other related files in a kivy project
0
2
2
21,260,736
1
0
0
I have recently published an Android application on Google Play written in Python/Kivy. Normally the "build.py" script would wrap the whole project files into one single folder that is the application package folder. But if i check the content of this package on my phone after the installation of the apk i can find the...
false
21,252,729
0.099668
0
0
1
Those files may be editor backups which kivy doesn't recognize. You can edit the build.py and add some patterns to BLACKLIST_PATTERNS. For your issue, you should add '*~' to the black list.
0
1,365
0
3
2014-01-21T08:24:00.000
android,python,kivy
How to hide python code file and other related files in a kivy project
0
2
2
21,253,288
1
0
0
While doing a breaf research on IronPython I got confused about it's execution model and how it integrates with C#. Can you please point, which of these assumptions are wrong: IronPython is Not compiled Ahead of time ( into a clr exe|dll with IL code) IronPython is distributed as script When executed, IronPython file...
true
21,275,131
1.2
1
0
3
You can use pyc.py to create an exe/dll, but it's not well documented. Otherwise, you're basically right.
1
185
0
3
2014-01-22T05:45:00.000
python,clr,ironpython
IronPython and Ahead-of-Time Compilation
0
1
1
21,284,660
1
0
0
Can anyone give me a point in the right direction please? I've created a piece of Python code that creates a GUI. One button opens a 'new window', but if I click on the same button again I get another 'new window', keep clicking and I've got multiple copies of the 'new window'. I want the original window to be unacces...
true
21,338,613
1.2
0
0
2
You want to call grab_set() on your new window, which will prevent any events from going to the other window. When you're done, call grad_release()
0
154
0
0
2014-01-24T17:20:00.000
python,user-interface,tkinter,window
Python - GUI creates new window, but the original window is still usable. How do I stop this
0
1
1
21,338,743
1
0
0
Is there a general way for zooming in/out on a wx.Panel (all its content should be zoomed as well) ? Is it possible to define a new sizer type that would provide this feature ?
true
21,369,120
1.2
0
0
1
No. The wx.Panel does not support this feature out of the box. The FloatCanvas widget does support panning and zooming though. You could use that widget instead. Of course, I think you will have to draw the items on it instead of using regular widgets.
0
413
0
0
2014-01-26T20:59:00.000
python,wxpython
Zoom in/out on a wx.Panel
0
1
1
21,383,591
1
0
0
I've created a dynamic property in the Designer interface. How do I access this property in my code? I don't see any properties listed with the name I've provided. I've found a dynamicPropertyNames property that contains a QByteArray object and the name I provided, but I cannot figure out how to access the data I store...
false
21,395,056
0
0
0
0
Just because I had a similar problem and the reason wasn't a wrong object: The property's content can be accessed with toString().
0
1,777
0
3
2014-01-28T01:12:00.000
python,pyqt,qt-designer
How do I access a dynamic property in PyQt?
0
1
2
28,092,434
1
0
0
I need to display a chart that can be very large, for example the image resolution could be 100 000 x 1000. However, it seems like I am limited to 32768 x 32768 by the QImage. I can't reasonably redraw directly the chart at every paintEvent so I need to store it into a QImage (it could be a QPixmap that won't change an...
false
21,462,118
0.066568
0
0
1
You can use the Qt Graphics View Framework. Create a QGraphicsView and a QGraphicsScene for it. Add items using QGraphicsScene::addPixmap (that returns QGraphicsPixmapItem which is derived from QGraphicsItem) and adjust their positions using QGraphicsItem::setPos. QGraphicsView will effectively draw your scene and hand...
0
622
0
1
2014-01-30T16:33:00.000
python,c++,qt
Draw an image too big to fit into a QImage
0
3
3
21,467,816
1
0
0
I need to display a chart that can be very large, for example the image resolution could be 100 000 x 1000. However, it seems like I am limited to 32768 x 32768 by the QImage. I can't reasonably redraw directly the chart at every paintEvent so I need to store it into a QImage (it could be a QPixmap that won't change an...
false
21,462,118
0.132549
0
0
2
You probably do not want to display more than one QImage of data at a time. Few screens are more than 32k pixels wide or tall. So you want an abstract type that produces QImages on request for reading, at offsets and possibly at different zoom factors. The next problem is modifying this abstract type. An easy to use,...
0
622
0
1
2014-01-30T16:33:00.000
python,c++,qt
Draw an image too big to fit into a QImage
0
3
3
21,462,850
1
0
0
I need to display a chart that can be very large, for example the image resolution could be 100 000 x 1000. However, it seems like I am limited to 32768 x 32768 by the QImage. I can't reasonably redraw directly the chart at every paintEvent so I need to store it into a QImage (it could be a QPixmap that won't change an...
false
21,462,118
0
0
0
0
You do realize that a 100,000 x 1000 RGBA QImage is 400MBytes? There's no point in wasting all that memory. Really, none. Just paint it every time, one request, in the paintEvent. Be clever about it so that you only paint what needs to be shown. I'd think one should focus on optimizing the painting process and your dat...
0
622
0
1
2014-01-30T16:33:00.000
python,c++,qt
Draw an image too big to fit into a QImage
0
3
3
21,469,131
1
0
0
I was using Python to process some data (int array). It is very slow. So I put the processing function in a c++ DLL and talk with it through ctypes. The data are loaded from swig-wrapped modules (c++). I browsed almost everywhere but found nothing to convert swig object of type 'int *' pointer to ctypes int pointer. Ho...
false
21,471,470
0
0
0
0
It seems no solution to do that after a few attempts. A simple way to fix this problem is wrapping the c++ code with SWIG, so can pass it to other SWIG-wrapped modules.
0
640
0
0
2014-01-31T02:31:00.000
python,c++
How to convert swig object of type 'int *' to ctypes int*
0
1
1
21,518,936
1
0
0
I am using Tkinter to create an application which requires a 0-9 numerical keypad to be built in to the UI. I plan to do this with 10 button widgets which enter the relevant number(s) into the currently selected Entry widget. I do not want to use one of the pre-made on-screen keyboards (e.g. Matchbox-keyboard) that ar...
true
21,509,623
1.2
0
0
0
You don't need to simulate keypresses if all you want to do is insert the numbers into the entry widget. Just have the buttons directly insert their value into the entry widget with the entry widget insert method.
0
1,024
0
0
2014-02-02T10:46:00.000
python,tkinter,raspberry-pi,on-screen-keyboard
In Python (on Raspberry Pi) how do I create an embedded keypad within my Tkinter window
0
1
1
21,511,280
1
0
0
I have a PyQt program that's apart of package which is only about 9MB. This isn't much of a concern except that the Qt dependencies that get drawn in with it combined are closer to 100MB. So my question is there any logical and safe way of including only portions of the Qt library that I could include in my package and...
true
21,514,717
1.2
0
0
0
I can't think of a way of doing what you want, but if you are using a standard PyQt distro, standard practice is to leave it up to the user to download and install dependencies. This could be automated by having an install script part of your ISO, that determines if pyqt is needed and if not available fetches the pyqt ...
1
223
0
2
2014-02-02T18:50:00.000
linux,qt,pyqt,size,python-2.x
Including only minimal Qt library with a program
0
1
1
21,546,276
1
0
0
I'm interested in creating my own programming language and I would like to use python. My question is, would a language written in Python using the PLY library be considerably slower than CPython or would they be about the same in terms of program execution speed? Also in terms of performance how much better would it b...
true
21,540,126
1.2
1
0
2
If you are implementing a compiler in PLY, the compilation may take longer - but that's irrelevant the execution speed of your program. For example, you could use PLY to write a C compiler. The compiler may or may not be faster than your other C compiler, but the resulting executable should run at a similar speed (unle...
1
243
0
0
2014-02-03T23:39:00.000
python,c,programming-languages,yacc,ply
Would a language written in Python using PLY be slow?
0
1
1
21,540,275
1
0
0
I would like to draw as many as 86,000 (small circles) on a Tkinter Canvas. On average it will be more like 8,600 circles. At times as few as 400. All of the circles being drawn at once are the same (size , color). The radius of the circles is related to the number of circles being drawn (as little as 1-2px when there ...
true
21,556,454
1.2
0
0
1
I don't think there's anything you can do to speed up the creation of circles. The canvas wasn't designed to handle 80,000 objects, and it doesn't support the ability to copy and paste items (beyond simply creating new objects with the same coordinates). It handles a few thousand OK, and even 10,000 is pretty performan...
0
165
0
1
2014-02-04T15:25:00.000
python,tkinter,tkinter-canvas
Making logs of circles quickly with Tkinter
0
1
1
21,558,520
1
0
0
if I am not wrong wxMenuITem does not support tooltips is there an easy turn around to show a popup tooltip of help upon mouse focus on a menu item for a sec or 2 ?
false
21,613,027
0.197375
0
0
1
You need to realize that wxPython wraps the native widgets of the OS that it is running on, so if that underlying widget does not support the desired behavior, then wxPython will not either. It should be noted, however, that you would normally update the StatusBar with information about the menu items. That is how the ...
0
225
0
1
2014-02-06T20:11:00.000
python-2.7,wxpython
how to set wxTooltip or tooltip like on wxMenuItem
0
1
1
21,630,518
1
0
0
I recently spent some time working out how to use a QDataStream with a QTreeWidget in PyQt. I never found specific examples for doing exactly this, and pyqt documentation for QDataStream seems to be pretty scarce in general. So I thought I'd post a question here as a breadcrumb trail in case someone else down the lin...
false
21,653,108
0
0
0
0
The QTreeWidget is a red herring. What you are saving is a generic QAbstractItemModel (treeWidget->model()) - after all, a QTreeWidget is a view, and has a built-in model. Now, those model's items are simply QVariants, and those are simply Python types, but also fully supported by QDataStream::operator<<. All you need ...
0
2,494
0
4
2014-02-08T23:30:00.000
python,qt,python-2.7,pyqt,pyqt4
PyQt: Saving native QTreeWidgets using QDataStream
0
1
3
21,654,212
1
0
0
I want to make a text editor with autocompletion feature. What I need is somehow get the text which is selected by mouse (case #1) or just a word under cursor(case #2) to compare it against a list of word I want to be proposed for autocompletion. By get I mean return as a a string value. Can it be done with tkinter at ...
false
21,675,320
-0.197375
0
0
-2
You can use QTextEdit::cursorForPosition to get a cursor for mouse position. After that you can call QTextCursor::select with QTextCursor::WordUnderCursor to select the word and QTextCursor::selectedText to get the word.
0
1,225
0
3
2014-02-10T10:59:00.000
python,qt,autocomplete,tkinter
How do I return word under cursor in tkinter?
0
1
2
21,675,660
1
0
0
I am new to Qt and developing with python. Would a python application developed using Qt framework and PyQt require the entire Qt framework to be installed on a user's machine in order to run a "exe" version of the application created with something like p2exe? Or would py2exe copy the required Qt framework components...
true
21,699,483
1.2
0
0
-1
No need for further install. e.g. Py2exe will copy everything needed. If you have some special requirement you may have to copy other stuff manually. In my application I copy some extra ddls, some ico files and some matplotlib files.
1
477
0
1
2014-02-11T10:39:00.000
python,qt,pyqt
Do Frozen PyQt applications need the Qt to be installed on client machines
0
2
3
21,699,872
1
0
0
I am new to Qt and developing with python. Would a python application developed using Qt framework and PyQt require the entire Qt framework to be installed on a user's machine in order to run a "exe" version of the application created with something like p2exe? Or would py2exe copy the required Qt framework components...
false
21,699,483
0.066568
0
0
1
I don't know what you mean by "frozen" but if your question is whether you can create an "exe" for a pyqt python script without installing python and pyqt on user machine then answer is yes. As with any other exe you don't need to install anything on user machine. I have created a few application using pyqt and convert...
1
477
0
1
2014-02-11T10:39:00.000
python,qt,pyqt
Do Frozen PyQt applications need the Qt to be installed on client machines
0
2
3
21,699,917
1
0
0
I have a Twisted application that someone else wrote. There is a file run.py which makes it run in the foreground. There is also a twistd plugin named as service.tac that makes it run in the background. Around 90% of the code is the same in both the .py and .tac file. Is it possible to combine the two together? Or is t...
true
21,708,441
1.2
0
0
4
You can run the tac file in the foreground: twistd -n -y service.tac. So perhaps you can just delete the run.py file.
0
441
0
3
2014-02-11T17:11:00.000
python,twisted
Right approach for running a Twisted application in the foreground or background
0
1
1
21,709,158
1
0
0
I am using windows 8 (not yet updated to 8.1) The code I am using is import ctypes SPI_SETDESKWALLPAPER = 20 ctypes.windll.user32.SystemParametersInfoA(SPI_SETDESKWALLPAPER, 0, "word.jpg", 0) print "hi" For some reason regardless if i give it a valid image (in the same directory as program) or not, regardless of type...
false
21,718,701
0.197375
0
0
2
Try passing SPIF_SENDCHANGE (which is 2) as the last parameter. You might also need to bitwise-or it with SPIF_UPDATEINIFILE (which is 1).
1
1,203
0
1
2014-02-12T04:30:00.000
windows,python-2.7,ctypes
How to Change Windows background using Python 2.7.3
0
2
2
21,718,853
1
0
0
I am using windows 8 (not yet updated to 8.1) The code I am using is import ctypes SPI_SETDESKWALLPAPER = 20 ctypes.windll.user32.SystemParametersInfoA(SPI_SETDESKWALLPAPER, 0, "word.jpg", 0) print "hi" For some reason regardless if i give it a valid image (in the same directory as program) or not, regardless of type...
false
21,718,701
0
0
0
0
Sorry, I know this is late, but the problem is that you need to include the path. Instead of "image.jpg" do r"C:\path to file\image.jpg" Otherwise python doesn't know where to look for the image.
1
1,203
0
1
2014-02-12T04:30:00.000
windows,python-2.7,ctypes
How to Change Windows background using Python 2.7.3
0
2
2
26,006,082
1
0
0
I am trying to integrate a complex python application (with a custom python interpreter shipped along) for OSX. In order to handle a set of issues due to cross platform requirements, I created a .app bundle pointing at a shell script with its CFExecutable entry in Info.plist. This works, and the invoked shell script st...
false
21,755,235
0
0
0
0
I solved the problem, and in hindsight it was rather trivial. In the shell script, I need to invoke my binary with exec, so that the running bash process is replaced (a la execve()) rather than spawning a new process. The only problem is that my interpreter now replaces the icon with the stock one, but I have only one ...
0
138
1
0
2014-02-13T13:11:00.000
python,macos,bundle,.app
How to have a natural MacOSX .app of a complex python application (including custom interpreter) via a shell initialization script?
0
1
2
21,756,168
1
0
0
I am new to python programming and development. After much self study through online tutorials I have been able to make a GUI with wxpython. This GUI interacts with a access database in my computer to load list of teams and employees into the comboboxes. Now my first question is while converting the whole program into...
true
21,788,522
1.2
0
0
0
The console could possibly appear if you used the 'console' parameter to setup(). Switch to 'windows' instead if that is the case. Can't say for sure without seeing your setup.py script. Possibly your app could also be opening console, but again hard to say without seeing source. One thing to check is to make sure you ...
0
373
0
0
2014-02-14T20:01:00.000
python,user-interface
wxpython GUI program to exe using py2exe
0
1
1
21,789,391
1
0
0
I'm trying to write a program in either python or C++ using opengl that will allow me to control different displays. Currently I have three different displays, I have the computer monitor, a LCD and a DLP all hooked up to my computer. I want to control each screen separately, and I want to full screen them all so they ...
true
21,790,472
1.2
0
0
2
Use something like SDL2 or GLFW3 for multimonitor support. They'll let you query the number of monitors and their sizes, as well as let you create multiple windows to cover them.
0
100
0
2
2014-02-14T22:14:00.000
python,c++,opengl,glut,pyopengl
Using different displays opengl
0
1
1
21,790,746
1
0
0
I just recently learned Python and Pygame library. I noticed that the rendering and main loop is automatically paused when I click and hold on the window menu bar (the bar with the title/icon). For example, in a snake game, the snake will be moving every frame. When I click and hold (or drag) the window menu, the snak...
false
21,895,657
0
0
0
0
This one is pretty easy, its seems you forgot to add a event callback. state 1 while (sate != 0): for event in pygame.event.get():
0
430
0
5
2014-02-20T00:30:00.000
python,pygame
Pygame built-in automatic pause?
0
1
2
21,896,365
1
0
0
I have a QLineEdit, and I need to know if there is a signal which can track mouse hover over that QLineEdit, and once mouse is over that QLineEdit it emits a signal. I have seen the documents, and found we have the following signals: cursorPositionChanged ( int old, int new ) editingFinished () returnPressed () ...
false
21,899,681
0.099668
0
0
1
You can use enterEvent, leaveEvent, enterEvent is triggered when mouse enters the widget and leave event is triggered when the mouse leaves the widget. These events are in the QWidget class, QLineEdit inherits QWidget, so you can use these events in QLineEdit. I you don't see these events in QLineEdit's documentation, ...
0
1,894
0
2
2014-02-20T06:14:00.000
python-2.7,pyqt4,mouseover,qlineedit
QLineEdit hover-over Signal - when mouse is over the QlineEdit
0
1
2
21,900,144
1
0
0
I'm embedding Python in an Objective C application using PyObjC, setting the Python environment up by hand on the ObjC side (i.e. not using py2app). I'm starting the Python in a separate thread (on the ObjC side) with a call to PyRun_File(), and then one to PyObject_CallFunction() to start it doing something (specific...
true
21,988,970
1.2
0
0
3
The easiest way to ensure problem free usage of the bridge is to ensure that the delegate methods that you use don't use C arrays as arguments or return values and don't use variadic signatures ("..."). Futhermore ensure that all pass-by-reference arguments (such as the commonly used "NSError**" argument) are marked up...
1
853
0
1
2014-02-24T13:18:00.000
python,pyobjc
How do I pass an Objective C instance into a PyObjC Python function when using PyRun_File()/PyObject_CallFunction()?
0
1
2
22,010,598
1
0
0
I installed Python 2.6 from source for software testing (2.7 was preinstalled on my Linux distro). However, I cannot import Tkinter within 2.6, I suppose because it doesn't know where to find Tk. How do I either help 2.6 find the existing Tkinter install or reinstall Tkinter for 2.6?
false
22,057,077
-0.066568
0
0
-1
Have you tried using pip-2.6 install package?
1
417
0
1
2014-02-27T01:15:00.000
python,linux,tkinter,tk,python-2.6
Installed Python from source and cannot import Tkinter - how to install?
0
3
3
22,057,396
1
0
0
I installed Python 2.6 from source for software testing (2.7 was preinstalled on my Linux distro). However, I cannot import Tkinter within 2.6, I suppose because it doesn't know where to find Tk. How do I either help 2.6 find the existing Tkinter install or reinstall Tkinter for 2.6?
true
22,057,077
1.2
0
0
1
I solved this by adding '/usr/lib/x86_64-linux-gnu' to lib_dirs in setup.py, then rebuilding python
1
417
0
1
2014-02-27T01:15:00.000
python,linux,tkinter,tk,python-2.6
Installed Python from source and cannot import Tkinter - how to install?
0
3
3
22,058,494
1
0
0
I installed Python 2.6 from source for software testing (2.7 was preinstalled on my Linux distro). However, I cannot import Tkinter within 2.6, I suppose because it doesn't know where to find Tk. How do I either help 2.6 find the existing Tkinter install or reinstall Tkinter for 2.6?
false
22,057,077
0.066568
0
0
1
Install the TCL and Tk development files and rebuild Python.
1
417
0
1
2014-02-27T01:15:00.000
python,linux,tkinter,tk,python-2.6
Installed Python from source and cannot import Tkinter - how to install?
0
3
3
22,057,115
1
0
0
I am using PySide in a not-so-MVC fashion, meaning, I try as much as possible not to edit the generated .ui to .py file, I put my application logic in packages (models) and I have one module (.pyw file) more like a controller for them all to initialize and perform management. Not too best of practice but I'm doing fine...
false
22,071,291
0
0
0
0
Monkey Patching did the job, I dont know why I didn't taught of that
0
1,710
0
0
2014-02-27T14:22:00.000
python,events,pyqt,pyside,qt-designer
Adding Event functions outside PyQt/PySide Generated Code
0
1
2
22,102,393
1
0
0
I can change color of all text in label, but I want to change color of one letter. Is that possible? I use tkiner and python 3.3.
false
22,071,505
0
0
0
0
No, it is not possible to change the color of one letter in a label. However, you can use a text widget instead of a label to color just a single character. You could also use a canvas widget.
1
820
0
0
2014-02-27T14:30:00.000
python,python-3.x,colors,tkinter,label
Change color of one letter in label. Python
0
1
1
22,078,545
1
0
0
I would like to read a HTML and I show it on a Tkinter window. I would like to know if this is possible with any module and if it's how can I do it, as I'm totally lost finding solutions. Thanks in advance.
true
22,077,846
1.2
0
0
5
There is no support for viewing rendered HTML in a tkinter widget. There was a project (tkhtml) to build a modern web browser using tcl/tk (which is what powers tkinter), but the project never got past a very early alpha release and the last check-in was in 2009.
0
3,286
0
3
2014-02-27T18:57:00.000
python,html,tkinter
Read a HTML file and show it on a Tkinter window
0
1
1
22,094,453
1
0
0
I'm trying to build the libpython33.a file so I can create my own C extensions using MinGW. For that, I need the python33.dll file to create a .def file and then convert that to the finally libpython33.a. In my Python 2.7 installation, I can see the file called python27.dll along with python.exe and pythonw.exe. But i...
true
22,187,196
1.2
0
0
3
python33.dll is found under c:\windows\system32
1
5,326
0
2
2014-03-05T02:19:00.000
python,python-3.x,python-3.3
python33.dll not found in my Python installation path?
0
1
1
22,187,241
1
0
0
I have developed a pygtk application and i need to release it to customers. I am using python 2.7, pygtk 2.2 in ubuntu. My question is how can I bundle the required packages(python, pygtk, gobject) together with my application, so that even if these packages are not installed in client machine I can run my application....
true
22,191,409
1.2
0
0
0
Just adding the solution to my own question! As suggested in the comments above installed packages by downloading the source and compiled them in a machine which had glibc2.5 then created binary executable of my pygtk app using pyinstaller I had tried compiling packages earlier also, but weren't checking the ./configur...
0
479
1
1
2014-03-05T07:34:00.000
python,linux,pygtk
Releasing pygtk application
0
1
1
22,983,513
1
0
0
I want to write a visualization for some complex scientific data in Python. I have done a similar thing a few years ago in Objective-C/Cocoa/OpenGL. The visualization will contain some fancy shader programs, so at least OpenGL 3.0 is required. Also, I need to draw a window and do some mouse/keyboard handling. Some GUI ...
false
22,195,254
0.197375
0
0
1
My recommendation is PyOpenGL plus PyQt. Python plus either Pyglet or wxPython are possible alternatives. PyOpenGL (the Mike Fletcher version, right?) is the best Python OpenGL API I know of. It has support for OpenGL 3 and 4 and is just very nice and Pythonic. PyQt itself only supports OpenGL 2, but PyOpenGL will run ...
0
1,787
0
0
2014-03-05T10:37:00.000
python,opengl
OpenGL 3+ with Python 3
0
1
1
22,212,424
1
0
0
Basically I want to know the libraries which can do it, preferably in C or Python.
false
22,207,218
0
0
0
0
I can think of OpenCV, but it may be overkill, depending on what kind of "manipulation" you need. It is c/c++ lib, but also provides python and java wrappers.
0
34
0
0
2014-03-05T19:23:00.000
python,c,image,video
How to grab a frame from a video and then manipulate it and then reassemble the video with it?
0
1
1
22,207,404
1
0
0
I have a lot of images i need to load into a Pygame program. Can I load all these from a separate script which I load into my main program as a module and be used from within the main program? Any help much appreciated. Thanks in advance.
false
22,214,989
0
0
0
0
After considering both answers above what I simply did was write a script where I loaded all images and created a dictionary called image_dict with the image names as the keys and saved the program as "load_images.py" Then from the second program I did a "from load_images.py import image_dict". now the keys gave me the...
1
733
0
0
2014-03-06T04:31:00.000
python,pygame
Loading pygame images as a module
0
1
3
22,255,548
1
1
0
so I am actually trying to get into software development and I currently have just spent a few days making a GUI in Photoshop. Now I know how to code in Java and Python but I have never implemented a GUI before. I am stuck on this because I know I can write the code and everything but how do I take what I made in Photo...
false
22,215,361
0.197375
0
0
2
but how do I take what I made in Photoshop add some java or python code to it to make certain things happen No, you cannot expect things to happen magically, for that you need to learn front-end technologies like HTML, CSS, JavaScript etc and manually convert the UI which is in Photoshop to corresponding code. This ap...
0
1,055
0
0
2014-03-06T04:57:00.000
java,python,user-interface,photoshop
UI Designed in Photoshop for Software
0
1
2
22,215,461
1
0
0
import sys sys.path.insert(1,"C:/Users/ravir_000/Desktop/python_CS105/python_CS105/Python27/Lib/site-packages") import math import random import pygame from pygame.locals import * pygame.init() How do you get rid of the error? Import error: Module use of python27.dll conflicts with this version of python. I was working...
false
22,236,546
0.379949
0
0
2
You are trying to use a pygame distribution that is for python 2.7 with a different version of python. You should download and use the appropriate version. If installed correctly, there will be no need for sys.path.insert.
1
4,333
0
0
2014-03-06T21:36:00.000
python,pygame,importerror
Import error: Module use of python27.dll conflicts with this version of python
0
1
1
22,236,742
1
0
0
This .ui file is made by Qt Designer. It's just a simple UI. All the commands or codes for doing this on the websites I have looked through are not for windows.
false
22,266,802
1
0
0
16
In pyqt5 you can use: convert to none-executable python file : pyuic5 -o pyfilename.py design.ui convert to executable python file : pyuic5 -x -o pyfilename.py design.ui and also for resource diles(qrc): convert qrc to python file : pyrcc5 -o pyfilename.py res.qrc Note: that if you run the command in the wrong w...
0
110,222
0
22
2014-03-08T08:06:00.000
python,user-interface,pyqt,qt-designer
How to convert a .ui file to .py file
0
2
4
57,951,576
1
0
0
This .ui file is made by Qt Designer. It's just a simple UI. All the commands or codes for doing this on the websites I have looked through are not for windows.
false
22,266,802
1
0
0
15
To convert from .ui to .py in Windows Go to the directory where your ui file is. Press shift right-click your mouse. Click open command window here. This will open the cmd, check what is the directory of your (pyuic4.bat) file. Usually, it is in: C:\Python34\Lib\site-packages\PyQt4\pyuic4.bat. Write in the cmd: C:\Pyt...
0
110,222
0
22
2014-03-08T08:06:00.000
python,user-interface,pyqt,qt-designer
How to convert a .ui file to .py file
0
2
4
34,833,304
1
0
0
How can I make a childWindow access and/or modify an attribute from his MainWindow? I have a MainWindow that opens different childWindows, dependeing on the pressed button on the MainWindow. I would like any of the childWindows to be able to modify some attributes of the MainWindow, but I cannot get the good way to acc...
false
22,294,229
0
0
0
0
You could pass a reference (self) to your childwindow.
0
82
0
1
2014-03-10T07:21:00.000
python,qt,parent-child,mainwindow
attributes of Mainwindow from childWindow
0
1
2
30,509,870
1
0
0
I am using PyQt4 and Qt Designer. I have a QListWidget in which I populate after loading a file in my program. I want to set it so that all items will be checkable, as opposed to just selectable. I have found online that this is a 'flag' of the QListWidget, however, in Qt Designer I can't see where to do this. Is it po...
false
22,340,514
0
0
0
0
The age-old question. There is an answer here, but I'll try to give some clarification: for several components there isn't enough to set item flag Qt::ItemIsUserCheckable, one needs to set item's check state for the checkbox to appear. Also, there is no widget flag to make all items checkable. An excerpt from Qt docume...
0
14,967
0
5
2014-03-12T02:00:00.000
python,qt,pyqt,pyqt4,qt-designer
Qt Designer QListWidget checkbox
0
1
2
66,103,178
1
0
0
I've been working with Python and PyGame days ago, and i noticed that when i move the player in my game, it will blit over itself again and again while moving, leaving a tail, is there any way i can clean up all the old sprites that the player left while moving? I tried bliting the background again while moving to remo...
false
22,361,870
0.099668
0
0
1
Just call window.fill([0, 0, 0]) each time in your main loop. Where the window is your pygame.display.set_mode() main surface. If you have any questions, just comment below.
0
421
0
1
2014-03-12T19:27:00.000
python,pygame,pygame-surface
PyGame, How to clean up Old Sprites
0
1
2
22,363,605
1
0
0
I have a third party DLL (no header file) written in C++ and I am able to get the function prototype information from the developer, but it is proprietary and he will not provide the source. I've gone through the SWIG tutorial but I could not find anywhere specifying how to use SWIG to access any functions with only th...
false
22,378,590
0
1
0
0
To use a library (static or dynamic), you need headers and library file .a, .lib... Its true for c++ and I think its the same for Python
0
1,508
0
0
2014-03-13T12:25:00.000
python,c++,dll,swig
SWIG C++ Precompiled DLL
0
2
3
22,378,831
1
0
0
I have a third party DLL (no header file) written in C++ and I am able to get the function prototype information from the developer, but it is proprietary and he will not provide the source. I've gone through the SWIG tutorial but I could not find anywhere specifying how to use SWIG to access any functions with only th...
false
22,378,590
0
1
0
0
SWIG cannot be used without the header files. Your only option is a lib like ctypes. If you find ctypes doesn't do it for you and you can't find alternative then post a question with why ctypes not useable in your case.
0
1,508
0
0
2014-03-13T12:25:00.000
python,c++,dll,swig
SWIG C++ Precompiled DLL
0
2
3
22,389,172
1
0
0
Is there a way to allow wxTextEntryDialogs to accept the tab character? I'm using wxPython and would like to accept tabs so that I can ask the user for the delimiter used in a text file.
true
22,419,345
1.2
0
0
1
It is possible to paste it in, but this is obviously not user friendly. I'd use a custom dialog with the predefined choices (e.g. radio buttons) for TAB, comma, semicolon etc and a text control for a custom separator entry.
0
65
0
0
2014-03-15T03:59:00.000
python,wxpython,wxwidgets
wxTextEntryDialog with Tabs
0
1
1
22,424,553
1
0
0
I have a really specific need : I want to create a python console with a Qt Widget, and to be able to have several independent interpreters. Now let me try to explain where are my problems and all tries I did, in order of the ones I'd most like to make working to those I can use by default The first point is that all...
false
22,435,352
0
0
0
0
If your main requirement is to have several interpreters independent from each other, you'd probably better suited doing fork() and exec() than doing multithreading. This way each of the interpreters would live in it's own address space not disturbing one of the others.
1
1,118
0
2
2014-03-16T09:50:00.000
python,c,multithreading,gil
Python & C/C++ multithreading : run several threads executing python in the background of C
0
1
2
22,435,597
1
0
0
I'm writing a prototype for the tactical spaceship combat in a game I'm working on. The basic idea of the part I'm working on right now is that a 'ship' object (which represents a single individual ship) contains a list of 'system' objects. When a ship is first initialized, it calls an initialize() function on each of ...
false
22,438,569
0.197375
0
0
1
The issue is trying to give an absolute value to the priority. Rather you need to build a relative priority data structure for each call. This way you can say that hit() is highest priority for super-shields then shields then hull. The mod would then simply need to change the hit sound effects for the hull or add an ad...
0
112
0
0
2014-03-16T15:06:00.000
algorithm,python-3.x,message-passing
Algorithm design for systems on a spaceship taking messages
0
1
1
22,452,071
1
0
0
Is there a way to use OpenGL to draw offscreen? What I want to do is this: I want to be able to use functions like glVertex, and get the result in a 2D pixel array. I am using Python. I tried using PyGame, but it's not working very well. The problem with PyGame is that uses a window event though i don't need it. In add...
false
22,440,743
0.379949
0
0
2
What you are asking for seems to be two things in one... you want an off-screen buffer (FBO) and you want to get the contents of the framebuffer in client memory. Can you indicate which version of GL you are targeting? If you are targeting OpenGL 3.0+, then you can use FBOs (Framebuffer Objects) and PBOs (Pixel Buffer ...
0
587
0
0
2014-03-16T18:09:00.000
python,opengl,pygame,pixels
Draw with OpenGL offscreen
0
1
1
22,441,324
1
0
0
I'm wondering how I can change the font of a Python Tkinter label widget so that half the displayed text is bold and half is not without having to use two labels. The text for the widget is assigned prior to the label actually being created and stored in a variable so I need some kind of flag presumably to tell it how ...
false
22,453,554
0.291313
0
0
3
There is nothing you can do with the label widget -- it only supports a single font and single color for the entire label. However, you can easily substitute a canvas or text widget anywhere you need this feature. There's no reason why you can't use a text widget that is one line tall and a dozen or so characters wide.
0
9,774
0
2
2014-03-17T11:51:00.000
python,widget,tkinter,label,styling
How to change font style for part of a tkinter label
0
1
2
22,455,831
1
0
0
I'm developing some Python scripts to read/parse/process some .vrscene files. From others' examples, I can see that there is a Python SDK for VRay called vrayutils. I want to get this information from the SettingsOutput object. From a .vrscene file I want to get the total frame numbers. Does anyone know where I can get...
true
22,456,509
1.2
0
0
1
I was able to do some of the things by parsing the file using basic Python and then extracting the things I needed. The V-Ray API has a proprietary license, and there is no open source way to access the .vrscene I decided to try with a trial version of the SDK, and by using the SDK you will be able to find a nice Pyth...
0
1,560
0
0
2014-03-17T14:07:00.000
python,sdk,render,maya,autodesk
Getting access to VRay Python SDK
0
1
1
22,980,455
1
0
0
I'm using IPython qtconsole under windows 7, and when I first write a method name and type the bracket, a popup shows method parameters. What is the way to display that popup explicitly, once it has disappeared? This is pretty common 'show method parameters' shortcut that I'm talking about, but I've failed to find th...
false
22,501,431
0
0
0
0
In Spyder, try View - Panes - Object inspector. Then type the full name of the function.
1
1,486
0
1
2014-03-19T09:32:00.000
python,ipython
How do I display function arguments in ipython qtconsole?
0
1
2
28,310,783
1
0
0
First, sorry for my language, english is not my native language :-/ I have some troubles using wxpython 2.8/python 2.7 with Windows. My app using wxPython is quite big now and uses a lot of widgets. My problem is : In a for loop, i open a frame as a variable (myVar = myFrame(...)), and give it some values/variables (li...
false
22,511,472
0
0
0
0
OP seemed to find the solution. The solution I found is to call wx.Yield() to releases unused ressources. But this only work perfectly on linux. On windows, i need to call wx.Frame.DestroyChildren().
0
296
0
2
2014-03-19T15:57:00.000
python,windows,wxpython,gdi
wxPython : GDI ressources are not release after wxFrame.destroy()
0
1
1
23,710,926
1
0
0
I seen the some difference when I execute the .py file. I have observed two cases, 1) when I run the .py file using the python mypython.py I got the result. But .pyc file not created in my folder. 2) when I run the .py file using the python -c "import mypython" I got the same result. But .pyc file was created in my fol...
true
22,552,304
1.2
0
0
0
Python saves the precompiled .pyc file only for imported modules, not for the main script you're running. Running a program as main or importing it as a module is not the exact same thing, but very similar because in a module everything that is at top level is executed at import time. Note that for main program the sou...
1
102
0
1
2014-03-21T07:03:00.000
python,compiler-construction,interpreter
Understanding python compile
0
1
2
22,552,400
1
0
0
I'm evaluating Kivy for android development. I need to know if is it possible to create an application with multiple windows using Kivy. I dont know for sure how android works with this kind of approach. In c#, windows forms, we have a main window and from that we open/close another forms. How can I accomplish this app...
true
22,563,386
1.2
0
0
3
What do you mean by 'window'? In the practical sense, you can easily create different screens with kivy and switch between them, e.g. to have a menu screen, settings screen, game screen etc. Is this the kind of thing you mean? More generally, you can easily achieve any particular windowing behaviour you want within kiv...
0
1,083
0
0
2014-03-21T15:49:00.000
android,python,kivy
Kivy Multiple windows
0
1
1
22,563,987
1
0
0
I am willing to make a Terminal like QTextEdit using pyqt4, but do not know what property to edit,so that when text from a process is dumped, it should start from the bottom and goes up. Any help for a starting point would be really appreciated. Cheers.
false
22,574,996
0.099668
0
0
1
I tried similar things before. For logging. Its a pain and it is very slow for a lot of lines. If you expect having a lot of lines cummulating in the terminal then consider writing an item model and attach it to a view. There are lot of possibilites in tweaking the appearance of such a view and it allows showing a smal...
0
541
0
0
2014-03-22T07:54:00.000
python,qt,terminal,pyqt,pyqt4
Loading text in QTextEdit from down up like in Terminal
0
1
2
22,578,889
1
0
0
What are the packages which need to be installed for writing scripts using PyJius in system ? Is there anyway by which i could run these python scripts on android phone ? What is K ivy Launcher for android ? Will it be helpful for executing my scripts ? How actually Kivy works ( in detail say in I want to switch on Bl...
false
22,578,624
0.664037
0
0
4
What are the packages which need to be installed for writing scripts using PyJius in system ? I'm not sure what you mean here. To run use pyjnius, all you need is...pyjnius. It is a separate module, not part of kivy itself, though kivy uses it on android. Kivy's mobile build tools automatically package this when you b...
0
768
0
1
2014-03-22T14:07:00.000
android,python,kivy
Kivy for android
0
1
1
22,578,797
1
0
0
I finally have some idea how to build Kivy app in Xcode with help of Kivy-ios. But Xcode and mac environment is new to me. My issue is: how to compile other python modules that required for my application. There is 'build-all.sh' in 'kivy-ios/tools' that builds standard things, but how to add some other module. In part...
true
22,621,259
1.2
0
0
3
I don't know how kivy-ios manages different modules, but in the absence of anything else you can simply copy the requests module into your app dir so it's included along with everything else.
0
462
0
3
2014-03-24T21:46:00.000
python,ios,xcode,python-requests,kivy
Compile custom module for Kivy-ios
0
1
1
22,622,162
1
0
0
I'm trying to set a custom background for selected items in wxPython 2.8. I cannot figure out how to do so. I've tried SetItemBackground with no luck.
true
22,624,070
1.2
0
0
0
Selected items in wxListCtrl, wxListBox and so on always use the system background selection colour, it can't be changed.
0
209
0
0
2014-03-25T01:55:00.000
python,wxpython,wxwidgets
Setting selection background in ListCtrl
0
1
1
22,635,854
1
0
0
Should/does NDK9 work with android API19? (though it was released with API18). Full story: I was building an Android App using kivy, python-for-android and buildozer. compiling with MDK9 (ie 9d) and api19 result in error: E/AndroidRuntime( 1773): java.lang.UnsatisfiedLinkError: Cannot load library: soinfo_relocate(lin...
false
22,624,987
0
0
0
0
Android SDK are released more often that NDK. It happened more than once that if you use a too recent SDK, the NDK will not have the .h for it. Now i'm not sure this would be related to your issue at all.
0
681
0
2
2014-03-25T03:35:00.000
android,python,android-ndk,kivy
android nkd and sdk compatibility issue (run time linker error)
0
1
2
22,644,004
1
0
0
I made a simple GUI (wxpython) application (some static text, buttons, comboboxes etc) and made exe file with pyinstaller, but the Avast antivirus says it's a virus. How can I fix this?
false
22,693,665
0
0
0
0
I have the same issue. If you are using Avast, do not uninstall it. This will make your computer vulnerable from threats. If you are sure, you can click 'add exclusion' when the Avast Hardened Mode blocked a program thing comes up. If this isn't correct, please comment or edit.
1
1,891
0
3
2014-03-27T16:30:00.000
python,pyinstaller,antivirus
python executables alarms antivirus
0
1
2
70,388,992
1
0
0
So I was wondering if there is any Python package that can allow a pure Python application with a graphic interface to be embedded in a website. I have an application with a Tkinter interface that I want to make available on a website. Any way to do this without converting too much code? Thanks!
false
22,741,838
0.066568
0
0
1
It's impossible. Python/Tkinter app is a desktop application, which requires desktop manager, has access to file system etc. Web application is a different stack of technologies (HTTP, HTML, javascript etc), it is not possible to mix them
0
74
0
0
2014-03-30T08:22:00.000
python
Web Server/Site Python
0
1
3
22,741,877
1
0
0
anyone know how to hide python GUI Tkinter, I 've created keylogger, for GUI I used python module Tkinter , I want to add button called HIDE, so when user click it it will hide GUI , and when user press key like CTRL+E , it should unhide GUI....?
false
22,764,927
0
0
0
0
To get rid of a GUI window I used the following in my code. window.destroy() and the following to bring it up again. nameoffunction() window.lift()
0
11,986
0
3
2014-03-31T14:55:00.000
python,tkinter
How To Hide Tkinter python Gui
0
1
4
46,719,809
1
0
0
I have created a small chat app using pyside. I want to add 'Emoticons'(smileys) options for users to chat. I haven't getting any material on internet. I will be really grateful if someone helps to solve this problem. Thanks in advance.
false
22,778,197
0.197375
0
0
1
Qt supports a thing called SVG font. It is a font where every letter is a colored vector image. You can use these in text fields and webkit.
0
114
0
0
2014-04-01T06:15:00.000
python,user-interface,pyqt,pyside
Adding Emoticons to app
0
1
1
22,778,301
1
0
0
I'm using some predefined accelerators connected with certain hot keys. Is it possible to temporarily disable them? I don't want to change the hot keys, in order not to confuse users. The accelerators are activated when typing into a combo box, which really is unacceptable.
false
22,782,726
0.099668
0
0
1
As far as I know you cannot disable them. They will receive any key stroke that is not consumed by the focused Window.
0
462
0
12
2014-04-01T10:09:00.000
python,gtk
How to disable accelerators when typing text in GTK+
0
1
2
37,508,137
1
0
0
I am pretty new to Python and I have been pretty annoyed with this problem. I am not sure if this matters, but I run my .py file with Python 2.7.6 with python installed on my computer, not using it on any online thing or other program. Every time I come across an error, my program works fine until it comes to the error...
false
22,830,060
0.099668
0
0
1
You should run it from command window/terminal instead of double clicking on the file.
1
2,813
0
1
2014-04-03T06:57:00.000
python,syntax-error,runtime-error,message
Python - I can't see my what my error is because the window disappears immediately
0
1
2
22,830,091
1
0
0
Good Day All! I am trying to figure out how to limit the popup box shown bellow. I am not trying to trim the text, I am however trying to set the amount of characters in the popup per line. eg: 30 Characters per line in the popup box tkMessageBox.showinfo("Results", str(e)) Any suggestions, without modifying the text...
false
22,831,462
0
0
0
0
There is nothing you can do with the tkMessageBox. You either have to alter the text or create your own message window. The latter isn't very difficult -- a Toplevel, a Text widget with a scrollbar, and a couple of buttons is about all you need.
0
157
0
0
2014-04-03T08:07:00.000
python,popup,tkinter,size,line
Tkinter Limit Size Of Popup per line
0
1
2
22,835,256
1
0
0
I am a First Year Physics major at Goshen College. I am supposed to create a final project for my programming class. I am thinking about doing the game Battleship. I realize that I could find the complete code somewhere online but I would really like to write my own.I came up with a list of things I would like to try t...
false
22,837,709
0.197375
0
0
2
Your algorithm looks perfectly fine. As you aim for this to be implemented in Python, I'd start with creating simple PyGame (or other library of your choice) application, that only draws two of your grids. That will help you debug your other functionality, once you'll see it better than array dump in the console. Alter...
0
1,306
0
2
2014-04-03T12:24:00.000
python
Battleship in Python
0
1
2
22,837,881
1
0
0
I have to make a computer graphics project on "Vote for better Nation" using python in a week..I have a knowledge of pygame but don't know how to create a particular object(like small cartoon man)..And then how to make it move..So please help me if anyone knows how to make a moving object.. Sorry For The English Thank ...
false
22,884,351
0
0
0
0
There is a series of books on Python Graphics called "Python Graphics for Games" (Amazon). It covers vector drawing and animation. Author Mike Ohlson de Fine.
0
1,621
0
0
2014-04-05T17:37:00.000
python,python-2.7,graphics,pygame,turtle-graphics
Computer Graphics with python
0
1
2
31,048,800
1
0
0
I am new to pygame and I am working on a distributed peer-peer multiplayer game. I tried doing the following but I was not able to figure out how. I have a player class and an enemy class. The player and enemies are all part of different sprite groups. Say in a 4 player game where there is one player object and 3 enem...
false
22,897,317
0
0
0
0
Seeing as it sounds like enemy objects and player objects can do the same thing, maybe you should have one common class for both enemy and player. This could be called for example a creature class. Then based on if the creature is a enemy or player you can control it using an EnemyAI class or a UserInput class. As for...
0
162
0
0
2014-04-06T17:19:00.000
python,pygame
Detecting sprite object within a sprite group on collision
0
1
1
22,897,426
1