15,190 Topics
![]() | |
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 … | |
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 … | |
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 … | |
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 = … | |
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. | |
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 … | |
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. … | |
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 … | |
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 … | |
![]() | 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! :( … |
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) … | |
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 … | |
![]() | 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 |
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 … | |
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, … | |
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 … | |
![]() | 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 … |
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 … | |
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 … | |
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 … | |
[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 … | |
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 … | |
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 … | |
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. ![]() | |
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 … | |
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 … | |
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 … | |
Is there a module for a camera in PyGame, because I want the camera to follow an image, thanks. | |
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 … | |
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, … |
The End.