Re: [Tutor] Apache, CGI-BIN, Python

2007-09-10 Thread Eric Brunson
Alan Gauld wrote: > "Ryan" <[EMAIL PROTECTED]> wrote > > >> I am running a Linux box and cannot find my Apache cgi-bin to put >> some >> python scripts in. I know I probably have to create one but don't >> know >> where and how. >> > > I think there are several places that you can create

Re: [Tutor] making math problems mmmm fun

2007-09-10 Thread Eric Brunson
When you get done with this math problem you should consider a book on punctuation. Not using it makes your sentences run together and difficult to read. :-) Honestly, I just gave up after the first two lines. max baseman wrote: > haha :) yeah it's the new imp stuff i like parts of the idea but

Re: [Tutor] Running other files

2007-09-10 Thread Alan Gauld
"Rikard Bosnjakovic" <[EMAIL PROTECTED]> wrote >> is it possible to run other non-python files using python such as >> .exe or >> other files. > > Have a look at os.system(). Or the more recent subprocess module which supercedes os.system etc. HTH, -- Alan Gauld Author of the Learn to Program

Re: [Tutor] Suggested books for Agile Programming & Testing?

2007-09-10 Thread Kent Johnson
Stephen McInerney wrote: > > Can anyone recommend me the best single must-read book for Agile > Programming? Quoting myself from the archives: I recommend Robert Martin's "Agile Software Development: Principles, Patterns, and Practices" http://www.objectmentor.com/resources/bookstore/books/Agi

[Tutor] input file encoding

2007-09-10 Thread Tim Michelsen
Hello, I want to process some files encoded in latin-1 (iso-8859-1) in my python script that I write on Ubuntu which has UTF-8 as standard encoding. When I use the "print lines_in_myfile" is get some wired symbols. How shold I read those files in or convert their encoding to utf-8? Thanks in ad

Re: [Tutor] Apache, CGI-BIN, Python

2007-09-10 Thread Alan Gauld
"Ryan" <[EMAIL PROTECTED]> wrote >I am running a Linux box and cannot find my Apache cgi-bin to put >some > python scripts in. I know I probably have to create one but don't > know > where and how. I think there are several places that you can create cgi-bin depending on how you configure apac

Re: [Tutor] inserting csv file into a sqlite3 memory connected table

2007-09-10 Thread Alan Gauld
<[EMAIL PROTECTED]> wrote > I am basically just a visual basic person trying to learn python. > > Anyway I have spent hours experimenting with CSV and sqllite3 > tutorial samples and misc snippets, Does anyone have any > code samples that might get me going? Doing what? Where are you havi

Re: [Tutor] making math problems mmmm fun

2007-09-10 Thread max baseman
wow this is a bit over my range of knowledge im impressed :) ill be happy to look at it but i think i will see if i can end up writing my own :) worse case ill do it by hand will not take long hmm wow thanks :) On Sep 10, 2007, at 8:47 PM, John Fouhy wrote: ### import operator bino

Re: [Tutor] making math problems mmmm fun

2007-09-10 Thread John Fouhy
On 11/09/2007, max baseman <[EMAIL PROTECTED]> wrote: > basically the problem is to find a bunch of ways to put 1,2,3,4,5 > into different math problems to that equal 1-25, i haven't spent to > much time thinking about how to do this but i cant think of a way to > do it it without writing making th

Re: [Tutor] making math problems mmmm fun

2007-09-10 Thread max baseman
haha :) yeah it's the new imp stuff i like parts of the idea but other parts i really dislike basically it TRIES to make math more interactive and world like i really enjoy how most of it is really programable stuff :) where compared to normal math books it's a bit harder to program just

[Tutor] Image Analysis

2007-09-10 Thread wormwood_3
I have thought up a project for myself that is rather beyond my current knowledge, but I think it will be fun and very informative. I'll leave out the details right now, but the task that will be the hardest is that I need some way to analyze an image for color patterns. I would like to be able

Re: [Tutor] making math problems mmmm fun

2007-09-10 Thread wormwood_3
Don't have any ideas to Pythonize this problem for you, but I must say that I hope this problem was listed in a chapter entitled "Cruel and Unusual"! -Sam - Original Message From: max baseman <[EMAIL PROTECTED]> To: tutor@python.org Sent: Monday, Sept

Re: [Tutor] Socket Timeout Handling

2007-09-10 Thread wormwood_3
Have not gotten any responses on this, nor very much by way of searching, which is strange and a little disappointing for such a seemingly basic thing. (May just be too obvious of a thing, so no one wanted to post the solution:-). ) But, I did find a decent recipe on ASPN that serves the purpose

Re: [Tutor] Making a python script to feed files into another python script

2007-09-10 Thread John Fouhy
On 11/09/2007, Ashley Booth <[EMAIL PROTECTED]> wrote: > I am trying to create a script that will get files from a directory > that the user specifies, then feeds the relevant input and output > (which are input and output paths) into another python script whose > path is also given by the user. I'

[Tutor] Making a python script to feed files into another python script

2007-09-10 Thread Ashley Booth
I am trying to create a script that will get files from a directory that the user specifies, then feeds the relevant input and output (which are input and output paths) into another python script whose path is also given by the user. I'm pretty lazy after all and I would rather spend my time making

[Tutor] making math problems mmmm fun

2007-09-10 Thread max baseman
hello all this is a homework in math i dont need to program it but i would like to :) so like any other time pleas dont just give a answer tutorials or a explanation. i dont like to use script something i dont understand :) thanks basically the problem is to find a bunch of ways to put 1,

[Tutor] making math problems mmmm fun

2007-09-10 Thread max baseman
hello all this is a homework in math i dont need to program it but i would like to :) so like any other time pleas dont just give a answer tutorials or a explanation. i dont like to use script something i dont understand :) thanks basically the problem is to find a bunch of ways to put 1,

Re: [Tutor] Running other files

2007-09-10 Thread Rikard Bosnjakovic
On 10/09/2007, Lawrence Barrott <[EMAIL PROTECTED]> wrote: > is it possible to run other non-python files using python such as .exe or > other files. Have a look at os.system(). -- - Rikard - http://bos.hack.org/cv/ ___ Tutor maillist - Tutor@pytho

[Tutor] Running other files

2007-09-10 Thread Lawrence Barrott
is it possible to run other non-python files using python such as .exe or other files. Thanks, Lawrence___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Livewires

2007-09-10 Thread Tonu Mikk
Hi Sacha, I am very much a beginner to Python myself, but I tried my hand on the Livewires modules. Here is how I solved the challenge. from livewires import * begin_graphics() allow_moveables() x=0 y=0 c = circle(x, y,5) while x < 640: x=x+5 y=y+3.822 move_to (c, x, y) time.sl

Re: [Tutor] Livewires

2007-09-10 Thread christopher . henk
[EMAIL PROTECTED] wrote on 09/10/2007 07:29:24 AM: > Hi all > > just learning python really and been using the livewires tutorial / worksheets to get some experience. > > I have hit an issue which is just my lack of understanding around looping concepts and execution. > > My issue: > > in wo

[Tutor] Printing HTML files

2007-09-10 Thread Gardner, Dean
Hi I am currently trying to print out a html file that is essentially a summary table and I am running into problems. From the link below it seems that the method I am using to print the table doesn't handle column width and wrapping but confusingly we use a similar method elsewhere in the code a

Re: [Tutor] replacing while loop

2007-09-10 Thread Arvind Deshpande
Is this what you are looking for? #!/usr/bin/python 'makeTextFile.py -- create text file' import os # get filename #while True: # fname = raw_input('Enter file name: ') # if os.path.exists(fname): # print"*** ERROR: '%s' already exists" % fname # else: # break while True:

Re: [Tutor] Problem with while loop

2007-09-10 Thread Michael Connors
Hi, I would do it as follows, adding 0s to front to make them valid PINs. while counter < howmany: pin = randint(,) print "%04i" % (pin) counter += 1 On 10/09/2007, Vishnu Mohan <[EMAIL PROTECTED]> wrote: > > > > Now I just need to figure out how to only get 4 digit pin numbe

Re: [Tutor] Problem with while loop

2007-09-10 Thread Vishnu Mohan
> Now I just need to figure out how to only get 4 digit pin numbers :) > Use regular expressions The following is the code with re. from random import randint import re counter = 0 pinPattern = re.compile(r'^\d{4}$') howmany = raw_input( "How many: " ) if pinPattern.match(howmany): whil

Re: [Tutor] Apache, CGI-BIN, Python

2007-09-10 Thread Jan Erik Moström
Ryan <[EMAIL PROTECTED]> 07-09-09 12:26 >I am running a Linux box and cannot find my Apache cgi-bin to >put some python scripts in. I know I probably have to create >one but don't know where and how. Look in Apaches config file, you should find something like this ScriptAlias /cgi-bin/ "/L