14,945 Topics

Member Avatar for
Member Avatar for nish88

hi...i'm tryiing to make the picture gold.gif transparent so that i can make some animation on it.cn you please help me to make the picture transparent.thanks in advance import Tkinter from Tkconstants import * import tkMessageBox def window(tk): global photo #### SIC! frame=Tkinter.Frame(tk) frame.pack() canvas=Tkinter.Canvas(frame,bg ='white', width=500,height=500) canvas.pack() photo=Tkinter.PhotoImage(file="gold.gif") canvas.create_image(200, …

Member Avatar for woooee
0
298
Member Avatar for eleonora

I am a python newbie and i have trouble with those 2 exercises: 1.A date of the form "8-MAR-85" includes the name of the month, which must be translated to a number. Create a dictionary suitable for decoding month names to numbers. I have to create a function which uses …

Member Avatar for eleonora
0
202
Member Avatar for Noliving

Here is my code, all I need help with is getting the text to display in a graphics window. I have tried several different ways and I'm not getting any errors either. I bolded the part that I'm having trouble with. The other ways I have tried have been pounded …

Member Avatar for vegaseat
0
107
Member Avatar for pythonhelp

hello, I am very new to python scripting and would require some help. Thers a product called Ajaxterm which makes use of python scripts and Ajax that I am using. It's a web based unix terminal emulator. I have set this up to work correctly. But there are some unicode …

0
68
Member Avatar for bsdixon21222

Hello All, I havn't been programming with python too long, but decided the best way to learn it would be to dive right in. Right now I have been taking snippets here and there along with modifying some code in between to create some programs. The one I am currently …

0
61
Member Avatar for nish88

can you please tell me the code to make a picture transparent in python.thnx... if possible you give me the codes. thnx in advance

Member Avatar for nish88
0
40
Member Avatar for jobs
Member Avatar for jliu66

Hi, I have a question regard to assign the values to each memebrs of the class objects because I have a large list of class objects. Can I do the following? If not, how can I achieve the same thing? Thanks in advance. class person(): def __init__(self): self.name = ' …

Member Avatar for woooee
0
163
Member Avatar for aot

I've been trying to use binding to a KeyPress/KeyRelease such that a particular function runs as long as the key is pressed and ceases when it is released. However, it seems like my major problem is that most keys are considered to continually activate as long as you hold them …

Member Avatar for Quarks
0
15K
Member Avatar for jobs
Member Avatar for maddog39

Hello all, In my python application I am trying to capture the output of stdin from a command that I run via popen2(). The python docs say that it returns a tuple of (stdin, stdout) however and i run: [code=python] result = popen2(command)[0].read() [/code] It only prints the results to …

Member Avatar for maddog39
0
126
Member Avatar for mruane

I have been trying to figure out how to create a custom save script for text games and a text editor that I am working on. I was thinking I would have to have the script write to the actual program, unless I had an extra file just for saves. …

Member Avatar for jrcagle
0
82
Member Avatar for LanierWexford

I am trying to learn Python by converting my C++ homework to Python. Below I am converting a Cobol file of employees to a comma delimited file. from: 00001JAMES ADAMSON 010104000014550324201021500067500040010011593 to: ID#,Last,First,Territory#,Office#,Salary,SSN,Department#,JobClass 00001,ADAMSON,JAMES,01,01,40000.00,145503242,01,02 I want to use EOF as my while loop control but I am getting a syntax …

Member Avatar for vegaseat
0
203
Member Avatar for cyberdon

I need to find a regular expression in Python. My text string is: 2007-10-12,163.01,167.28,161.80,167.25 I want to extract only the last part: 167.25 (end of line part) I tried using regex="(?=[,].+?(?=[\\n]))" but it did not work. What will be the answer? Thanks!

Member Avatar for woooee
0
75
Member Avatar for viswanadh

Hello, I have Python 2.4.4 installed on a system (CentOS distribution) at my university. I am experimenting with some python add-ons which are already installed. But the files are with Read-Only permission. Root permission is not my problem. But I want to alter the program code of some python add-ons …

Member Avatar for woooee
0
84
Member Avatar for tphilbin

I am a new Python user and would like help on the following task. I need a program that will be able to receive input from the system COM port and display it in a window that mimics an LCD graphic display that would be found on a calculator or …

Member Avatar for woooee
0
94
Member Avatar for kuoz

Hi, I am very new to Python, I know how to write a basic program, but i know nothing about drawing graphs. I need to write a program to test a random number generator by putting dots on a coordinate graph. Can someone tell me how to make a coordinate …

Member Avatar for vegaseat
0
70
Member Avatar for MrKnowNothing

Again I have tried to move on to another program and I am running into another snag. I am trying to write a program that determines if a number is prime. I know the basic format of what I have is pretty close (we talked about it in class), so …

Member Avatar for woooee
0
73
Member Avatar for CoolFool

Hello EVeryone... I really need some help with this problem... A certain CS professor gives 100 - point quiz graded on scale 90 - 100:A 80 - 89:B 70- 79: C , 60 - 60:D <60 :F I need to write a program that eccepts an exam score as input …

Member Avatar for woooee
0
164
Member Avatar for Fox5

Hey all, I'm trying to write a python networking program that is capable of recieving arbitrary files, as well as sending them. However, I can't really get it working, though occasionally a string seems to get through in tact. If someone could look through my code and maybe run it …

Member Avatar for Fox5
0
78
Member Avatar for jliu66

Hi, my friends, I try to use csv module to input data in csv format but split does not work. Could you please help? The input data is 2 column data separated in comma as csv format. The code is following: reader = csv.reader(open('Indices.csv', 'r'), delimiter = ',') line = …

Member Avatar for BearofNH
0
255
Member Avatar for sreejithps

Hi, I created a python script and trying to run it as a windows service. In my script I am reading some data from a configuration file . My problem is , if I run the script in python editor it will work fine and when running the same as …

Member Avatar for BearofNH
0
1K
Member Avatar for 136456

Hi every bod I am new in programming and I like to start with pyqt but I can not find anything for learning in internet please help me how how can I write program with gt designer & when I make a form in qt how can it work(my English …

0
61
Member Avatar for axn

excuse my ignorance, cant find it here in the forum. how do i strip the "|" or the pipe character from a line. i tried this. it splits but doesnt remove the "|" character. output = string.strip (line, '|') # strip the pipe character print output.split() # split output and …

Member Avatar for jrcagle
0
79
Member Avatar for jliu66

Hi, I have a question ask you or expert. Can python's function return a class at the end of function definition. The class have only a set of data members like struct in C. Please help and thanks in advance. Any good reference on this topic? John

Member Avatar for jliu66
0
12K
Member Avatar for manishdhelia

[COLOR=red]if(ikmo.getObjectType() == 'Folder'): [/COLOR] sReturnURL = 'Present?object=1.11.1234' else: sReturnURL = 'Present?object=%s' % (oid) The above code when executed doesn't go inside the "if" condition despite the condition being true. Can anyone tell me where is the problem??? Editor for Python on Daniweb: Please use the [b][noparse][code=python][/noparse][/b] and [b][noparse][/code][/noparse][/b] tag pair …

Member Avatar for vegaseat
0
94
Member Avatar for sreejithps

Hi, I am tryiing to open a file from my python project. The path to the file is given as .\Templates\html\temlate1.html. I used the file Alerter.py to open the above said file. Actually this source file and the Templates directory are existing in the same folder and on execution of …

Member Avatar for vegaseat
0
111
Member Avatar for arkad

Hi I’m trying to use the function os.execv to execute a batch script within my Python script. Second argument for os.execv shall be a tuple or a list and I test to send tuple or a list as second argument, but nothing works, I get different type of error message. …

Member Avatar for arkad
0
1K
Member Avatar for Panarchy

Hello! I was wondering if anyone has a forum backend, in python? I know a bit of python myself, but I want the backend (working backend for a forum) I am going to make the frontend myself (in html, not php, has to be html) Please provide it! Thanks in …

Member Avatar for Panarchy
0
114
Member Avatar for Haze

when i change the state of a entry widget to disabled it greys out automaticly and this doesn't happen with text widgets. I was wondering if there is a specific value i can change for text widgets to make it work the same way as a entry widget. this is …

Member Avatar for jrcagle
0
83

The End.