15,185 Topics
| |
| Hey guys, I am working on a Python project which will enable to watch movies on YouTube easily. I have added 'YouTube Video Downloader' as an add-on to my Mozilla we browser. Now, everytime I enter a list of URLs containing the movie I want to watch in parts, the … |
hello everyone, I am new to python so I need help about [B].pyd[/B] file I have a[B] xxx.pyd[/B] file which is basically a merge of many [B].h5[/B] data files. I have to use this [B]xxx.pyd files[/B](merge of simulations files) and compare it with one experiment data file which is also … | |
Hey I am obviously new here, but would love to get better at programming. I currently am using Michael Dawson's "Python Programming, Second Edition (for the absolute beginner)" to try and learn it. Anyway he gives code on how to make a very basic tic-tac-toe game inside the cmd prompt … | |
hi, how do I left justify all the radiobutton displayed? For example, I have 5 radio button with different text, each on different row using: [CODE]rb[i].grid(row=i, column=0)[/CODE] Instead of displaying it left justified, its all centered. I tried using anchor='w', but result the same. I tried also to count the … | |
Hello, I'm very new to Python (meaning I just started class about a week ago) and I'm a little stuck on something that I'm hoping to get some direction on. I'm trying to write a program that asks for user input for the names of two food names, then pushes … | |
I'm very new to Python and don't know very much about it's syntax and I need to write a class to interface with code given to me. [code] result = temperature(celsius=tempC).fahrenheit() [/code] The class is a temperature class that converts from celsius to fahrenheit and vise versa. The thing that … | |
Hey all, I've figured out how to monitor changes in a directory. But is it possible to monitor if a user is accessing a directory. I assume that when you click on a folder to change directory that triggers some event, but what event and how would I get access … | |
Hi, I've got two tables in a database - one a list of schools (around 50 entries), and one a list of pupils (around 17,000). Both are spatially-attributed using PostGIS. Basically I need to allocate each pupil to their nearest school. Currently I'm looping through the schools repeatedly, using the … | |
Hi Guys, I need to modify this script so that is also scan a range of host. [CODE] import socket import sys import fileinput import re import time from optparse import OptionParser usage = "./%prog -t target -p port -i input file -P proxy\nExample: ./%prog -t 74.52.252.187 -p 25 -f … | |
hi, I'm newbie in python and I'm using python 3.1 From the project ideas thread, I try to write a small module to calculate your age in years, months and days. Calculating the ages without the month (only years and days) would be easy, but adding the months makes me … | |
I’ve developed a twitter bot @Twity001 provides with useful information.It’s an auto reply bot.So you have to send a direct reply message to this bot to get information. Well,Twity is developed in Python.With the help of Cron job of GAE(I upload this program to gae btw),the program get the latest … | |
I have a python script whihc logs in some file. This script calls some outside bat file which also logs in same file. The out side program complains that it cant get lock on log file. The python script has lock to log file so it has to temporarily release. … | |
A couple weeks ago I was reading a thread about character counting and Vegaseat made the comment that [QUOTE]Function calls are time expensive in Python, so I modified Sneekula's count_char2() approach by replacing all those calls to islower(), isupper(), isdigit() and isspace(), and also changing the order of if/elif to … | |
Im confused and I need to know how to read from a tkinter textbox in order to create a text editor. Also would it be possible to have certain words colorized as you type in words? I would like to make this into a code editor possibly. Any help would … | |
hello there everyone , i am trying to compile a python script into exe , i tried both py2exe and pyinstaller and both cannot produce an exe without errors... when trying to compile simple scripts , the resulted exe works fine..... both programs after compilation displayed error messages requesting modules … | |
>>> print "hello world" syntax error :invalid syntax(<pyshell#0>, line1) where is the prob | |
hi , i just started working in python , am using postgresql connected using turbo gears , python . I have connected to DB modifying the dev.py , I want to display a created table from postgre sql in web browser using python turbo gears , my table in the … | |
Hello All, I want to copy zipped file from one machine to another in same network. I have the IP and folder of destiny machine, but I'm pondering on the best way to go! transfering among same drive, I will use shutil module. But what about networked PCs? Should I … | |
Hi everyone - I've got a C function that doesn't have a return type. Instead, its argument is a pointer to an array of doubles (the array is four doubles long - so the argument to the function is a pointer to the first one). So this function takes this … | |
| I don't know why this isn't working properly, it is supposed to use different colors every time you specify a new color, but it is not. [code] import pygame, os pygame.init() pygame.display.init() screen = pygame.display.set_mode((830, 620)) draw = 0 selected = 0 points = [] col = [0,0,0] selectedtxt = … |
| Hey guys, I wanted to make a simple Python program to send an email to my Gmail account. So: [code=python] import smtplib sobj=smtplib.SMTP("smtp.gmail.com") sender="sravan953@gmail.com" rec="sravan953@gmail.com" msg=""" From: From Person<sravan953@gmail.com> To: To Person<sravan953@gmail.com> Subject: Test Does it work? """ sobj.sendmail(sender,rec,msg) [/code] -but it doesn't work, it shows an error [code] Traceback … |
I programmed a a neural network class in python using numpy. I had some trouble getting it to work properly, in my case I wanted to train it with back propagation to approximate XOR, but then it started working, then it didn't, and overall it only seems to work sometimes. … | |
Hi, I'm using Python 3.1, and got some confusion when using eval. The code is in the following [ICODE] from datetime import date globalDict = dict() globalDict['today'] = date.today globalDict['date'] = date globalDict['__builtins__'] = None #date.today() funName = input('please input the function name: ') result = eval(funName, globalDict) print("The result … | |
hi all. This might be more of a math problem then anything, but i'll give it a shot. I have an idea for a game i am working on, in which the player must advanced thru a level my the means of propelling a cube in the air (across the … | |
hi, I'm using python 3.1 Is it possible if I run two applications at once? For example, if I make a clock/timer application with alarm etc, then I want exercise with my python, creating other codes, and running it. Is it possible? If I can make the application as stand-alone … | |
Hi! I've made a small program for an assignment and it works as it should. There's just one problem; the code contains two global variables. I won't pass the course unless I get rid of them and it's been bugging me for weeks. The program: [CODE] ##This program simulates a … | |
What is more efficient? 1) import math 2) from math import * 3) from math import sin, cos | |
| hi im making a chat program and im having a spot of trouble with a small part of code: [code=python] #def_unknown word_list=open("words.txt", "a") never_save=open("banned.txt", "a") def define_word(word): if word not in never_save.readlines() question="do you want to save %s? (y=yes n=not this time nn=no never)"% word define = raw_input(question) if define.lower()=="y": … |
Hey guys! I'm working on a program in python with Tkinter that allows you to enter in a bunch of number and such, and generate an image. So, I have PIL creating a blank PNG image and saving it, it all works... Now I want to add stuff to the … | |
Hi all, Here's my issue: [CODE=python]>>> a = [1,2,3] #all good so far >>> b = a #make a copy of a, called b >>> b.remove(1) #remove value 1 from b ONLY >>> print a #grrr, value has also been removed from a [2, 3] >>> print b #and b! … |
The End.