15,175 Topics

Member Avatar for
Member Avatar for lordluke_80

hi everyone. hi have a template with a form and many inputs that pass some data trough a POST request to a view, that process them and send the result to another template. in the final template, if i use the browser back button to jump to the first view, …

0
202
Member Avatar for python-noob

I am relatively new to python and am having a hard time with an assignment. We just started using dictionaries and I can't quite grasp what is going on. I am just having trouble figuring out where to even start exactly. This is the code my teacher gave me and …

Member Avatar for TrustyTony
0
2K
Member Avatar for pelin

the question is a year is a leap if it is divisible by 4, unless it is a century year that is not devisible by 400. write a program that calculates whether a year is a leap or not [CODE][/CODE] def main(): year = eval(input("Enter a year")) if year/4 and …

Member Avatar for pelin
0
119
Member Avatar for mjohnson

I need to write censor program that 1-reads in the text from a file 2-creates a new file where all the four-letter words have been replaced by “****”. can you help? this what I have so far [CODE]import string def main(): filename = raw_input("File: ") text = open(filename,'r').read() text = …

Member Avatar for mjohnson
0
469
Member Avatar for sofia85

I'm a beginner at python programming and now I want to try to write a function consisting of my already written programs. The goal is to get all probabilities when I'm calling on the function in the main program. My already separately written programs looks something likes this and the …

Member Avatar for Gribouillis
0
191
Member Avatar for fatalaccidents

Hey guys, This is a quick formatting question that I'm having trouble with. I'm trying to create columns of numbers, but I want the columns to only be as large as the largest number in that column. I was trying to use format() width, but that is creating a width …

Member Avatar for fatalaccidents
0
167
Member Avatar for bigredaltoid

Hi guys, first off just wanted to say that this website has been immensely helpful to me for my programming class. I asked a question to help with a lab a couple of weeks ago and was able to figure out the issue with the forums help, so thank you. …

Member Avatar for TrustyTony
0
2K
Member Avatar for Ice_Occultism

Hey, I'm on the rookie side, to Python, and Pygame and new to this community, and I'm confused if this could be possible; I want to change the data type of a list, in Python, from strings to integer (they have to be integer, because I need to sort them …

Member Avatar for Ice_Occultism
0
345
Member Avatar for ChristianOncken

[code] # -*- coding: utf-8 -*- #diretorios de imagens alldir = ("C:\\Users\juridico.anoreg\Desktop\OFICIOS-ANOREG\imagem\\") # from tkinter import * from tkinter.filedialog import * import sys import tkinter import time import math import datetime import os import subprocess import tkinter.messagebox import calendar as cd from tkinter import * import webbrowser import tkinter.font class …

Member Avatar for ChristianOncken
0
319
Member Avatar for abhik1368

I have a sort of csv file which looks likes given below i want to count number of digits in each line like number of 0's ,1 s in each line and print them this way for each line i want to print information in csv file . 0 0 …

Member Avatar for Gribouillis
0
136
Member Avatar for Cyl11

I want to write a simple program for burning calories, but I haven't used python in so long I could use some aid. The basic formula is this =0.0201*EXP(0.107*G3)*71*(F3*24*60) Where: 71 is my weight in kg G3 is speed in MPH F3 is time in days I'm not sure if …

Member Avatar for TrustyTony
0
87
Member Avatar for DarkFeather

I just recently started using Python and I was wondering if there was a way to increase a value in a list.

Member Avatar for DarkFeather
0
44
Member Avatar for Sprewell184

Hi there. For some reason I am struggling with this problem. The purpose of this problem is to take an existing .py file and change it so instead of writing to a screen, it has to be written to an output file. The output file will be a csv file. …

Member Avatar for snippsat
0
275
Member Avatar for pelin

HOW CAN I WRITE A PROGRAM THAT CALCULATES THE FIRST N NATURAL NUMBERS THAT USER ENTERS. I SHOULD USE FUNCTIONS. n = eval(input("Enter the value of n: ")) def sumN(n): for i in range(n): sum = n+i return sum sum = sumN(n) THIS IS WHAT I DID SO FAR. THANKSSS

Member Avatar for pelin
-1
135
Member Avatar for felix001

What is the best way to print columns within python. Each of the values that I will be printing will be anything from 1 to 8 characters long. I had found this but wondered if there was any other methods... [url]http://www.daniweb.com/software-development/python/threads/202023[/url] Thanks,

Member Avatar for felix001
0
323
Member Avatar for felix001

Does anyone know how I can base my re condition based on it not finding a match. I have the following at the moment ..... [CODE]if re.search(r'123', os.uname()[1]):[/CODE]

Member Avatar for felix001
0
87
Member Avatar for Sprewell184

Hey everyone, I need help to figure out how to input while loop in here. I have this program where it converts from Fahrenheit to Celsius or Celsius to Fahrenheit. The purpose is to convert this program so that it repeats the calculation as long as the user wants. After …

Member Avatar for Sprewell184
0
260
Member Avatar for Túrin

So I was running a simple python program in IDLE, and I got this subprocess error. I looked it up on Google, and found much information about it. None of it really got me anywhere. I think the error has to do with AVG blocking IP 127.0.0.1. (I am using …

Member Avatar for jaclynn
-1
3K
Member Avatar for algrandjean1

Hello all, I am a beginning python user and I am a bit perplexed by something that I am writing up. What I have to do is assign buttons to colors (Traffic lightesque). There is a red, a green and an auto. The tricky part is that the "auto" button …

Member Avatar for woooee
0
277
Member Avatar for madtowneast

Hi all, I have been trying to parse the a log file to plot some of the data in it. The format is something like this: [CODE]PyrateBufferManager: 2011-10-24 15:42:47.709684: CurrentAquiredBuffers: 0 ReturnBufferCount: 11527 CurrentAquiredBytes: 0 SimDataCollectorMonitor-00A: 2011-10-24 15:42:47.709684: SNProfile: {'SNLoop': 6133}[/CODE] I was trying to use regex, but didnt get …

Member Avatar for madtowneast
0
152
Member Avatar for Cireyoretihw

pyTony i learned lots from this code you used in resoponce to thread [url]http://www.daniweb.com/software-development/python/threads/384191[/url] i first mixed up the input and was supprised at the result which only printed last occurence of the key in the dictionary list... i did work out how to sort it first and reproduce your …

Member Avatar for Cireyoretihw
0
922
Member Avatar for magnum_vf

Hi folks, (Python 2.4.x - I cannot install any modules including dateutil) Here's what I have so far. [code] mydate=['20111025.00', '20111026.12'] start_time= time.strptime(mydate[0], "%Y%m%d.%H")[:5] end_time=time.strptime(mydate[1], "%Y%m%d.%H")[:5] for myhour in datespan(time.strptime(mydate[0], "%Y%m%d.%H")[:4], time.strptime(mydate[1], "%Y%m%d.%H")[:4], delta=datetime.timedelta(hours=1)): print myhour [/code] What I'm trying to do is take the two values in mydate list …

Member Avatar for magnum_vf
0
6K
Member Avatar for Gribouillis

This snippet composes functions of the form [icode]func(infile, outfile)[/icode] which read an input file and transform its content to write an output file. A function [icode]compose((f, g, h,...))[/icode] is defined which returns a new such file transformation function which successively applies f, g, h, using in-memory temporary files.

0
154
Member Avatar for hisan

How to create n number thread in python. i want iterate over the for loop and create a thread for iteration sample code for i in range(o,50): i want to create 50 thread here which call the same function. how start and stop each thread after completion .

Member Avatar for Gribouillis
0
254
Member Avatar for tpatel162

I am trying to complete an assignment for my beginner's computer science. I have to write a program that proves that every even number greater than four is the sum of two prime numbers. I prompt the user for the top end of the range (the lowest being four) and …

Member Avatar for woooee
0
316
Member Avatar for pandita

Hello, Everyone I am a beginner with Python, I have to design a simple GUI page which should have a login form, Need Help. Thanks in Advance

Member Avatar for Tech B
-1
89
Member Avatar for kkasp

I've searched all over, but Have not been able to find exactly what I need help on. I am creating a program that takes user input of a word and determines if it is a Palindrome or not....the catcher is I need to use stacks. They are confusing to me. …

Member Avatar for TrustyTony
0
1K
Member Avatar for Creatinas

Hello again, Can someone please help me learn some easy multiprocessing or threading :) I want to write a simple program that opens let say ~50-100 web page at a same time and write some HTML from those sites. What is better to use multiprocessing of threading? What different ? …

Member Avatar for Gribouillis
0
174
Member Avatar for Stefano Mtangoo

Hi, Is there tutorial somewhereto use Python with EWS? I'm trying to develop a program that will interact with Microsoft Exchange Server without using managed services Thanks

0
98
Member Avatar for dannyDaniweb

I'm trying to build the package for use in Maya. Maya comes with its own python installation so the .exe installer for this package doesn't work for me. the package is [URL="http://polygon.origo.ethz.ch/"]Polygon[/URL] I downloaded the zip. It contains: setup.py /src /Polygon and some other stuff In cygwin I run: ./mayapy.exe …

Member Avatar for dannyDaniweb
0
366

The End.