15,185 Topics

Member Avatar for
Member Avatar for lstensland

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 …

Member Avatar for lstensland
0
440
Member Avatar for foco

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 …

0
64
Member Avatar for Pineapplesf

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. …

Member Avatar for vegaseat
0
13K
Member Avatar for daanh

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

Member Avatar for Gribouillis
0
131
Member Avatar for Syphilis

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 …

Member Avatar for Syphilis
0
138
Member Avatar for pixeldroid

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, …

Member Avatar for pixeldroid
0
172
Member Avatar for onizuka1

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 …

Member Avatar for onizuka1
0
385
Member Avatar for vlady

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 …

Member Avatar for vlady
0
78
Member Avatar for MrAlshahawy

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 …

Member Avatar for Beat_Slayer
0
91
Member Avatar for MrAlshahawy

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 ?? …

Member Avatar for Beat_Slayer
0
96
Member Avatar for tzushky

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 …

Member Avatar for tzushky
0
268
Member Avatar for Chupakun

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 …

Member Avatar for Chupakun
0
1K
Member Avatar for zjjca

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

0
26
Member Avatar for evaristegalois

Hello I am new to python. I am looking for resources with good examples for learning python. I need python for data processing. thanks

Member Avatar for SgtMe
0
35
Member Avatar for Pinchanzee

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 …

Member Avatar for Pinchanzee
0
93
Member Avatar for G_S

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 …

Member Avatar for G_S
0
4K
Member Avatar for G_S

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() …

Member Avatar for G_S
0
103
Member Avatar for ic_m

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 …

Member Avatar for baki100
0
182
Member Avatar for cyon

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 …

Member Avatar for TrustyTony
0
373
Member Avatar for jinjonBoo

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 …

Member Avatar for Tech B
0
342
Member Avatar for G_S

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, …

Member Avatar for SoulMazer
0
456
Member Avatar for radioflyer1

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 …

Member Avatar for radioflyer1
0
195
Member Avatar for jamesl22

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 …

Member Avatar for jcao219
0
181
Member Avatar for G_S

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 …

Member Avatar for G_S
0
144
Member Avatar for G_S

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. …

Member Avatar for G_S
0
9K
Member Avatar for radioflyer1

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 …

Member Avatar for griswolf
0
152
Member Avatar for SoulMazer

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] …

Member Avatar for SoulMazer
0
812
Member Avatar for SoulMazer

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 …

Member Avatar for vegaseat
0
145
Member Avatar for lewashby

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(), …

Member Avatar for vegaseat
0
94
Member Avatar for lewashby

[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: " …

Member Avatar for snippsat
0
157

The End.