15,190 Topics
![]() | |
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] | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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. | |
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 . | |
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 … | |
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 | |
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. … | |
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 ? … | |
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 | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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. | |
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, … | |
Hi! I am just wondering what would be fastest(performance-wise) of Game Maker(with GML) or Python with Pygame? | |
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 … | |
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 … |
The End.