15,185 Topics
| |
I am new to programming and have been reading a few books on Pyhton but can't seem to grasp what I believe is probably a simple process. I need someone to show me briefly a sample script that would allow me to open a CSV file and edit it line … | |
I have a simple script to POST a pdf to a server. It works great when I use Ubuntu to run it. However, when I run it in Windows, I get this error: Error: <urlopen error [Errno 10035] A non-blocking socket operation could not be completed immeditately> Could this be … | |
I am having a lot of trouble sorting an array. The array contains 140 inner arrays of 3 points (x y z). I would like to sort all arrays based on lowest x coordinate to the highest. I have googled many methods and none of them have worked so far. … | |
i'm reading a an excel file with xlrd. When i'm running the code a warning pops up: 'WARNING *** format u'"*"' produces constant result ' I think that u'"*"' stands for unicode, is that correct? But what does 'produces constant result' mean and what implications can it have? Thanks | |
What's Up? So, In my first python script, If a button is pressed, Then it defines a variable called var, With the content of "0" and then sends it over the net to another python script, And here's the problem. When it comes to receiving the content of var. [code]var … | |
Hi folks: Once again, working w/Python in Maya, a 3D animation app. I'm using a potentially time-consuming procedure to generate a list of commands, and I want to store the list in the Maya file. The best solution I can think of is to convert the list to a string, … | |
Hi all, I have used some forum browsing and the WxDemo to create my desired GUI and struggling to find some good reference material to add functionality to my design. This GUI will ideally pull / send information to other programs (in python and/or c) in the future but for … | |
I study manual "Think Python: How to Think Like a Computer Scientist by Allen B. Downey, Version 1.1.22, chapter 13, 13.6 Dictionary subtraction. There is an exercise 6. I did it by not using set types. The result will be the same? Pls can you show me how to use … | |
Hi all , How can I get the number of MissedCalls and Unread SMS'. EX :Reminder: You have received 6 MissedCalls and 2 Unread SMS'. And ofcourse I'm not talking about all calls that I didn't answer and loged in log. How can I get the numbers and time for … | |
Hi all , I got some questions about wrapping my applicatio so it can work when I hand it out to the user : First : How can I have an icon that appears in "Installed" folder and in the top of my application window instead of Python Icon ?? … | |
Hi everybody, New adventure question: if you know how macros act in C, is there such a behavior in C? Basically the most important feature I'm looking for is similar to this: [CODE] #define MY_C_MACRO(x) {if (x>0) x++; else return} [/CODE] Such a macro would cause the function where it … | |
Hi there, I have a simple piece of software written up that I'm running off the terminal's command line interface. Very recently, it was asked of me to create a GUI for it. So I basically made one to reflect how I would use the software but I actually haven't … | |
Hi all, I just want to know if it is possible to add a background image in text widget Thanks ps: I got python version 2.4.4 | |
Hello I am new to python. I am looking for resources with good examples for learning python. I need python for data processing. thanks | |
Hey guys, new here. Decided to start learning Python and this community looks like a perfect place to learn with the help of others. A bit of a forum-related problem at the moment though, when the browser is loading "ad.amgdgt.com" it takes about 4 minutes to load each time I … | |
Hi people, the title says it all: The user manual of my program is an HTML document, and I want the OS's default browser to open it directly once the user clics on help. The function that the help menu entry invokes is this: [CODE=python]os.popen("/usr/local/firefox/firefox ./html/index.html")[/CODE] Now this only works … | |
Hello, I've been looking for this here but haven't been able to find an answer that fits my case: I have a tkinter GUI consisting in a button and a Text (a textbox). You write the whole text in the textbox, then press the button and it uses the get() … | |
Need help to code a program which: - validate user input, accept values that a user has entered (ex, a, b, c, d, e) - any other values other than these are to be treated invalid with a message and block it from processing. - Prompt the user to enter … | |
| I'm trying to import a module that checks an .ini config file for correct syntax (via regex patterns). If the syntax is wrong, I want the main code to crash (and hopefully log the error, too). I need some guidance on how I should do this. My current approach doesn't … |
Hi there everyone. I'm new to Python, and i'm programming a game application, using pyOpenGL. The thing is, the program crashes and exits when i push a key (but i don't want (at least for now) help for that), but i wish i could see the error that appears on … | |
The question is simple: I have two scrolled text widgets (I'm using tkinter and python 3.x), and I want to synchronize them, that is I want both scrollbars to move at the same time when the user moves the mouse wheel. Both widgets are suppossed to contain the same text, … | |
I am attempting to design and implement a horse race game, but I keep getting lost in the while loops and if statement in the horse selection and wager prompt. Would someone please help me get passed this problem? Thanks. [CODE]print ("It's a beautiful day out here folks. A fine … | |
Hi, I'm getting some errors when compiling Python 2.6.5 on MInGW with gcc 4.5.0. I'm getting these errors: [icode]gcc -c -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototyp es -I. -IInclude -I../Include -DPy_BUILD_CORE -o Python/thread.o ../Pyth on/thread.c In file included from ../Python/thread.c:121:0: ../Python/thread_pthread.h: In function 'PyThread_start_new_thread': ../Python/thread_pthread.h:200:2: error: aggregate value used … | |
Hi, I have a very simple question: first of all, my code: [CODE=python] import os def test(): x = "Linux" y = "Windows" if os.name == "posix": print(x) if os.name == "nt": print(y) else: print("there is a problem") [/CODE] Run that code on Linux (don't know about windows) and it'll … | |
Hi, I have a minor quesion today: can somebody tell me how to change basic style options for buttons using ttk. I'd like my buttons and entry fields to have rounded corners. I know this is possible but documentation on ttk (for python) seems to be inexistent on the Web. … | |
I can't determine how to randomly list horses as they cross various parts of the track. Will someone please point me in the write direction? [CODE]if bet > 1: #starts the race, if bet when bet is placed print (""" Here come the horses now, folks. They're being loaded into … | |
Hi, I've tried searching around for other problems similar to mine, and I was unable to find any. I seem to not be able to "color" text in a TextCtrl widget on Windows, but I can on Linux. I have a little screenshot and some code to show this: [URL="http://i189.photobucket.com/albums/z266/Capn_Soul/WinLinuxDifference.jpg"]Screenshot[/URL] … | |
Hi, I'm trying to color some text with wxPython but I am having some trouble. I am using the SetStyle method of the TextCtrl widget. My problem is that the coloring works perfectly on Linux but does not under Windows. My script basically gives a vocabulary test, and if you … | |
In the following program I have a few questions. [B]results.txt[/B] Johnny 8.65 Juan 9.12 Joseph 8.45 Stacey 7.81 Aideen 8.05 Zack 7.21 Aaron 8.31 [CODE]scores = {} result_f = open("results.txt") for line in result_f: (name, score) = line.split() scores[score] = name result_f.close() print("The toop scores were:") for each_score in sorted(scores.keys(), … | |
[CODE]line = "101;johnny 'wave-boy' Jones;USA;8.32;Fish;21" s = {} (s['id'], s['name'], s['country'], s['average'], s['board'], s['age']) = line.split(";") # above, why is "s" and the end of the key list surrounded by parenthesis? print("ID: " + s['id']) print("Name: " + s['name']) print("Country " + s['country']) print("Average " + s['average']) print("Board type: " … |
The End.