15,175 Topics

Member Avatar for
Member Avatar for jbskaggs

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 …

Member Avatar for leegeorg07
0
69
Member Avatar for chardson

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 …

Member Avatar for chardson
0
176
Member Avatar for d-bug87
Member Avatar for jlm699
0
68
Member Avatar for quietasamouse

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

Member Avatar for lllllIllIlllI
0
75
Member Avatar for sumithar

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 …

Member Avatar for vegaseat
0
635
Member Avatar for JDCyrus

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!

Member Avatar for woooee
0
5K
Member Avatar for evilsage4

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 …

Member Avatar for woooee
0
90
Member Avatar for Whelk

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 …

Member Avatar for Whelk
0
1K
Member Avatar for vmars

Greetings; Please, is there a 'python tool' of sorts (ide or whatever) that will convert [U]Python code to 'C' code[/U] . Thanks!

Member Avatar for Nine Tails
0
12K
Member Avatar for DisembodiedLoaf

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 …

Member Avatar for sneekula
0
73
Member Avatar for MaxVK

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 …

Member Avatar for MaxVK
0
9K
Member Avatar for hunterm

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. …

0
67
Member Avatar for marcux

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! …

0
41
Member Avatar for ning2009

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 …

Member Avatar for ning2009
0
175
Member Avatar for ning2009

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 …

Member Avatar for ning2009
0
210
Member Avatar for kiddo39

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? ") …

Member Avatar for kiddo39
0
103
Member Avatar for bhanu1225

[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 …

0
57
Member Avatar for StarZ

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 …

Member Avatar for vegaseat
0
195
Member Avatar for leegeorg07

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: …

Member Avatar for jlm699
0
257
Member Avatar for faniryharijaona

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 = …

Member Avatar for scru
0
90
Member Avatar for clareypants

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 …

Member Avatar for jlm699
0
73
Member Avatar for sneekula

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 …

Member Avatar for MaxVK
0
325
Member Avatar for kiddo39

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 …

Member Avatar for kiddo39
0
112
Member Avatar for jeffj

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: …

Member Avatar for woooee
0
232
Member Avatar for faniryharijaona

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 …

Member Avatar for faniryharijaona
0
75
Member Avatar for hunterm

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 …

Member Avatar for sneekula
0
3K
Member Avatar for Rahul1123

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 …

Member Avatar for jlm699
0
4K
Member Avatar for shar123

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 …

Member Avatar for jlm699
0
277
Member Avatar for planetPlosion

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 …

Member Avatar for Gribouillis
0
79
Member Avatar for shadwickman

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, …

Member Avatar for shadwickman
0
121

The End.