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 | Background
I am working on a program that needs to find a list of open Metro apps. I originally tried using pure python with ctypes and using win32 api. Unfortunately, I couldn't get the names of Metro apps. So I moved on to IronPython thinking I could leverage a .net function or two to get what I want. No luck.
Where ... | true | 29,197,996 | 1.2 | 0 | 0 | 0 | I don't think MS allows this functionality. As an alternative, you can have the user put their mouse over the window and press a keyboard shortcut (What I am doing).
That is the best one can do. | 1 | 121 | 0 | 0 | 2015-03-22T18:11:00.000 | c#,python,windows-8,windows-store-apps,ironpython | IronPython-List Open Metro Apps only | 0 | 1 | 1 | 29,978,493 | 1 |
0 | 0 | Up until now to move widgets I have been issuing another .place on it. I wonder if that is creating another instance of the widget in memory or not?
If it is creating another copy in memory, what is the correct way to move a widget when using place? Do I need to keep destroying the widget and placing it perhaps ove... | false | 29,200,214 | 0 | 0 | 0 | 0 | Now that I think about it, as long as I do a .place_forget() prior to any .place that should take care of any extra instances in memory. Can anyone confirm? | 1 | 13 | 0 | 0 | 2015-03-22T21:43:00.000 | python,widget | Python: When using place what is the correct way to move widgets? | 0 | 1 | 1 | 29,200,555 | 1 |
0 | 0 | I want to make a heads-up display that pops up it's frame, taking focus from the previous application and then gives focus back to that application when it's done.
wxPython frames have Hide and Show methods that work but don't focus the application. Also, there's SetFocus which you'd think would do it but doesn't.
Upda... | true | 29,222,699 | 1.2 | 0 | 0 | 2 | You might be able to steal focus by calling Raise on the frame. There is the wx.STAY_ON_TOP style flag that could also be applied. Then you might be able to just use the frame's Show and Hide methods to make it work.
Depending on what exactly you want to do, you might take a look at the ToasterBox widget. I can't recal... | 0 | 542 | 0 | 1 | 2015-03-24T00:03:00.000 | python,wxpython,wxwidgets | How can a wxpython frame "steal" and "return" focus similar to the Dash app? | 0 | 1 | 1 | 29,233,860 | 1 |
0 | 0 | I've recently begun programming with QPython3 on my android phone, and I've found it slightly annoying that the console pops up whenever I run a script. I often have it sending the output through a Toast since I usually only need the information for a second.
Is there a way I can make it, either within my script or in... | false | 29,247,204 | 0 | 0 | 0 | 0 | Try to insert the "#qpy:console" into your script, does it work for you ? | 0 | 733 | 0 | 0 | 2015-03-25T04:00:00.000 | qpython,qpython3 | QPython 3 console | 0 | 1 | 1 | 29,415,173 | 1 |
0 | 0 | Can I control the "Wrap Text" property of a cell using Python+xlwings? | false | 29,258,237 | 0.099668 | 0 | 0 | 2 | For anybody like me who comes to this now and doesn't find these solutions are working, I found accessing the pywin32 API directly with work_sheet.range('A:A').api.WrapText = True worked in Python 3.7 and xlwings 0.15.8 in Windows 7 and Excel 2010. | 1 | 2,055 | 0 | 2 | 2015-03-25T14:17:00.000 | python,excel,python-2.7,xlwings | Does xlwings support "Wrap Text" property? | 0 | 1 | 4 | 57,833,558 | 1 |
0 | 0 | I have a working C program and now I'm embedding a python script implementing a specific function.
The question is, the arguments passed into Python is a complicated(I mean nested) C structure defined in C. And I hope the solution would be able to do the two ways communication easily:
1.Create structure in C, and pass ... | false | 29,269,401 | 0 | 1 | 0 | 0 | In my experience, SWIG should be able to handle arbitrarily nested structs the way you'd "expect". – brunobeltran0 | 0 | 134 | 0 | 0 | 2015-03-26T01:12:00.000 | python,c,structure,swig,mixed-programming | How do I pass C structure into Python when embedding a Python module in a C program | 0 | 1 | 1 | 32,625,890 | 1 |
0 | 0 | I have written a program which use thread in Tkinter. It works fine when I run this program on linux, but when the same program run on Windows it doesn't work.
Problem exist when loop (which is run under thread) is ended and call function which cause to appear Toplevel window
Any suggestions?? | false | 29,295,830 | 0.664037 | 0 | 0 | 4 | Generally speaking, you can't use threading with Tkinter. Or more accurately, you can only access tkinter widgets and functions from the thread that created them. If your thread is creating a window, that simply will not work on windows, and may work non-deterministically on other platforms. | 1 | 391 | 0 | 0 | 2015-03-27T08:00:00.000 | python,multithreading,tkinter | Is there any difference in threading between Linux and Windows on python? | 0 | 1 | 1 | 29,298,504 | 1 |
0 | 0 | Just like the title implies, is there any difference? I was using pygame.display.flip and I saw on the Internet that instead of using flip they used pygame.display.update. Which one is faster? | false | 29,314,987 | 0.049958 | 0 | 0 | 1 | pygame.display.flip() updates the whole screen.
pygame.display.update() updates only specific section but with no arguments works similar to the pygame.display.flip(). | 0 | 55,985 | 0 | 42 | 2015-03-28T08:03:00.000 | python,pygame,python-2.x | Difference between pygame.display.update and pygame.display.flip | 0 | 2 | 4 | 67,557,797 | 1 |
0 | 0 | Just like the title implies, is there any difference? I was using pygame.display.flip and I saw on the Internet that instead of using flip they used pygame.display.update. Which one is faster? | false | 29,314,987 | 1 | 0 | 0 | 9 | Flip will always update the entire screen. Update also update the entire screen, if you don't give argument. But if you give surface(s) as arguments, it will update only these surfaces. So it can be faster, depending on how many surfaces you give it and their width and height. | 0 | 55,985 | 0 | 42 | 2015-03-28T08:03:00.000 | python,pygame,python-2.x | Difference between pygame.display.update and pygame.display.flip | 0 | 2 | 4 | 29,316,190 | 1 |
0 | 0 | I realize the short answer may be 'no,' but perhaps this is worth asking again.
If I am witting a Kivy app with a couple thousand of lines - then would it be possible to write some classes in another kv file?
This would make it so much easier to edit, correct errors, make changes... etc.
Just to clarify - the .KV files... | false | 29,332,868 | 0.132549 | 0 | 0 | 2 | I believe you can create muliple .kv files and can include at one place (root file) by this way only you can distribute/branch your code
Kivy documentation clearly says "A kv file must contain only one root widget at most"
means only one kv main file. even if you run multiple instances of Mainapp class
I'm newer to the... | 0 | 11,529 | 0 | 21 | 2015-03-29T18:10:00.000 | python,kivy | Is it possible to read from more than one .kv file in Kivy app? | 0 | 1 | 3 | 61,815,101 | 1 |
0 | 0 | I saw that there are 2 ways for use the ui file with pyside. It's possible to convert or to load file. What is the best performance between this 2 solutions ?
Thanks in advance | false | 29,345,617 | 0 | 0 | 0 | 0 | Conversion processes the ui file once and creates a static module. Loading the ui file at runtime processes it every time the application is run. So obviously any difference in performance is going to be roughly equal to the overhead of processing the ui file.
Having said that, runtime performance is probably not a goo... | 0 | 38 | 0 | 0 | 2015-03-30T11:56:00.000 | python,pyside,benchmarking | performance between converted and loaded file with pyside | 0 | 1 | 1 | 29,354,758 | 1 |
0 | 0 | As I am more familiar with tkinter than Qt, is it possible to have a tkinter frame populate with a C++ application to enable the manipulation of visio files. The end result would hopefully be to have a portable .exe that would connect to an access database for line item tracking, and the Visio "canvas" to manipulate v... | true | 29,351,650 | 1.2 | 0 | 0 | 2 | I don't think you can embed ActiveX controls like the one provided by Visio (it's probably what you refer to as "visio canvas") in tkinter. Even with Qt, this may be not that straightforward.
The second thing is, "visio canvas" won't work without Visio installed - not sure if that's okay with you. Means, your users fir... | 0 | 96 | 0 | 0 | 2015-03-30T16:40:00.000 | python,ms-access,visual-c++,tkinter,visio | C++ "canvas" inside of tkinter frame to manipulate MS visio files | 0 | 1 | 1 | 29,352,732 | 1 |
0 | 0 | resized_image = Image.resize((100,200));
Image is Python-Pillow Image class, and i've used the resize function to resize the original image,
How do i find the new file-size (in bytes) of the resized_image without having to save to disk and then reading it again | false | 29,368,155 | 0 | 0 | 0 | 0 | You can't. PIL deals with image manipulations in memory. There's no way of knowing the size it will have on disk in a specific format.
You can save it to a temp file and read the size using os.stat('/tmp/tempfile.jpg').st_size | 1 | 1,687 | 0 | 2 | 2015-03-31T12:00:00.000 | python,python-imaging-library,pillow | How to get image size in python-pillow after resize? | 0 | 1 | 2 | 29,368,336 | 1 |
0 | 0 | My application have a window which handle key press events. When user press a key I run some long tasks and during a task I update a label on the window. To update the label while task is still running I call the following code.
while gtk.events_pending():
gtk.main_iteration(False)
This update the label but problem... | false | 29,395,356 | 0.197375 | 0 | 0 | 1 | You want the .queue_draw() and related GtkWidget methods. Note that these will mark your widget as needing redraw when you get back to the main loop; I don't think GTK+ has a method for drawing right now (but marking as dirty and letting the system redraw when it's ready is usually better for optimization reasons). | 0 | 280 | 0 | 0 | 2015-04-01T15:52:00.000 | python,events,widget,gtk,redraw | How to redraw gtk widget in python without calling gtk.main_iteration? | 0 | 1 | 1 | 29,396,431 | 1 |
0 | 0 | My question is : is it possible to put ads on a tkinter program , something like google ads or something , because I made a program which a lot of people started using and I am not getting any benefits from it , is there a way ? | true | 29,446,102 | 1.2 | 0 | 0 | 3 | There is nothing built-in to tkinter, nor available as a third party library, that makes it possible to display an ad and receive revenue from it. | 0 | 1,029 | 0 | 3 | 2015-04-04T11:55:00.000 | python,python-2.7,tkinter | Advertising on a tkinter program | 0 | 1 | 2 | 29,446,371 | 1 |
0 | 0 | I am running a simple client-server program written in python, on my android phone using QPython and QPython3. I need to pass some commandline parameters. How do I do that? | false | 29,456,031 | 0 | 0 | 0 | 0 | Just write a wrapper script which get the parameters and pass to the real script using some function like execfile, and put the script into /sdcard/com.hipipal.qpyplus/scripts or /sdcard/com.hipipal.qpyplus/scripts3 (for qpython3).
Then you can see the script in scripts when clicking the start button. | 0 | 2,584 | 0 | 2 | 2015-04-05T09:44:00.000 | qpython,qpython3 | Passing commandline arguments to QPython | 0 | 1 | 2 | 29,654,733 | 1 |
0 | 0 | How do I setup Spyder to highlight and auto-complete kivy files (.kv)? | true | 29,467,603 | 1.2 | 0 | 0 | 1 | (Spdyer dev here) There is no way at the moment for Spyder to highlight kivy files, sorry :-( | 1 | 707 | 0 | 0 | 2015-04-06T08:09:00.000 | python,kivy,spyder | How do I setup Spyder to highlight and auto-complete kivy files (.kv)? | 0 | 1 | 1 | 29,635,815 | 1 |
0 | 0 | The question I have as the title says is on the idea of setting up a graph in pygame that graphs sub-pixel coordinates.
Something a friend and I spoke of was how I could try to make a function graphing program for fun in python, and I thought about how I could use it, but I found a few issues.
The first one was the u... | false | 29,484,408 | 0 | 0 | 0 | 0 | Instead of setting each individual pixel, use pygame's line drawing function to draw a line from the current coordinate to the next instead of using sub-pixel coordinates (pygame.draw.line or even pygame.draw.lines).
This way, the "gaps" between two points are filled; no need for sub-pixel coordinates.
You just have to... | 0 | 312 | 0 | 0 | 2015-04-07T05:29:00.000 | python,numpy,pygame | Pygame, sub-pixel coordinates. | 0 | 1 | 1 | 29,488,142 | 1 |
0 | 0 | I run python using Winpython. I would like to use the GUI libraries from wxpython in my Spyder IDE. I tried the wxpython installer but for some reason the packages are not copied to the WinPython\python\Lib\site-packages folder. I also tried the build it "Winpython Control Panel" which is supposed to add new packages b... | false | 29,509,526 | 0.197375 | 0 | 0 | 1 | So I managed to find a solution to my problem.
Winpython has the option to "register" the distribution, this will add associate file extensions, add icons, and importantly for my case, register WinPython as a standard Python distribution. When I registered my copy of Winpython, in the Advanced tab of the Winpython con... | 1 | 1,863 | 0 | 1 | 2015-04-08T08:25:00.000 | python,wxpython,spyder | Installing/running wxpython on Winpython Spyder | 0 | 1 | 1 | 29,619,247 | 1 |
0 | 0 | How can I choose photo in Kivy ?
I couldn't see a module to see and select a photo.
from kivy.uix.filechooser import FileChooserListView
shows files by names
Thank you | false | 29,513,493 | 0 | 0 | 0 | 0 | There is no built in widget for displaying photos, the Kivy philosophy is instead to make it easy to build such a thing from component widgets, e.g. in this case layouts and Image widgets probably.
That said, we would be happy to include image browser implementations in the Kivy garden user repository. | 0 | 259 | 0 | 0 | 2015-04-08T11:36:00.000 | python,kivy | Kivy Photo Chooser | 0 | 1 | 1 | 29,522,735 | 1 |
0 | 0 | I'm making a program that streams my screen to another computer(like TeamViewer), I'm using sockets, PIL ImageGrab, Tkinter.
Everything is fine but the screenshot I get from ImageGrab.grab() is without the mouse cursor, which is very important for my program purpose.
Do you know how can I take screenshot with the mouse... | false | 29,524,885 | 0.53705 | 0 | 0 | 3 | The cursor isn't on the same layer as the desktop or game your playing, so a screenshot won't capture it (try printscreen and paste into mspaint). A workaround is to get the position of the cursor and draw it on the image. you could use win32gui.GetCursorPos(point) for windows. | 0 | 2,661 | 0 | 6 | 2015-04-08T20:37:00.000 | python,screenshot,python-imaging-library | Include mouse cursor in screenshot | 0 | 1 | 1 | 29,624,597 | 1 |
0 | 0 | I am making a game for a presentation and I cannot seem to understand how to make a delay in Python.
For example, whenever I press the D key, my character not only moves but also changes pictures so it looks like it's running.
I have the movement part down, I just need to slow down the changing of the sprite so that it... | false | 29,526,895 | 0 | 0 | 0 | 0 | The command turtle.down() will work, I guess | 1 | 165 | 0 | 1 | 2015-04-08T23:09:00.000 | python,pygame | How Do you make a delay in python without stoping the whole program | 0 | 1 | 2 | 29,527,035 | 1 |
0 | 0 | I am trying to program an application that runs a HTTP server as well as a GUI using Tornado and PyQt4 respectively. I am confused about how to use these two event loops in parallel. Can this be done with the multiprocessing module? Should the HTTP server be run in a QtThread? Or is a bash script the best way to go to... | false | 29,551,003 | 0 | 0 | 0 | 0 | You won't need a bash script. Probably simplest to write a PyQt application and have the application launch the web server. The server may be in a separate thread or process depending on your requirements, but I'd start by having a single thread as a first draft and splitting it out later.
Having the PyQt app as your m... | 1 | 757 | 0 | 0 | 2015-04-09T23:49:00.000 | python,bash,qt,pyqt,tornado | How can I combine PyQt4 and Tornado's event loops into one application? | 0 | 1 | 2 | 29,551,539 | 1 |
0 | 0 | I am trying to build a GUI which will:
Load a file with parameters which describe certain type of problem.
Based on the parameters of the file, show only certain tab in QTabwidget (of many predefined in Qt Designer .ui)
I plan to make a QTabwidget with, say 10 tabs, but only one should be visible based on the paramet... | false | 29,560,307 | 0 | 0 | 0 | 0 | I see that this thread is kinda old. But I hope this will still help.
You can use the remove() method to "hide" the tab. There's no way to really hide them in pyqt4. when you remove it, it's gone from the ui. But in the back end, the tab object with all your settings still exist. I'm sure you can find a way to improvis... | 0 | 7,611 | 0 | 1 | 2015-04-10T11:28:00.000 | python,pyqt,qt-designer,qtabwidget | PyQT Qtabwidget add, remove, hide, show certain tab | 0 | 1 | 2 | 44,781,276 | 1 |
0 | 0 | I installed (extracted) Kivy (Kivy-1.9.0-py3.4-win32-x86.exe) on my PC (Win7 32bit). Now whenever trying to run a file using kivy-3.4.bat getting an error message within a window...
python.exe- Entry point not found
The procedure entry point inflateReset2 could not be located in the dynamic link library zlib1.dll.
On... | false | 29,566,947 | 0.049958 | 0 | 0 | 1 | This happened to me because an old zlib1.dll was being loaded from somewhere in my PATH. I copied a new version to system32 and it solved the problem. | 0 | 12,725 | 1 | 5 | 2015-04-10T17:03:00.000 | python-3.x,system,kivy | Python | Python.exe- Entry point not found | 0 | 2 | 4 | 35,697,811 | 1 |
0 | 0 | I installed (extracted) Kivy (Kivy-1.9.0-py3.4-win32-x86.exe) on my PC (Win7 32bit). Now whenever trying to run a file using kivy-3.4.bat getting an error message within a window...
python.exe- Entry point not found
The procedure entry point inflateReset2 could not be located in the dynamic link library zlib1.dll.
On... | false | 29,566,947 | 0.197375 | 0 | 0 | 4 | Yes, I know this post is a bit old, but maybe someone else searches this.
I got the same error. And really, I just tried to start the python script via MS Powershell instead of CMD. I just wanted to use the PS one time.
And it worked, at least for me.
So, if you encounter this error, try to use the Powershell :) | 0 | 12,725 | 1 | 5 | 2015-04-10T17:03:00.000 | python-3.x,system,kivy | Python | Python.exe- Entry point not found | 0 | 2 | 4 | 34,912,630 | 1 |
0 | 0 | I want to install pygame library on Ubunbu 14.10. I am using Python 2.7.x. At this time I found dependences problems with python-numpy dependence., because it uses a previous version of gcc that 14.10 uses that's why I am stuck with this, my question is: is there any way to install pygame on 14.10?
best | false | 29,593,223 | 0.197375 | 0 | 0 | 1 | If you open up the terminal
type in
sudo apt-get install python-pygame
It should download and install the dependencies required for pygame. | 1 | 386 | 1 | 0 | 2015-04-12T18:46:00.000 | python-2.7,pygame,ubuntu-14.10 | install python pygame on ubuntu 14.10 | 0 | 1 | 1 | 30,444,254 | 1 |
0 | 0 | Is there any way to detect the color that the turtle is standing on in python?
For example if the the turtle is on a black colored space, he moves forward. | true | 29,649,743 | 1.2 | 0 | 0 | 1 | Quickly glancing over the turtle documentation, nope, there's no way to detect colors.
You should probably keep a record of which spaces you have drawn so far, adding to the collection whenever you draw a new space. Then, when you want to know the color of an old space, you only need to search through the collection.
W... | 0 | 1,770 | 0 | 0 | 2015-04-15T12:04:00.000 | python,turtle-graphics | Turtle graphics color detection | 0 | 1 | 1 | 29,649,944 | 1 |
0 | 0 | i'm trying to create chatbox on kivy python. one of the most difficult is to create class with super class Label, which can support select its text like a TextInput class. Can somebody help me? | false | 29,679,264 | 0.53705 | 0 | 0 | 3 | Why not just use a TextInput field? change the appearance parameters so it looks like a label and disable input to the field. | 1 | 891 | 0 | 4 | 2015-04-16T15:24:00.000 | python,kivy | Label with selectable text | 0 | 1 | 1 | 29,679,556 | 1 |
0 | 0 | I would like to copy the console output to ask a question about a program that's not working. but it seems the normal way of holding down text doesn't highlight the text for selection like in the editor.
Is there a way to copy the text from qpython console? | false | 29,706,559 | 0 | 0 | 0 | 0 | You can only press-and-hold the console and then select the "Copy All" option.
At least I am doing so.
I think there is no way to copy specific text. | 1 | 471 | 0 | 0 | 2015-04-17T18:11:00.000 | qpython | How do you copy text from qpython console? | 0 | 1 | 1 | 30,407,110 | 1 |
0 | 0 | I have a Python\Tkinter Label formatting question.
I have a simple main window with a Label that has its textvariable bound to a DoubleVar()
I want to display the value in the DoubleVar() as a US dollar amount,
as in "$ 123.45"
How can I have the Label display the value the way I want?
I know I could change the textv... | false | 29,759,754 | 0.066568 | 0 | 0 | 1 | You can't. At least, not automatically. You can use a separate label just for the "$", or manually format the string for the label. | 0 | 3,745 | 0 | 0 | 2015-04-20T22:44:00.000 | python,tkinter,label | Python tkinker label formatting | 0 | 1 | 3 | 29,759,880 | 1 |
0 | 0 | I m working on a python project currently, It is a application which don not interact with internet.GUI is being dine with wxpython. Is there code available in python which can simulate button click. | false | 29,764,235 | 0.761594 | 0 | 0 | 5 | I depends on what you really need it to do. Do you just want cause the same code to be executed as would be done when the user clicks the button? Or do you need to have a real system level mouse event occur on the native UI button as if there was a real user doing it?
For the former you just need to cause the event h... | 0 | 1,909 | 0 | 2 | 2015-04-21T06:11:00.000 | python-2.7,wxpython,buttonclick,simulate | simulating button click in python | 0 | 1 | 1 | 29,778,393 | 1 |
0 | 0 | In pygame I can use pygame.mixer.music to load and play long audio files (by streaming), or pygame.mixer.Sound & pygame.mixer.Channel for shorter ones (that are loaded entirely into memory) - as I understand correctly.
I'd like to use both of these methods. However I'd also like to know, when playback of given Channel ... | false | 29,805,701 | 0 | 0 | 0 | 0 | -.- I misunderstood the documentation. There is said:
The type argument will be the event id sent to the queue. This can be any valid event type, but a good choice would be a value between pygame.locals.USEREVENT and pygame.locals.NUMEVENTS. If no type argument is given then the Channel will stop sending endevents.
A... | 0 | 196 | 0 | 0 | 2015-04-22T18:11:00.000 | python,events,audio,pygame | How to differentiate endevent of music and channel? | 0 | 1 | 1 | 29,806,090 | 1 |
0 | 0 | In PyQt4, I want to present a QPushButton that looks like the down-arrow button in QComboBox. Feasible, and if so, how?
I don't need help getting my new widget-combination acting like a QComboBox (see below). I only want the QPushButton display/graphic to look like the down-arrow button in a QComboBox - and tips/code ... | true | 29,806,160 | 1.2 | 0 | 0 | 2 | You can try a QToolButton with no text and the arrowType property set to Qt.DownArrow. eg: myqtoolbutton.setArrowType(Qt.DownArrow). | 0 | 2,863 | 0 | 0 | 2015-04-22T18:36:00.000 | python,pyqt,qcombobox,qpushbutton,qdate | PyQt: display QPushButton that looks like the down-arrow button in QComboBox | 0 | 1 | 1 | 29,907,644 | 1 |
0 | 0 | When PyScripter opens another window (eg. a pygame window or matplotlib graphs), I can't edit code until I close the other window. I can move around the code and delete bits, but can't type.
The problem didn't use to occur because the pygame window opened with another program (I think it was python.exe). I don't recall... | false | 29,848,354 | 0 | 0 | 0 | 0 | Woops I just needed to change run->python engine from internal to remote. | 0 | 233 | 0 | 0 | 2015-04-24T13:07:00.000 | python,pygame,pyscripter | Pyscripter not editable when a sub window is open | 0 | 1 | 1 | 29,859,267 | 1 |
0 | 0 | I've been programming some Kivy/Python apps on my Motorola Moto G mobile phone.
I've got a few handy little apps, that have been working OK for a few months.
Today, I launched one of the apps - through the QPython interface, and it didn't work.
So, I tried another of my apps and that failed to launch for the same reaso... | true | 29,851,825 | 1.2 | 0 | 0 | 2 | You need to have
#qpy:kivy
part in the first line.
At least that was what happened to me.
I suppose that is because QPython is finding what type of app is it. | 0 | 543 | 0 | 1 | 2015-04-24T15:41:00.000 | android,python,kivy,qpython | KeyError: 'ANDROID_APP_PATH' | 0 | 1 | 1 | 30,407,066 | 1 |
0 | 0 | I am fairly new to Python and to GUI programming, and have been learning the Tkinter package to further my development.
I have written a simple data logger that sends a command to a device via a serial or TCP connection, and then reads the response back, displaying it in a ScrolledText widget. In addition, I have a but... | true | 29,896,688 | 1.2 | 0 | 0 | 0 | In general, no, there are no memory limitations with writing to a scrolled text widget. Internally, the text is stored in an efficient b-tree (efficient, unless all the data is a single line, since the b-tree leaves are lines). There might be a limit of some sort, but it would likely be in the millions of lines or so. | 0 | 72 | 0 | 0 | 2015-04-27T13:05:00.000 | memory,logging,textbox,tkinter,python-3.4 | Are there memory limitations when outputting to a ScrolledText widget? | 0 | 1 | 1 | 29,900,168 | 1 |
0 | 1 | I have a pyQT4 application where the user is asked for a savefile (QFileDialog and all that...)
One annoyance is it does not remember the last directory so multiple call always defaults to the working directory of the application (or whatever I set the 3rd argument to)
If I set the option to not use the native file bro... | false | 29,914,909 | 0 | 0 | 0 | 0 | The QFileDialog.saveState() and QFileDialog.restoreState() methods can save and restore the current directory of the dialog box. | 0 | 305 | 0 | 1 | 2015-04-28T09:02:00.000 | windows,python-3.x,pyqt4 | pyQT4 native file dialog remembering last directory | 0 | 1 | 1 | 29,999,330 | 1 |
1 | 0 | Is there a way to take existing python pyqtgraph and pyqt application and have it display on a web page to implement software as a service? I suspect that there has to be a supporting web framework like Django in between, but I am not sure how this is done.
Any hints links examples welcome. | true | 29,928,485 | 1.2 | 0 | 0 | 0 | Here is what I have sort of put together by pulling several threads online:
Ruby On Rails seems to be more popular than python at this moment.
If you go python, Flask and Django are good templates.
bokeh seems to be a good way of plotting to a browser.
AFAIK, there is no way to take an existing PyQt or pyqtgraph appl... | 0 | 1,640 | 0 | 4 | 2015-04-28T19:43:00.000 | python,django,pyqt,saas,pyqtgraph | Displaying pyqtgraph and pyqt widgets on web | 0 | 2 | 2 | 29,947,088 | 1 |
1 | 0 | Is there a way to take existing python pyqtgraph and pyqt application and have it display on a web page to implement software as a service? I suspect that there has to be a supporting web framework like Django in between, but I am not sure how this is done.
Any hints links examples welcome. | false | 29,928,485 | 0 | 0 | 0 | 0 | If all you need are static plots, then it should be straightforward to draw and export to an SVG file, then display the SVG in a webpage (or export to image, as svg rendering is not reliable in all browsers). If you need interactivity, then you're going to need a different solution and probably pyqtgraph is not the too... | 0 | 1,640 | 0 | 4 | 2015-04-28T19:43:00.000 | python,django,pyqt,saas,pyqtgraph | Displaying pyqtgraph and pyqt widgets on web | 0 | 2 | 2 | 29,987,875 | 1 |
0 | 0 | Is it possible to mount more than one image AND text on a Tkinter button?
Or, is it possible to put a FRAME containing images + text on a button?
I want a big button containing multiple widgets that, when taken together, fully describe the option the user will be able to choose.
I appreciate any suggestions!! | true | 29,933,581 | 1.2 | 0 | 0 | 2 | Is it possible to mount more than one image AND text on a Tkinter button?
Strictly speaking, no, it is not possible.
Or, is it possible to put a FRAME containing images + text on a button?
Yes, though it probably won't work on OSX. It would probably take you less time to actually try it than to type in the question... | 0 | 917 | 0 | 2 | 2015-04-29T03:02:00.000 | python,python-2.7,user-interface,button,tkinter | Python Tkinter: multiple images and text on a BIG button? | 0 | 1 | 1 | 29,941,782 | 1 |
0 | 0 | I want the user to be able to select the items on a PyGTK ComboBox, while not being able to write in the combo. He/She should be allowed just to select one of the items.
So I can't use set_active(False), for it will disable the combo.
How can I do this ? | true | 29,969,746 | 1.2 | 0 | 0 | 2 | GTK+ 2 has a type GtkComboBoxEntry that always has the entry box you don't want (and handles some model-related things). Your Glade file uses a GtkComboBoxEntry. Change it to GtkComboBox and, assuming everything else is set up properly (your model is correct and you have a GtkCellRendererText), you should be good to go... | 0 | 667 | 0 | 0 | 2015-04-30T13:57:00.000 | python,gtk,pygtk | How do I disable edition of a PyGtk Combobox? | 0 | 1 | 1 | 29,976,673 | 1 |
0 | 0 | I am using wxPython ObjectListView and it is very easy to use. Now I need to render a wx.Color as a column but I haven't found a way in the documentation. Basically I have list of items each of them have the following attributes: name, surname and hair color. Hair color is a RGB color and I would like to show it as a c... | false | 29,990,202 | 0 | 0 | 0 | 0 | For the future: what I did was to show the color as a background of the row of the list. | 0 | 360 | 0 | 0 | 2015-05-01T15:46:00.000 | python,wxpython,objectlistview-python | ObjectListView wxPython: how to show a wx.Color | 0 | 1 | 2 | 30,030,742 | 1 |
0 | 0 | So, I'm working with pygame in python 2.7.9 and I'm trying to make some kind of zoom, to view details of a fractal.
I can easily draw a Sierpinski triangle using polygons, my idea is to zoom a area of the triangle and see details of the depth without pixelation.
So far, I can zoom in but the surface gets pixelated
Is t... | false | 29,994,341 | 0 | 0 | 0 | 0 | First make a canvas and triangle with a big size and Zoom out. So when you zoom in, it won't get pixelated. | 1 | 1,289 | 0 | 0 | 2015-05-01T20:09:00.000 | python,pygame,zooming,pixel | Zoom in and Zoom Out Pygame | 0 | 1 | 1 | 29,994,418 | 1 |
0 | 0 | I have a tuple of constants:
WIN = 640, 360, "Example", False, 'tool' # x, y, title, resizable, style
And now to use it I have to type in this:
app = pyglet.window.Window(WIN[0], WIN[1], WIN[2], WIN[3], WIN[4])
Is there a method to split tuple into separate elements like this:
app = pyglet.window.Window(WIN.extract()) ... | true | 30,000,275 | 1.2 | 0 | 0 | 0 | app = pyglet.window.Window(*WIN) | 1 | 123 | 0 | 0 | 2015-05-02T08:48:00.000 | python,python-3.x,tuples,extract | Python: method to extract tuple | 0 | 1 | 3 | 30,000,302 | 1 |
0 | 0 | My question is simple, apart from the three themes pre-installed in Tkinter are there any other themes I can get ? Something like 3rd party themes ? If not, how can I change the button or other widgets looks (manually changing the form,etc..)?
Also I would like to know if it is possible to change the outside window loo... | true | 30,002,869 | 1.2 | 0 | 0 | 2 | You cannot change the window border, but you can remove it entirely and draw your own border. You'll also be responsible for adding the ability to move and resize the window. Search this site for "overrideredirect" for lots of questions and answers related to this feature.
As for third party themes: no, there aren't an... | 0 | 174 | 0 | 1 | 2015-05-02T13:29:00.000 | python,python-2.7,tkinter | 3rd party Tkinter themes and modifying outside window buttons | 0 | 1 | 1 | 30,014,871 | 1 |
0 | 0 | I have recently encountered an issue whenever I try and use pygame. The window that comes up hangs and just ends up crashing. I know this program works because I have run it many times before (this also occurs with anything else I try and run in pygame). Strangely, in the command prompt window it asks an input question... | false | 30,089,723 | 0 | 0 | 0 | 0 | It could be, that you named your file pygame.py, so now, whenever you try to import pygame, it imports from THAT pygame.py file. Maybe delete/rename the file and reinstall pygame would work, i had the same problem a year ago and it worked. | 1 | 190 | 0 | 0 | 2015-05-07T00:03:00.000 | python,command-line,pygame | Pygame crashing | 0 | 2 | 2 | 31,355,786 | 1 |
0 | 0 | I have recently encountered an issue whenever I try and use pygame. The window that comes up hangs and just ends up crashing. I know this program works because I have run it many times before (this also occurs with anything else I try and run in pygame). Strangely, in the command prompt window it asks an input question... | false | 30,089,723 | 0 | 0 | 0 | 0 | Seems to be a setup problem.
possible solutions:
rename files (as Mooper suggested)
create the smallest possible use for pygame (once without / once with windows popping up), in order to tell us where the error comes up / does not.
look at the code again; seems to me being an error with a neverending loop / overflowi... | 1 | 190 | 0 | 0 | 2015-05-07T00:03:00.000 | python,command-line,pygame | Pygame crashing | 0 | 2 | 2 | 41,851,946 | 1 |
0 | 0 | I have been using Python for a bit now (5-6 months) and I would like to finally like to start programming in GUI. Is there a good tutorial for this? Also, I would really like to use something in the default Python language rather than something installed otherwise, unless Py2EXE has been updated to 3.x and it supports ... | false | 30,111,145 | 0.197375 | 0 | 0 | 1 | Tkinter is part of python, and it is quite powerful. You have Notebook, Listbox and such...
There are some limitations, and PyQt and PyGTK are more powerful.
My advice will be to start with Tkinter (typing what widget you want + tkinter in your search engine usually works) and see what you can do.
I am not sure I under... | 1 | 65 | 0 | 0 | 2015-05-07T20:33:00.000 | user-interface,python-3.x | Integrated GUI for Python3? | 0 | 1 | 1 | 30,111,555 | 1 |
0 | 0 | What I have is a large amount of C code and a bunch of swig wrappers to export all the functions into python. We like using python for testing, it's great, but my problem is there don't seem to be any editors out there that will share tags between python and C.
What I want is to ctrl+click (or whatever shortcut) on a f... | false | 30,112,333 | 0 | 1 | 0 | 0 | I do this using UltraEdit, but UltraEdit is not great if you do not like it :-) Its not really an IDE more like an Editor. However the way I do it can most likely be ported to e.g. Eclipse.
I generate the Ctags file my self. and force UE to use the custom generated cTags file. This works like a charm. | 0 | 290 | 0 | 5 | 2015-05-07T21:54:00.000 | python,c++,c,exuberant-ctags | Code editor that supports cross-language (c)tags between C and python | 0 | 1 | 1 | 31,437,333 | 1 |
0 | 0 | I am having some Python code that heavily relies on numpy/scipy and scikit-learn. What would be the best way to get it running on an Android device? I have read about a few ways to get Python code running on Android, mostly Pygame and Kivy but I am not sure how this would interact with numpy and scikit-learn.
Or would ... | false | 30,119,149 | 0.099668 | 0 | 0 | 1 | Depends on what you need....
Python on a server using Flask/ Django would allow you to build an http UI or even an API interface for your Android (or any) device.
Qpython is a brilliant way to run python on an Android but probably won't cope with the whole of scipy so depends on what libraries have already been ported ... | 0 | 2,766 | 0 | 1 | 2015-05-08T08:23:00.000 | android,python,numpy,scikit-learn | Port Python Code to Android | 0 | 1 | 2 | 30,120,067 | 1 |
0 | 0 | I am using Tkinter to create a GUI in python.
What I did was I insert a GIF image into the background and also created labels and buttons.
How do I make the labels and buttons background to be transparent as the background is covering my GIF image? | false | 30,180,138 | 0.379949 | 0 | 0 | 2 | Basically what @Paul Rooney indicated in his comment above.
You might be able to workaround this using canvas to create your own label. You can then use a canvas text object instead of a label.
If you create an empty canvas and add the text with the create_text(), and then place this text-canvas 'on top' of the 'main'... | 0 | 7,124 | 0 | 0 | 2015-05-12T01:14:00.000 | python,tkinter | How to make labels background to be transparent in Tkinter? | 0 | 1 | 1 | 30,194,049 | 1 |
0 | 0 | I'm trying to create a simple Python application for Linux and I'm using GTK to generate a UI for it. I've only begun exploring GTK but from what I can tell, the moment you call GTK.main() the program goes into that function wherever and only responds to user interactions with the UI. The thing is, I'm running an SDN c... | false | 30,280,774 | 0 | 0 | 0 | 0 | I was able to solve the problem by spawning separate threads for both GTK and the POX controller. With this done, everything's working fine simultaneously. | 0 | 69 | 0 | 0 | 2015-05-16T21:06:00.000 | python,linux,multithreading,gtk,pox | Keep background events active when using GTK | 0 | 1 | 1 | 30,397,459 | 1 |
0 | 0 | I've got my own drawing loaded on to the screen and scaled it to the size I want, but the background of the program I used to make the drawing is still on the image. I noticed that when I move the image, the background doesn't move with the picture, but it actually looks like it's stretching out and it will cover where... | true | 30,315,466 | 1.2 | 0 | 0 | 0 | Not sure if this is the problem, but the stretching might be caused by not redrawing the background. Blitting is like painting, you can't erase stuff. When you want to move something, you need to repaint all the places that have changed - also the background that is not visible after movement.
The quickest way to do th... | 0 | 79 | 0 | 0 | 2015-05-19T01:47:00.000 | python,pygame | Getting my drawing into pygame without .blit() | 0 | 1 | 2 | 30,315,673 | 1 |
0 | 0 | How can I register a callback for when a Kivy gui is loaded?
In my Kivy app, as soon as the GUI is loaded (aka the window pops up with the initial view), I need to kick off a function that loads expensive data and updates the UI.
So far i've been using the on_start method in App but this runs before the GUI is loaded.... | false | 30,332,159 | 0 | 0 | 0 | 0 | You could Clock.schedule(some_function, 0) in your build method, I think that would run after everything is initialised but before the next frame. | 0 | 499 | 0 | 2 | 2015-05-19T17:21:00.000 | python,kivy | kivy -- event for when guis is loaded | 0 | 1 | 1 | 30,334,720 | 1 |
0 | 0 | Is it possible to use any Python package within a Kivy program, and ultimately running it on an android device? for example - can I use the package "xlrd" or "googlemaps" on Kivy? If the answer is positive, How do I do it? normally I get an error message that says "No module named X".
Thank you. | true | 30,353,541 | 1.2 | 0 | 0 | 1 | Yes you can. Just download the package you want to use and place it in the same folder as your main.py. Then import whatever you wish to use from that package. The packages will also work when you deploy the app onto an Android device. | 0 | 199 | 0 | 1 | 2015-05-20T15:04:00.000 | python,packages,kivy | Using various Python packages within a Kivy program | 0 | 1 | 1 | 30,354,153 | 1 |
0 | 0 | I am building a turn-based strategy game using Libtcod and Python. The game map has variable terrain and each tile can be 1 of 5 types:
Plains - Costs 1 to move over
Forest - Costs 2
River - Costs 4
Hill - Costs 3
Mountain - Impassable
Each type has its own movement cost, so that it costs less "move points" to move t... | false | 30,408,098 | 0 | 0 | 0 | 0 | As far as I understand, what you want to achieve is very well possible with tcod's built-in pathfinding function.
path_new_using_function will call your path_func with adjacent cells, so you can simply have it return the values you listed above depending on the terrain below (xFrom, yFrom) and/or (xTo, yTo). | 0 | 965 | 0 | 2 | 2015-05-23T01:50:00.000 | python,algorithm,dijkstra,libtcod | Python Libtcod: How to do pathfinding with variable move cost terrain? | 0 | 1 | 2 | 54,982,870 | 1 |
0 | 0 | Making a very simple tic-tac-toe game in Python using a P2P architecture with sockets. Currently my GUI has button that says 'Create' that will open up and draw a new game board window, create a socket, bind, listen, and accept a connection. The 'Join' button will open and draw a new gameboard and connect to that 'serv... | true | 30,430,162 | 1.2 | 0 | 0 | 1 | Sounds like a threading issue.
I'm unfamiliar with TK graphics, but I'd imagine what you need to do is start the window showing the "waiting for player" message. That window then loops waiting for something to happen.
When the message box displays you need to have the "listening" done on another thread, which signals ... | 0 | 339 | 0 | 4 | 2015-05-25T01:35:00.000 | python,sockets,p2p | Python: Show message 'Waiting for player...' while socket listens for connection | 1 | 1 | 1 | 30,430,588 | 1 |
0 | 0 | I am learning python and i don't know that it will be helpful to me if i want to make android apps.I have read somewhere that python can make android app.But I want to ask you that is it a good option or we should always use andriod studio to make android apps because that is developed particularly for creating android... | false | 30,465,364 | 0.066568 | 0 | 0 | 2 | If the question is,can i run python programs on android then by all means yes.
But if the intent is to create a mobile app usibg python then please look at kivy which is yet to support python 3.
But outside the love of python ,its best to stick to android studio for native android apps. | 0 | 25,019 | 0 | 9 | 2015-05-26T17:42:00.000 | android,python,android-developer-api | Can python build android apps? | 0 | 2 | 6 | 30,466,179 | 1 |
0 | 0 | I am learning python and i don't know that it will be helpful to me if i want to make android apps.I have read somewhere that python can make android app.But I want to ask you that is it a good option or we should always use andriod studio to make android apps because that is developed particularly for creating android... | false | 30,465,364 | 0 | 0 | 0 | 0 | Yes you can using
1- Kivy library
2- install Ubuntu on a versatile machine
3- run buildozer to transfer your main.py file into APK file | 0 | 25,019 | 0 | 9 | 2015-05-26T17:42:00.000 | android,python,android-developer-api | Can python build android apps? | 0 | 2 | 6 | 68,053,648 | 1 |
0 | 0 | My setting: Python 2.7 with anaconda
Recently I have installed OpenCV 3.0 and when I try to do simple image display or I want to run python samples that come with OpenCV, there is a error message:
This application failed to start because it could not find or load the Qt platform plugin "xcb".
I have read many comment... | false | 30,483,753 | 0.197375 | 0 | 0 | 2 | Okey, I have figured it out.
During cmake I set flag -D WITH_QT=OFF since I read somewhere that it doesnt work for Qt5.x | 0 | 1,947 | 0 | 1 | 2015-05-27T13:21:00.000 | python,opencv,anaconda,xcb | python app - xcb plugin fail | 0 | 1 | 2 | 30,487,195 | 1 |
0 | 0 | I have a program in which I use a tkinter button to exit the program with the exit() command. However, when I compile the program through cx_freeze, it doesn't work anymore. I also tried with sys.exit() but then the button doesn't work at all (with or without cx_freeze). Any hint would be appreciated, thanks! | true | 30,490,795 | 1.2 | 0 | 0 | 2 | For tkinter applications, the preferred way to exit is name_of_application.destroy(). Using exit() can give unpredictable results. | 0 | 628 | 0 | 3 | 2015-05-27T18:50:00.000 | python,python-3.x,tkinter,cx-freeze | exit() doesn't work with cx_freeze | 0 | 1 | 1 | 30,491,828 | 1 |
0 | 0 | I'm experiencing something strange when using Image.resize(). I have two images, one is a cropped version of the other. I've been working out the aspect ratio so that I can resize both images by the same factor and then resizing them separately.
Now for some reason, the larger of the two images is resized fine but the ... | false | 30,540,872 | 0.066568 | 0 | 0 | 1 | I haven't used Pillow, and I haven't seen your images or code, but let's say you have an image with a resolution of 400x200 and you want to resize it to 200x100, then each of the new pixels needs to have some color. Since the new image is smaller, the colors from the original will have to be mashed together to form the... | 0 | 1,342 | 0 | 0 | 2015-05-30T00:16:00.000 | python,image,pillow | Using Python to resize images using Pillow, why are the colours changing? | 0 | 1 | 3 | 30,541,163 | 1 |
0 | 0 | I have been working on my first wxpython app and this app has a search functionality. The app has to search for elements from database, list them and display details of one single element, when the element is clicked from the list.
I found there is ListView or ObjectListView to be used for this. But what should be used... | false | 30,545,494 | 0 | 0 | 0 | 0 | I found out that wx has a EVT_LIST_ITEM_ACTIVATED event that is triggered when a list item is double clicked. I used this to capture the selected item and display the data accordingly. | 0 | 33 | 0 | 0 | 2015-05-30T11:18:00.000 | python,wxpython | Display single element page on click of list element wxpython | 0 | 1 | 1 | 30,546,887 | 1 |
0 | 0 | I got program that draws spaceship
(Turtle Graphics) forward,backward etc.
By using a lot of orders and lines drawing spaceship takes 5 seconds using turtle.speed(0).
And whenever you click the right/left key it draws it again in other direction.
It major thing in my project.
Is there a way to draw it faster?
Than... | true | 30,554,696 | 1.2 | 0 | 0 | 2 | By default, turtle has a draw delay of 10 milliseconds. Every time it updates the canvas, it will pause 10 milliseconds as a simple way of controlling the animation speed. This delay is independent of the speed of the turtle itself. If you want to speed up the animation, you can set a shorter delay, e.g. with turtle.de... | 0 | 1,123 | 0 | 3 | 2015-05-31T06:53:00.000 | python,python-2.7,turtle-graphics | Faster drawing in python | 0 | 2 | 2 | 30,554,792 | 1 |
0 | 0 | I got program that draws spaceship
(Turtle Graphics) forward,backward etc.
By using a lot of orders and lines drawing spaceship takes 5 seconds using turtle.speed(0).
And whenever you click the right/left key it draws it again in other direction.
It major thing in my project.
Is there a way to draw it faster?
Than... | false | 30,554,696 | 0.099668 | 0 | 0 | 1 | you can use screen.tracer(n) where a bigger n value means a faster drawing speed but less details | 0 | 1,123 | 0 | 3 | 2015-05-31T06:53:00.000 | python,python-2.7,turtle-graphics | Faster drawing in python | 0 | 2 | 2 | 30,555,631 | 1 |
0 | 0 | I'm working on developing a PyQt4 application that will require a lot of widgets and I have run into an issue. When you say where to move the widget to (such as: btn.move(100, 100) it moves it properly, but if you resize the window, you can't see it). I'm not sure how to fix this. I don't want to restrict resizing of t... | false | 30,560,147 | 0 | 0 | 0 | 0 | Use a Qt layout (like a QVBoxLayout, QHBoxLayout, or a QGridLayout) | 0 | 42 | 0 | 0 | 2015-05-31T17:05:00.000 | python,widget,pyqt,pyqt4 | How to update PyQt4 widget locations based on window size? | 0 | 1 | 1 | 30,563,200 | 1 |
0 | 0 | I am writing a Kivy UI for cmd line utility I have developed. Everything works fine, but some of the processes can take from a few seconds to a few minutes to process and I would like to provide some indication to the user that the process is running. Ideally, this would be in the form of a spinning wheel or loading ba... | false | 30,595,908 | 0.066568 | 0 | 0 | 1 | I've dealt with similar problem and creating new thread didn't do the trick. I had to use Clock.schedule_once(new_func) function. It schedules function call to the next frame, so it is going to run almost immediately after callback ends. | 0 | 12,311 | 0 | 9 | 2015-06-02T12:20:00.000 | python,user-interface,events,kivy | Building a simple progress bar or loading animation in Kivy? | 0 | 1 | 3 | 56,684,592 | 1 |
0 | 0 | I'm wondering if there are any preloaded gestures on kivy, such as pinch, expand, etc. The examples have check, square, circle, and cross gestures. Is there a database for more? | false | 30,645,470 | 0 | 0 | 0 | 0 | I'm not sure that there is, not many people use the gestures. We have a gsoc project that will probably bring some improved tools for this to kivy core, though. | 0 | 63 | 0 | 0 | 2015-06-04T13:43:00.000 | python,kivy,gesture | Preloaded gestures on Kivy? | 0 | 1 | 1 | 30,648,659 | 1 |
0 | 0 | I'm adding a simple toolbar to my PyQt application and trying to get the toolbar to start by default in the top position, but in the 2nd row beneath another toolbar.
I have called:
self.addToolBar(Qt.TopToolBarArea, navBar)
This combines the toolbar with my first toolbar which is much shorter into the same row. Is the... | false | 30,687,178 | 0.379949 | 0 | 0 | 2 | Finally found the solution after scouring the documentation and trying different options. I think I was looking for something along the lines of "toolBarRow" so I missed it.
The solution is to insert a toolBarBreak. The same way a separator can be added to a toolbar itself, a "break" simply breaks up one of the four ... | 0 | 714 | 0 | 1 | 2015-06-06T20:17:00.000 | python,pyqt | PyQt toolbar in 2nd row by default | 0 | 1 | 1 | 30,687,563 | 1 |
0 | 0 | I am using the anaconda python distribution (python version 2.7) and I would like to be able to use wxpython either in a notebook or at least in an ipython console through the anaconda spyder app (their IDE). I am running into what is apparently a common problem which is due to the anaconda python environment not being... | false | 30,743,683 | 0 | 0 | 0 | 0 | I believe simply using pythonw vs. python helped when I was using a MacBook. | 1 | 2,244 | 0 | 0 | 2015-06-09T22:08:00.000 | python,wxpython,anaconda | How to use wxpython in an ipython notebook or console | 0 | 2 | 2 | 36,034,036 | 1 |
0 | 0 | I am using the anaconda python distribution (python version 2.7) and I would like to be able to use wxpython either in a notebook or at least in an ipython console through the anaconda spyder app (their IDE). I am running into what is apparently a common problem which is due to the anaconda python environment not being... | false | 30,743,683 | 0 | 0 | 0 | 0 | In an ipython notebook before you run a cell invoking wxpython functions you have to insert the %gui magic:
%gui wx | 1 | 2,244 | 0 | 0 | 2015-06-09T22:08:00.000 | python,wxpython,anaconda | How to use wxpython in an ipython notebook or console | 0 | 2 | 2 | 30,744,213 | 1 |
0 | 0 | I know there are many posts about this problem (i've read them all).
But i still have a problem with my exe, still cannot be opened.
I've tried to put the qwindows.dll (i tried with 3 different qwindows.dll) in the folder dist with my exe but doesn't change anyhting.
I've tried with libEGL.dll, nothing.
Any suggestions... | true | 30,757,708 | 1.2 | 0 | 0 | 3 | I've had this issue aswell, after a lot of digging I found the following solution:
Copy the following file next to you main .exe:
libEGL.dll
Copy the following file in a folder "platforms" next to you main .exe:
qwindows.dll
Putting the qwindows.dll in the subfolder is the important part I think, hope this helps | 0 | 1,637 | 0 | 1 | 2015-06-10T13:24:00.000 | python,user-interface,py2exe,pyqt5 | Qt platform plugin 'windows' - py2exe | 0 | 2 | 3 | 31,620,544 | 1 |
0 | 0 | I know there are many posts about this problem (i've read them all).
But i still have a problem with my exe, still cannot be opened.
I've tried to put the qwindows.dll (i tried with 3 different qwindows.dll) in the folder dist with my exe but doesn't change anyhting.
I've tried with libEGL.dll, nothing.
Any suggestions... | false | 30,757,708 | 0 | 0 | 0 | 0 | For me it was enough to copy qwindows.dll to platforms folder, like @Inktvisje wrote.
And don't repeat my mistake: don't download this dll from Internet! Copy it from your Python libs folder: YourPythonFolder\Lib\site-packages\PyQt5\plugins\platforms. | 0 | 1,637 | 0 | 1 | 2015-06-10T13:24:00.000 | python,user-interface,py2exe,pyqt5 | Qt platform plugin 'windows' - py2exe | 0 | 2 | 3 | 41,159,237 | 1 |
0 | 0 | I have a python program using PySide. When run normally, it opens up a PySide GUI, but when run with some flags in the command line, it spits some things out in the console window.
I'd like to retain this dual functionality, but it seems with py2exe you have to choose whether to have a console window or not when compil... | false | 30,759,749 | 0.197375 | 0 | 0 | 1 | This is not a py2exe limitation, but a Windows limitation. On Windows, applications are compiled either as Console Applications or GUI Applications. The difference is that Console Applications always open a console window, whilst GUI Applications never do.
As far as I can tell, it's not possible to have an application ... | 1 | 66 | 1 | 0 | 2015-06-10T14:45:00.000 | python,user-interface,console,pyside,py2exe | py2exe: Allow a console window to be either shown or hidden with a sys.argv | 0 | 1 | 1 | 30,759,966 | 1 |
0 | 0 | I'm confused as to the difference between using a function in commands of tkinter items. say I have self.mb_BO.add_radiobutton(label= "Red", variable=self.BO, value=2, command=self.red)
what is the difference in how the add statement works from this:
self.mb_BO.add_radiobutton(label= "Red", variable=self.BO, val... | true | 30,769,851 | 1.2 | 0 | 0 | 2 | A good way to look at it is to imagine the button or binding asking you the question "what command should I call when the button is clicked?". If you give it something like self.red(), you aren't telling it what command to run, you're actually running the command. Instead, you have to give it the name (or more accurate... | 0 | 881 | 0 | 1 | 2015-06-11T00:59:00.000 | python,lambda,tkinter,command | commands in tkinter when to use lambda and callbacks | 0 | 1 | 2 | 30,770,368 | 1 |
0 | 0 | I know the difference between static and dynamic linking in C or C++. But what does it mean in Python? Since it's just an interpreter, and only having one style of import mechanism of modules, how does this make sense?
If I freeze my Python application with cx_freeze by excluding a specific library, is it a kind of dy... | true | 30,770,219 | 1.2 | 0 | 0 | 1 | In python there's no static linking. All the imports requires the correct dependencies to be installed on our target machine. The choice of the version of such libraries are in our decision.
Now let's come to the binary builders for python. In this case, we'll have to determine the linking type based on the GNU definit... | 1 | 2,509 | 0 | 12 | 2015-06-11T01:45:00.000 | python,qt,pyside,cx-freeze | What does it mean for statically linking and dynamically linking in Python? | 0 | 1 | 1 | 43,317,798 | 1 |
0 | 0 | Using PyQt 4, Python 2.7, Windows 7 on a x64 machine.
I have been developing a bit of code using a Python console with PyQt4 and passing strings from QLineEdit() widgets to OS commands with no issues using os.system(cmd)
But when I tried running from the command line in Windows I get the following error,
TypeError: se... | false | 30,833,264 | -0.099668 | 0 | 0 | -1 | I think that this problem happens because the command line parameters are actually byte arrays and not strings, strings are encoded in Unicode, but byte arrays are not. Calling str(cmd) return the content of cmd as a string. | 0 | 288 | 0 | 1 | 2015-06-14T18:54:00.000 | python,windows,command-line,pyqt4,qstring | PyQt Qstring not accepted when script run from WIndows command line, why? | 0 | 1 | 2 | 30,833,435 | 1 |
0 | 0 | I'm using PyQt4 to enter credentials into a domain login page and pull data from several additional pages in the domain. Everything works exactly as expected when supplying login or search credentials from within the code. When I open up raw_input to allow the user to enter information, it causes hang-ups trying to dow... | true | 30,926,097 | 1.2 | 0 | 0 | 1 | raw_input uses synchronous/blocking IO without giving Qt a chance to continue processing events in the background. Qt isn't really prepared for it's processing to be halted in this way. In theory it should just resume when raw_input is finished. But maybe in the meantime a timeout occurred or something like that. You r... | 0 | 285 | 0 | 1 | 2015-06-18T21:27:00.000 | python,pyqt4,stdin,raw-input,qwebpage | Using raw_input causes problems with PyQt page loading | 1 | 1 | 1 | 30,926,485 | 1 |
0 | 0 | I'm using Tkinter to design a UI for an application. I'm using grid geometry and while specifying button width (or any widget width), I realized that width should be specified in text units and not pixels. Since I want to make it platform independent and screen size independent Is there any method to get max text unit ... | true | 30,950,925 | 1.2 | 0 | 0 | 8 | If you want to make a GUI that is "platform independent and screen size independent", you definitely do not want to be measuring sizes yourself. Unless, by saying you want something platform independent, you're saying you want a button to be X pixels regardless of pixel density or screen resolution (which seems like a ... | 0 | 10,473 | 0 | 2 | 2015-06-20T06:13:00.000 | python,tkinter | Tkinter : Getting screen text unit width. (Not pixels) | 0 | 1 | 3 | 30,954,325 | 1 |
0 | 0 | I need to execute C++ code to acquire images to process in python.
I need to use these commands from python:
make and
./name_of_the_executable
Could anybody please help know me how to do it? | false | 30,954,589 | 0.197375 | 0 | 0 | 2 | Look For python.net which is cable of making a call to the interfaces written in .net supported languages.
What all you need to do is
Steps:
Download and put it two files Python.Runtime.dll and clr.pyd in your DLLs folder.
From you >>>(triple greater than prompt )Python prompt Try
>>>import clr
if it doesn't gives a... | 1 | 70 | 1 | 0 | 2015-06-20T13:36:00.000 | python,c++ | Excuting cpp file from Python | 0 | 1 | 2 | 30,954,837 | 1 |
0 | 0 | I am currently trying to write a script to automate the ATTO disk benchmark GUI. I can use the script to successfully locate images in the GUI, but I can not get any clicks generated by the script to register in the application. I have modified the script to test if I could use the PyAutoGUI package to click things i... | false | 30,991,451 | 0.197375 | 0 | 0 | 1 | Please try to run your script with administrative privileges. If you are using Powershell then run powershell as administrator | 0 | 1,086 | 0 | 0 | 2015-06-22T23:18:00.000 | python,user-interface,automation | PyAutoGUI click() function will not register in certain applications | 0 | 1 | 1 | 34,939,080 | 1 |
0 | 0 | I am interested into programming with different languages besides Ti-Basic (like Java, C, and Python) on my Ti-84 plus calculator. Does my calculator support this, and if not, are there any calculators on the market that would be able to do this? Thanks in advance!
(The idea is that when I don't have access to my compu... | false | 30,993,221 | 0.049958 | 1 | 0 | 1 | You would need a compiler that will translate whatever language you're writing in (in the case of Java, an implementation of the JVM as well) to the assembly used by the calculator's CPU, it's probably not likely you will find an easy to use solution as calculators like the TI-84 are pretty archaic. | 1 | 3,809 | 0 | 6 | 2015-06-23T03:13:00.000 | java,python,c,calculator,ti-basic | Multiple Language Programming on Ti-Calculator | 0 | 3 | 4 | 30,993,515 | 1 |
0 | 0 | I am interested into programming with different languages besides Ti-Basic (like Java, C, and Python) on my Ti-84 plus calculator. Does my calculator support this, and if not, are there any calculators on the market that would be able to do this? Thanks in advance!
(The idea is that when I don't have access to my compu... | false | 30,993,221 | 0.049958 | 1 | 0 | 1 | The TI-84 Plus CE Python allows you to code in Python but it is a barebones implementation. But it has been pretty useful for me. | 1 | 3,809 | 0 | 6 | 2015-06-23T03:13:00.000 | java,python,c,calculator,ti-basic | Multiple Language Programming on Ti-Calculator | 0 | 3 | 4 | 69,366,466 | 1 |
0 | 0 | I am interested into programming with different languages besides Ti-Basic (like Java, C, and Python) on my Ti-84 plus calculator. Does my calculator support this, and if not, are there any calculators on the market that would be able to do this? Thanks in advance!
(The idea is that when I don't have access to my compu... | true | 30,993,221 | 1.2 | 1 | 0 | 3 | After a little research, I found some some hand-held "pocket" devices.
The Palm m500 has a JVM to program java on. There apparently was a website that had an SDK for C, but the website was removed.
In regards to calculators:
TI-82, 83, 84, 85, 86, and related models all support TI-BASIC and z80 ASM.
TI-92, Voyage 200... | 1 | 3,809 | 0 | 6 | 2015-06-23T03:13:00.000 | java,python,c,calculator,ti-basic | Multiple Language Programming on Ti-Calculator | 0 | 3 | 4 | 31,085,450 | 1 |
0 | 0 | I would like to move the cursor in a Python matplotlib window by a (data) pixel at a time (I'm displaying a 2D image), using the keyboard arrow keys. I can trap the keyboard keypress events, but how do I reposition the cursor based on these events? | false | 31,003,551 | 0 | 0 | 0 | 0 | One solution is to make MatPlotLib react to key events immediately.
Another solution is print a 'Cursor' or marker line on the plot, and change its coordinates with the mouse events. Eg. draw a vertical line, and update its X coordinates with the left and right keys. You can then add a label with the X coordinate along... | 0 | 533 | 0 | 1 | 2015-06-23T13:02:00.000 | python,matplotlib | move cursor in matplotlib window with keyboard stroke | 0 | 1 | 2 | 31,004,307 | 1 |
0 | 0 | I am trying to get my game to look/scale well across different devices. I am attempting to introduce the dp and sp metrics into my apps as much as possible, but in this case I am refactoring a game to use these metrics for layout and widget sizing.
Where before, my layouts were sized using size_hint in order to have e... | false | 31,037,748 | 0.379949 | 0 | 0 | 2 | Using size_hint alone already guarantees a degree of scale independence, as (as you note) all the sizes will be relative.
Kivy internally checks some resolution related values of the device, and this is basically the point of dp; something like dp(10) for instance should be the same actual size on any device, in terms ... | 0 | 766 | 0 | 1 | 2015-06-24T21:51:00.000 | android,python,scale,kivy,screen-density | Proper usage of metrics with Kivy(So GUI scales well across devices) | 0 | 1 | 1 | 31,038,234 | 1 |
0 | 0 | I am new to python and want to learn this from the basic.
I want to open two other application like notepad in a single window. I searched for any examples by using "tkinter". Any idea for implementing this using "tkinter".
PS: two tabs one in left and one in right so that one tab will be having notepad and other will... | false | 31,098,786 | 0 | 0 | 0 | 0 | I don't think you will be able to do this easily. Notepad is using its own toolkit which, most probably, is not compatible with the one you are using.
If you want to open eg. an editor, look for a widget in the toolkit of your choice which does what you want (or nearly). Eg. if you want an editor, use the GtkTextView i... | 1 | 509 | 0 | 0 | 2015-06-28T10:33:00.000 | python,window,parent | Opening other application in single window using python | 0 | 2 | 3 | 31,100,428 | 1 |
0 | 0 | I am new to python and want to learn this from the basic.
I want to open two other application like notepad in a single window. I searched for any examples by using "tkinter". Any idea for implementing this using "tkinter".
PS: two tabs one in left and one in right so that one tab will be having notepad and other will... | false | 31,098,786 | -0.066568 | 0 | 0 | -1 | For what you need, you will have to use libraries like tkinter or pyqt. As you want to learn it from the basic, I would suggest you to pick a GUI library and start learning it. Eventually you will know how to get the result that you desire. | 1 | 509 | 0 | 0 | 2015-06-28T10:33:00.000 | python,window,parent | Opening other application in single window using python | 0 | 2 | 3 | 31,098,854 | 1 |
0 | 0 | I am trying to make a Drop Down Menu of colors. Red Green Blue Yellow. I want the words inside the option box to be colored with their respected name. So the when the user clicks the arrow to open the optionMenu, Option red will have red letters. blue will have blue letters and so forth.
Is this Possible?
Thanks. | false | 31,105,836 | 0 | 0 | 0 | 0 | Try using the fg(or foreground) and bg(or background) options. If a is the menu, use:
a.entryconfig( optionindex , bg=" color_name " ) for the background, and
a.entryconfig( optionindex , bg= " color_name " ) for the foreground. | 1 | 439 | 0 | 1 | 2015-06-28T23:24:00.000 | python,tkinter,optionmenu | How do you change the color of the words in a Python Tkinter OptionMenu | 0 | 1 | 2 | 31,127,939 | 1 |
0 | 0 | In the program I'm writing, the user needs to be able to select a cell in the grid and edit its value. The program also shows what the value of the currently selected value is in hexadecimal (so (0,0) is 0x00, (1,3) is 0x19, etc.) I originally had this display be updated through a binding to the wx.grd.EVT_GRID_SELECT_... | true | 31,118,668 | 1.2 | 0 | 0 | 0 | Adding event.Skip() at the end of my custom handler passes the event to the default handler. | 0 | 137 | 0 | 0 | 2015-06-29T14:44:00.000 | python,events,grid,wxpython,wxwidgets | In wxPython Grid, creating event handler for Cell Selection disables moving the GridCursor | 0 | 1 | 1 | 31,124,993 | 1 |
0 | 0 | I'm wondering if python is a good choice to develop a desktop application for a small business.
Is it possible to build something using PyQT or even Swing + Jython ? How I can make a executable file at the end? | false | 31,123,293 | 0 | 0 | 0 | 0 | It depends on what you are looking to do. I have done it and it worked but there are other questions that can factor in like who will maintain or update the code, and do they know Python. You can look at cx_freeze for making a windows executable out of a python program as one of many options. | 1 | 2,859 | 0 | 0 | 2015-06-29T18:50:00.000 | python,pyqt | Is python a good choice to build a desktop application? | 0 | 2 | 2 | 31,123,417 | 1 |
0 | 0 | I'm wondering if python is a good choice to develop a desktop application for a small business.
Is it possible to build something using PyQT or even Swing + Jython ? How I can make a executable file at the end? | true | 31,123,293 | 1.2 | 0 | 0 | 8 | I've found Python to be an excellent choice for developing a broad scala of applications including desktop applications. I've developed in C++ for many years, and for parts that are really time critical I sometimes use it still, but for most of my code Python helps me get results much faster. There are several ways to ... | 1 | 2,859 | 0 | 0 | 2015-06-29T18:50:00.000 | python,pyqt | Is python a good choice to build a desktop application? | 0 | 2 | 2 | 31,123,686 | 1 |
0 | 0 | I'm creating a setup.py install script for my upcoming PyQt application. The PyQt modules are all spelled with camel case as opposed to the standard module name conventions, and I can't find what name to use in the setup script.
What is the name of the PyQt4 module to be used in the install_requires field of setup()? | false | 31,167,283 | 0 | 0 | 0 | 0 | A search of the Python Package Index reveals it's actually python-qt. Annoying, but I suppose it works.
EDIT: Actually, it's not. See the comments below. | 1 | 432 | 0 | 1 | 2015-07-01T16:50:00.000 | python,dependencies,pyqt4,setuptools,setup.py | PyQt4 as dependency in setup script | 0 | 1 | 1 | 31,167,583 | 1 |
0 | 0 | I'd like to import the "requests" library into my Kivy application. How do I go about that? Simply giving import requests is not working out.
Edit:
I'm using Kivy on Mac OS X, 10.10.3. | false | 31,182,671 | 0.099668 | 0 | 0 | 1 | If you're using windows with kivy's portable package, I think you can get a shell with kivy's env by running the kivy executable. Assuming so, I think you can run pip install requests in this shell to install it to kivy's environment.
Edit: I see you've now noted you are using OS X, but something similar may be true. I... | 0 | 1,389 | 0 | 2 | 2015-07-02T10:57:00.000 | python,kivy | Importing libraries in Kivy | 1 | 1 | 2 | 31,183,217 | 1 |
0 | 0 | This question is distilled from the original application involving callback functions for Tkinter buttons. This is one line that illustrates the behavior.
lambdas = [lambda: i for i in range(3)]
if you then try invoking the lambda functions generated:
lambdas[0](), lambdas[1]() and lambdas[2]() all return 2.
The desir... | false | 31,186,959 | -0.099668 | 0 | 0 | -2 | Ahhh, further Googling found a solution (admittedly one I would not have stumbled upon myself). The desired behavior can be invoked by use of a default argument:
lambdas = [lambda i=i: i for i in range(3)] | 1 | 1,153 | 0 | 4 | 2015-07-02T14:13:00.000 | python,python-2.7,lambda,list-comprehension | How to generate a list of different lambda functions with list comprehension? | 0 | 1 | 4 | 31,187,126 | 1 |
0 | 0 | I have a C# Application and I want to run python script by passing some arguments and i also want to return some values from python. should i make a .dll file of my python script ? or is there any other way.
I can't use ironpython because i am unable to import my python project libraries in ironpython
thanks | false | 31,211,941 | 0.099668 | 1 | 0 | 1 | Convert your Python script to executable using py2exe.exe, and call it from C# using Process.
Another way is to execute cmd command "python program.py" from your C# program. But, you've to make sure that environment variable for Python is set. | 1 | 339 | 0 | 2 | 2015-07-03T17:37:00.000 | c#,python | Executing Python Script from C# (ironPython is not an option) | 0 | 1 | 2 | 31,212,458 | 1 |
0 | 0 | I have a design question. I'm doing an exercise in python (2.7) which is a simple game with a labyrinth. I need to read an write from a specific file every step of the game.
Currently I have 2 classes (Game and Labyrinth). The Labyrinth class is responsible for reading and writing the file.
My question is, is it ok to ... | true | 31,243,476 | 1.2 | 0 | 0 | 1 | You are at the design phase.
So, you have to weigh the chances of losing your data due to some error or crash against the importance of your data and the cost of "protecting" it.
Using with protects you from some errors. If you consider that python itself may crash (e.g.), then you still have some risk. Saving after e... | 1 | 62 | 0 | 1 | 2015-07-06T10:27:00.000 | python,file,oop | Working with files in an object | 0 | 1 | 2 | 31,244,797 | 1 |
0 | 0 | I'm trying to count the number of distinct colors in an image using img.getcolors(). However, this does not distinguish between transparent and black pixels - they both report as one pixel colored [0,0,0].
How can I distinguish between transparent and black pixels? Many of the images I need to process are largely black... | false | 31,279,936 | 0 | 0 | 0 | 0 | Embarrassing answer:
I was using convert('RGB') before calling getcolors(). Without the conversion, a 4-value tuple comes back with an alpha channel. | 0 | 421 | 0 | 0 | 2015-07-07T21:49:00.000 | python,png,python-imaging-library,transparent | PIL Image.getcolors() cannot distinguish between black and transparent? | 0 | 1 | 1 | 31,280,044 | 1 |
0 | 0 | I have code in python that integrates c++ code using swig.
The c++ class has a field with the long value 1393685280 which is converted to python.
The problem is that when calling the getter of this field from python I get the int value -2901282016 instead.
How can I fix it?
Thanks | false | 31,314,526 | 0 | 1 | 0 | 0 | Well, sorry to give everyone the run-around on this one.
We found the solution and it's completely unrelated to SWIG.
Problem emanated from the ODBC driver for the Vertica DB we were using which behaved unpredictably when using a long variable to bind the SQL result to.
Tomer and Inbal | 0 | 103 | 0 | 0 | 2015-07-09T10:15:00.000 | python,type-conversion,swig | swig converts a positive long to negative int | 0 | 1 | 1 | 31,378,499 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.