15,175 Topics

Member Avatar for
Member Avatar for Ismatus3

Hello everybody I'm trying to use Python and Django to make my first website , i followed this tutorial : [URL="http://webpy.org/docs/0.3/tutorial"]http://webpy.org/docs/0.3/tutorial[/URL] , and i could finaly while the execution of the Python code nouveau_fichier.py which is : [CODE]#! /usr/bin/python # -*- coding: utf-8 -*- import web urls = ( '/(.*)', …

0
48
Member Avatar for Ismatus3

hello friends As the tittle say , i just would like to know if there is possibilities to change the graphisme of the Button : color , form , insert image on the Button ... , Thank you for answering , good luck :) .

Member Avatar for Ismatus3
0
213
Member Avatar for Ismatus3

hello friends , I just don't know , why in using Crontab it don't execute a code python that contain : [CODE]execfile("Backup1.py")[/CODE] my code is nouveau_fichier2.py : [CODE]#!/usr/bin/python #-*- coding:Utf-8-*- # -*- coding: cp1252 -*- import os print 'helo' #os.system("sudo chmod 777 /home/ismail/Bureau/Test/20111214") execfile("Backup1.py")[/CODE] and my crontab file after "crontab …

Member Avatar for Ismatus3
0
182
Member Avatar for veelasong

I am having trouble parsing xml files using ElementTree after the python code is turned into .exe using cx_freeze. [CODE] from xml.etree import ElementTree file1 = 'file1' file2 = 'file2' tree1 = ElementTree.parse(file1) tree2 = ElementTree.parse(file2) print 'Done' [/CODE] It works fine with the .py file, but after I made …

Member Avatar for veelasong
0
415
Member Avatar for pythonstudent11

What I'm trying to do is read a line from a file containing some data that includes a person's first and last name, their hourly wage and the number of hours they worked, and then writing to a seperate file their last name, first name: wage. The input file looks …

Member Avatar for pythonstudent11
0
326
Member Avatar for Lemony Lime

So, this seems like it should be the default to me... if you're going to make your own picture for a button, I don't see why you'd want the default border around it, but I can't for the life of me figure out how to get rid of it. I …

Member Avatar for vegaseat
0
2K
Member Avatar for Jaxyn

Beginner here (meaning I probably did something silly): I am trying to target indexed elements that have [A], in them. Entries for 'scarcity' and 'sweet' are both shown. I am running into trouble when index item[2] is empty. I get the following message: [code=text]['scarcity', 'scarce', '[A],', 'ity', '[N|A]', '[N]'] scarcity …

Member Avatar for Jaxyn
0
296
Member Avatar for sofia85

Hi, I need to extract some info from a file. This is two rows from what the file looks like: prob=0.0093;ID=RGT430;BQRS=491;BRZ=-4.263;ID2=RT914;DRT=0.00;HRun=0;HaplotypeScore=0.2794; prob=0.003;ID=RGR301;BQRS=4;BRZ=-3.261;ID2=EV913;DRT=0.00;HRun=0;HaplotypeScore=0.2654; ....etcetc until last row: prob=0.345. I want to extract prob from each row in the file and put it in a new file, but I don't know how …

Member Avatar for sofia85
0
133
Member Avatar for AndresOend

Have you ever cited the Python documentation? How did you do it? I can't seem to find author names and such information. I've only ever cited books as well. I'm trying to find out who authored the 2.7.2 docs, and how to cite them properly, since I used it to …

Member Avatar for TrustyTony
0
232
Member Avatar for jacob501

[code] import urllib from urllib2 import urlopen from gzip import GzipFile from cStringIO import StringIO import re import urllib2 def download(url): s = urlopen(url).read() if s[:2] == '\x1f\x8b': # assume it's gzipped data with GzipFile(mode='rb', fileobj=StringIO(s)) as ifh: s = ifh.read() return s s = download('http://www.locationary.com/place/en/US/Virginia/Richmond-page20/?ACTION_TOKEN=NumericAction') findLoc = re.compile('http://www\.locationary\.com/place/en/US/Virginia/Richmond/.{1,100}\.jsp') findLocL …

Member Avatar for Ezzaral
0
309
Member Avatar for Huntersknoll

Hi! I am trying to make a program that will put the bands I've played with in alphabetical order. I'm getting the band names from a file on my computer. I am fairly new to python and don't have much experience what so ever. I'll post the code that I …

Member Avatar for TrustyTony
0
186
Member Avatar for Nevicar

Hi everyone! I joined these forums about a week ago so I could try and learn more about Python, and thankfully I can say that I have learned a bit. Enough to try and create a Mastermind game, although I'm having trouble with converting the code into Pygame and give …

Member Avatar for TrustyTony
0
281
Member Avatar for seek

I am getting this error PYTHON - TypeError: unsupported operand type(s) [CODE]weekPay = [] names = [] hours = [] wages = [] while True: name = raw_input("Please input yor first and last name or type \"Done\" to continue: ") if name.title() == "Done": break names.append(name.title()) hour = raw_input("Please input …

Member Avatar for vegaseat
0
220
Member Avatar for AdampskiB

In my code they're instructed to enter a width and height. However obviously these will be intergers, but I need to perform checks that they are intergers before they're used. Atm I've got this: [CODE] while True: if width.isdigit() == True and height.isdigit() == True: if width >= 2 and …

Member Avatar for TrustyTony
0
196
Member Avatar for AndresOend

Hi there, I'm writing my first Python script for a(n imperative) programming class at university, and I want to make it a little better. It's meant to be fairly short, 50 lines. I've written the basic 'mechanism' to look at the user input. Instead of simply printing every property of …

Member Avatar for AndresOend
0
40K
Member Avatar for subhra1234

hi everyone,i am just a beginner in python,i am going through "head first programming" and saw about the [B][COLOR="red"]pygem[/COLOR] [/B],but iam unable to install pygem....i already downloaded [B][COLOR="red"]pygame-1.9.1release.win32-py2.5[/COLOR][/B] from pygem site,but at the time of running the set up i am getting a error that it is not compatible with …

Member Avatar for subhra1234
0
289
Member Avatar for Petee.bill

Hi friends! I need to make a function which takes a string, e.g: '(239..247),(467..765)' (corresponding to the coding area of DNA sequence) and return a list with a tuple for each coding part, each with a start and end value. e.g. [(239,247),(267,765)]. Someone has a clue how to start up?

Member Avatar for TrustyTony
0
126
Member Avatar for Sprewell184

Hi guys, I been working on a project that involves in managing a phone inventory for a company. So for this project we are to use classes. For the most part I got everything except two areas of code that I am having trouble with. I have two classes, Class …

Member Avatar for TrustyTony
0
118
Member Avatar for Kitson

Hi, I have data in the form: rpm Torque 1000 36 2000 40 3000 45 4000 50 . . I need to find the torque at a specific rpm. I found numpy.interp() which will give me a linear interpolation, but my tutor said it wouldn't be accurate enough. I found …

Member Avatar for Kitson
0
480
Member Avatar for greenblack

How do you get the name of a win32com.client.gencache.EnsureDispath name? For example, I have an application named "xxxxx", and the Python object browser detects it when I use makepy.py. How do I get name like "Excel.Application"?

0
45
Member Avatar for cocobun31

[CODE]tomorse ={ 'A': '.-', 'a': '.-', 'B': '-...', 'b': '-...', 'C': '-.-.', 'c': '-.-.', 'D': '-..', 'd': '-..', 'E': '.', 'e': '.', 'F': '..-.', 'f': '..-.', 'G': '--.', 'g': '--.', 'H': '....', 'h': '....', 'I': '..', 'i': '..', 'J': '.---', 'j': '.---', 'K': '-.-', 'k': '-.-', 'L': '.-..', 'l': '.-..', …

Member Avatar for TrustyTony
0
454
Member Avatar for monica23

Good day everyone, I need to print data using if-elif statement. I when I run this code like this, everything went well [CODE] if row['username'] == 'mutago': print " okay" sys.exit(0) else: print "wrong" [/CODE] OKAY now i want to include elseif statement to print another data but it returns …

Member Avatar for woooee
0
234
Member Avatar for Lukester3

Hey, So I am completely new to python, I was wondering if someone could assist me with this program I am trying to make, The idea is simple, a program that counts for the user. Asking the user to enter a starting number, ending number, and the amount to count …

Member Avatar for Ezzaral
0
191
Member Avatar for adobe71

Is their any way to make an exe from my python files other that py2exe as am getting some problem.And for the same is their any method for linux also.

Member Avatar for snippsat
0
186
Member Avatar for Ismatus3

hello everybody , good day , i just need to insert an image : "BosqueTK.jpg" in a speciale place in my window Tkinter using .place(x= , y= ) , for this i created a frame f2 placed like : [CODE]f2.place(x=130 , y=213) [/CODE] , and want to insert in it …

Member Avatar for Ismatus3
0
220
Member Avatar for hencre

Hi Guys, I'm new to python - how to execute dos2unix from python - subprocess.popen with shell = False ? >>> cmd = subprocess.Popen(["dos2unix","./FEED1/bin/*"], stdout=subprocess.PIPE) dos2unix: converting file ./FEED1/bin/* to UNIX format ... >>> dos2unix: problems converting file ./FEED1/bin/* All help appreciated.

Member Avatar for hencre
0
1K
Member Avatar for chet6

Hi, We are a team of 3 people. We have not worked on Python before.We want to learn python & also develop a small project or software using python,c,shell scripts in LINUX environment. Could someone help us or give information on websites of the projects that we can develop?

Member Avatar for Ismatus3
0
154
Member Avatar for ThemattyC

Im working on my final project for school where i have to uses arrays to store the first year of energy costs, the second array will store the second year after going green, and the third array will store the difference. I have pretty much all the code written out …

Member Avatar for TrustyTony
0
162
Member Avatar for natehome

Hello, im currently taking a python programming class at my high school and we have an assignment to create a falling sand type game using pygame. im totally lost on how to start could someone please help me get started. if you dont know what the falling sand game is …

1
93
Member Avatar for Luis Ventura

Hello, i'm new to this forum and to Python and i want to creat a function that counts the number of words on .txt file, but also that creats a dictionary with it, with the words has a key and the number of referencies to it has a value. Thanks …

Member Avatar for Luis Ventura
0
527

The End.