14,952 Topics

Member Avatar for
Member Avatar for oscquin

I have to do this project, The concept is quite simple (I think) but I have no Idea of how to accomplish it in python. What I have to do is make a date converter for Haab - Tzolkin Maya Calendar. It has to read Haab Date and return Tzolkin …

0
50
Member Avatar for Racoon200

Hi. Iam making an app to write and append to an html document blog-type blocks. I have the GUI finished, but I need to fusion it with my script. Look at this snippet of my script: [CODE] def link(href,target,linkName): partA = "<a href='"+href+"' target='"+target+"'>"+linkName+"</a>" print partA [/CODE] Now, this is …

Member Avatar for Racoon200
0
141
Member Avatar for meiyantao

Hello,everybody! I write my first Python script in file [B]Fibonacci.py[/B] in Linux as the fallowing: [CODE]a,b = 0,1 while b < 10: print b a,b = b,a+b[/CODE] When I want to run it,I must input these command in the command line: > python Fibonacci.py I want to know what should …

Member Avatar for meiyantao
0
116
Member Avatar for jiu

Hi everyone, I'm a relative beginner in python looking for a bit of help on an error I get when running the script posted below. It is used to split data files in text mode. It runs through a list of files (using the glob module) and creates a number …

Member Avatar for jiu
0
85
Member Avatar for animatinator

I'm having problems getting the MediaCtrl to display at a reasonable size with large videos. When I make it play one it instantly resizes itself to the size of the original video no matter what I set as it's maxsize, which often means that part of the window is off …

Member Avatar for woooee
0
191
Member Avatar for mn_kthompson

I'm curious why this bit of code doesn't work. When run it returns a blank line. Note: this is making use of a linux device file so it should not be expected to run properly on Windows. [CODE=python] #!/usr/bin/env python import os infile = os.open("/dev/zero", os.O_RDONLY) charout = os.read(infile,1) os.close(infile) …

Member Avatar for woooee
0
876
Member Avatar for Seagull One

Sorry...this turned out to be such a long post.:sweat: Hello. This was originally a problem I was facing with the user interface for my robot, but my latest post was never answered there. Right now I'm experimenting specifically with this problem: verbal raw input. I've posted this problem in another …

Member Avatar for jrcagle
0
223
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
203
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
108
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
71
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
62
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
164
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
83
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
71
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
256
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

The End.