15,190 Topics

Member Avatar for
Member Avatar for abhigyan91

hey i just started python.. i know this is a useless stupid program but i still cant get it right..:( here i want the user to enter date in dd/mm/yyyy fashion and return the date in words. eg. 12/12/1912= 12th December,1912 but it doesnt work.. it only works for 29 …

Member Avatar for sneekula
0
104
Member Avatar for jcmeyer

Let's say a user of my application opens two or more MDIChildFrames. How can I get access to any one of the child frames? If I keep track of the names of the child frames in a list is there a way to use the name to call upon a …

Member Avatar for jcmeyer
0
85
Member Avatar for jcmeyer

When I run this code: [CODE]sql = "SELECT Name FROM nameDatabase" self.cursor.execute(sql) list=self.cursor.fetchall() print list[/CODE] I get: >>> [(u'Joe',), (u'Katie',), (u'Bob',), (u'Ian',)] However, if I try to make a SingleChoiceDialog with wxpython it does not like that list. Is there any way to get those values in a so it …

Member Avatar for jice
0
109
Member Avatar for rustysynate

I tried the first post on wxpython by fuse. The code is as follows # import wx # # always add this line, or your code won't compile - the wx module contains the GUI code you'll use # """The start of our wxPython GUI tutorial""" # # app = …

Member Avatar for rustysynate
0
171
Member Avatar for besktrap

Hi all. Is there any way that if I give python a string, it can convert it into code? Example, say I am given this string: [CODE=python]string = "Class( 0,100 )"[/CODE] Now I want to convert it into code: [CODE=python]Class( 0,100 )[/CODE] Any ideas? Thanks.

Member Avatar for abhigyan91
0
12K
Member Avatar for rupeshpradhan

I am using an array 'array_studentDetails'. This array will be used by other functions after it is initialized. Should I make it a global array as I have done in this example OR should i return the array to the calling function and pass it on to the other function …

Member Avatar for shadwickman
0
150
Member Avatar for rustysynate

Hi, I am trying to build a rectangle which changes its size with respect to the input given. My problem is that on using the[B] surface.blit[/B] function the object start to replicate when the size of the screen is greater than the object. So many rectangle appear instead of one. …

Member Avatar for rustysynate
0
153
Member Avatar for rawsilk

I am trying to write a program that retrieves data from a site. However the url automatically displays the most recent data (from within the past month). I want to receive the data for the past year. On the page there is the option of choosing a previous data to …

0
38
Member Avatar for The Champ

Question: Prompt user to enter ten two digit number. The program should compute the sum of all positive values and print the sum of values added. Over here what I had done is: Chosen list to store initial all the ten numbers. First I have to initialize the list with …

Member Avatar for shadwickman
0
106
Member Avatar for sravan953

Hey guys... I would like to know how we can mask text input...I have read in some websites that we have to turn off the 'echo', but as far as I know, it only works in Linux....so what the alternative for Windows? I tried the getpass.getpass but in vain! :( …

Member Avatar for sneekula
0
2K
Member Avatar for Surge591

Hello, I would like to know how I can call a program ('example.exe') which runs as a batch process in a new command prompt and control the inputs and outputs from within a python script. I have tried the following code: import subprocess p = subprocessPopen('example.exe', shell=True, stdin=PIPE, stdout=PIPE, stderr=STDOUT) …

Member Avatar for vegaseat
0
2K
Member Avatar for firegenius

Hi everyone, I am trying to build application with Tkinter like a wizard, i'll use background image for application, and put some text and image to application window. But i couldn't do that. When I use background with that code, text labels background color is blocking background view. Is there …

Member Avatar for firegenius
0
4K
Member Avatar for aakaashjois

I just got Linux Mint 7 and I installed IDLE. I want to know if there is "drag and drop"(like WYSIWYG interface) python GUI builder for Linux?? Thanks in advance

Member Avatar for shadwickman
0
131
Member Avatar for andriod

Hello, I am new to the Python language and I am having difficulty with the print statement. For example, when I type print 4, or print "Hello", i get an error. The error message is: [CODE]SyntaxError: invalid syntax (<pyshell#2>, line 1)[/CODE] When I use python on other computers, the print …

Member Avatar for andriod
0
132
Member Avatar for Zidane

Hi. I just got started using wxPython and I was wondering how to create a button which transferred the user from one screen to another. To kind of illustrate what I mean, I created two files, 'main.py' and 'newgame.py'. I've made a button called 'New Game' in the main.py file, …

Member Avatar for vegaseat
0
105
Member Avatar for Jintu

Write a program to read a list of non-negative integers, and to display the largest integer, the smallest integer, and the average of all the integers. The user indicates the end of the list by entering a negative sentinel value (use -1) that is NOT used in the calculations. The …

Member Avatar for Jintu
0
404
Member Avatar for sravan953

Hey, I am thinking of making a Facebook application, where you open the app, enter your login details, and it passes the data and logs into the acc, and gets the HTML code, writes it to a .html file and opens it....I don't know how to make it pass the …

Member Avatar for firegenius
0
78
Member Avatar for hughesadam_87

Hey guys, I wrote a file the other day, which reads in data, adds a column, and then reads the data out to a specific file. I thought everything was working great, with all of your help; however, I am now running into another problem. The output data looks like …

Member Avatar for sneekula
0
84
Member Avatar for jcmeyer

I know how to store data into a database if I know the value of what I am storing. For example: [CODE]sql="INSERT INTO nameDatabase (name) Values('Joe')"[/CODE] However, I want to be able to store data that I do not know the value of into my database. So I can prompt …

Member Avatar for jcmeyer
0
117
Member Avatar for Zaffron

So I made a combat system, and for the life of me i cannot figure out how to make it start automatically. It does run, but it ignores the function at the beginning and doesn't run it. There is a similar text adventure I looked at as an example for …

Member Avatar for Zaffron
0
136
Member Avatar for rasizzle

[code] import os import csv ifile = open("C:/Python26/testdata.csv", "r") [/code] here is the error i get: Traceback (most recent call last): File "C:/Python26/06_June_2009/testhenry.py", line 4, in <module> ifile = open("C:/Python26/testdata.csv", "r") IOError: [Errno 2] No such file or directory: 'C:/Python26/testdata.csv' I have no clue what to do. I can't read …

Member Avatar for rasizzle
0
156
Member Avatar for hughesadam_87

Hey everyone, I am writing a simple code, and seek to do something which I don't know whether it is possible or not. First, I have a name list: [CODE]Name_List = ["Jake", "Steve", "Adam"];[/CODE] The first thing I'd like to do is open a separate file for each name in …

Member Avatar for hughesadam_87
0
99
Member Avatar for zatanelov

I have a problem iterating through a dictionary where the sequence should be ACTGDEDQ..., but it includes some other stuff Biopython adds when it parses a FASTA file. If I just print seq_record.seq it prints the sequence, and does not include extra stuff. However, if I print the dictionary it …

0
65
Member Avatar for sciguy77

I'm ready to put up my Python web server, but before I do I would like to know what security risks hosting a web server presents. And more importantly how do I make it more safe and secure? Thanks.

Member Avatar for leegeorg07
0
59
Member Avatar for flip121

I need to change a character inside of a string in a list ex horizontal=2 across=2 List=['abcdefg', 'hijklmno', 'pqrstuv',] I would want to change just one character like the third character in the third string(but I don't know that the program will know using horizontal and across) to 'd'. if …

Member Avatar for flip121
0
80
Member Avatar for jcmeyer

I have a textentrydialog and my goal is that the user cannot leave the the text entry blank or just empty whitespace. So the dialog should not go away until the user enters some characters in the box or hits cancel. This is what I have: [CODE]def OnNewButton(self,event): error=1 while …

Member Avatar for JasonHippy
0
93
Member Avatar for max.yevs

i've been trying to make simple programs and downloaded python 3.01. unfortunately i have no programming experience, and am a bit stuck despite searching around the tutorial, library, etc. (please forgive if this question is already answered somewhere) my first attempt at a program is >>>print (hello world) hello world …

Member Avatar for carapace
0
173
Member Avatar for tomtetlaw

Is there a module for a camera in PyGame, because I want the camera to follow an image, thanks.

Member Avatar for shadwickman
0
122
Member Avatar for akkkk

Hi i have a program that currently reads in the contents of a file and stores it in a string. Some of the files are quite large so speed is quite important. I want to print out the words that begin with capital letters and was wondering how i could …

Member Avatar for akkkk
0
213
Member Avatar for tillaart36

Hi, my question is how I can find the centroid of group of cells that share the same value. Say I have this: [code] grid = [[0, 0, 0, 0, 0], [0, 1, 1, 1, 0], [0, 1, 1, 0, 0], [0, 1, 1, 1, 0], [0, 0, 0 ,0, …

Member Avatar for no_spam_for_dan
0
2K

The End.