15,190 Topics
![]() | |
Hi, I am using the following code to send mail from a open window in maya application. This gives me following error. I think it says that A2 is not created. What is a possible way to have this code send a mail. BRgds, kNish # Error: name 'A2' is … | |
Hello All. I am quite new to programming, I have a question in regards to creating a script that reads data from a file and then prints how many time each value ( number in my case occurs). I was wondering if you could help me write a similar script, … | |
I am getting an attribute error...Group not found on cookie = m.group(1) Can any one fix my code here? [CODE]#!usr/bin/python import re import urllib import urllib2 def MassVote(first_number, last_number, email1, email3, password, community_id, join = False, unjoin = False): def curl(url, cookie = None, get_header = False, fields = None): … | |
I found a way to open the source code on python command line, but my question is once it's in the command line what can i do with it? Anything? Or is it just another way to view the source code? | |
I'm trying to find the moving average of 20 numbers at a time, being read from a list. This moving average then needs to be inserted into the list. Here is my code: [code]inplis = file(r'table.csv','r').readlines() outp = file(r'avg_volume.csv','w') import math emptyList = [] totalVolume = 0 counter = 0 … | |
I've been searching for information on using wx.PyEvent so I can create custom events that fire from within my code rather than needing the user to trigger them. There isn't much around. There is some information on using wx.PyCommandEvent but I believe that these events still require the user to … | |
Hi everybody! I wrote for my company one little test application: Frame , Pmw.NoteBook and few buttons. and one main button 'Start' under NoteBook which starts process depend on name of Pmw.NoteBook... everything is fine , the problem is each of the processes run ~10 min and all this time: … | |
how do I extract the arguments using getopt Usage: test.py -P abc -S def -G xyz How do I extract the values abc, def and xyz? | |
This is my code for a chat client. I create a simple UI with a text box for viewing the chat and an entry widget to write messages. There's a button called 'Connect', when i click this i start a new thread which does the connection and keeps receiving messages … | |
how would you sort a class object? say..you have a card class, and in the card class, you can have the suits and face value of a card. how would you sort the cards by face values? (smallest to biggest?) thanks | |
Hi, I know nothing about compiling a program, but I desperately need a program that is written in python. I installed python and tried to compile it, but got errors. If someone would be kind enough to compile it for me and sent it to my email address, I would … | |
I'm currently working on an application to which sound integration is important. Currently I'm using winsound for all the sound-related aspects of the program, but it is sub-optimal. I've been unable to make it completely work, and .wav files are bulky. Are there any equally usable alternatives to winsound? | |
I'm having trouble with creating a function that would generate a random word from a list of four-Letter words from a file called fiveLetterWords.txt. I know how to generate the list and print it but I can't seem to get the random part right. I have attached the fiveLetterWords.txt file … | |
I need help on the use of Classes. I am trying to use the Font class in Python to create my own instance. Erro is no Font! I though Font was a standard class in Python. Any help for a newbie will be appreciated. ----------------------------------------------------- [code]from Tkinter import * class … | |
how would I tell python (using pygame code) to do an event after a certain amount of time? Would I use pygame.time.Clock()? | |
Hello I am fresh newbie in Python world. I need a python code that just copy my input file with a different name. I just want to test it. Example. A simple scipt file : [B]copyfile.py[/B] when I do a command like "python copyfile.py 1.jpg" it would copy the "1.jpg" … | |
This is a follow up to my solved thread a few days ago about extracting parts of a RegEx search in a web scraping app. Now, I have a script that includes 4 RegEx searches that each work individually. Now I want to compile all 4 into a single search … | |
i downloaded and put linux mint on a Cd it took about 3 hours i started the CD up and it's just files that i can't do nyhting with. what should i do? | |
Can anyone help me in graphics in python GUI using Tkinter toolkit...can anyone give me a code that can implement simple images onto the canvas of a GUI program, i know i have to use bmp. or gif. images which is fine because i got that. Thanks... | |
Hi there, I'm trying to connect to a PostGIS database (which is basically an enriched PostgreSQL database) and I'm having trouble with the [I]INSERT[/I] statement. Here's my code: [code=python] import psycopg2 try: conn = psycopg2.connect("dbname='postgis' user='fdi' host='localhost' password='fdi'"); print "Database connection established" except: print "Critical Error: Unable to connect to … | |
Heigh.. I have made an html editor which is a wx.stc.StyledTextCtrl with style=wx.TE_LINEWRAP definition. (stc.STC_LEX_HTML) when the lines are wrapped, they starts in the left side of the editor window. I found out only haw to make them start at fixed numbers of characters frrom the left, but I really … | |
High.... I am making a multi editor to use in my (some days in a month) job relateed to web building, and i have a problem in my html editor. I transformed the StyledTextCtrl_2 module from the wxPython Demo, from Python editor to HTML editor. Thats mean that i [B]changed … | |
when you are writing a program and you get an errer do you have to start all over again or is it ok to go on. i am just writing some of the programs that are on this site in the sticky's i am writing them in the command line … ![]() | |
can u guyz help me on how to make a program that's able to read chm file? i got this idea when i want to convert an entire chm file to pdf. i kno theres awready a software on that. but i reckon it would b interesting if we can … | |
Hello, I'm very much new to Python and I am stumbling on my first 'experiment'. What I want to do is create an application that operates as an on-screen log viewer where Python prints information it is processing into a wxTextCrl widget (called 'sampler' in my example). I am using … | |
Hi, Please can anyone help me to find a way to shutdown an SimpleXMLRPCServer. | |
Hello there everyone. For a summer project I'm doing, I have to use a phone to pass an image I've taken (on the phone) to a dedicated server I've made on a local ubuntu machine. For the upload code, I decided on python (seeing on how its easy to learn, … | |
[B][U]Ok heres the deal they're both a mathematics program but i want to make it like this...[/U][/B] [ICODE]from Tkinter import * import tkMessageBox import random def ask(): global num1 num1 = random.randint(1, 100) global num2 num2 = random.randint(1, 100) global answer answer = num1 + num2 label1.config(text='What is ' + … | |
[code] url='http://www.google.com' webbrowser.open_new_tab(url) [/code] This should open the google.com webpage, but instead it attempts to open : "file:///u/guest/python/%22http%3A//www.google.com%22 guest is my username, and /u/guest/python is where I execute the script from . Could you please tell me why this is happening ? Thanks | |
i have a python script and would like to know how to email the output of the script in python. i can do it from the command line(kshell) with in *nix but would like something like this in the script. somescript.py; echo "test" | mailx [email]john_smith@xyz.com[/email] |
The End.