15,181 Topics
| |
| 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, … | |
I know that, in python, to start a file with it's associated application that is located on my hard drive I can simply use os.startfile. However, I want to be able to start a file with it's associated application that is located on an ftp site. Does anyone know how … | |
Hey everyone, Here is an outline of my problem: I have a working code which defines a class, GeneDict, which reads in data from a special type of file, and stores it as a dictionary. What it is really doing is taking in millions of lines of biological data, and … | |
I have a recursive function. My base case is: [code] somemethod(somelist) [INDENT]if len(somelist) == 0[/INDENT] [INDENT][INDENT]return[/INDENT][/INDENT] ... [/code] This is suppose to return the function to the place where it was called from. [code] main() ... somemethod(somelist) ... [/code] But I get this error: AttributeError: Trie instance has no attribute … | |
I'm getting my feet wet with nodebox and Python. What is a real world way to find a library I need, download it, and move it to a directory so that the Import --some library will work? I'm having trouble getting any imports to work from within nodebox. thanks | |
To help people who come from console application and who wants to implement GUI, it is better for them to know the real world application made by available toolkit. I suggest this be the place to show real world apps doen by toolkits in Python Language Hope it will help … | |
Hi, I am new to programming with python. I want to make a image rotate dynamically corresponding to the CPU usage in ubuntu. I searched everywhere but couldnot find any post for it.All i have found is a static rotation with the PIL. If anyone could help me in this … | |
Hi! I'm about to rename a hole bunch of files in different folders and want to use Python to do it. The problem is that I want to keep parts of the file name from the old file and insert it into the new file in another location. for example: … | |
The basic set-up is: [CODE=python] class A(): def __init__(self): self.var = 1 @staticmethod def do_stuff_with_var(self): # A method which uses self.var ... class B(A): def __init__(self): A.__init__(self) b1 = B() b2 = B() list_of_B_instances = [b1, b2] for instance in list_of_B_instances: instance.do_stuff_with_var(instance) [/CODE] However the last line of code raises … | |
Hi Forum, I am a total newbie, so please be gentle!! I am trying to extract data in many text files that looks like this: 0.0 -0.9 0.3 -0.4 0.6 -1.0 0.9 0.3 These colums always appear on the same line number. What I want to do is to get … |
The End.