15,185 Topics

Member Avatar for
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
255
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
317
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
Member Avatar for The_Tiger

Hi everyone, I really need help to make the below code calculate the numeric value for each name separately. for example: if i enter "Williams smith", it will calculate the first name and give its value alone and calculate the second name and give its value too. the code right …

Member Avatar for Tech B
0
121
Member Avatar for ohlermsu

I am in desperate need of help with a python 2.7 project I am working on. I am really struggling in the class and they messed up my tutoring appointment for tonight so I have no one to help me. I am doing a project that reads a .csv file …

Member Avatar for Stefano Mtangoo
0
214
Member Avatar for NickSchade

Dear, kind python experts, I'm quite new to this program having only started 2 days ago, but the program I want appears to be relatively simple and I've managed to copy most of the important code from other examples. In a nutshell, I want to 1) Open a txt file …

0
30
Member Avatar for effBlam

Im trying to change this modified blackjack game to where there is no computer. A choice of either two or three players is asked with three cards dealt instead. How can I i change this current code to 1) prompt user for either 2 or 3 players(no computer), 2) have …

Member Avatar for TrustyTony
0
212
Member Avatar for effBlam

Im having a main function issue. My program is a text analyzer of more than several lines and then input 'END' to stop taking input. It analyzes input text based on the chosen options 1 through 2, relooping for invalid choice. Im having an issue having it properly work in …

Member Avatar for Greeky
0
223
Member Avatar for eikonal

Hi there, I've got a little script which is not working nicely for me, hope you can help and find the problem. I have two starting files: traveltimes: contains the lines I need, it's a column file. The lines I need are separated by a line which starts with 11 …

Member Avatar for Gribouillis
0
167
Member Avatar for dilbert_here00

Hello ALL, I was wondering if there is a way to run a python program at windows startup, without running the script as a windows service? I have a python program which runs a bunch of functions & then sometimes restarts the computer. At startup I want my script to …

Member Avatar for dilbert_here00
1
5K
Member Avatar for peste19

I have a list for example list = ['a','b','c','d'] and i give and i want to give the letters in the list numeric value for example a=2,b=1,c=4,d=3 i want to display the list like this list = ['a','b','c','d'] but than i wanted to do a sum(list) and get a value …

Member Avatar for snippsat
0
121
Member Avatar for cwilli23

The US uses a progressive approach to income taxes. Tax rates for 2011 (for singles) are 10% taxable income from 0 to $8,500 15% over $8,500 to $34,500 25% over $34,500 to $83,600 28% over $83,600 to $174,400 33% over $174,400 to $379,150 35% over $379,150 There are also a …

Member Avatar for woooee
0
187
Member Avatar for Gobble45

Hello everyone at DaniWeb, this is my first post here, so please correct me, if i am wrong in asking this question. Firstly, i had a 10minute search amongst Google, and here at Daniweb. But im not entirely sure what to search for. So my question. i have a Python …

Member Avatar for Gobble45
0
922
Member Avatar for oberlin1988

I want to randomize a range of numbers without "random.shuffle." Instead it would be using "randint(0, n-1)" If I put in 4 into the function it could return [1,3,2,0] or [3,1,0,2]. I know that starting with an empty list and running through with a while list would work.

Member Avatar for Gribouillis
0
89
Member Avatar for fatjoe22

My assignment for python is to create a card game where 2-3 draw 3 random cards in order to try to get a total of 31. If there are three identical cards(ex player has 3 2's). That value is equal to 30. At any point does a player get 31, …

Member Avatar for woooee
0
636
Member Avatar for Hoff123

Hi! I am just wondering what would be fastest(performance-wise) of Game Maker(with GML) or Python with Pygame?

Member Avatar for Tumlee
0
290
Member Avatar for vegaseat

If a word or sentence reads the same way forward and backward, then it is a palindrome. A small admonition is in place, whitespaces and punctuation marks can be ignored. Also, all the letters should be in one case, lower or upper, your choice. Ideal for Python to show off …

Member Avatar for Gribouillis
0
1K
Member Avatar for ao_py

I am trying to draw circle in the upper left corner of a graphics window, and then move that circle at a diagonal to the bottom right corner, and then bounce it back to the upper left, and so on until my loop is exhausted. I can't get my moving …

Member Avatar for woooee
0
1K
Member Avatar for beck4456

I'm trying to write a program that takes a string and prints one letter per line. I need to use a while loop based on string length. I googled, so sorry for the newbie question. Thanks!

Member Avatar for JoshuaBurleson
0
1K
Member Avatar for sonicx

I'm trying to find max and min values from a text file which contains data in rows and columns. But I want to create a script which will skip the first couple of lines and calculate the max and min from there on. I am aware for the max and …

Member Avatar for woooee
0
14K
Member Avatar for terry_bogart

Not sure how to do this I tried googling it but to no avail. I want to print out a specific line in my while loop [CODE]450 42.5 16625.0 460 42.0 16820.0 470 41.5 17005.0 480 41.0 17180.0 490 40.5 17345.0 500 40.0 17500.0 [/CODE] example of part of my …

Member Avatar for JoshuaBurleson
0
148
Member Avatar for effBlam

I am making a program that analyzes text from a user After inputting several line and using the keyword "DONE", the program will ask for one of 8 possible options which is the menu() function where the user will enter the number. How would i be able to run my …

Member Avatar for JoshuaBurleson
0
211
Member Avatar for effBlam

Im trying to find the first element in each nested list: x = [['hey','wassup'],['are','you','ok'],['i','am','fine'] So that I get print a string: "hw ayo iaf" so far I have: def first_letters(): x = [['hey','wassup'],['are','you','ok'],['i','am','fine'] Thanks!

Member Avatar for Gribouillis
0
91

The End.