15,181 Topics
| |
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 … | |
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. | |
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? | |
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 … | |
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 … | |
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) … | |
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 … | |
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'; … | |
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 … | |
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 … | |
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 … | |
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 … | |
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. … | |
**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 " … | |
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 … | |
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 … | |
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? | |
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 … | |
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 … | |
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 … | |
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, … | |
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? | |
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 … | |
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, … | |
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 … | |
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. … | |
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 … | |
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 … | |
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 = … |
The End.