15,181 Topics

Member Avatar for
Member Avatar for gwarguy

Howdy, hoping I can get alittle help today. First off I have a real bad habit of learning one thing, and getting very fascinated by it and going off on a tangent using what i learned in as many ways as I can think of. Im a very new person …

Member Avatar for linux
0
154
Member Avatar for StepIre

Hi Guys, Im having trouble with my prog.. basically i have a file with lots of details in it. I want to find every time the file says for example "blah" Than i want to find the next occurence of "notblah" and i want to use the information between these …

Member Avatar for ZZucker
0
80
Member Avatar for mcenley

Hi friends, I am trying to write a histogram function in Python. This is what I have managed so far: [code=Python] def histogram(s): d={} for c in s: if c not in d: d[c]=1 else: d[c]+=1 return d h=histogram('brontosaurus') print h [/code] However, I want to use the get() function …

Member Avatar for mcenley
0
156
Member Avatar for gwarguy

Howdy, Im a beginner to programing and Ive chosen python as my first language to learn. I have recently completed my first "non-tutorial" code. I wrote a book modeled after the old "Choose Your Own Adventure" books. When ran it asks for your name, and puts you into the story, …

Member Avatar for sinkingships7
0
91
Member Avatar for xRuP7uR3x

Greetings once more. I have been working on a script to convert a user provided number in basetwo and convert it to baseten. What I've got so far: [code=python] myinput = raw_input("Enter a binary real number: ") (myint, myfrac) = myinput.split(".") x = int(myint[0]) y = 0 t = len(myint) …

Member Avatar for woooee
0
120
Member Avatar for random7

I have a question about reading array from file. I wrote some array at file like below. file name: xy0.dat [2, 4, 6] [4, 8, 12] ... ... Now, I want to read this array(not string) at my original file. I want to define x0[0] = [2,4,6] and x0[1] = …

Member Avatar for vegaseat
0
2K
Member Avatar for aot

I'd like to be able to make a slider widget without the knob that users can click and drag -- that is, I want the user to simply click somewhere on an empty slider and *then* have the knob appear where clicked. Is this possible with either Tkinter or wxPython? …

Member Avatar for Ene Uran
0
261
Member Avatar for 1337455 10534

I need to convert .docx files to .doc (on Linux and Windows). I'm planning to use the zip mod to access all of the internal XML documents. Then I'll the /word/document.xml and I need to parse it so that it will read all of the text in the tags, place …

Member Avatar for 1337455 10534
0
136
Member Avatar for lucym

Hello, I want to add the 'did you mean' feature (like on Google) on my shareware site, where a lot of users have mistypes, and they get 0 results... so they exit the site very fast. Do you have any idea how I could implement such a thing? Does it …

Member Avatar for BearofNH
0
107
Member Avatar for rmurphy1061

I am having a problem reading a date format in a file I am trying to count the difference between two dates. the format I have is 010108. I tried to break up the date mmddyy but have run into other errors. [CODE=python]import datetime as dt # US format month/day/year …

Member Avatar for vegaseat
0
126
Member Avatar for knish

Hi, The following works. import maya.cmds as cmds def importImage( fileName, fileType): cmds.file( fileName, i=True ); return 1 cmds.fileBrowserDialog( m=0, fc='python("importImage")', ft='image', an='Import_Image', om='Import' ) However in the following situation it does not work. The error is ================================================== ==== Cannot find procedure "importImage". Start of trace: (command window: line 1). …

0
63
Member Avatar for Mike W

I'm currently writing a set of small scripts for a web page. I've retrieved the GET variables using cgi.parse_qs and the query string, but can't figure out how to access the POST variables. I know you can use FieldStorage to access both GET and POST variables, but would like to …

0
54
Member Avatar for papaJ

Hi, I'm writing in python for s60 (nokia cell.) and working with Canvas and Image, while i'm moving through the image using: [CODE]canvas.blit(image, source=((sourceLocX, self.sourceLocY), (sourceLocX+ canvas.size[0], sourceLocY+self.canvas.size[1])))[/CODE] i can't seems to zoom in/out, I looked into Image and Canvas documentation and still don't understand how to do that... anyone …

Member Avatar for papaJ
0
97
Member Avatar for petersrin

I am very new to programming in general, and of course, it follows: to Python. Yet, I am in desperate need of a particular database program, and I am attempting to write it via objects, since I need to learn the ways of OOP anyway. I am currently trying to …

Member Avatar for petersrin
0
145
Member Avatar for StepIre

Hi All, I am writing a little program that i should be able to get working i think! basically i have this file full of content and i want to search it for a list of words. And add to a score variable each time i find a word [CODE] …

Member Avatar for woooee
0
87
Member Avatar for izzybitsie

my Python program retrieves an html doc containing a link that looks like: [href="" onclick="return somefunc('someid')"] where somefunc is embedded in the html doc downloaded How can my program "click" in such link and get the new html doc.? Tx

Member Avatar for jrcagle
0
43
Member Avatar for alivip

when I wont to inser (anyting I print) to the textbox it will not inser it just print then hanging [CODE]# a look at the Tkinter Text widget # use ctrl+c to copy, ctrl+x to cut selected text, # ctrl+v to paste, and ctrl+/ to select all # count words …

Member Avatar for jrcagle
0
696
Member Avatar for fongoos

I am very new to both programming and Pyhton and while trying to do some practice using A byte of python an Error pops up on the IDLE shell. I am using windows XP. PLease see below. [code=python]number = 30 guess == int(raw_input("enter an integer:")) if guess == number: print …

Member Avatar for 1337455 10534
0
495
Member Avatar for rysin
Member Avatar for rysin

During my quest to learn pygame I came across a tutorial that was really helping me through. However I came across a piece of code that has confused me. Being that this tutorial has a very vague explanation on each of the snippets, I need someone to explain this to …

Member Avatar for Ene Uran
0
140
Member Avatar for aot

I was wondering if it's possible to show videos via a python GUI -- preferably quicktime videos, but any format would be a start. If it's not possible to play them from within the GUI, is it possible to at least have the person press a button that will automatically …

Member Avatar for linux
0
105
Member Avatar for Uncle_John

hey, is it possible to make a python program that could interact with internet, for example a program that could make a search on google. If it is possible then how could i do that?

Member Avatar for wwwalker
0
170
Member Avatar for rysin

If I have something like this [CODE] a = input("Number: ") b = 2 + a [/CODE] How do I make the answer of b the name of a file? Thanks!

Member Avatar for 1337455 10534
0
130
Member Avatar for rysin

Hey guys. Ive been coding python for about a year now, and yesterday my older brother,who has no experience in programming at all, asked me when I was going to start programming video games. Is there some sort of test I can take to see if im ready for this …

Member Avatar for 1337455 10534
0
159
Member Avatar for LarZ

Does anyone know how easy it is to automate a web browser using python? If so, can you point me in the direction of any basic examples of screen scraping and html manipulation using python I work with firefox LarZ

Member Avatar for 1337455 10534
0
113
Member Avatar for ah12345

I'm trying to write a client for this web service (see wsdl below), but anything I've tried so far doestn't work. With SOAPpy, I'm getting the following error: Traceback (most recent call last): File "<interactive input>", line 1, in ? File "C:\Python24\Lib\site-packages\SOAPpy\Client.py", line 470, in __call__ return self.__r_call(*args, **kw) File …

0
48
Member Avatar for strictlycustom

So below is my simple code for my simple program, now I have to "Use 2 functions for this program in addition to the main program. The first function should ask for the hours and returns them to the main program. The second function should receive the hours from the …

Member Avatar for vegaseat
0
93
Member Avatar for scru

Is there a way to find out the IP addresses of all the computers on the subnet my script is running on?

Member Avatar for BearofNH
0
59
Member Avatar for alivip

I integrat program to be GUI using Tkinter I try browser direction as you can see [CODE]# a look at the Tkinter Text widget # use ctrl+c to copy, ctrl+x to cut selected text, # ctrl+v to paste, and ctrl+/ to select all # count words in a text and …

Member Avatar for alivip
0
450
Member Avatar for alivip
Member Avatar for 1337455 10534
0
61

The End.