15,175 Topics
| |
How does one do the equivalent in Python of GridView in VB? I have a project with hundreds of different info cards with about several individual pieces of data to be tracked on each card. example of card: card 1 name: Zeus image: img1.png level:5 heirarchy:0 type: diety now imagine … | |
hey everyone, does anyone know the python command that forces the interpreter to go interactive? the situation i'm talking about goes like this: [LIST] [*] run script from command line [*] let all kinds of complicated nonsense execute [*] script runs the "go interactive" command [*] python dumps you in … | |
My friend and I play call of duty 4. He pwns me. I'd like to disable his keyboard in the middle of playing. | |
How do I take randomly generated numbers and print the average of the numbers? And how do should I go about printing how many even and odd numbers that were generated? Thanks | |
I created a little script using the datetime functions in python and am trying to convert this to a .exe using py2exe. When I try running this from someone else's machine I get an error message about calendare module not found This is the python [code]import datetime import calendar no_of_days … | |
Hi everyone. I need some help with a subprocess. My Python script uses the os.popen2 function to spawn a non-Python subprocess. Now it needs a way to send a Ctrl-C interrupt or something equivalent to the subprocess. Does anyone know how to do this? Thanks in advance! | |
hey all, I'm trying to integrate sqlalchemy into my project build rather than install it separate. so in my project i have "<project_dir>/lib/sqlalchemy/*" i put a the __init__.py in "lib" but when i try to do [icode] from lib.sqlalchemy import * [/icode] i get: [quote] --------------------------------------------------------------------------- ImportError Traceback (most recent … | |
First of all, forgive my naivete - I'm new to programming and trying to teach myself Python with the aid of the Internet and a book or two. My current problem that I can't find a solution to is hard for me to explain. First, I'll give the code I … | |
Greetings; Please, is there a 'python tool' of sorts (ide or whatever) that will convert [U]Python code to 'C' code[/U] . Thanks! | |
I'm having trouble with my programs for class. Program 1 Write a function that receives a list as its parameter and returns a list with the length of each element. In the main function print the returned list. [CODE]def elementLength(list): list = raw_input("enter list") return len(list) print elementLength(list)[/CODE] What it … | |
Hi. I have an xml file like this: [CODE=xml]<tree> <category title="Item 1">item 1 text <subitem title="subitem1">subitem1 text</fileitem> <subitem title="subitem2">subitem2 text</fileitem> </category> <category title="Item 2">item 2 text <subitem title="subitem21">subitem21 text</fileitem> <subitem title="subitem22">subitem22 text</fileitem> </category> </tree>[/CODE] I use ElementTree to parse this file and this works okay, however, I now need to … | |
So, for my assignment I have to make an image look like part of it was a green screen or blue screen or whatever you want to call it (what they use for things like weather forecasts on tv). So that means turning certain pixels blue/green/whatever. I can that much. … | |
Hi all! I have an drawing area inside a scrolled window. I use the following to redraw my drawing area: [CODE] myDrawingArea.connect("expose-event", self.view_expose) [/CODE] In function view_expose the redrawing is carried out. When I open my window the view_expose function is called all the time and my processor goes crazy! … | |
Hi, there I have resource lines and target lines here below resource lines: 1 J=2,7183 SEC=CON450X450 NSEG=2 ANG=0 56 J=7224,164 SEC=CON450X450 NSEG=2 ANG=0 Target lines: *element,type=b31,elset=CON450X4501 *element,type=b31,elset=CON450X45056 "elset=CON450X4501" in the target lines come from a combination of "1" and "SEC=CON450X450". Similarly, "elset=CON450X45056" in the target lines come from a combination … | |
Hi, there Thank you so much for reading my question. I have apart of a text file with a structure as following: LOAD NAME=LIVE TYPE=UNIFORM ADD=110 UZ=-4500 ADD=113 UZ=-4500 ADD=114 UZ=-4500 ADD=120 UZ=-4500 ADD=121 UZ=-4500 NAME=SIDL TYPE=UNIFORM ADD=110 UZ=-850 ADD=113 UZ=-850 NAME=CLADDING TYPE=DISTRIBUTED SPAN ADD=15470 RD=0,1 UZ=-4500,-4500 ADD=15471 RD=0,1 UZ=-4500,-4500 … | |
I can't seem to figure out what's wrong with this simple code. I have a user input and if it matches prints out 'That's good', if not prints out 'Too bad' but how can I get the input to ignore being case sensitive? [code] ans=raw_input("Are you feeling well today? ") … | |
[B][/B]Hello to all. I am getting more hurdles while trying for the validation for the login from. I did a small project , but i am unable to set the validation for the main login form. I am using some simple logics. [COLOR="Green"][B]try: import os import MySQLdb,md5 import bz2 import … | |
the topic is writing/reading text files, but i got this simple question. how do i make this program so it will look like this: [url]http://i39.tinypic.com/5554wi.jpg[/url] i can't figure it out. - to make it keep looping and asking "enter your name or break to exit" continue the question until the … | |
| hi again! at school we were learning about perfect numbers and i thought it would be useful to write a program to find them i currently have this code: [ICODE]b= 1 h= 1 factors = [1,] n = float(raw_input("what is the number?")) while h < n: if h*b == n: … |
Hi all, Is it possible to copy an object (instance) and manipulate the copy without affecting the original one. I mean, Suppose: D.node = 'Node' and D.child = {0:'child1',1:'child2'}. Now, copy D to D_c and put D_c.child={}. So, D should be kept as it is originaly, which means D.node = … | |
hi everyone, I am having issues with an assignment for university. I know that you are not here to do my work for me but I could really use a little help. My assignment involves a parse file that the uni tutors have written for us and we have to … | |
I just bought an inexpensive used Dell notebook that has Ubuntu/Linux as an operating system. Compared to Vista this is sweet. It came with Python25 installed, but it was easy to use the Add/Remove application feature to get open source software from the Ubuntu site. I downloaded/installed Stani's Python Editor … | |
I am printing out the R,G,B values of an image and get results like this: (30, 0, 0) (29, 0, 0) (28, 0, 0) (27, 0, 0) (26, 0, 0) (25, 0, 0) (24, 0, 6) (23, 0, 0) (22, 0, 0) (21, 0, 0) That is just a partial … | |
Hi, Don't hate me cuz I am a NUB. This may be very basic but I am more basic when it comes to python I simply need to add some variables together some come from a database and some are calculated. but I am getting a very frustrating error [code]TypeError: … | |
I've got this strange problem, I created an instance called structure, I made a function which return an object of this type. Just before returning, I print it, it gives me the right object. Now when I collect it in 'main' and print it, it becomes 'None'. If someone can … | |
So, I am supposed to be encoding and decoding hidden messages in images. I have perfect the decoding hidden messages part, but am a bit stuck on the encoding part (encoding a message by changing the red value in the pixel color to the unicode number of the letter. I … | |
Hi, I am trying to invoke a shell script from python. This shell script while running expects user inputs based on which it proceeds to perform several actions. I want to automate the process of sending the user inputs(may be from a file) I am using the subprocess Popen class … | |
I am having an issue with a project due. I am missing something? can you please help? here are the instructions and what i have so far. The final project will consist of three files called, Shape.py, Circle.py, and Square.py. I’ve written a test file you can use to see … | |
I have a list of directories named dirList. I need to filter and sort before I pickle I think. This is what I've got. [code] fileHandle = open( 'dirList.txt', 'w' ) fileHandle.write( 'yadda yadda yadda intro' ) cPickle.dump(mu1List, fileHandle) fileHandle.close() [/code] the mu1List is declared at the beginning and it … | |
This technically isn't fully a Python-related question, but I couldn't find a better place to post it than here. I'm just curious about how to get/update weather information from the internet... like say that sidebar gadget in Vista that updates the weather and temperature from some online-source. The problem is, … |
The End.