15,194 Topics

Member Avatar for
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
433
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
148
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
223
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
109
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
85
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
55
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
57
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
144
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
125
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
237
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
276
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
821
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
103
Member Avatar for mayanktalwar
Member Avatar for sneekula
0
70
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
69
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
222
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
65
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
41
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
169
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
41
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
144
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
59
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
117
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
118
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
102
Member Avatar for mattlew62

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 …

Member Avatar for woooee
0
158
Member Avatar for sravan953

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 …

Member Avatar for Dan08
0
105
Member Avatar for leegeorg07

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(), …

Member Avatar for leegeorg07
0
100
Member Avatar for leegeorg07

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

0
56
Member Avatar for BigTurtle

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 …

0
69
Member Avatar for kk2628

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

Member Avatar for kk2628
0
6K
Member Avatar for kennm

Greetings. I'm relatively new to Python and need to write a simple (?) script that will capture all data from, say, port 42 and write it to a file. Can someone help me get started? Thanks. kennM

0
47
Member Avatar for stellalxin

Hello, everyone. My boss gave me a mission impossible. He asked me to retype all the content from a 126 pages PDF document. God! I don’t wanna spend the whole day doing this boring task. Any idea? I tried copy and paste, but I can’t copy from the PDF files. …

Member Avatar for stellalxin
0
978
Member Avatar for Stefano Mtangoo

Hi, I'm planning to work something with XML and Python. As part of familializing with it, I want to make simple playlist for a wxMedia player. the player is simply wx.MediaCtrl with some buttons and wxListCtrl as list container. My Question is, what process does it take to get playlis …

Member Avatar for Stefano Mtangoo
0
135
Member Avatar for thr

hello i want to select programming language that obtain this feature for me: 1: write best web application and speedy web application( like php application) 2: write desktop best and speedy application is fit python this features please help me to select best programming language for this feature i am …

Member Avatar for John A
0
100
Member Avatar for Navanax

First of all, just want to say hello, new to the forums, and hope that I could receive some help. I spent some time learning reversing, (Up to tutorial #30 of lena151's) I know pretty much everything except advanced key-genning and crypto, even reversed a few programs that were being …

0
42
Member Avatar for thr

hello i want to select programming language that obtain this feature for me: 1: write best web application and speedy web application( like php application) 2: write desktop best and speedy application is fit python this features

Member Avatar for tomleo
0
247
Member Avatar for stvrich

Hello This is a completely foreign thing to me, so, forgive my "Noob-ness" I'm so embarassed. You programmers out there are prob gonna say, "how much easier can we MAKE it for you?" I just installed the python gui on vista. (I will re-install it on THIS xp machine also …

Member Avatar for stvrich
0
240
Member Avatar for darangho

Hi, all I want to write a program that doesn't require /path filename.py whenever i execute the program. I heard that one way to do is creating an alias for a command. I know this can be done by alias name=String in shell script, but how can i perform this …

0
61
Member Avatar for mahela007

Hi.. I'm just curious as to how one would set about writing some python code to monitor the network usage in one session... The program should simply record how much data has been downloaded from the time the computer is switched on to the time it was switched off. What …

Member Avatar for willygstyle
0
3K
Member Avatar for sab786

hi all, i still cant get myself out in my previous thread i wrote that i wanted to carry out a random sample function on an entire file.. now what i wish to do is read a file use a dictionary to search lines and then get this lines and …

Member Avatar for willygstyle
0
148
Member Avatar for mahela007
Member Avatar for pluring

Hi! I don't remember where but i found this download function (geturl) that works great if i just send one url to the function. But as you can see i want to execute geturl() for each line in url.txt witch contains url:s. It still downloads but instead of a progressbar …

Member Avatar for pluring
0
139
Member Avatar for eddy80310

I have a text file(computer.txt) with informations about (computer ID) (computer brands), (price) and (computer parts:number required). It looks like the following comp123, Sam sung, GC323:3,MC202:2,KB132:1 comp423, Acer, GC232:1,SP666:2,WC132:3 comp341, Asus, LP123:3,MM231:3,LA123:3 How can i read this text file and output as a dictionary.

Member Avatar for willygstyle
0
126
Member Avatar for jcmeyer

Is there any way to tell if a user clicks on the TitleBar of a frame? I tried to use wx.EVT_LEFT_UP(frame, self.OnLeftDown) but it does not seem to recognize a click on the TitleBar. Thank you for any suggestions.

0
63
Member Avatar for foosion

I've been having problems with email in 3.1.1. I decided to try the examples from the docs. Alas, the first I tried didn't work. I tried to send a directory whose only contents were a single zip file. [code]#!/usr/bin/env python """Send the contents of a directory as a MIME message.""" …

0
252

The End.