15,179 Topics
| |
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! … | |
I am new to programming and python in general I have written a couple of beginner programs now I am working on my first one and I have hit a bump I am using the IDLE interface and using 2.5. I have a repetitive task I do at work which … | |
| Hey, I just learnt the basics of smtplib module, and now know how to successfully send emails using Python. My next step is to learn how to use Python to 'use' the web, as in, download files from a specified URL, or something like that. What module is required for … |
| i have a program that converts text into morse code and then outputs it using a module i found in the snippets section but whenever i try to run it, it raises the error that "utext is not iterable" here is the code: [code=python] morse_code={ "a":beeps.a(), "b":beeps.b(), "c":beeps.c(), "d":beeps.d(), "e":beeps.e(), … |
| hi i was wondering if there are any open source projects looking to take on people in a sort of internship? I looked on sourceforge but i couldnt find anything thanks in advance |
Dear wizards, here are two easy wxpython questions. Thanks in advance for your help! 1. How do I get wxpython to activate a button when user presses "Enter"? In the baby application below, pressing "Tab" switches the focus from one button to another, but I don't know how to make … | |
Hi, I can use webbrowser.open_new(url) to open an browser window easily, but how do I close this browser window ? I have searched the web and still not able to find a solution. Another way of doing this might be to start the browser window in a separate program (progA) … |
The End.