[Tutor] help: threading + cron in python?

2005-05-12 Thread Aaron
Lets say you have a threaded program. Is there any way to make it so that an operation occurs at a certain time every hour (eg) like the cron daemon? I'm afraid I don't really understanding threading enought to make this work.. ___ Tutor maillist - Tu

[Tutor] Extracting a PNG Image File from a Binary File..

2005-01-03 Thread Aaron Elbaz
Hi, My question is sort of on the difficult side, but I promise I'm a newb ;) So maybe it isn't.. Frederick Lundh himself gave me this chunk of code..and I can't get it to work. I was hoping someone could spot the error. The goal is to extract a png image file from a binary simcity 4 file. #imp

[Tutor] Text Directly to Screen?

2005-05-03 Thread Aaron Elbaz
Hi, My question has to do with outputting text. Normally, you ouput to a console or a gui...but for my task, a hack might be needed.. What I want to do is output text *directly* to the screen. And if possible, restrict the window area to specific dimensions (top right in mind). It should basical

[Tutor] #NameError: global name is not defined

2005-05-12 Thread Aaron Elbaz
Hi, I'm having difficulty understanding why the following code doesn't work: getfr.py #import pymetar # #class wReport: #def __init__(self,metarcode="CYYC"): #weather for calgary INTL #self.METARCODE=metarcode #rf=pymetar.ReportFetcher(self.METARCODE) #rep=rf.FetchRep

[Tutor] help: space formatting for multiplication table

2005-05-14 Thread Aaron Elbaz
I've been racking my brain and am right now feeling nauseous from not being able to figure out such a simple problem. Here's the code: #r=10 #line=1 # #def spaces(r): #return r/10 # #while line-1 < r: #for i in range(r): #print str((i+1)*line) + ' '*spaces(r), #line=line+1 #

[Tutor] Help: wget-- how does it work?

2005-05-27 Thread Aaron Elbaz
One of my favourite unix applications is wget. Thinking how easy (and fun) it might be to implement with pythons excellent librairies has led me to a few questions. First, I found the progress bar class from aspn http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/168639 This could be used t

[Tutor] Help: Possible to Pickle and Image?

2005-06-04 Thread Aaron Elbaz
Hi again :), My goal is to store an image file with lots of information relating to the image and the file it was extracted from, persistantly. Pickle seems like a really easy way to do this. So I'm wondering, is it possible to serialize things like images into a pickle? How do I do it? If not,

[Tutor] HELP: wxPython, adding items to combo box?

2005-07-04 Thread Aaron Elbaz
The simplest way I can explain this: I have a settings wxPython settings dialog, which contains a 'servers' combo box. I also have a shelf object that 'remembers' values entered into the ComboBox. The current value is stored as shelf['SERVER'] and the old values are kept in a list at shelf['OLD_SER

[Tutor] Performing an union of two files containing keywords

2014-02-17 Thread Aaron Misquith
I have 2 different text files. File1.txt contains: file RAMPython parser File2.txt contains: file1234 program I want to perform an union of these both files such that i get an output file3.txt which contains: file RAMPython parser1234 program The program that i'm working on just combines t

[Tutor] Library for .ppt to .txt conversion

2014-05-30 Thread Aaron Misquith
Like pypdf is used to convert pdf to text; is there any library that is used in converting .ppt files to .txt? Even some sample programs will be helpful. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.p

Re: [Tutor] Library for .ppt to .txt conversion

2014-05-31 Thread Aaron Misquith
The only thing i want from the ppt's is text and ignoring all graphical representations. I need the text to perform various nltk operations. On Fri, May 30, 2014 at 11:54 PM, Alan Gauld wrote: > On 30/05/14 10:41, Aaron Misquith wrote: > >> Like pypdf is used to convert pdf

[Tutor] Unicode Encode Error

2014-06-17 Thread Aaron Misquith
I'm trying to obtain the questions present in StackOverflow for a particular tag. Whenever I try to run the program i get this *error:* Message File Name Line Position Traceback C:\Users\Aaron\Desktop\question.py 20 UnicodeEncodeError: 'ascii' codec can't encode ch

[Tutor] (no subject)

2010-06-30 Thread Aaron Chambers
I'm new to Python, and wanted to start messing around with it, but the computer I'm using is running Windows 7, so is there a version of Python that's compatible with 7? ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options

[Tutor] Help needed

2011-04-07 Thread Aaron Brown
wed)) print("Minutes used were " + str(used)) print("Minutes over were " + str(totalOver)) print("Total due is $ " + str(totalDue(totalOver)) I keep getting a syntax error in a blank line

[Tutor] Need some help

2011-05-07 Thread Aaron Brown
Here is the code I have, and the error.I don't understand the TUPLE problem. Can someone explain. #Main Program def main(): notGreenCost = (12,float) goneGreenCost = (12, float) savings = (12, float) months = "January ","February","March ","April ","May ","June ","July ","August "

[Tutor] Python program to search videos using Bing

2014-09-12 Thread aaron misquith
I have been trying to search videos using bing search engine. But every-time I try I get error HTTPError:HTTPError 403:Forbidden This is the code i am using: import urllib import urllib2 import json def main(): query = "'pyscripter'" print bing_search(query, 'Video') def bin

[Tutor] The Best Way to go About with Self Modifying Code/Code Generation?

2012-07-07 Thread Aaron Tp
genetic algorithim or backprop algorithim and hopefully get something that can automatically write simple codesidk) My question iswhat should I be doing? Would the AST module work? Or am I jst being overly-ambitious? -Aaron ___ Tutor maillist

Re: [Tutor] The Best Way to go About with Self Modifying Code/Code Generation?

2012-07-08 Thread Aaron Tp
Thank you all for your responses. I don't know if I have the capability to even complete such a project, or if I possess the necessary will to start, but at least I understand it a bit more than when I was starting. --Aaron ___ Tutor mai

[Tutor] Beginner Q: What does the double underscore mean __ ?

2012-09-09 Thread Aaron Pilgrim
Hi, I was trying to teach myself some python from a book and I have seen double underscores used. What does the __ mean and how do I know when to use it? for example: __name__==’__main__’ (source) Pilgrim, Mark (2009-10-23). Dive Into Python 3 (Books for Professionals by Professionals) (Kindle L

[Tutor] convert ascii to binary

2012-09-12 Thread Aaron Pilgrim
Hello, I am trying to write a small program that converts ascii to binary. I tried using the python reference library section 18.8 but had trouble understanding how to make it work. Here is the code I am currently trying to use: def main(): import binascii myWord = input("E

Re: [Tutor] Tutor Digest, Vol 103, Issue 82

2012-09-17 Thread Aaron Pilgrim
> Message: 7 > Date: Mon, 17 Sep 2012 21:34:05 +0530 > From: Santosh Kumar > To: tutor > Subject: [Tutor] Trying to get next item from a list > Message-ID: > > Content-Type: text/plain; charset=UTF-8 > > Here is the script: > > alphabets = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j

[Tutor] Facebook login using python

2013-01-28 Thread Aaron Misquith
I am working on a program which is used to login to facebook, get my friend lists using graph api and export them into pdf format. So far i'm able to login with facebook and get the friend list. I would like if someone is able to provide me a code to export the output to pdf. Another thing is that

[Tutor] How to create a GUI for python using tkinter

2013-02-05 Thread Aaron Misquith
I have attached a python program with this mail which peforms following operations: 1.Logs in to facebook. 2.Asks the user for access tokens. 3.Gets the friend list of the user. 4.outputs the friend list as pdf. My Problems regarding the above program are: 1.I want to display the names of my frien

[Tutor] hiya

2008-02-05 Thread aaron meredith
i have tried to do this so many different ways but im not sure how to do it, i have a file with say multiple lines in it, it has a word in each line i want to keep but i also need the kept word in every first and second line joined together with some text in the middle this is what file looks like

[Tutor] COM & IE problems

2008-06-26 Thread Aaron Colichia
I've been using win32com.client to work with IE via COM, but recently had a need to start using comtypes.client because it provides a better wrapper for IE. However, when I want to grab an existing IE using comtypes.client.GetActiveObject() the result is always the same as illustrated below H:\dev

[Tutor] Help

2016-06-28 Thread Aaron Johnson
I have a program that is telling my i need your digital snake, but i dont want a snake. Help ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

[Tutor] Python IDLE for Windows 10, 64-bit

2016-09-21 Thread Aaron Rose
Hi, I'm looking for a link for Python IDLE for Windows 10, 64-bit. Can't seem to find the right link on python.org. Could someone kindly point me in the right direction? Thank you. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subs

Re: [Tutor] ask

2010-02-13 Thread Shurui Liu (Aaron Liu)
t; > These assignments are more about learning your local computing > environment and tools than they are about Python. If you are having > trouble you should ask for help at school. > > Kent > -- Shurui Liu (Aaron Liu) Computer Science & Engineering Technology University

Re: [Tutor] command error help

2010-02-14 Thread Shurui Liu (Aaron Liu)
SyntaxError: EOL while scanning single-quoted string. 2010/2/14 Shurui Liu (Aaron Liu) > Here is a program I need to run in putty.exe, but there is an error in it. > I cannot find out. When I ran this program, it mentions that the error is in > red line.It shows that "SyntaxEr

[Tutor] command error help

2010-02-14 Thread Shurui Liu (Aaron Liu)
you would weigh only", moon_weight, "pounds?" sun_weight = weight * 27.1 print "But on the sun, you'd weigh", sun_weight, "(but, ah... not for long)." raw_input("\n\nPress the enter key to exit.") -- Shurui Liu (Aaron Liu) Computer

[Tutor] count time limit

2010-02-16 Thread Shurui Liu (Aaron Liu)
command for this mission? Cause I don't even know how to google it. Thank you! -- Shurui Liu (Aaron Liu) Computer Science & Engineering Technology University of Toledo ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscriptio

[Tutor] command error

2010-02-16 Thread Shurui Liu (Aaron Liu)
print ("And it only took you", "tries times", "tries !\n") if ("tries = 0"): print "You have tried 10 times, game over." raw_input("\n\nPress the enter key to exit.") raw_input("\n\nPress the enter key to exit.") -- Sh

[Tutor] ask

2010-02-19 Thread Shurui Liu (Aaron Liu)
How to describe a math formula: sphere=(4/3)*PI*R**3? -- Shurui Liu (Aaron Liu) Computer Science & Engineering Technology University of Toledo ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python

[Tutor] ask

2010-02-23 Thread Shurui Liu (Aaron Liu)
umber from 1.0 to 1.9, and I did this in the same way as integer: range(1.0,2.0,0.1), but it doesn't work. Can you help me? Thank you! -- Shurui Liu (Aaron Liu) Computer Science & Engineering Technology University of Toledo ___ Tutor maillist -

[Tutor] ask

2010-03-28 Thread Shurui Liu (Aaron Liu)
ET 1100.We get to analyze all sorts of real-world problems.We also have to memorize some programming language syntax. But, the center of our focus is game programming and it is fun.Our instructor adds colour to his lectures that make them interesting.It is an honor to be part of this class!

Re: [Tutor] ask

2010-03-28 Thread Shurui Liu (Aaron Liu)
us is game programming and it is fun. Our instructor adds *color* to his lectures that make them interesting. It is an honour to be part of this class! 在 2010年3月28日 下午12:26,Shurui Liu (Aaron Liu) 写道: > Since English is not my native language, so I got confused by some > requirement of my assig

Re: [Tutor] ask

2010-03-28 Thread Shurui Liu (Aaron Liu)
know how to add its path in parentheses. What do u think? 2010/3/28 Shurui Liu (Aaron Liu) > I came out with a transigent answer: save the right text file* > (storyAmer.txt*) at the right place /cset1100py/assign19/storyAmer.txt. > Then I just add a command after the command which p

[Tutor] how to change some words in a text file

2010-03-28 Thread Shurui Liu (Aaron Liu)
eError: 'type' object is unsubscriptable What's wrong? -- Shurui Liu (Aaron Liu) Computer Science & Engineering Technology University of Toledo ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] how to change some words in a text file

2010-03-28 Thread Shurui Liu (Aaron Liu)
g > >>>> a  = 0 >>>> b = str(a) >>>> type(b) > > > > On Mon, Mar 29, 2010 at 2:53 AM, Shurui Liu (Aaron Liu) > wrote: >> >> Here's the thing, I wanna change some wrong words from a text file like >> this: >> >&

[Tutor] commands

2010-03-28 Thread Shurui Liu (Aaron Liu)
CSET 1100.') w.write('\n') w.write('We get to analyse all sorts of real-world problems.\n') w.write('\n') w.write('We also have to memorize some programming language syntax.') w.write('\n') w.write('But, the center of our focus is game programming

[Tutor] characters

2010-03-30 Thread Shurui Liu (Aaron Liu)
In Python, could space be counted as a character same as a letter? -- Shurui Liu (Aaron Liu) Computer Science & Engineering Technology University of Toledo ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options:

Re: [Tutor] characters

2010-03-30 Thread Shurui Liu (Aaron Liu)
yeah, thank you! On Wed, Mar 31, 2010 at 1:41 AM, Christian Witts wrote: > Shurui Liu (Aaron Liu) wrote: >> >> In Python, could space be counted as a character same as a letter? >> >> > > len(...) >   len(object) -> integer >     Return the number o

[Tutor] what's wrong in my command?

2010-03-31 Thread Shurui Liu (Aaron Liu)
ekdictionary.txt', 'r+')) # close file geekfile.close() raw_input("\n\nPress the enter key to exit.") When I run it, the system gave me the feedback below: Traceback (most recent call last): File "geek_translator3.py", line 4, in import pickle File

Re: [Tutor] what's wrong in my command?

2010-04-01 Thread Shurui Liu (Aaron Liu)
OK, can you tell me import.py is empty or not? If it's not an empty document, what's its content? On Thu, Apr 1, 2010 at 5:45 AM, Dave Angel wrote: > Shurui Liu (Aaron Liu) wrote: >> >> # geek_translator3.py >> >> # Pickle >> import pickle >> &

[Tutor] constructor

2010-04-04 Thread Shurui Liu (Aaron Liu)
it__(self): print "A new critter has been born!" def talk(self): print "\nHi. I'm an instance of class Critter." # main crit1 = Critter() crit2 = Critter() crit1.talk() crit2.talk() raw_input("\n\nPress the enter key to exit.&q

Re: [Tutor] constructor

2010-04-04 Thread Shurui Liu (Aaron Liu)
ritter has been born! A new critter has been born! Hi. I'm an instance of class Critter. Hi. I'm an instance of class Critter. On Sun, Apr 4, 2010 at 2:05 PM, Shurui Liu (Aaron Liu) wrote: > I am studying about how to create a constructor in a Python program, I > don't re

[Tutor] ask-why I cannot run it, and I am so confused about the traceback

2010-04-07 Thread Shurui Liu (Aaron Liu)
.1),Cone(1.2)] # Print out the list contents. for volume in list: print "The volume is: ", volume.calculateArea() raw_input("\n\nPress the enter key to exit.") Traceback (most recent call last): File "classVolume.py", line 30, in list = [Cube(1.1),Cube(1.2),Sphere(1.1

Re: [Tutor] ask-why I cannot run it, and I am so confused about the traceback

2010-04-07 Thread Shurui Liu (Aaron Liu)
Yes, I found it. thanks! On Wed, Apr 7, 2010 at 7:00 AM, Wesley Brooks wrote: > Morning, > > Your only supplying one argument to cone, when you need two: radius & > height. > > Cheers, > > Wesley Brooks. > > On 7 April 2010 11:56, Shurui Liu (Aaron Liu) wro

[Tutor] blackjack game

2010-04-29 Thread Shurui Liu (Aaron Liu)
is the code of this game. I want to change some part of them. 1. Since I don't know what part of code is "responsible" for the number of cards, so I don't know how to add a "card number check" attribute, I mean, to check the number of card is more enough for next

Re: [Tutor] Learning Objectives?

2017-02-28 Thread Aaron Myatt via Tutor
Just my humble contribution: I rather appreciated this fellows intermediate python tutorial series: https://youtu.be/YSe9Tu_iNQQ?list=PLQVvvaa0QuDfju7ADVp5W1GF9jVhjbX-_ Though I would argue some other topics, like context managers, would also be worth including in his list. On 28 Feb 2017 9:15 a.

Re: [Tutor] understanding code testing

2017-04-16 Thread Aaron Myatt via Tutor
My favourite book on testing. It is a pretty thorough walk through of building a django app that helps you get a feel for the TDD work flow and red, green, refactor cycle. A rather more practical and real world applicable introduction to TDD, in my opinion. On 16 Apr 2017 12:59 a.m., "Rafael Knut