15,175 Topics

Member Avatar for
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
155
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
80
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
197
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
322
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
Member Avatar for Edwards8

I'm trying to figure out how to input metadata into a tiff file, and my general web searches are just confusing me. Is there anyone that can point me in the right direction? I'm essentially trying to pull data from an excel file and use that as the metadata for …

Member Avatar for Edwards8
0
157
Member Avatar for vatocleti

Hey all, I'm new at programming with Python and thru reading different documentation, I built a small program (handler), that I want to accept calls from other scripts to log to file and console, depending on the level passed in. I'm able to get the error message to show up …

Member Avatar for bumsfeld
0
993
Member Avatar for majestic0110

Hi all, hope you are well. Just a quick one here that you pythons will be able to answer in no time (I am new with python). What I am trying to do is read a text file and print only the first and last line of that file. Any …

Member Avatar for majestic0110
0
3K
Member Avatar for Mr NiceGuy

Hi all, Im new to python and I need some help. I have tried to get this piece of code to work for quite some time now. I finally made it work by using two while-loops. [INDENT][B]THE PROBLEM[/B][/INDENT] What I really wanted to do at the first place was to …

Member Avatar for SUBHABRATAIISC
0
107
Member Avatar for ChrisP_Buffalo

I'm trying to automate a series of find/replace actions. I have an input file containing a large list of stemmed verb forms like this: apolog apologis becam apologis apologis apologis apologis becom becom aris arisen arisen I want to change every "apologis" to "apolog", every "arisen" to "aris" and so …

Member Avatar for ChrisP_Buffalo
0
93
Member Avatar for Deooptimomaximo

Hi there, This is a part of a project that i am doing.... the thing is that i want to link MS Excel with internet explorer in a manner such that whenever any page on the explorer opens it highlights the words that are present in the excel sheet.. I …

-1
55
Member Avatar for heshan

Hi, I have written a the following python code to analyse a function or a method. I am having a script which is having a python function (add) and a class (MyClass) with a method (multiply).When I analyse it using the following method(analyze_func) , I get an output like below. …

Member Avatar for BearofNH
0
232
Member Avatar for fredomondi

could anyone please tell me if pyTTS module is available in python version 1.4.0 3rd edition

Member Avatar for linux
0
97
Member Avatar for Tobias

Ok, I have been given this problem to code a solution with python Problem Definition The N.S.W. Bird Watching Library sends a reminder notice to its borrowers when it is found that a borrower has failed to return a book by the due date. It is possible that a borrower …

Member Avatar for Tobias
0
95
Member Avatar for crackers

Im writing a game of scissors paper rock and have come up with this so far, but i cant get it to work. any idea's where ive gone wrong. print \ ''' a - Rock b - Paper c - Scissors ''' choice1 = raw_input("Choice: ") print if choice1 == …

Member Avatar for ZZucker
0
140
Member Avatar for unzzi

I have been looking for a good plugin system for a while. I've found a few but they don't exactly match my needs. I wouldn't want to go ahead and reinvent the wheel (I'm sure someone has already done what I need). What I'm looking for: Plugin system that lets …

0
42
Member Avatar for patrick91

hello I've this python code: [CODE=python]import wx class MyFrame(wx.Frame): def __init__(self, parent=None, id=-1, title=None): wx.Frame.__init__(self, parent, id, title) self.panel_1 = wx.Panel(self, -1) self.panel_1.Bind(wx.EVT_PAINT, self.on_paint) self.image = wx.Image('foto.jpg') # Menu Bar self.frame_1_menubar = wx.MenuBar() self.File = wx.Menu() self.Test = wx.MenuItem(self.File, wx.NewId(), "Test", "", wx.ITEM_NORMAL) self.File.AppendItem(self.Test) self.frame_1_menubar.Append(self.File, "File") self.SetMenuBar(self.frame_1_menubar) # Menu Bar …

Member Avatar for patrick91
0
219
Member Avatar for oldSoftDev

hi I am a beginner python user studying python is fun and i have learned many thing now a days I am working on a program to find prime numbers and non prime number in a list generated by range function. i am done with my work the problem is …

Member Avatar for jrcagle
0
98
Member Avatar for roulette843

I want to create a method in Python that will read all of the text on a webpage and put it into a text file. Eventually I will have it distinguish between hyperlinks by having it exclude lines in the text containing href="....." Any help would be greatly appreciated.

Member Avatar for vegaseat
0
3K
Member Avatar for Chunkymonkey

Hi everyone, I'm new to daniweb and seems cool there are alot of nice helpful people on here. With my dad we are trying to script a simple poker game on python(and tkinter). There are 4 players ( 1 real and 3 artificiel intelligence players), each AI should be able …

Member Avatar for Chunkymonkey
0
178

The End.