15,190 Topics

Member Avatar for
Member Avatar for wandie

Could someone please help. I would like to sort a multidimensional array. But to sort it out by one key which appears in all array for example. [code] total=[[serial,'john'],[[serial,'james']] [/code] all the records i have all in arrays they contain a "serial" i would like sort by serial. I have …

Member Avatar for PlagTag
0
257
Member Avatar for FreezeBlink

Recently I downloaded Ubuntu v8.04 (Hardy Heron), and was delighted to find Python pre-installed. However, that pleasant surprise was soon dampened by the fact that IDLE would not run, and so I am left without a decent program for coding in Python. gedit works, but lacks pretty much everything except …

Member Avatar for bumsfeld
0
180
Member Avatar for musturd

My script works perfectly now!!! :) This is my first script too!! The problem is that this code sucks. I hate to bash my own code, but it is really inefficient and I am sure that there is a better way to perform the brute force. Here is the code, …

Member Avatar for musturd
0
267
Member Avatar for tondeuse34

Hey guys....I've been doing Python for probably more than 4 months and i have gotten to the point saying to myself "What should i make?" and "How would i do that?" i just don't know where to go know and what to do. I am capable in many things in …

Member Avatar for tondeuse34
0
94
Member Avatar for wizard wusa
Member Avatar for happimani

Dear All, Iam Using python 2.3,i have pythonpath in environment variables,is it possible to rename Pythonpath because i have to use two path alternatively first is pythonpath and second is PythonPath1 any idea????????? regards Narain

Member Avatar for vegaseat
0
123
Member Avatar for bhagyaR

Hey, Can anyone please point me to a place where I can find all the modules so far developed for python. I am mainly looking for modules that can be used to update excel files. ping machines and send automatic mails though local mail client. Appreciate your help here! Thanks, …

Member Avatar for vegaseat
0
86
Member Avatar for micam
Member Avatar for Miyuki

SysFileTree() in REXX offers an easy way to work with all files (or subset) in a directory tree. For a summary of the function, see [URL="http://publib.boulder.ibm.com/infocenter/iadthelp/v6r0/index.jsp?topic=/com.ibm.etools.iseries.orxw.doc/orxw_ref614.htm"]http://publib.boulder.ibm.com/infocenter/iadthelp/v6r0/index.jsp?topic=/com.ibm.etools.iseries.orxw.doc/orxw_ref614.htm[/URL]. Which Python module offers similar function?

Member Avatar for jrcagle
0
71
Member Avatar for saskvach

for home work I have to write a small class that deals with something mathematical it has to have some loops... anyway if u could give me some ideas (not codes) for the theme of my classs anything that would have some loops and is not very complicated i did …

Member Avatar for saskvach
0
59
Member Avatar for sbrown2594

The code below is part of a simple craps game that I am writing for practice. I have the dice rolling down, but I can't get this betting command to work out. The only module that I am really interrested here is the bet1(x) module but I copied the entire …

Member Avatar for woooee
0
114
Member Avatar for enigmaenigma

Hello all. I have a txt file which has a number of links and i need to save this file as a .html page in my webserver.How do i append <html><body><title></title>'Content of the file'</body> </html> tags to the start and end of a file so that it is saved as …

Member Avatar for sneekula
0
82
Member Avatar for tondeuse34

Hey guys i'm new here, but i got the basics of python down and i'm having some problems with my code. All i want to do is be able to type in something and have it saved as a txt file, i have tryed numerous things and when i ran …

Member Avatar for tondeuse34
0
113
Member Avatar for bf2loser

Hi guys, I'm learning python right now, and I'm having a little trouble with one of my assignments. I have to write a program that will take a word and "encrypt" it. an example, if the letter is 'a' then it should get converted to 'b'. I have the code …

Member Avatar for bf2loser
0
106
Member Avatar for ChrisP_Buffalo

I'm trying to modify a find/replace script that I previously got help with here on Daniweb. The script below iterates through a file A and makes replacements defined in a csv file B. My original goal was to change any line in file A containing a search string (in whole …

Member Avatar for ChrisP_Buffalo
0
1K
Member Avatar for Archigos

Below is code that I'm using that essentially creates fake *.avi files and puts them in a directory structure so that they can be later added into a database. The whole purpose of this is to be able to index the files without the risk of screwing up the originals. …

0
32
Member Avatar for DoctorBob

Hello I'm trying to write a program that will wrap an ASD envelop to a trangle wave sound. I can't seem to get my trangle one to work. I did get my sine wave to work. What could I change to get it to do a trangle? [code] def asd(fileName,nSeconds,cyclesPerSecond,maxAmp): …

Member Avatar for sneekula
0
92
Member Avatar for pazoo

""" i am having a bit of trouble with my whoWins function and my menue. i can get all of my other functions to run from main but whoWins just doesnt seem to want to work no matter what i try.i am also unsure if the dictionaries etc for the …

Member Avatar for woooee
0
126
Member Avatar for problematiquee

[CODE] """ cow.py a fully animated cow sprite uses graphics from reiner's tile set cow walks towards the east """ import pygame pygame.init() class Cow(pygame.sprite.Sprite): def __init__(self, screen): self.screen = screen pygame.sprite.Sprite.__init__(self) self.image = pygame.image.load("sprites/Walking1.gif") self.image = self.image.convert() tranColor = self.image.get_at((1, 1)) self.image.set_colorkey(tranColor) self.rect = self.image.get_rect() self.rect.center = (320, 240) …

0
44
Member Avatar for pazoo

"""hi i am having heaps of trouble with calling my whoWins function from main. i can get all of my other functions to call ok from main, but am having trouble with this one for some reason. any help would be greatly apreciated. cheers joel""" import random Ascore = 0 …

Member Avatar for pazoo
0
117
Member Avatar for pazoo

I am having a bit of trouble with my whoWins function and my menue. i can get all of my other functions to run from main but whoWins just doesnt seem to want to work no matter what i try.i am also unsure if the dictionaries etc for the whoWins …

Member Avatar for pazoo
0
90
Member Avatar for P.Bateman

I am a total n00b to both programming and Python. I am working my way through "Python Programming for the Absolute Beginner" by Michael Dawson. On of the "challenges" given on page 87, chapter 3 is to create a Fortune cookie program. I can't get the code I want to …

Member Avatar for P.Bateman
0
156
Member Avatar for ChrisP_Buffalo

I have a file with a long list of English verbs and I have a set of search strings; now I want to search through the verbs to find any verb which contains any of the strings as a substring. For example, the verbs "forgotten" and "negotiate" both contain the …

Member Avatar for woooee
0
97
Member Avatar for Mackjan

Hi I have a function which rand digit between a and b. it maybe 2,3 or more digits. I want to save these digits in a list and then use them in another part of my program. How can I do it? [code] def dela(x): sum=0 while sum <x: b= …

Member Avatar for Mackjan
0
81
Member Avatar for urmybaby

1. Achilles and the Turtle (10 Points) Write a program that simulates a race between Achilles and the turtle. Here is an example run (the user input is underlined): Where does Achilles start? 0 How many feet is the turtle ahead? 100 How many feet does Achilles run per second? …

Member Avatar for BearofNH
0
199
Member Avatar for Edwards8

OK, here is a litting script I wrote (admittedly with some help from [URL="http://www.pythonware.com/library/tkinter/introduction/hello-again.htm"]http://www.pythonware.com/library/tkinter/introduction/hello-again.htm[/URL])that will allow me to cloak in with ease here at work. Only.... since I sometimes log into the computer multiple times in the day, I wanted to use Tkinter to give me a yes/no button. But.... …

Member Avatar for Edwards8
0
158
Member Avatar for swaroopk85

Hi All In perl we have something like www:mechanize to interact with web sites.Is there any equivalent one in python??? Can anyone help me in this regard??

0
69
Member Avatar for majestic0110

Hi all - hope you are well. I am trying to print out only the first 15 characters of each line of a text file. The trouble is I am not sure how I would go about doing such a thing! Any help will be greatly appreciated. Thank you for …

Member Avatar for majestic0110
0
325
Member Avatar for SUBHABRATAIISC

I am using a while loop like while a>0: a=a+1 a1=open("/python25/file1.txt","r+") a2=str(a) a3=a1.write(a2) It is storing only the last value of a, but how can I store any row or all the rows in file?

Member Avatar for SUBHABRATAIISC
0
63
Member Avatar for Mackjan

Hi I have an idea to rand some digit which sum is equal to my inputs digit. If I put in 12 then I like to have 4, 2, 6 or 4,4, 4 or 3, 3, 3, 3 …….etc. Not more and not lease then my input. In my function …

Member Avatar for Mackjan
0
100

The End.