15,181 Topics

Member Avatar for
Member Avatar for dvirdc

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 …

Member Avatar for dvirdc
0
123
Member Avatar for BThomps

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 …

Member Avatar for BThomps
0
233
Member Avatar for salina786

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 …

Member Avatar for salina786
0
293
Member Avatar for vlady

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 …

0
68
Member Avatar for lordluke_80

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, …

0
248
Member Avatar for Tyler212
Member Avatar for jlm699
0
75
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
332
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
409
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

The End.