15,194 Topics

Member Avatar for
Member Avatar for natehome

can someone help me make my code more simple. i uploaded the source to my website in a zip file with all the images because i used pygame and if you want to test it you will need the images. you can download everything here [url]http://2nh.co/Tk[/url] or here is the …

Member Avatar for natehome
0
293
Member Avatar for jackbauer24

What is wrong with this code? [CODE]import time import sys print """Welcome to the age finder. This program takes some input (they will be the years) and then adds it to 4 ages. For example, if you give the ages 10, 11, 12 and 13 it will return the age …

Member Avatar for Gribouillis
0
334
Member Avatar for lundon

i searched for similar threads but couldnt find any. i write python scripts ..but i want to store them in someother folder eg /Desktop/... the scripts get executed from the unix terminal..however the python intepreter(initialised by typing python in terminal window )is not able to find the files. i changed …

Member Avatar for Trentacle
0
162
Member Avatar for zurk91

I am starting to try and manipulate some CSV file data. My first problem is the empty values (empty cells in a spread sheet). My boss sends me these files and when I open the in csv format Python gives me: "Denison, P14, , , , , $1600" I can't …

Member Avatar for valorien
0
217
Member Avatar for ThePythonNoob

Hi guys I need some help with a tic tac toe game I made, the problem[s] is that it will not display that there is a tie and when you win it will run the computer move function and then it will say you have won. It is something to …

Member Avatar for ThePythonNoob
0
221
Member Avatar for Findlebot

Okay, I need to write a maze solver for the maze in the text file (yes it is an assignment). I am not asking for a direct answer, I just want someone to propose ways of solving the maze( I also have to mark the paths taken in the maze). …

Member Avatar for 0x69
0
3K
Member Avatar for sofia85

Hi, I need some help getting the hypergeom distr. I've started with this code, but it doesn't seem work: [CODE]def logchoose(n, k): lgn = special.gammaln(n+1) lgk = special.gammaln(k+1) lgnk = special.gammaln(n-k+1) return lgn - (lgnk + lgk) def hypgeo(x, r, b, n): return exp(logchoose(r, x) + logchoose(b, n-x) - logchoose(r+b, …

Member Avatar for Gribouillis
0
104
Member Avatar for jackbauer24

Have a look at this...[QUOTE]>>> chores = 5 >>> paper_round = 30 >>> spending = 10 We’ve just created variables named ‘chores’, ‘paper round’ and ‘spending’. We can then re-type the equation to get: >>> print (chores + paper_round - spending) * 52 1300 16 CHAPTER 2. 8 MULTIPLIED BY …

Member Avatar for jackbauer24
0
177
Member Avatar for der caiser

Hello everyone, I'm new on wxPython programming I want to make an database with sqlite3, but I don't know how to make a database report with, just like an Microsoft Access Here's the code: [CODE]import wx import sqlite3 as lite class myframe(wx.Frame): def __init__(self, parent, id, title): wx.Frame.__init__(self, parent, id, …

0
66
Member Avatar for inuasha

The title really says it all. For example if I had a music file and I wanted to have it play all the way through then how would I make it start another music file after the first is done?

Member Avatar for inuasha
0
215
Member Avatar for glao

Hello , i have two tables ,animal ,which has name,familie and weight and table food which has feed. I want to assure that every animal has at least one food. I did this : [CODE]import mysql.connector from database import login_info db=mysql.connector.Connect(**login_info) cursor=db.cursor() data=[('Geo','Elephant',['hay',peanuts']), ('Gerald','Gnu',['leaves','shoots']), ('Leo','Leopard',['meat']) ...................... ] for name,familie,feed in …

Member Avatar for glao
0
4K
Member Avatar for Tech B

This will allow you to login a website with python. After logging in, you now have access to all the pages for "members only" accessed with python. Could be handy for a myspace update program, webcrawlers, facebook(not recommended, facebook doesn't like scripts), and other things. Some knowledge of HTML is …

Member Avatar for python.crawling
0
3K
Member Avatar for luvsdabud

Working on program to solve a predefined maze. I'm thinking the strings of spaces and #s should be arranged as strings or lists w/in a list, but not sure how to define spatial relationships so program can "move" through the maze. Just looking to help get started.

Member Avatar for hovestar
0
219
Member Avatar for Ares08

I'm fairly new to python and I've been working on this script for a week. I would like to get your input on my script and what improvements I can make to it. The way it works is by reading a file for backup times, which folders to backup and …

0
32
Member Avatar for jacob501

Hi. I am making a python program that automatically enters information into a form on a website. I looked at a module called mechanize at first but then I realized that it didn't support javascript. Is there any way to take a piece of information and insert it into a …

Member Avatar for jacob501
0
127
Member Avatar for Tcll

this is just a little project I'm working on for my converter I'll be asking for C++ to Py conversion since IDK C++ well enough to do it myself... but the project involves converting the current functions as well as writing opposite functions... (since the SDK only worries about writing …

Member Avatar for Tcll
0
444
Member Avatar for BenDeMoor

Does anyone know how to duplicate the top of the 'Torre Agbar' building? I've been able to make the whole colom structure but the top code is bothering me Pls help; need it for my school assignment What I'e got so far : [CODE]from visual import* import math #gegeven straal= …

Member Avatar for griswolf
0
141
Member Avatar for carasel

Hello Sorry about the stupidity of my question, I'm rather new to python. I'm writing a text analysation program. It reads from a text file and creates a list called 'line' which has variable length and is a list of words. I want to make a loop that will go …

Member Avatar for carasel
0
6K
Member Avatar for monica23

Good day expert, am trying to direct user to a web page if login is okay in python but does not work [CODE] if username==okay and password == okay: # direct to success_page.py print "Location: success_page.py\r\n"; else: direct to errorpage.py [/CODE] the code does not work as the web page …

Member Avatar for inuasha
0
227
Member Avatar for bond00

I've looked everywhere and I'm sorry if I'm missing the obvious, but I'm irritated out of my mind trying to find this solution. All I want to do is start an application with arguments in a new window (cmd.exe or linux terminal). I don't care about piping the data from …

Member Avatar for inuasha
0
6K
Member Avatar for p_sbk

Hi, I am new to python world ! Requirement is to automate plashing process. I need to run few ommand from command line (cmd) on window. - open cmd - execute command1 - execute command2 could you help me to develop script to automate this process ? Br, sbk

Member Avatar for inuasha
0
145
Member Avatar for imperialguy

Following is the system and software info [b]Platforms: Windows XP and OSX Lion Activestate Python 2.7.2 wxPython2.9-osx-cocoa-py2.7 (for OSX) wxPython2.9-win32-py27 (for Windows XP)[/b] I am trying to create a UltimateListCtrl using ULC_VIRTUAL and ULC_REPORT mode. I would like to know how can I put a checkbox beside the first column …

0
217
Member Avatar for Ares08

Hi guys, I am fairly new to python. The problem I am having is manipulating the data that I read from a file. Example: if a line of the file is Monday = 0800, is it possible to break up that line so I can read Monday and 0800 separately …

Member Avatar for woooee
0
156
Member Avatar for princessotes

i have two files containing lists and I would like to perform some manipulations with the numbers. file 1: [list] A 1 B 2 C 3 [/list] and file 2: [list] A 4 B 5 C 6 [/list] I have written the following code to read in the files and …

Member Avatar for woooee
0
91
Member Avatar for alpdoruk

Hello everybody, I wrote a script as like below arr = [(line.rstrip('\n').split(';')) for line in open('C:/Config_Changer.csv')] import sys import fileinput for i, line in enumerate(fileinput.input('C:/1.cfg', inplace = 1)): for f,t in arr: if 'description' not in line: line = line.replace(f, t) sys.stdout.write(line) ok my problem is my config changer file …

Member Avatar for alpdoruk
0
266
Member Avatar for oli82

Hi, Thank you for your help in advance, i am trying to create a dictionary, the code below works fine if I have two columns in each row with no spaces, however one of the columns data natively has spaces in it e.g. Sarah me hy uuuuu at the moment …

Member Avatar for oli82
0
2K
Member Avatar for Ismatus3

Hello friends In my window Tkinter there is 3 entries : actualpass , newpass , confirmnewpass . I just want to know how to do to check all entries one by one : if actualpass is empty : print "enter ur password" if actualpass is not empty and and newpass …

0
54
Member Avatar for iPanda

How can I use the "datetime" class to get a different time zone than mine? (for example gmt = 0 or utc+2) Thanks!

Member Avatar for iPanda
0
130
Member Avatar for BCBTP

I was wondering if anyone has some good examples of running python functions and scripts within C++ using the Python C API. I can't seem to understand the ways of the Python C API, and was expecting something more similar to the Lua C API. The real question is "What …

Member Avatar for vijayan121
0
318
Member Avatar for Jean Declaix

In the following code : [COde]#!/usr/bin/python # -*- coding: iso-8859-1 -*- import Tkinter import os import threading class Fil (threading.Thread): def __init__ (self): threading.Thread.__init__ (self) print "Init Fil" def f1 (self): print 'f1' #app().ecrit(1) class App(Tkinter.Tk): def __init__(self,parent): Tkinter.Tk.__init__(self,parent) print "Init App" self.initialize() ping() def initialize(self): self.grid() self.bouton1L = Tkinter.Label(text="-", …

Member Avatar for Jean Declaix
0
251

The End.