15,181 Topics

Member Avatar for
Member Avatar for dbphydb

Hi, i am basically from QA. So what we do each morning is open a web browser with the address [url]http://11.12.13.27:8080/cruisecontrol[/url]. Then we click on the build with last nights date. Then we click on a folder say client. Then in that folder we click on an exe file say …

Member Avatar for Udai02
0
5K
Member Avatar for naktos

Hello! I was writing a code and got an unexpected result, I broke it down in order to analyse it and in the end I have 8 rows of code. The problem I have is that I print x and it gives me the value 0.9 then if I say: …

Member Avatar for TrustyTony
0
114
Member Avatar for tbrambor

I am trying to get some data off a Brazilian government website. The data is accessible through a form with some javascript. I am able to get the form and fill it out, but have trouble submitting it (a button needs to be clicked). I am using the library mechanize …

Member Avatar for tbrambor
0
4K
Member Avatar for bharatk

I have 2 lists: a=[0,1,5,7] b=[2,10,6,3] I need to get this list : c=[(b[0]+a[0]),(b[0]+b[1]),(b[0]+b[1]+b[2]),(b[0]+b[1]+b[2]+b[3])] I tried doing this using a for loop: [CODE] c=[(b[0]+a[0])] for i in range(0,(len(b)-1)): for p in range(i+1,len(b)): if i==0: c.append((b[i]+b[p])) else: c.append((c[i]+b[p]))[/CODE] I am supposed to get [2,12,18,21] but I am getting [2, 12, 12, …

Member Avatar for bharatk
0
108
Member Avatar for nonemsludo

I am trying to write a function that returns true if the number of vowels in a word are equal to the consonants or false if otherwise, but I keep on getting an error that the word is not defined, I need help to debug my code [code] def word(n): …

Member Avatar for nonemsludo
-1
459
Member Avatar for sabiut

Hi, i need your expertise in this one. i am new to python, i want to write an algorithm that takes a string as input and determines whether or not it is a palindrome. please point me to the right direction. Thanks in advance. sabiut

Member Avatar for sabiut
0
193
Member Avatar for Tech B

I would like some feed back on my code. It is an IRC bot written in Python 2.6. What I might be doing wrong/inefficient. Better ways of doing something. And anything that will help sharpen my skills. I know I probably should have wrapped it into a class, and the …

Member Avatar for snippsat
0
196
Member Avatar for karrotbear

write a python function called getAP which: has three input parameters: an array of measured voltages, the number of measurements n and the threshold voltage for an action potential; and returns an array with n entries, containing a 0 if no action potential occurred at the corresponding time step, and …

Member Avatar for vegaseat
0
111
Member Avatar for albertkao

How to recursively walk directory & rename files & directories with Python 3.1 on windows? [CODE]#!c:/Python31/python.exe -u import os path = "test" for (path, dirs, files) in os.walk(path): print (path) print ("-----------------") if "monitoring" in path: dst = path.replace("monitoring", "managing", 10) print (dst) os.rename(path, dst) print ("path----") for file in …

Member Avatar for griswolf
0
2K
Member Avatar for giri.pankaj

This script uploads the pics in the specified directory into the specified album in picasa. The script requires gdata libraries installed. Check [I]code.google.com[/I]. I had written and tested the code in linux platform. Hasn't been tested in windows. Any suggestions to add more functionality, or add a UI or any …

Member Avatar for giri.pankaj
0
363
Member Avatar for rasizzle

Hey Guys, This seems like a basic problem with an easy answer but I simply cannot figure it out no matter how much I try. I am trying to create a line graph based on two lists. For my x-axis, I want my list to be a set of strings. …

Member Avatar for rasizzle
1
97
Member Avatar for TrustyTony

This function I did to improve calculator program by eliminating problems with Pythons problem of dividing integer with integer and giving integer division result.

Member Avatar for TrustyTony
0
403
Member Avatar for compuspace

Hey! I created my first project on Google Code. Let me introduce myself. I'm Kevin, 18 years old. Next year I'll study computer science in Holland. I'm interested in computers ofcourse, and also in artificial intelligence and natural language processing and internet. So I created a new project. But I …

Member Avatar for compuspace
0
73
Member Avatar for jagopy

I am looking for very beginner programming software for my 12 y/o grandson for his birthday. He wants to program his own video games eventually but needs to start with basics. Is this a good software for that? If not, any suggestions? I am not technically savvy wise, so please …

Member Avatar for jagopy
0
117
Member Avatar for nsutton

I need this code to ask if you finished the current quest, if your say YES you have, i must check your inventory to see if you have the necessary items to complete it. What will check if inventory contains flour and eggs in this case? Thanks, (code below) [CODE]#Tavern …

Member Avatar for snippsat
0
112
Member Avatar for TrustyTony

I tried this super simple class example from net. (Yes I am a beginner in implementation of object oriented features in Python) UPDATE: Now from fresh start of IDLE it did not crash, but did not quit properly still. Hmm. TaskManager any (or dozen) python zombies hanging around?? No only …

Member Avatar for vegaseat
0
588
Member Avatar for linuxoidoz

Hi, I'm trying to save elementtree back into an xml file and it bahaves really strange. I have a function which takes some QTextEdit text arguments (obviously QStrings) and if I save a node property as a QString, it saves the file fine, but if I try to save a …

Member Avatar for jcao219
0
132
Member Avatar for bchin

Hi, I have been searching high and low on google, and I cannot seem to figure out how to convert unicode to integers. Take the unicode codepoint, u'3001', for example. I know in utf-8, this is suppose to be ideographic comma. The hexadecimal representation is 0xE38081. I know if I …

Member Avatar for bchin
0
3K
Member Avatar for morteza_ipo

Hi everybody! I want to get list of files and folders with permission from ftp! This is my code: [CODE] from ftplib import FTP ftp=FTP('ftp.domain.com','username','pass') a=ftp.dir('') [/CODE] after runnig : (Output) drwxrwxrwx 1 user group 0 Mar 01 14:29 Backup drwxrwxrwx 1 user group 0 Mar 01 14:29 logs drwxrwxrwx …

Member Avatar for nezachem
0
146
Member Avatar for vegaseat

A short look at creating lists of file names or full path names using the versatile Python module glob. Glob follows the standard wildcard protocol.

1
3K
Member Avatar for jacob07

Hello, i have proplem with the following excercise: There's a txt file which contains tab seperated words like: [CODE] Name N1 N2 Type FFapple 11 15 fruit ZZbanana 33 45 fruit ZZcarrot 22 25 vegetable FFapricot 10 30 fruit ZZmelon 22 50 fruit FFbroccoli 16 40 vegetable[/CODE] i want to …

Member Avatar for jcao219
0
218
Member Avatar for d.devendran

hi expert, i'm newbie for python, anywhere i'm learning from internet sample, i got doubt here, i found below sample for thread import threading def hello(): print "Hello" t = threading.Timer(2, hello).start() t = threading.Timer(2, hello) t.start() this working fine when run manually ( python thread.py) but i try to …

Member Avatar for jcao219
0
158
Member Avatar for Ntsoaki

Hi i am new at python,i am getting problem in the above code,the problem reads as follows: Having several accounts on several servers, one has to remember many passwords. You can imagine a situation where someone forgets one of them and he or she only remembers that it consisted of …

-1
332
Member Avatar for ultimatebuster

The directory layout looks like this [CODE] base -- + parcer -- + parcer.py log -- + log.py [/CODE] I want to import log.py from parcer.py. How would I do that?

Member Avatar for TrustyTony
0
95
Member Avatar for cyon

Can someone help me resolve the following error or point me in the right direction? An incomplete value is returned if ' is in the list value. Thanks for any help. [CODE] def FindName(self,name,list1): """ searches for a patten in the list, returns the complete list entry. Is case sensitive. …

Member Avatar for d5e5
0
159
Member Avatar for amadain

Hi Folks I have the following code in one of my classes along with checks when the code does not eval: [code]filterParam="self.recipientMSISDN==tmpBPSS.split('_')[3].split('#')[0] and self.recipientIMSI==tmpBPSS.split('_')[3].split('#')[1]" if eval(filterParam): print "Evalled" else: print "Not Evalled\nfilterParam\n'%s'\ntmpBPSS\n'%s'\nself.recipientMSISDN\n'%s'\nself.recipientIMSI\n'%s'" % (filterParam, tmpBPSS, self.recipientMSISDN, self.recipientIMSI)[/code] I am not getting anything to 'eval'. Here are the results: [code] Not …

Member Avatar for TrustyTony
0
79
Member Avatar for olofom

I'm writing a slideshow program with Tkinter, but I don't know how to go to the next image without binding a key. [CODE=python]import os, sys import Tkinter import Image, ImageTk import time root = Tkinter.Tk() w, h = root.winfo_screenwidth(), root.winfo_screenheight() root.overrideredirect(1) root.geometry("%dx%d+0+0" % (w, h)) root.focus_set() root.bind("<Escape>", lambda e: e.widget.quit()) …

Member Avatar for olofom
0
307
Member Avatar for DayneD89

I'm fairly sure this will be my second thread to make me facepalm when I realise what I've missed, but oh well. If I have a list, for example L=[0,1,2,3,4], can I take the values out so that, again for example, t1 = 0, t2=1, etc.? The easy way would …

Member Avatar for vegaseat
0
154
Member Avatar for camigirl4k3

the program I had looks like this: def wordToNumber(word): if word == "one": return 1 elif word == "two": return 2 elif word == "three": return 3 elif word == "four": return 4 elif word == "five": return 5 elif word == "six": return 6 elif word == "seven": return …

Member Avatar for TrustyTony
0
129
Member Avatar for lmn_k

Hi all. I'm taking a beginner python course and have an assignment to write code using a 'for loop' + 'named variable' + 'branching logic' Trouble is, I have no idea what 'branching logic' is - if anyone has the time to respond, I'd really appreciate it!

Member Avatar for lmn_k
0
102

The End.