15,181 Topics
| |
Hey. I'm writing a script that processes some data. The script creates a HTML page which contains a form that calls (action=) the same script and changes according to data asked. So the user asks for something, the script goes to a DB, gets it and prints it into the … | |
I'm a tutor that is helping one of my students with a simple guessing game program. It's supposed to be similar to the board game Mastermind. This program should prompt the user to enter 5 distinct digits, and it should return the how many digits are correct and how many … | |
I am also working in python 2.6 and i want to send SMS to a mobile while my cell phone i.e. Nokia E-72 is connected to PC via Data Cable. The mobile is connected through a serial port and the code prompts the correct port as well and there is … | |
Hello! I try to get py output to html table tag. I have a problem to create table in a table... Here is a pattern how it should look like (in yellow color) file name: format_DOC.doc here is the code I use to get a result. Pls can you help … | |
hi everyone. i'm tryng to use Reportlab to output an invoice on a simple Django app. it seems quite difficult to do simple things like this. here's my code: def print_pdf(fattura, soggetto, buffer=None): import time from reportlab.lib.enums import TA_LEFT, TA_CENTER, TA_RIGHT, TA_JUSTIFY from reportlab.lib.pagesizes import letter from reportlab.platypus import SimpleDocTemplate, … | |
How do you append a CGI file from a server into a txt file? | |
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 … | |
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 | |
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. | |
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 … | |
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 … | |
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 … | |
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. … | |
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! | |
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 … | |
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 … | |
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 … | |
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, … | |
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 … | |
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. … | |
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'] … | |
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" … | |
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: … | |
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 … | |
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 … | |
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: … | |
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 … | |
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 … | |
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) … | |
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 # … |
The End.