14,952 Topics

Member Avatar for
Member Avatar for hazyvisions

I'm using python 2.6 64-bit and py2exe 64bit I want to make my program runnable for people who have 32-bit windows. Any help? Do I have to install and use python 32-bit version or is there a workaround?

Member Avatar for leegeorg07
0
31
Member Avatar for dinilkarun
Member Avatar for dinilkarun

Hi All, I have created a grid and want to implement the following idea: The user should be able to enter only numeric values in any of the cells in that grid. I could not get any property of the cell which can check for the entered data. Please guide …

Member Avatar for lllllIllIlllI
0
135
Member Avatar for you2

Hi , I'm a newbie to python. I would appreciate if someone can help me in solving this one. Say i have a string [b]str1 = "a:1,a:2,b:3,c:4"[/b] I want to get output in form of a dictionary like [b]d= {a:3 , b:3 , c:4}[/b] i.e if in the string[b] a[/b] …

Member Avatar for you2
0
118
Member Avatar for Whelk

I'm having a blast coding up my little text-based python game. I'm learning a heck of a lot while doing it. Now, I want to share it with some friends. I could just have them install Python and send them the files, but I was wondering if I could somehow …

Member Avatar for shadwickman
0
141
Member Avatar for samush

I'm trying to write a script thats spawns a fortran program that needs std file input i.e. you would open it in bash with: [ICODE] ./program < input [/ICODE] How can I do this in python? I have tried the os.spawnl() and it spawns the process but the input does …

Member Avatar for woooee
0
140
Member Avatar for ldk

Hello, I have a wxPython interface to an application (.pyw). I want to be able to run the application also from commandline to start the application as a batch procedure with the desired parameters. If the application runs and parameters are available (sys.argv), I run, from the commandline without the …

Member Avatar for jlm699
0
114
Member Avatar for ifemi

Hi all, i need help on how to change a grid line((x1,y1), (x2,y2)) to another color. I have a 6 * 6 grid(black lines), made using pygame and i want to change the colour, with response to a mouse click on the coordinates. Is this possible? Below is the code …

Member Avatar for ifemi
0
100
Member Avatar for davhuang

I am trying to write a program to do the hill cipher technique of encryption. I am stuck trying to break the large array of numbers representing letters etc. into multiple smaller arrays with one column and two rows does anyone know how this could be done?? Here is the …

Member Avatar for jlm699
0
258
Member Avatar for bobstein

I'm writing part of a program that involves writing user generated information to a text file. [code]class MonsterStats: def __init__(self, name): self.__monName = name def setName(self, name): self.__monName = name def fileWrite(self): monFile = open('MonsterFile.txt', 'w') monFile.write(self.__monName) monFile.close() [/code] I wrote this to test it out: [code]import MonsterClass name = …

Member Avatar for jlm699
0
107
Member Avatar for applebiz89

I'm not really to sure with using python and its object oriented features as Im better with java. Im not sure whether to put the functions inside the classes as i can't really seeing this making a difference. I will apply my code and any changes or guidence would be …

Member Avatar for jlm699
0
238
Member Avatar for mr.g.at.lot33

Hello to whom ever can help me out there. I have created a game where the player selects on a suit to bet. this suit will be shared among three dice. if the player gets his symbol shown up on all the dice he wins three times the bet amount, …

Member Avatar for woooee
0
461
Member Avatar for clR3vv

Well I decided to work on a GUI for this because I need the practice. However I ran into this weird problem. If I change line 67 from 1000 to 100 my program prints two of the last letter... [url]http://pastebin.com/d656cfd09[/url] (with 1000) [url]http://www.grabup.com/uploads/195f84b4dab3...f199.png?direct[/url] with (100) [url]http://www.grabup.com/uploads/8fd5d3d988ec...b568.png?direct[/url] That just makes no …

Member Avatar for clR3vv
0
324
Member Avatar for ning2009

Hi, there I have been confused about format control of List. My problem is that I get strange format when exchanging List[-1] with List[-2] using a middle variable. My code is to handle a text file. Old code in a For loop is: [QUOTE]sinf.write('*element,type=s4r,elset=WSLAB\n') path4b2_value[0]=str(int(path4b2_value[0])+100000) path4b3=','.join(path4b2_value) sinf.write(path4b3)[/QUOTE] which produces a …

Member Avatar for ning2009
0
128
Member Avatar for scheda

I'm having a little trouble running wxPython. I did a little Googling and didn't find a whole lot though. Here is a sample of what I'm trying to run... [ICODE]import wx app = wx.PySimpleApp() frame = wx.Frame(None, wx.ID_ANY, "Hello World") frame.Show(True) app.MainLoop()[/ICODE] This code is straight from the tutorial provided …

Member Avatar for vegaseat
0
134
Member Avatar for chardson

hi there, i'm using the PyArg_ParseTuple() function in my python bindings for some C code. the code i'm wrapping has two functions, one that returns a default value instead of an error if an error would have occurred, and one that returns an error. i simply want to use one …

Member Avatar for scru
0
176
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
166
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
634
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
4K
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
87
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
66
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
169

The End.