15,175 Topics

Member Avatar for
Member Avatar for aquaben

Trying to get soemone to input a Password (hello) as an input and then getting a loop to a second part of the program where he/she inputs his/her name and then gets a response accordingly. Not sure why this is not working but maybe someone else does. let me know …

Member Avatar for TrustyTony
0
149
Member Avatar for ngurjar

Hi, I am creating RTF editor in python. I am not able to get which classes or library I should use for opening and saving RTF files. I found one pyrtf but that is very old and just for exporting... Please help me out.. Regards Neelesh Gurjar

Member Avatar for raptr_dflo
0
72
Member Avatar for lisa92222

When I open my Python file through cygwin it recongnizes a module that I installed recently(PyCrypto) but when I open Python IDLE and then click on Run Module, it says that PyCrypto wasnt installed. Whats wrong? Thanks for the help.

Member Avatar for TrustyTony
0
105
Member Avatar for abhik1368

I have a file like this a csv file DB01967 ZIPA DB01967 PFAZ DB01992 YVBK DB01992 ZAP70 DB02191 ZIPA DB02319 YQHD DB02552 ZFPP I want to print a file of csv in the format like DB01967 ZIPA PFAZ DB01992 YVBK ZAP70 DB02191 ZIPA DB02319 YQHD DB02552 ZFPP i am totally …

Member Avatar for TrustyTony
0
131
Member Avatar for webstart

I have a list as alist = [[], [(u'0.77',)], [(u'0.34',)], [(u'0.12',)], [(u'0',)], [(u'0.0',)], [(u'0',)]] I'm trying to get it as like this [0.77, 0.34, 0.12, 0, 0.0, 0] using the statement rlist= map(lambda a: int(a), alist) but got an error as, TypeError: int() argument must be a string or a …

Member Avatar for vegaseat
0
6K
Member Avatar for windiggy

I need to figure out what is wrong with this program and correct it so it works. I have been screwing around with it for hours and still cannot figure out what is wrong. I know that I need to change the first line, but I have no idea how …

Member Avatar for woooee
0
337
Member Avatar for MunkyCheez

Hi, I'm new to programming in Python, & I need help. I am trying to read from a text file, which contains: 1 4 5 3 1 0 2 4 18 5 2 0 0 9 I am suppose to implement a Simplex algorithm that can hopefully solve these numbers. …

Member Avatar for woooee
0
4K
Member Avatar for utkarshsahu

In Python, which is more of a pythonian style of writing between these two: 1. print 'Hello' or 2. print('Hello') If u have a link on basic outlines of pythonian style and which syntax is a more pythonic way to use, it would be very useful to me. Thank You!

Member Avatar for utkarshsahu
0
172
Member Avatar for lisa92222

Hello, I need to install the module pycrypto to run a program but ive been stuck for about 2 hours trying to figure out where to put it exactly. Ive tried in the folder where my program is, also in the usr/lib/python2.6/ using python setup.py install (i actually did build …

Member Avatar for TrustyTony
0
188
Member Avatar for C0ding

Hello everyone, I've been working with some python scripts for few days now, what editor i've been using? the answer is Notepad, but then i move to Notepad++ which is the one i use to edit batch files php files, and many other programming files formats, but just now i'ma …

Member Avatar for C0ding
0
416
Member Avatar for aquaben

Hey As my title sais having issues getting characters (like names and such ) in my code. I can only get numbers Any help would be appreaciated print ("Program 2: Using Inputs") #prints the title print ("Author: Benoit Labelle") #prints the author's name print ("ID: 3065521") #prints the authors id …

Member Avatar for woooee
0
103
Member Avatar for Twin802

As you can tell I am very new to python...I stumbled upon pygame and it looked fun. So I started to build a game and I got stuck right away...Player controls. I would like the player to be able to contorl the person. Thank you. import pygame, random import random, …

Member Avatar for Twin802
0
165
Member Avatar for C0ding

Hello everyone, I search for this answer, and yeah, it looks like many asked this question before, but my answer was not on those posts. now i would liek to double ask the same question again... how can i invoke a python script from command pronpt? this is the way …

Member Avatar for C0ding
0
321
Member Avatar for SpartanIE

I'm trying to design a function that accepts a list of numbers as an argument. I can get the program working when i put a list into the programme but I can't figure out how to allow a user to enter a series. What i've got so far is below. …

Member Avatar for TrustyTony
0
2K
Member Avatar for Kaptain Khronic

Whats up guys! To start off I am really new to python. I got this program that keeps giving me this error message. I was wondering if anyone could help me. Heres the code: from math import * from numberTest import * Lname=['Zdofalos','Johnson','Terrell','Wilson','Key','Smith','Alfonso'] Fname=['Fred','Malcom','Monkey','Wilson', 'LeDoor','Jim Bob','Ralph'] City=['Charlotte','Monroe','Broken Pine','Hogwart','Spot In Road','Denver','Gastonia'] …

Member Avatar for TrustyTony
0
287
Member Avatar for meli123

hey all..if I have a 5 files in PDF named PDF1, PDF2, PDF3, PDF4, PDF5 I want to create a program that renames them to project 1, project 2, project 3, project 4, project 5 import os,sys namelist=['jon', 'leon', 'david', 'nombre',] for filename in os.listdir("C://YOUR/PATH/HERE/"): os.rename(filename, namelist.pop()) print "succesfuly renamed" …

Member Avatar for snippsat
0
111
Member Avatar for Twin802

Hello again everyone. I am creating a math game sort of...I dont know if they call it a case or switch statement but I want one in both my Menus. Also I am wondering if you can create an if statement or case statement that will support two variables...for example: …

Member Avatar for vegaseat
0
242
Member Avatar for oldSoftDev

I am reading from a file and creating two lists, then sorting them after sorting I am trying to compare each elements number of occurances in a list but printing them with that number for example if a list is something like {1,2,3,3,3,5,5,5,6} then I want to print a report …

Member Avatar for TrustyTony
0
216
Member Avatar for vlady

Hello I try to get py output (s_subject) to a web bage table using html code. Thing is that result is in one line. I'd like to have it for each subject one line. Pls can you show me how to make it? Example: Predmet: maths fyzics history here is …

Member Avatar for woooee
0
190
Member Avatar for jone kim

I want to design: 1. address class ->using dictionary data structure where items are; state, city and street for individual person 2. name class -> person's first and last name 3. display class -> searches for the given name and displays the address of that particular name my questions are: …

Member Avatar for woooee
0
152
Member Avatar for crazy99

Hi I'm trying to build two seperate dictionaries with a file thats arranged in this format. I need to take the name's reverse it so first name then last name, for the first dictionary I need to take the first name as the key and the other names in the …

Member Avatar for crazy99
0
330
Member Avatar for M.S.

Hi I found this script from http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/189858 it uses getopt module for managing cmd arguments, but I need it to work on mobile phones. I want to make a Mobile app using this script but I cant figure out how to change the comand Args to simple raw_inputs. can somebody …

Member Avatar for M.S.
0
408
Member Avatar for Niner710

Hi, I have a dictionary with the key as a tuple. x = { ('AA',1,3):0.56, ('BB',0,3):0.70, ('AA',1,3):0.10, ('CC',1,3):0.60 } I would like to get all the values where the key is equal to... ('AA',1,3) However, when I use it only returns the last value where ('AA',1,3) is found. x.get( ('AA',1,3) …

Member Avatar for TrustyTony
0
3K
Member Avatar for gge18

Im trying to solve a question of python Data Structures and Sorting, and i meet a question about mergesort, this question ask me make two mergesort and i just finished one mergesort. so i really need some help for this question. thank you !!!!!! # This is alternate mergesort # …

Member Avatar for vegaseat
0
142
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
272
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

The End.