15,190 Topics

Member Avatar for
Member Avatar for giri.pankaj

This code takes in a scrambled input word and gives out the unscrambled list of words. Eg... Input = time Output = mite, item, emit etc. I had posted an unscrambler in java sometime ago. This one is the improvement over the previous one. In the sense, the java unscrambler …

Member Avatar for TrustyTony
0
4K
Member Avatar for mehdi0016

hi i'm looking for a python lib or module to draw text as graphic and save it as png, but i also need to support right-to-left languages like Farsi. i tested PIL with no success for unicode rtl texts(it draws text reverse and un-joint). so what do you suggest? (it's …

Member Avatar for TrustyTony
0
93
Member Avatar for mysticstylez

Hi, I have a text file that contains bunch of phone numbers. Some contain invalid characters and some are too long. How do i read this file into a list using regex. I only want valid phone numbers to populate the list, and skip the invalid ones. this is what …

Member Avatar for TrustyTony
0
7K
Member Avatar for deedee2

Hi there, I was wondering if anyone could help me find a procedure in python that takes in an unsorted list, and returns the difference between the largest and smallest values in the list, without using the built in max/min/sort procedures. Thank you!

Member Avatar for deedee2
0
109
Member Avatar for bharatk

Hello I have 4 .py files along with __init__.py in a folder. I want to create a file which would act as a menu and load classes from the files in that folder. I have that file outside the folder. The contents of that file: [CODE]from files import * print …

Member Avatar for bharatk
0
221
Member Avatar for pythonNerd159

im currently trying to create a button widget using Tkiner and would like to know how to get a number from that button when i click on it. I have tried lots of methods and ideas from different people and i still haven't got the right bit of code. any …

Member Avatar for pythonNerd159
0
168
Member Avatar for ewiggin

I am a beginner, and I am trying to run my first script in the windows command line. When I try to open the file I get the following error: >>> script1 Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'script1' is not defined I …

Member Avatar for Hummdis
0
152
Member Avatar for sneekula

I have a text I want to search for all it's upper case letters, then present these letters unique and sorted. I welcome any suggestions.

Member Avatar for twekberg
0
320
Member Avatar for a_jan2002

I have been working on connect five in python as a project. I have got this far but I cannot figure out how to make history of the things that have been clicked and how to undo. This is what i have got so far. I cannot make the player …

0
32
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
460
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
197
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
112
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
365
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
590
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
148
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

The End.