15,175 Topics

Member Avatar for
Member Avatar for jeezcak3++

This is a program to extract/compile car NAV .KWI extensions. Unfortunately, I do not know anything about Python though I will love to learn some time very soon. Could you help me compile this into an executable file for windows 7? Will be reatly appreciated. [CODE]#!/usr/bin/env python # # kiwi …

Member Avatar for vegaseat
0
620
Member Avatar for Joey7

Hello, I have to count the number of words in a .txt file. Here is my program so far [CODE]import string ofile=open(raw_input("Please enter the name of a text file :")) s=ofile.readlines() print s word_freq={} word_list=string.split(s) for word in word_list: count=word_freq.get(string.lower(word),0) word_freq[string.lower(word)]=count+1 keys=word_freq.keys() keys.sort() for word in keys: print word,word_freq[word][/CODE] As …

Member Avatar for vegaseat
0
134
Member Avatar for caribedude

Hi, I'm very new to Python and programing in general and wanted to learn how to use the py2exe module. I think I've done the setup alright but I get an error message. Everything runs along smoothly until it start to make the dist folder. When it begins to make …

Member Avatar for patratacus
0
2K
Member Avatar for hemant_rajput

Hi, i've both pyhon 2.7 and python 3.2 installed on my windows PC. I downloaded and installed the module BeautifulSoup but it got installed only in python 2.7 how can i installed this also in python 3.2.

Member Avatar for Gribouillis
0
245
Member Avatar for eikonal

I've got a problem trying to replace keys (dictionary) that I have in a file, with its corresponding values. More details: an input file called event_from_picks looks like: EVENT2593 EVENT2594 EVENT2595 EVENT41025 EVENT2646 EVENT2649 Also, my dictionary, created by reloc_event_coords_dic() looks like: {'EVENT23595': ['36.9828 -34.0538 138.1554'], 'EVENT2594': ['41.2669 -33.0179 139.2269'], …

Member Avatar for woooee
0
360
Member Avatar for vegaseat

I am still trying to take a look at the gtk GUI package and reinstalled the following: gtk-win32-devel-2.8.6-rc3.exe and pygtk-2.8.2-1.win32-py2.4.exe (updated version) I have it down to a simpler error message now. Here are my warnings and errors with the sample file base.py [code]Traceback (most recent call last): File "D:/Python24/Atest/Demo/pyGTK/base.py", …

Member Avatar for vegaseat
0
294
Member Avatar for Tomie

I started taking a "introduction to programming" class a month ago, and the introductory language we are using is Python. Because I have never programmed before and only have a month's worth of experience with Python, please forgive my mistakes. So basically, here's the prerequisites to the "Piglatin Translator" assignment …

Member Avatar for woooee
0
853
Member Avatar for Azmah

I'm looking at learning Ruby (including Ruby On Rails) or Python (Including any of its frameworks - though which is better?). What are the pros/cons of each? Thanks in advance.

Member Avatar for Azmah
0
186
Member Avatar for huntaz556

i have things in a text file an index of movies that one owns and can add more but when i want to add a new one but when i have it print the line of a text file it just does this. i k o g n how can …

0
102
Member Avatar for madtowneast

I have been trying to figure out how to associate data with the event of checkbox being checked. The problem is that my data is stuck in a 5 keys deep dictionary (dict{dict{dict{dict{dict{}}}}}). I have tried crawling through the parents and getting their labels since they are created from the …

Member Avatar for woooee
0
359
Member Avatar for sofia85

Hi, I'm trying to execute an if loop inside a program to extract some values. But I only want to extract them if the following is true, [CODE]if ((letter in lines) == (letters in data)) and ((nr in lines) == (nr in data)) dt = a*c outfile.write(dt + '\n') elif …

Member Avatar for woooee
0
96
Member Avatar for pelin

i need to write a function changeName(name) that takes a string value as an argument. where name is in the form last,first,middle. the function should return a string that has the name in form fits,middle,last. [CODE][/CODE] name1 = input("Enter your name") def changeName(name): fields = name.split(",") return fields fields = …

Member Avatar for vegaseat
-1
91
Member Avatar for huntaz556

Hi everyone im making a program to keep track of your movies just keeping it simple ! but im having a problem i am writing what movies you have to a text file but i cant append to it every time i write to the text file it overwrites everything …

Member Avatar for TrustyTony
0
295
Member Avatar for as3g

Is there any way to shorten this function by way of an array, list or the like? I've tried various methods (no pun intended) but can't seem to make it work, I'm getting errors coming out the wazoo! I don't want the code, just point me in the right direction.[CODE]def …

Member Avatar for TrustyTony
0
89
Member Avatar for DoubleTapThat

Wrote this for my college open evening just to give prospective students a taste of python. added a little "information" section just to bulk it out a bit (this section is slightly messy i know). Not sure if it works in command line, definitely works in IDLE but the command …

Member Avatar for TrustyTony
0
316
Member Avatar for giancan

Hi guys, when I process some images (where apparently the dpi info is missing for python) I get a Keyerror: 'dpi'. Is there an easy way to capture this error or set the dpi to 72 if this info is not available? Thanks a lot

0
127
Member Avatar for beck4456

Hello, I'm working on a program that would print the prefixes of two user inputs if they matched. I'm thinking of this along the lines of if the value of the first character in a is = to the value of the first character in b, print the value. Next …

Member Avatar for TrustyTony
0
168
Member Avatar for just_starting

[CODE]def main(): distance, fuel = 0.0, 0.0 inStr = input ("Enter gallons and miles (with a space between):") while inStr != "": gallons,miles = inStr.split() gallons = eval(gallons) miles = eval(miles) print("MPG for this leg: {0:0.1f}".format(miles/gallons)) distance = distance + miles fuel = fuel + gallons inStr = input("Enter gallons …

Member Avatar for just_starting
0
164
Member Avatar for arson09

I'm really confused at the moment. I'm not looking for anyone to give me the answers, but if you could at least give hints on what i need to do in each method, i'll be happy!! FYI, one of the main things that's confusing me is that i'm not allowed …

Member Avatar for arson09
0
221
Member Avatar for graphicsgrl

I am new to python(version 3.2.11) and having some problems with this code...Please Help!! Here is the program I am supposed to write: Write a program which computes the fuel efficiency of a multi-leg journey. The program will prompt the user for the starting odometer reading and then for information …

Member Avatar for graphicsgrl
0
942
Member Avatar for ao_py

I have written a program that simulates volleyball using rally scoring. In rally scoring, the team that wins the rally wins the point, regardless of which team is serving (for this reason my program ignores the issue of who’s serving). Games are played to a score of 30 and must …

Member Avatar for Gribouillis
0
2K
Member Avatar for hemant_rajput

Hi, I need wrote a script which can go to particular site and download all the wallpaper or images available there. Can any one suggest me how to start with that. I never wrote python prog before but i know python. If anyone cn give me the direction it will …

Member Avatar for hemant_rajput
0
207
Member Avatar for sitmiller

I have a file with several lists of names with scores. Ex: Foo 3 4 5 4 3 80 90 40 I need to split the file and then make it so I can take the numbers and calculate averages, so the numbers need to not be seen by Python …

Member Avatar for woooee
0
200
Member Avatar for pelin

Jack loves to do jumping jacks. Create a simulation of Jack consisting of a stick figure and three buttons: start, stop, and quit. If the user clicks the start button, Jack begins jumping; if the user clicks the stop button, Jack stops jumping; if the user clicks the quit button, …

Member Avatar for pelin
0
463
Member Avatar for imperialguy

I want to create an ultimate list ctrl based table where the user can sort the columns by clicking on the column header. Here's the code I attempted: [CODE]import wx import wx.lib.mixins.listctrl as listmix from wx.lib.agw import ultimatelistctrl as ULC APPNAME='Sortable Ultimate List Ctrl' APPVERSION='1.0' MAIN_WIDTH=300 MAIN_HEIGHT=300 musicdata = { …

Member Avatar for woooee
0
484
Member Avatar for algrandjean1

I am having a little trouble ending my program when I click on my End Program button. The current code that I have keeps making the program freeze when I try to exiting via the button. Also, I am having some issues with my Auto Button not working. Any help …

Member Avatar for woooee
0
169
Member Avatar for peste19

I made a function which will look up ages in dictionary and give out there name my dictionary si for example {george:16,amber:19} i made this [CODE] search_age = raw_input("Provide age") for age in list.values(): if age == search_age: name = list[age] print name[/CODE] but i know how to compare and …

Member Avatar for woooee
0
97
Member Avatar for huntaz556

I know this thread has been done alot but i cant find anything that i think i would like to do i want to make a program in python i have a pretty basic understanding of python and i really like it but i want to make somthing thats going …

Member Avatar for huntaz556
0
343
Member Avatar for Creatinas

Hello, i need some help with code, i need to be able to print something that function returns then i press button on panel1 it should return text to panel2 textctrl in wxpython. Here is some bit of code.(i just cut code that i think is needed for this) [CODE] …

Member Avatar for Creatinas
0
154
Member Avatar for eikonal

Hi guys! Pretty easy question below From the code below 'data' is made by a column of numbers, let's say 12 numbers (see below) 56.71739 56.67950 56.65762 56.63320 56.61648 56.60323 56.63215 56.74365 56.98378 57.34681 57.78903 58.27959 [CODE]def block_generator(): with open ('test', 'r') as lines: data = lines.readlines ()[5::] for line …

Member Avatar for eikonal
0
180

The End.