15,175 Topics
| |
I am new to Python Server Pages (psp). Can psp “read” the html field value? Example: [CODE] <html> : : <body> <input type="hidden" id="selected" name="selected" value="0"> <% # Read/Get the above hidden field value # Perform some task #re-write the hidden field value %> : : </body> </html> [/CODE] Thanks … | |
will anybody tel me how to run a symbian code using PyQWt4? | |
I am trying to finish the second release of this hpgl interface for ubuntu/linux, The first release is popular but not very feature rich. My problem is I have added two large save and read in settings buttons on the bottom of the gui window. I need to be able … | |
Hello I have generated a list of words & their occurrences. Now, how to I filter them based to the starting alphabet. I.e. all words starting with 'a' should be filtered from thos list & put into 1 list along with their occurrences, similarly b,c & d. This is the … | |
This is the python code from a file 'legend.py' that prints the contents of variable 'doc' to console: [CODE=python]print '\n'.join (doc)[/CODE] Now through the above code, whatever is inside doc gets written to the console, if I run python legend.py description.xml Below is a shell script : [QUOTE][B]for z in … | |
In a file called functions.py, write the functions listed in the table below. Include a docstring comment for each function. The docstring should be an appropriate rephrasing of the specification on the right-hand side of the table. See the Assignment rules page for guidance on how to write good docstrings. … | |
Hello, I have a little problem. My program (LH-ABC 3.2.0) works well in Windows XP and Vista. But in windows seven programa closed, but process keep going :S What can be problem? Maybe one thread not closed? But this problem is exclusive in windows seven. Source of my program in … | |
I am learning Python now. It is too complicated. I started the file that i did but it crashed. Can you show me how to do it? Write a Python program to convert a given weight from kg to pound and to gal and to liter. 1kg=0.2642gal=2.205lb 1gal = 3.785liter … | |
Hello Python community, I've just finished building an app with Python and I'd like to share my experiences and get some feedback. This was from scratch (no code templates) all the way to compile and distribution on a Windows environment. Now all my colleagues at work are using the app … | |
Hi folks, I am a newbie to python, and I would be grateful if someone could point out the mistake in my program. Basically, I have a huge text file similar to the format below: AAAAAGACTCGAGTGCGCGGA 0 AAAAAGATAAGCTAATTAAGCTACTGG 0 AAAAAGATAAGCTAATTAAGCTACTGGGTT 1 AAAAAGGGGGCTCACAGGGGAGGGGTAT 1 AAAAAGGTCGCCTGACGGCTGC 0 The text is nothing but … | |
I've been reading a lot here lately on self replicating code. I wanted to try my hand at it. It only copies itself in forward directories. I.E. "C:\Users\cd.." is not supported yet but will be later. I wanted to post it here to see if anyone had ideas, tips, and … | |
I got this from the python docuemtation. date2 = date1 + timedelta --->date2 is timedelta.days days removed from date1. (1) date2 = date1 - timedelta---> Computes date2 such that date2 + timedelta == date1. (2) timedelta is an object representing a time [I]difference[/I] and a date object represent a certain … | |
Hi, Can you recommend a book in Python language for the creation of pages (webmasters). Without any Framework. Thanks Which part of ... [B]If you know a good project, please post it here. If you have questions, start your own thread and don't clutter the sticky.[/B] ... don't you understand? … | |
I am new to Python.. I want to know how can be the number of lines can be reduced? My task is to print whatever Simon says from the text file given below. the o/p should be sing,dance, go to school. Is there any way to make the following program … | |
how can I check the difference between two dates using the datetime modules? (or any other module that would do the same thing). I want to read a date from a file (which was written in the same format as the datetime module uses) and then calculate the difference in … | |
Hello I have created a multidimensional list in python I used the following code: [CODE] r =[(300, 4), (5, 6), (100, 2)][/CODE] I tried sorting it in ascending order using r.sort() and I get [(5, 6), (100, 2), (300, 4)] I want it to get sorted based on each on … | |
Dear all, I would like to make a small script that does the following: I have a file that at some point there is a section: ... ... a heading is here .... 1 2 3 4 5 6 7 8 9 10 22 22 336 11252 12 25 3 … | |
Hi I am writing some code for a game in python and using sql to store the information for each of the cells. I keep getting a NameError: name 'row' is not defined error. Could someone please help? Below is a bit of the code: [CODE]con.execute("create table Game(row integer primary … | |
A lotto simulator with a twist, you pick the winning numbers and the computer buys the lotto tickets. Anyway, the computer at least generates the tickets and checks how many of them would match the winning numbers you selected. Let's assume you would be the state lotto commissioner and your … | |
Hey all; I had a serious problem occur; after compiling and programming something in python for months, my computer crashed, and the 3 back ups I had of the program crashed within 24 hours after mine, so I lost ALL DATA. The only data I have is the exe program … | |
Hello, I decided I want to make a game where you have to move a ball through a maze and make it to the end without hitting any walls, some of which are invisible!! The game is extremely far from completion, and will be until I learn how to overcome … | |
Hello, I have 2 canvases, which will eventually contain plots made with matplotlib, packed side by side in a Tkinter window. Using mpl_connect with key_press_event and button_press event works fine initially. However, when I pack the second canvas widget the binding to key_press_event stops working. The button press binding still … | |
Hey, I have a problem, if checkboxes is activated, it could be download packages ( Ubuntu ), would be necessary to verify to checkboxes and if it's true, then these packages, which should installed my system ( Ubuntu ). [CODE]#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2010 from … | |
I have a homework assignment to instructs me to play around with functions and exceptions, but one seciton I'm stuck with is a certain condition it tells me to write o if x is not "So sue me!", but x is still not convertible to an int (by calling int(x)), … | |
I am writing a tic-tac-toe program and whenever my game gets to here it generates the following error: [CODE]# Display board function def display_board(board): """Display game board on screen.""" print "\n\t", board[0], "|", board[1], "|", board[2] print "\t", "------" print "\t", board[3], "|", board[4], "|", board[5] print "\t", "------" print … | |
I having a little trouble to figure out how can I replace the specific lines in a text file by the lines from another text file marching certain pattern. !?!? For example: I have two files: file1 and file2 , I want to search lines of the first file for … | |
Hi, I am asking here three question together rather than making separate threads for each question. I am making an application where I can load images in a canvas. I load the image with file menu askopenfilename dialog box. Something like this: [CODE]class MyApp(object): def __init__(self, master): frame = tk.Frame(master) … | |
despite its simplicity, for some reason, my code refuses to work, even though the encryption works [CODE] # add() is just (a+b)%2**32. for some reason, without the function, it doesnt work delta = 0x9e3779b9 sum = 0xc6ef3720 for x in range(cycles): # 32 data[1] = add(-add(data[0]<<4, key[2]) ^ add(data[0], sum) … | |
hi i'm new with python and django and i work on search page of my site. in my html search form, user can choose table(or field) which want to search. in server-side i use sequences of 'if' to find chosen table(or field) and related django model. [CODE]... #here assumed searched … | |
Hey guys, I made a class that I am using to save numbers for a larger Ping Pong stat tracker program I am making. I am having problems with it however and can't figure out how to solve it. The class is a basic save to file program. It takes … |
The End.