15,181 Topics

Member Avatar for
Member Avatar for sainitin

Hi all, I have list of pubchem Compound names and want to retreive pubchem Ids from NCBI Pubchem database using NCBI eutilities to acheive that i wrote biopython script as follows ~~~ from Bio import Entrez Entrez.email = "ni@gmail.com" #Input names infile = open("file1", "r") out_put = open("file2.csv","w") for line …

Member Avatar for woooee
0
274
Member Avatar for Twin802

I need some help with programming python. I need to have what it would normally state in the terminal (Linux Mint 12) to be stated in something for example the search bar. Thanks for your help.

Member Avatar for Twin802
0
104
Member Avatar for lfmconsummates

I'm trying to have HTML generate random background colors using Python. What I have so far is: `print "<body bgcolor='%s'>" % choice` what python code should follow?

Member Avatar for prerakmody
0
388
Member Avatar for pleasecompile

I ask the DaniWeb Community for guidance in resolving the following NameError. I have attached the import (OpenOPC for Python Library Module), but basically my code: import OpenOPC opc = OpenOPC.client() produces this NameError: >>> import OpenOPC >>> >>> opc = OpenOPC.client() Traceback (most recent call last): File "<pyshell#4>", line …

Member Avatar for pleasecompile
0
6K
Member Avatar for pakiali007

ile problem 2. Write a function named countTriWords() that opens a file for reading, reads each line in the file, and returns the number of three letter words in the file. For simplicity, you may ignore the fact that some characters are punctuation and treat them as part of the …

Member Avatar for hughesadam_87
0
106
Member Avatar for JenniferT1980

I have been working on this for a while. I'm new to python programming. I've been designing a user interface. I origionally created a python file for each interface. Such as the two below. mainmenu.py from Tkinter import * class mainMenu: def __init__(self, master): frame = Frame(master, width=500, height=400, bd=1) …

Member Avatar for JenniferT1980
0
182
Member Avatar for pakiali007

File problem 1. Write a function named stringsToFile() that opens a file for writing and writes a list of strings to the file, with each element of the list written to a line. Hint: use a for loop to iterate over the list of strings and write them to the …

Member Avatar for TrustyTony
0
72
Member Avatar for joey_r

Hello, long time lurker first time poster. I was looking for some help on a problem I came across on a python site. I am supposed to count the number of times 'code' apears in my string. But any letter can be in the place of the 'd' in 'code'; …

Member Avatar for TrustyTony
0
162
Member Avatar for paulzef

So I'm just learning python still, and I've got this assignment to make a maze program (no graphics or any of that, just a text based one) and I'm trying to get it working, but the function I've written to find the legal moves keeps throwing errors. The most recent …

Member Avatar for TrustyTony
0
193
Member Avatar for jon92

Write a program that accepts a filename as a command-line parameter. The program will search the given file for each letter in the alphabet and print statistics on the number of occurrences. I was wondering if i could have some help with this as i dont understand how to do …

Member Avatar for woooee
1
110
Member Avatar for blahman

I am running into some issue with scraping data. If I hardcode value for key "lbo race" in the code below it is able to scrape the data but if I try to set key "lbo race" to a variable which is being read in it doesn't seem to scrape …

Member Avatar for blahman
0
540
Member Avatar for hughesadam_87

Hey everyone, Last semester my buddy and I made a tutorial on application programming in Python. This video uses the Enthought Tool Suite (ETS), a free powerful Python development toolkit, to build quick, easy and powerful GUI's. I see many posts on this site about Tk, wx, qt but haven't …

Member Avatar for hughesadam_87
0
482
Member Avatar for Programmer_Girl

I am having trouble trying to figure out how to write code so the room number increases by 1 each time it asks for length and width. Here's what the assignment is about.. In this program, you are going to calculate the total square footage of a five room apartment. …

Member Avatar for Programmer_Girl
0
672
Member Avatar for RogerGC

**So i am having trouble with printing as you have noticed with the title** **i need to have 2 things print after the 2 menu choices. it is a smiley face creator** `Inline Code Example Here import time def eyes_menu(): print "These are your choices for eyes:" time.sleep(1) print " …

Member Avatar for RogerGC
0
150
Member Avatar for gbonline

Hi to all, i'm writing a little interface in python with Tkinter on linux debian, with this interface i need to execute some program like rdesktop and vnc. but i've a little problem: i use a fullscreen window without decorator (read buttons for iconify and close) where i've putted some …

Member Avatar for gbonline
0
262
Member Avatar for hemant_rajput

I want some help to generate a report in PDF/Doc(MS Word) format . I’m not able to find any module to generated report in doc, except “docx” which I’m not able to comprehend. Actually my actual task is to generate the report in Doc only, but as I’m not able …

Member Avatar for hemant_rajput
0
462
Member Avatar for KickAssElmo

I want to call 'n' which is the input number followed by a string. I've been putting it like this: (n 'string') but it is wrong. How do I write it?

Member Avatar for KickAssElmo
0
82
Member Avatar for midnightparade

Hi I'm new to python and this forum and I am trying to work on a program that splits the html text file into its components: The HTML file looks something like this: " Hello World #title Today is a Friday. The weekend is coming. Lets have fun. #summary 1923 …

Member Avatar for bumsfeld
0
227
Member Avatar for sinnebril

Hi there again, I'm still a newby in Python, so I'm taking the Google Python Class. They talk about `ls -l` and `rm -rf` (with the last command the class started laughing) But I don't understand it. I googled it and a hint came to me, that is is a …

Member Avatar for sinnebril
0
3K
Member Avatar for LDJ95

Hi all, I apologise in advance if this is too simple, but I've been searching around for a good hour or two now, and I can't quite get my head around this. Basically, I'm looking to teach myself Python (3), and one of the things I'm trying to do is …

Member Avatar for LDJ95
0
848
Member Avatar for frivolous
Member Avatar for guidely

Hi I dont really sure what I did wrong but it no working. I am making Snakes and Ladders game with out using list import random separator = '-' * 20 spaces = [None] * 90 c_l_spaces = {r'slid down a chute ': [[14, 3], [20, 15], [39, 33],[66, 53],[69, …

Member Avatar for TrustyTony
1
1K
Member Avatar for utkarshsahu

Suppose i have a list l=[1,2,3] i want to make this list as [2,3,4] i.e. add 1 to all the values in list l. I want to do it by the method of for loop.. Can someone help?

Member Avatar for TrustyTony
0
123
Member Avatar for NeoSyn

Been stumped over this for a while.. I was just wondering how I'd go about creating pattern movement and randomising it. The movemnt itself is just simple back and forward. But I wanted to make it random rather then fixed (which is what it is now) The main isn't posted …

0
79
Member Avatar for SlzzyDzzy

Im trying to teach myself a little bit of python and have become stuck/frustrated. Im on [Python.org](http://www.learnpython.org/page/Loops#) and so far have had no luck. First, the objective is not too clear "Loop through and print out all even numbers from the numbers list in the same order they are received, …

Member Avatar for M.S.
0
184
Member Avatar for dobermiller

I've been trying to finish up an otherwise straightforward assignment for my python comp sci class but for whatever reason everytime I try importing cTurtle it informs me that such a module does not exist. I'm a little confused because I've never had this problem before. The relevent bit of …

Member Avatar for TrustyTony
0
224
Member Avatar for greatman05

Hello. What are some ways that one can work with (x,y) coordinate pairs in Python? I'm doing a homework assignment that requires me to create a program that can check for certain binary relations (reflexive, transitive, symmetric), and I'm having an issue coming up with the best approach for it. …

Member Avatar for greatman05
0
275
Member Avatar for bsh6wc

I have a file that looks like this: 110603/1200 stuff stuff stuff min and max 0.00 1.00 110604/1200 stuff stuff stuff min and max 0.00 1.50 etc... I want to pull out the date and pair it with the associated min and max value associated with it. I know how …

Member Avatar for TrustyTony
0
130
Member Avatar for Niner710

Hi, I am interested in trying to make a cumulative distribution function in Python. I have a set of data in a numpy array and just want to plot that data. numpyArray = [0.4, 0.3, 0.6,1.2,1.8, 0.5] I would also like to have a vertical line on the x-axis at …

Member Avatar for Niner710
0
242
Member Avatar for kernel>panic

I wrote an XML parser that works great to fit my needs, but I can't retrieve the root attribute nodes no matter what I try! So far I have the following code that works great to retrieve the child tag values: import xml.dom.minidom def parse(filename): xmlDoc = xml.dom.minidom.parse(filename) tag = …

0
122

The End.