15,190 Topics

Member Avatar for
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
261
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
278
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
924
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
155
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
319
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
99
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
216
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
31
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
923
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
641
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
292
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

The End.