15,185 Topics

Member Avatar for
Member Avatar for sravan953

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 …

0
67
Member Avatar for tarun02kumar

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 …

Member Avatar for tarun02kumar
0
415
Member Avatar for eggowaffles

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 …

Member Avatar for mrnutty
0
146
Member Avatar for Lingson

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 …

Member Avatar for Lingson
0
217
Member Avatar for DimmerMeerkat

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 …

Member Avatar for DimmerMeerkat
0
105
Member Avatar for becca23

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 …

Member Avatar for willygstyle
0
83
Member Avatar for willygstyle

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 …

0
53
Member Avatar for nickcampbell

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 …

Member Avatar for woooee
0
2K
Member Avatar for blade18

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 …

0
55
Member Avatar for Lingson

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 …

Member Avatar for leegeorg07
0
141
Member Avatar for kavingray

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 …

Member Avatar for sravan953
0
123
Member Avatar for nani123

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. …

Member Avatar for Stefano Mtangoo
0
229
Member Avatar for mn_kthompson

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 …

Member Avatar for vegaseat
0
264
Member Avatar for EAnder

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 …

Member Avatar for vegaseat
0
818
Member Avatar for someone112

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 …

Member Avatar for snippsat
0
101
Member Avatar for mayanktalwar
Member Avatar for sneekula
0
68
Member Avatar for goldy736

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 …

0
67
Member Avatar for Stefano Mtangoo

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 …

Member Avatar for Gribouillis
0
219
Member Avatar for trayres

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 …

0
63
Member Avatar for computerfreak97

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 = …

0
40
Member Avatar for sravan953

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 …

Member Avatar for BDG
0
6K
Member Avatar for OffbeatPatriot

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. …

Member Avatar for OffbeatPatriot
0
166
Member Avatar for hkfwy

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 …

0
39
Member Avatar for fallopiano

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 …

Member Avatar for Gribouillis
0
140
Member Avatar for Lingson

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 …

0
57
Member Avatar for hydrobat

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 …

Member Avatar for hydrobat
0
1K
Member Avatar for bumsfeld

What is more efficient? 1) import math 2) from math import * 3) from math import sin, cos

Member Avatar for Stefano Mtangoo
0
115
Member Avatar for leegeorg07

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": …

Member Avatar for woooee
0
115
Member Avatar for mediachicken

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 …

Member Avatar for Ene Uran
0
2K
Member Avatar for zachabesh

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! …

Member Avatar for zachabesh
0
100

The End.