Re: [Tutor] Help with choices for new database program

2010-07-02 Thread David Hutto
On Fri, Jul 2, 2010 at 9:31 PM, David Hutto wrote: > On Fri, Jul 2, 2010 at 9:27 PM, Jeff Johnson wrote: >> On 07/02/2010 06:14 PM, David Hutto wrote: >>> >>> Stick to the main python libraries(python with sqllite, and for the >>> standalone exe know it'

Re: [Tutor] Help with choices for new database program

2010-07-02 Thread David Hutto
On Fri, Jul 2, 2010 at 9:44 PM, Jeff Johnson wrote: > On 07/02/2010 06:32 PM, David Hutto wrote: >> >> On Fri, Jul 2, 2010 at 9:31 PM, David Hutto  wrote: >> >>> >>> Well, it was mainly that he said he was a beginner and was only using >>>

Re: [Tutor] Help with choices for new database program

2010-07-02 Thread David Hutto
On Fri, Jul 2, 2010 at 9:55 PM, Jeff Johnson wrote: > On 07/02/2010 06:51 PM, David Hutto wrote: >> >> In the end, there might be so many packages, I might not be able to >> handle it all(for my own uses). But, I would think, you would agree >> that a simple account ba

Re: [Tutor] Help with choices for new database program

2010-07-02 Thread David Hutto
On Fri, Jul 2, 2010 at 10:01 PM, David Hutto wrote: > On Fri, Jul 2, 2010 at 9:55 PM, Jeff Johnson wrote: >> On 07/02/2010 06:51 PM, David Hutto wrote: >>> >>> In the end, there might be so many packages, I might not be able to >>> handle it all(for my own

Re: [Tutor] Help with choices for new database program

2010-07-02 Thread David Hutto
On Fri, Jul 2, 2010 at 10:07 PM, David Hutto wrote: > On Fri, Jul 2, 2010 at 10:01 PM, David Hutto wrote: >> On Fri, Jul 2, 2010 at 9:55 PM, Jeff Johnson wrote: >>> On 07/02/2010 06:51 PM, David Hutto wrote: >>>> >>>> In the end, there might b

Re: [Tutor] Help with choices for new database program

2010-07-02 Thread David Hutto
On Fri, Jul 2, 2010 at 10:10 PM, David Hutto wrote: > On Fri, Jul 2, 2010 at 10:07 PM, David Hutto wrote: >> On Fri, Jul 2, 2010 at 10:01 PM, David Hutto wrote: >>> On Fri, Jul 2, 2010 at 9:55 PM, Jeff Johnson wrote: >>>> On 07/02/2010 06:51 PM, David Hutto wrote:

Re: [Tutor] Python Documentation Clarification

2010-07-12 Thread David Hutto
On Mon, Jul 12, 2010 at 10:49 AM, Huy Ton That wrote: > This is going to sound silly, but I realized there are some areas within the > documentation that do not make absolute sense to me. > e.g. > compile(source, filename, mode[, flags[, dont_inherit]]) > I see within this built in function, the f

Re: [Tutor] Request for help learning the right way to deal with lists in lists

2010-07-12 Thread David Hutto
On Mon, Jul 12, 2010 at 9:45 PM, Eric Hamiter wrote: > I'm fairly new to programming and Python as well, but I have a suggestion > that may be worth looking into-- are you familiar with pickling? It sounds > like something that may fit in well with what you're trying to do. > > Good reference art

Re: [Tutor] Response to responses about list of lists: a meta exercise in mailinglist recursion

2010-07-13 Thread David Hutto
ut I don't know how they are doing it since I > haven't received the mailing yet that would include my message and its > responses. > > If my list had a million books in it and 10 million page numbers, would the > approach I've outlined in my initial post be the b

Re: [Tutor] Response to responses about list of lists: a meta exercise in mailinglist recursion

2010-07-13 Thread David Hutto
On Tue, Jul 13, 2010 at 1:20 PM, David Hutto wrote: > > > On Tue, Jul 13, 2010 at 8:40 AM, Siren Saren wrote: > >> I'm not sure if there's a way to submit responses 'live' or whether it's >> better to respond to subthreads at once or together,

Re: [Tutor] Python Book recomandation!

2010-07-15 Thread David Hutto
On Thu, Jul 15, 2010 at 5:22 PM, Eric Hamiter wrote: > Hi Daniel, > > As a fellow complete beginner, I have actually started a web site that > details just this. I'm learning as I go and have tried to put together > a curriculum of sorts that will helpfully guide other newbies as well, > and reinf

Re: [Tutor] [OT] Confusion [was Re: A file containing a string of 1 billion random digits.]

2010-07-19 Thread David Hutto
On Mon, Jul 19, 2010 at 8:57 PM, Steven D'Aprano wrote: > On Tue, 20 Jul 2010 01:42:51 am Richard D. Moores wrote: > >> The formatting operations described here are obsolete and may go away >> in future versions of Python. Use the new String Formatting in new >> code. >> >> I hope that use of '*'

Re: [Tutor] has it gone quiet or is it just me?

2010-07-21 Thread David Abbott
tion, but did get this as you I hope can see :) David -- David Abbott (dabbott) ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Difficulty Understanding Example Code for Blender Script

2010-07-22 Thread David Hutto
On Thu, Jul 22, 2010 at 2:47 AM, Marc Tompkins wrote: > On Wed, Jul 21, 2010 at 9:48 PM, Andrew Martin > wrote: >> >> This code was part of a Blender script to build a 3d bar graph, so I don't >> know if understanding Blender is a prereq for understanding this code. The >> function is for the axi

Re: [Tutor] Running .py files in shell

2010-07-28 Thread David Hutto
On Wed, Jul 28, 2010 at 2:39 AM, Kevin Rapley wrote: > >>> I am running Mac OSX v10.6.4 Snow Leopard >>> I am running Python 2.6.1 >> >> In general get the MacPython distributions of Python etc, they usually >> install easier (ie from the GUI) than the "Unix" based versions. > > Okay, thanks. I wi

[Tutor] Order Of Operations Question

2010-07-28 Thread David Hutto
re (in Kg) is the weight per square meter, times the number of square meters Ma = P0 × g × A""" masEarthAtmoInKgPerSqM = airPressCLevl * gravity * areaSphere print(masEarthAtmoInKgPerSqM) atmosphereWeight() TIA, David ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Order Of Operations Question

2010-07-28 Thread David Hutto
On Wed, Jul 28, 2010 at 6:11 AM, Evert Rol wrote: > Sorry, forgot to reply-to-all: > > > I don't know the book nor the exercise, but see my comments interspersed in > the code, and a few general remarks at the bottom > >> From a practice exercise in Building Skills In Python page 64 I'm >> workin

Re: [Tutor] Order Of Operations Question

2010-07-28 Thread David Hutto
On Wed, Jul 28, 2010 at 6:19 AM, Hugo Arts wrote: > On Wed, Jul 28, 2010 at 11:41 AM, David Hutto wrote: >> From a practice exercise in Building Skills In Python page 64 I'm >> working on How Much Does The Atmosphere Weigh? Part 1: >> To check it states that the answ

Re: [Tutor] Order Of Operations Question

2010-07-28 Thread David Hutto
On Wed, Jul 28, 2010 at 7:35 PM, Hugo Arts wrote: > On Thu, Jul 29, 2010 at 1:10 AM, David Hutto wrote: >> I get this with yours and Evert's modification from mult to div, but >> if you're right, then the 10e18 the book states as a checker is a >> typo/error. &

Re: [Tutor] Order Of Operations Question

2010-07-28 Thread David Hutto
On Wed, Jul 28, 2010 at 8:03 PM, Dave Angel wrote: > > > David Hutto wrote: >> >> >> I'll probably ending up reading something about it later in the book, >> but as a quick question, why does: >> >> >>>>> >>>>> 5e18

[Tutor] A better way for greatest common divisor

2010-07-29 Thread David Hutto
= num/countx dendiv = den/countx print('Reduced value is: %d/%d' % (numdiv,dendiv)) print(int(numdiv/dendiv),'and',int(numdiv%dendiv),'/',int(dendiv)) break break '''Greate

Re: [Tutor] A better way for greatest common divisor

2010-07-29 Thread David Hutto
On Thu, Jul 29, 2010 at 10:36 PM, James Mills wrote: > On Fri, Jul 30, 2010 at 12:22 PM, Richard D. Moores > wrote: >> On Thu, Jul 29, 2010 at 19:10, James Mills >> wrote: >>> On Fri, Jul 30, 2010 at 11:47 AM, David Hutto wrote: >>>> This is basically t

Re: [Tutor] A better way for greatest common divisor

2010-07-29 Thread David Hutto
On Thu, Jul 29, 2010 at 10:16 PM, James Mills wrote: > On Fri, Jul 30, 2010 at 12:10 PM, James Mills > wrote: >> def gcd(a, b): >>    while b != 0: >>        (a, b) = (b, a%b) >>    return a That was pretty short, and sweet. > > Here's another solution that uses a generator called factors to >

Re: [Tutor] A better way for greatest common divisor

2010-07-30 Thread David Hutto
On Fri, Jul 30, 2010 at 2:57 PM, Richard D. Moores wrote: > On Thu, Jul 29, 2010 at 18:47, David Hutto wrote: >> This is basically to get feedback, on a better way to show the >> greatest common divisor in fraction, in order to reduce it fully, than >> the one I've co

Re: [Tutor] A better way for greatest common divisor

2010-07-30 Thread David Hutto
On Fri, Jul 30, 2010 at 10:25 PM, Richard D. Moores wrote: > On Fri, Jul 30, 2010 at 17:43, David Hutto wrote: >> This is the url: >> http://python.pastebin.com/fP3jjqGj > > This is a slight revision, with my suggested changes highlighted: > <http://python.pastebin.co

Re: [Tutor] A better way for greatest common divisor

2010-07-30 Thread David Hutto
On Fri, Jul 30, 2010 at 10:42 PM, David Hutto wrote: > On Fri, Jul 30, 2010 at 10:25 PM, Richard D. Moores > wrote: >> On Fri, Jul 30, 2010 at 17:43, David Hutto wrote: >>> This is the url: >>> http://python.pastebin.com/fP3jjqGj >> >> This is a

Re: [Tutor] A better way for greatest common divisor

2010-07-30 Thread David Hutto
On Fri, Jul 30, 2010 at 10:25 PM, Richard D. Moores wrote: > On Fri, Jul 30, 2010 at 17:43, David Hutto wrote: >> This is the url: >> http://python.pastebin.com/fP3jjqGj > > This is a slight revision, with my suggested changes highlighted: > <http://python.pastebin.co

Re: [Tutor] A better way for greatest common divisor

2010-07-30 Thread David Hutto
On Fri, Jul 30, 2010 at 10:43 PM, David Hutto wrote: > On Fri, Jul 30, 2010 at 10:25 PM, Richard D. Moores > wrote: >> On Fri, Jul 30, 2010 at 17:43, David Hutto wrote: >>> This is the url: >>> http://python.pastebin.com/fP3jjqGj >> >> This is a

Re: [Tutor] A better way for greatest common divisor

2010-07-30 Thread David Hutto
On Fri, Jul 30, 2010 at 10:44 PM, David Hutto wrote: > On Fri, Jul 30, 2010 at 10:43 PM, David Hutto wrote: >> On Fri, Jul 30, 2010 at 10:25 PM, Richard D. Moores >> wrote: >>> On Fri, Jul 30, 2010 at 17:43, David Hutto wrote: >>>> This is the url: >

Re: [Tutor] Python - RPG Combat System

2010-07-30 Thread David Hutto
On Fri, Jul 30, 2010 at 10:49 PM, Jason MacFiggen wrote: > I am have trouble figuring out how to make my program stop at 0 hit > points if I run it, it always goes into the negative hitpoints... > > So my question is how do I make this program end at exactly 0 hit points > every time instead o

Re: [Tutor] A better way for greatest common divisor

2010-07-30 Thread David Hutto
On Fri, Jul 30, 2010 at 11:51 PM, Steven D'Aprano wrote: > On Sat, 31 Jul 2010 01:03:27 pm David Hutto wrote: > >> This fixes the floating point 'bug' when numerator is greater than >> denominator: http://python.pastebin.com/bJ5UzsBE > > I don't

Re: [Tutor] A better way for greatest common divisor

2010-07-30 Thread David Hutto
On Sat, Jul 31, 2010 at 12:37 AM, David Hutto wrote: > On Fri, Jul 30, 2010 at 11:51 PM, Steven D'Aprano wrote: >> On Sat, 31 Jul 2010 01:03:27 pm David Hutto wrote: >> >>> This fixes the floating point 'bug' when numerator is greater than >>>

Re: [Tutor] A better way for greatest common divisor

2010-07-31 Thread David Hutto
On Sat, Jul 31, 2010 at 12:43 AM, David Hutto wrote: > On Sat, Jul 31, 2010 at 12:37 AM, David Hutto wrote: >> On Fri, Jul 30, 2010 at 11:51 PM, Steven D'Aprano >> wrote: >>> On Sat, 31 Jul 2010 01:03:27 pm David Hutto wrote: >>> >>>> Thi

Re: [Tutor] A better way for greatest common divisor

2010-07-31 Thread David Hutto
On Sat, Jul 31, 2010 at 3:39 AM, David Hutto wrote: > On Sat, Jul 31, 2010 at 12:43 AM, David Hutto wrote: >> On Sat, Jul 31, 2010 at 12:37 AM, David Hutto wrote: >>> On Fri, Jul 30, 2010 at 11:51 PM, Steven D'Aprano >>> wrote: >>>> On Sa

Re: [Tutor] Python - RPG Combat System

2010-07-31 Thread David Hutto
On Sat, Jul 31, 2010 at 1:51 PM, bob gailer wrote: > On 7/30/2010 10:49 PM, Jason MacFiggen wrote: >> >> what can I do instead of writing print so many times? >> import random >>    my_hp = 50 >>    mo_hp = 50 >>    my_dmg = random.randrange(1, 20) >>    mo_dmg = random.randrange(1, 20) >>    whil

Re: [Tutor] Writing scripts and apps for Internet consumption

2010-07-31 Thread David Hutto
On Sat, Jul 31, 2010 at 2:27 PM, Eric Hamiter wrote: > Not sure if this is the right place for this, since this is a tutor list, > but I think it is because it involves learning Python and the application of > knowledge. > > I've just started learning it as my initial programming language as of tw

Re: [Tutor] Writing scripts and apps for Internet consumption

2010-07-31 Thread David Hutto
On Sat, Jul 31, 2010 at 2:34 PM, David Hutto wrote: > On Sat, Jul 31, 2010 at 2:27 PM, Eric Hamiter wrote: >> Not sure if this is the right place for this, since this is a tutor list, >> but I think it is because it involves learning Python and the application of >> knowl

Re: [Tutor] Simple Python Program

2010-07-31 Thread David Hutto
On Sat, Jul 31, 2010 at 2:35 PM, bob gailer wrote: > On 7/31/2010 12:00 AM, Jason MacFiggen wrote: > > Can anyone tell me how to fix the errors I am getting if possible? I'm quite > new and so confused... > > > I could give lots of diagnostic advice and detail. There is so much wrong > with this p

Re: [Tutor] Writing scripts and apps for Internet consumption

2010-07-31 Thread David Hutto
On Sat, Jul 31, 2010 at 2:45 PM, Eric Hamiter wrote: >> Get a linux hosting account, and a web address, most linux hosting >> comes with python, so practice in the 'cloud'. > > I have that-- an account with Dreamhost. This hasn't solved my problems yet > though. Like I said, I can have it write a

Re: [Tutor] Writing scripts and apps for Internet consumption

2010-07-31 Thread David Hutto
On Sat, Jul 31, 2010 at 2:56 PM, David Hutto wrote: > On Sat, Jul 31, 2010 at 2:45 PM, Eric Hamiter wrote: >>> Get a linux hosting account, and a web address, most linux hosting >>> comes with python, so practice in the 'cloud'. >> >> I have that-- an

Re: [Tutor] Where to start with Unit Testing

2010-08-01 Thread David Hutto
On Sun, Aug 1, 2010 at 12:18 PM, Che M wrote: > > >> Do any of you have any feedback, strategies and best practices >> related to unit testing within Python. This is a relatively new topic >> for me. I was thinking of starting with reading the documentation >> associate with the unittest module. >

Re: [Tutor] web-based python?

2010-08-01 Thread David Hutto
On Sun, Aug 1, 2010 at 7:38 PM, Eric Hamiter wrote: > On Sun, Aug 1, 2010 at 1:56 PM, Che M wrote: >> >> For a long time I have hoped for a "Python web apps for absolute >> beginners" >> tutorial that doesn't assume any knowledge.  For a beginner, it is not >> even >> clear what a "web frameworks

Re: [Tutor] Where to start with Unit Testing

2010-08-01 Thread David Hutto
On Sun, Aug 1, 2010 at 9:11 PM, Che M wrote: > > >> > The idea of unit testing/test driven development has remained >> > foreign to me throughout my time trying to learn Python--by choice. >> > I want to make desktop GUI applications and I don't use MVC, so >> > the idea of writing tests strikes m

Re: [Tutor] Where to start with Unit Testing

2010-08-01 Thread David Hutto
On Sun, Aug 1, 2010 at 9:31 PM, David Hutto wrote: > On Sun, Aug 1, 2010 at 9:11 PM, Che M wrote: >> >> >>> > The idea of unit testing/test driven development has remained >>> > foreign to me throughout my time trying to learn Python--by choice. >>&g

Re: [Tutor] Where to start with Unit Testing

2010-08-01 Thread David Hutto
On Sun, Aug 1, 2010 at 9:39 PM, David Hutto wrote: > On Sun, Aug 1, 2010 at 9:31 PM, David Hutto wrote: >> On Sun, Aug 1, 2010 at 9:11 PM, Che M wrote: >>> >>> >>>> > The idea of unit testing/test driven development has remained >>>> > fo

Re: [Tutor] Menu not working properly

2010-08-02 Thread David Hutto
On Mon, Aug 2, 2010 at 8:00 AM, Evert Rol wrote: >> Hello Evert Rol, >>           Thank you for the menu help, I have completed it with great >> success... There is 1 more problem I am currently having, and when I fix it >> my program will be completed. If you are interested in helping me with t

Re: [Tutor] Menu not working properly

2010-08-02 Thread David Hutto
On Mon, Aug 2, 2010 at 10:41 AM, Luke Paireepinart wrote: > > > On Aug 2, 2010, at 8:13 AM, David Hutto wrote: > >> On Mon, Aug 2, 2010 at 8:00 AM, Evert Rol wrote: >>>> Hello Evert Rol, >>>>           Thank you for the menu help, I have completed it w

Re: [Tutor] How to get script to detect whether a file exists?

2010-08-02 Thread David Hutto
On Mon, Aug 2, 2010 at 8:53 PM, Richard D. Moores wrote: > On Mon, Aug 2, 2010 at 16:57, Steven D'Aprano wrote: >>  # File *probably* doesn't exist. Consider better error checking. > > Steve, before I dig into your detailed reply, please tell me what you > meant by " # File *probably* doesn't exi

Re: [Tutor] How to get script to detect whether a file exists?

2010-08-02 Thread David Hutto
On Tue, Aug 3, 2010 at 12:05 AM, David Hutto wrote: > On Mon, Aug 2, 2010 at 8:53 PM, Richard D. Moores wrote: >> On Mon, Aug 2, 2010 at 16:57, Steven D'Aprano wrote: >>>  # File *probably* doesn't exist. Consider better error checking. >> >> Steve, befor

Re: [Tutor] Finding the version # of a module, and py module problem

2010-08-05 Thread David Hutto
On Thu, Aug 5, 2010 at 7:33 PM, Wayne Watson wrote: > It's been awhile since I've used python, and I recall there is a way to find > the version number from the IDLE command line  prompt. dir, help, > __version.__? > > I made the most minimal change to a program, and it works for me, but not my >

Re: [Tutor] Finding the version # of a module, and py module problem

2010-08-05 Thread David Hutto
On Thu, Aug 5, 2010 at 8:53 PM, David Hutto wrote: > On Thu, Aug 5, 2010 at 7:33 PM, Wayne Watson > wrote: >> It's been awhile since I've used python, and I recall there is a way to find >> the version number from the IDLE command line  prompt. dir, help, >> _

Re: [Tutor] modify csv textfile

2010-08-07 Thread David Hutto
On Sat, Aug 7, 2010 at 7:26 AM, Alan Gauld wrote: > > "TGW" wrote >> >> What I want to output is: >> 12345|some text|some more text|example|example32423 >> 11223|more text|and more|example|example455667 >> >> So column 4 is where the change occurs, but only if the beginning >> of the string in co

Re: [Tutor] modify csv textfile

2010-08-07 Thread David Hutto
On Sat, Aug 7, 2010 at 8:26 AM, David Hutto wrote: > On Sat, Aug 7, 2010 at 7:26 AM, Alan Gauld wrote: >> >> "TGW" wrote >>> >>> What I want to output is: >>> 12345|some text|some more text|example|example32423 >>> 11223|more text|an

Re: [Tutor] Distributing Python Code for Commercial Porpoises?

2010-08-08 Thread David Hutto
On Sun, Aug 8, 2010 at 2:41 PM, Eike Welk wrote: > Hello Alan! > > On Sunday August 8 2010 10:10:20 Alan Gauld wrote: >> Yes thats a good point. Most books (including mine) focus on how to >> write code. Very few tell you how to distrubute it! And that's not >> just >> in Python, most programming

Re: [Tutor] Distributing Python Code for Commercial Porpoises?

2010-08-09 Thread David Hutto
On Sun, Aug 8, 2010 at 7:57 PM, Steven D'Aprano wrote: > On Mon, 9 Aug 2010 04:44:37 am David Hutto wrote: > >> Four words... Software is python's propaganda. > > Four more words: please trim unnecessary quoting. No problem buddy pal.

Re: [Tutor] [SPAM]Re: O'Reilly is offering Learning Python (4th ed.), eBook form for USD 9.99

2010-08-11 Thread David Hutto
I thought the open source mentality of python was it own 'perpetual bible'. A building of disciples so to speak. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] Iterating through a list of replacement regex patterns

2010-09-02 Thread David Hutto
e of the regex, without it yielding the second result? Right now, I can see that it searches the file for the term if it's in ' ', so that part works, and on other attempts than this one, I can get it to loop through the words in the dictionary list and replace the regex pattern as it

Re: [Tutor] Iterating through a list of replacement regex patterns

2010-09-02 Thread David Hutto
I just added +'*' to select in re.search(select+'*', str(readfile[:])), and it now shows the same in both. But if you have any input on modifications let me know. Thanks, David ___ Tutor maillist - Tutor@python.org To u

Re: [Tutor] Iterating through a list of replacement regex patterns

2010-09-03 Thread David Hutto
On Thu, Sep 2, 2010 at 11:05 PM, David Hutto wrote: > I just added +'*' to select in re.search(select+'*', str(readfile[:])), > and it now shows the same in both. > > But if you have any input on modifications let me know. > > Thanks, > David > Stil

Re: [Tutor] Iterating through a list of replacement regex patterns

2010-09-03 Thread David Hutto
On Fri, Sep 3, 2010 at 2:51 PM, David Hutto wrote: > On Thu, Sep 2, 2010 at 11:05 PM, David Hutto wrote: >> I just added +'*' to select in re.search(select+'*', str(readfile[:])), >> and it now shows the same in both. >> >> But if you have any i

Re: [Tutor] Iterating through a list of replacement regex patterns

2010-09-03 Thread David Hutto
First of all, I'll respond more thoroughly tomorrow, when I can review what you said more clearly, but for now I'll clarify. Here is the whole code that I'm using: http://pastebin.com/Ak8DFjrb On Fri, Sep 3, 2010 at 9:12 PM, Steven D'Aprano wrote: > On Fri, 3 Sep 2010

Re: [Tutor] Iterating through a list of replacement regex patterns

2010-09-03 Thread David Hutto
On Fri, Sep 3, 2010 at 9:57 PM, David Hutto wrote: > First of all, I'll respond more thoroughly tomorrow, when I can review > what you said more clearly, but for now I'll clarify. > > Here is the whole code that I'm using: > > http://pastebin.com/Ak8DFjrb &

Re: [Tutor] Iterating through a list of replacement regex patterns

2010-09-03 Thread David Hutto
snip I'll go further with this though, just to get the response. Hypothetically, if I wanted AI(artificial imagination), then I would want random thoughts that made sense, every once in a while. So, I hypothesize that the first step in Artificial Imagination, is random thoughts, and then they have

Re: [Tutor] Iterating through a list of replacement regex patterns

2010-09-05 Thread David Hutto
On Sat, Sep 4, 2010 at 6:16 AM, Steven D'Aprano wrote: > On Sat, 4 Sep 2010 11:57:00 am David Hutto wrote: >> First of all, I'll respond more thoroughly tomorrow, when I can >> review what you said more clearly, but for now I'll clarify. >> >> Here is

Re: [Tutor] Creating custom GUI elements

2010-09-05 Thread David Hutto
I'd suggest you take a look at blender. It has a pretty easy to use game engine with actuators, sensors and controllers, with a Python scripts api. It'll take the time out of going 3-d with pygame, and you can build the custom legos within it as well. ___

Re: [Tutor] Multiple versions of python and paths problems

2010-09-06 Thread David Hutto
On Mon, Sep 6, 2010 at 1:46 PM, Dominique wrote: > Hello, > > I usually use python 2.6 and several packages. Everything's fine. > > At present, I'm trying to run a package which is only available with python > 2.5. > So, i installed 2.5 and the various dependencies needed to run this package: > P

Re: [Tutor] Multiple versions of python and paths problems

2010-09-07 Thread David Hutto
On Tue, Sep 7, 2010 at 4:03 AM, Dominique wrote: > Alan Gauld btinternet.com> writes: > > >> How do you start IDLE? Is it via a desktop or start menu shortcut? >> If so what is the startin folder specified as? > Hello, > First, thanks to you David, Alan and Dave

Re: [Tutor] How to numerically sort strings that start with numbers?

2010-09-13 Thread David Hutto
On Mon, Sep 13, 2010 at 9:11 PM, Adam Bark wrote: > On 14/09/10 01:11, Pete O'Connell wrote: >> >> theList = ["21 trewuuioi","3zxc","134445"] >> print sorted(theList) >> >> Hi, the result of the sorted list above doesn't print in the order I >> want. Is there a straight forward way of getting pyth

Re: [Tutor] How to get both 2.6 scripts as well as 3.1 scripts to run at command line?

2010-09-15 Thread David Hutto
print("a is", a) or from future import * ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] How to get both 2.6 scripts as well as 3.1 scripts to run at command line?

2010-09-15 Thread David Hutto
On Thu, Sep 16, 2010 at 12:02 AM, Bill Allen wrote: > > > On Wed, Sep 15, 2010 at 10:35 PM, David Hutto wrote: >> >> print("a is", a) >> or >> from future import * >> ___ > > Other than the Pytho

Re: [Tutor] How to get both 2.6 scripts as well as 3.1 scripts to run at command line?

2010-09-15 Thread David Hutto
On Thu, Sep 16, 2010 at 12:11 AM, Richard D. Moores wrote: > > > On Wed, Sep 15, 2010 at 20:25, Richard D. Moores wrote: >> >> 64-bit Vista. >> >> I have no problem running 3.1 scripts at the command line. However 2.6 >> scripts seems to require 2.x. For example, I get this error showing that the

Re: [Tutor] Help - importing modules

2010-09-18 Thread David Hutto
On Sat, Sep 18, 2010 at 11:46 AM, Steven D'Aprano wrote: > On Sun, 19 Sep 2010 12:16:47 am Fernando Karpinski wrote: >>    Hi, everyone. I need help when importing a file I created, with >> the .py extension. I am trying to access its directory in DOS, and >> after I do it, I type "import filename

Re: [Tutor] pure function problem

2010-09-24 Thread David Hutto
On Fri, Sep 24, 2010 at 1:43 AM, Roelof Wobben wrote: > > > > >> From: st...@pearwood.info >> To: tutor@python.org >> Date: Fri, 24 Sep 2010 13:00:40 +1000 >> Subject: Re: [Tutor] pure function problem >> >> Roelof, please learn to delete unnecessarily quot

Re: [Tutor] class method problem

2010-09-25 Thread David Hutto
test.woord, "a", 1,stop) print test2 David ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] class method problem

2010-09-25 Thread David Hutto
= len(test.woord) search = raw_input('Enter character to find: ') #print 'search =' ,search test2 = test.find(test.woord, search, 1,stop) print test2 Of course, there are other ways to accomplish this. David ___ Tutor maillist - Tutor@

Re: [Tutor] class method problem

2010-09-25 Thread David Hutto
Since I had nothing else to do, but practice, this looks much better: def find(word, search): if search in word: print True else: print False word = raw_input('Enter string of letters to search: ' ) search = raw_input('Enter character to find: ')

Re: [Tutor] How to start IPython in Windows

2010-09-25 Thread David Hutto
IIRC, it's like idle, just run: python C:\\Python\\Scripts\\ipython.py ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] class method problem

2010-09-25 Thread David Hutto
On Sat, Sep 25, 2010 at 9:16 PM, Steven D'Aprano wrote: > On Sun, 26 Sep 2010 08:13:23 am David Hutto wrote: >> Since I had nothing else to do, but practice, this looks much better: >> >> def find(word, search): >>       if search in word: >>

Re: [Tutor] class method problem

2010-09-26 Thread David Hutto
On Sun, Sep 26, 2010 at 3:14 AM, Steven D'Aprano wrote: > On Sun, 26 Sep 2010 02:26:25 pm David Hutto wrote: >> On Sat, Sep 25, 2010 at 9:16 PM, Steven D'Aprano > wrote: >> > On Sun, 26 Sep 2010 08:13:23 am David Hutto wrote: >> >> Since I had nothin

Re: [Tutor] Issues In Terminal

2010-09-26 Thread David Hutto
On Sun, Sep 26, 2010 at 5:55 PM, Bill DeBroglie wrote: > Hello all, > > Totally new to this stuff and community so I very much appreciate the help > and apologize in advance for asking what might be a stupid question... Oh, > and I'm new to the lingo too!! > > I'm having issues running Python in T

Re: [Tutor] Issues In Terminal

2010-09-26 Thread David Hutto
On Sun, Sep 26, 2010 at 6:03 PM, David Hutto wrote: > On Sun, Sep 26, 2010 at 5:55 PM, Bill DeBroglie > wrote: >> Hello all, >> >> Totally new to this stuff and community so I very much appreciate the help >> and apologize in advance for asking what might be a stu

Re: [Tutor] Python Help

2010-09-27 Thread David Hutto
variables x = input("Enter a starting value: ") y = input("Enter a stopping value: ") #You set a for loop for range for num in range(x, y): #If that number divided by 2 has a remainder of 0, it's of course even. if num % 2 == 0: #print the number print num And various other ways as well. David ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] Matching relational data

2010-10-03 Thread David Hutto
the program perceive the relation. So, I think what I'm asking is if there is anything similar to this in use that anyone knows of, or if anyone has encountered a similar problem, and what approach they may have taken? TIA, David ___ Tutor maillist - Tuto

Re: [Tutor] Matching relational data

2010-10-03 Thread David Hutto
On Sun, Oct 3, 2010 at 6:37 PM, Steven D'Aprano wrote: > On Mon, 4 Oct 2010 08:33:07 am David Hutto wrote: >> I'm creating an app that charts/graphs data. The mapping of the >> graphs is the 'easy' part with matplotlib, >> and wx. My question r

Re: [Tutor] Matching relational data

2010-10-04 Thread David Hutto
are not same length for comparison' per = (100/lena) print count * per, '% match' The plus and minus signs would represent the movement over an equal amount of time(say one minute/hour) Although I'm going to the statistics for the rest of this, anyone who has an improved solution let me know. Thanks, David ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Matching relational data

2010-10-04 Thread David Hutto
On Mon, Oct 4, 2010 at 6:31 PM, Steven D'Aprano wrote: > On Mon, 4 Oct 2010 10:52:02 am Alan Gauld wrote: > >> One of the best programming stats tools is R >> >> http://en.wikipedia.org/wiki/R_%28programming_language%29 >> >> There is a python bionding for R too. >> >> Although R may be overkill f

Re: [Tutor] WRITING XLS FROM OS.WALK()

2010-10-08 Thread David Hutto
On Fri, Oct 8, 2010 at 11:55 PM, Steven D'Aprano wrote: > On Sat, 9 Oct 2010 06:34:44 am Susana Iraiis Delgado Rodriguez wrote: >> Hello members: >> I developed a Python module to make a list which contains all the >> files ending with .shp and .dbf extensions, I have solved this >> already, > > >

Re: [Tutor] WRITING XLS FROM OS.WALK()

2010-10-08 Thread David Hutto
On Sat, Oct 9, 2010 at 2:12 AM, Steven D'Aprano wrote: > On Sat, 9 Oct 2010 03:15:35 pm you wrote: > >> > You should use that. It works, it is tested and thoroughly >> > debugged, and it is powerful. >> >> Certainly so, but not as powerful as the individual's ingenuity in >> solving the problem at

[Tutor] Interpolation

2010-10-08 Thread David Hutto
Maybe I missed it, even in the google searches/manuals, but does someone know of an introduction to python interpolation that show the different forms of % , as in %s = string, and %d = digit(i think, or correct me). TIA, David ___ Tutor maillist

Re: [Tutor] WRITING XLS FROM OS.WALK()

2010-10-08 Thread David Hutto
Here's a little 'anomaly' though, programmers say hammer when the truth is, that modern construction should use pneumatic tools, as in air hammer. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.or

Re: [Tutor] Interpolation

2010-10-09 Thread David Hutto
Thanks buddy pal. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] WRITING XLS FROM OS.WALK()

2010-10-09 Thread David Hutto
On Sat, Oct 9, 2010 at 4:12 AM, Alan Gauld wrote: > "David Hutto" wrote > >> > I'm sorry to tell you that you've just reinvented the wheel. This > was >> > already solved, a long, long time ago. It is called the glob > module: >> >

Re: [Tutor] WRITING XLS FROM OS.WALK()

2010-10-09 Thread David Hutto
And in other news, is it better to be a programmer, or an electrician first? ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] WRITING XLS FROM OS.WALK()

2010-10-09 Thread David Hutto
On Sat, Oct 9, 2010 at 1:58 PM, Alan Gauld wrote: > > "David Hutto" wrote >>> >>> should learn to program in assembler (or even microcode) then move >>> to C and then to Python(or similar) and finally to 4G languages. >> >> Even old school

Re: [Tutor] WRITING XLS FROM OS.WALK()

2010-10-09 Thread David Hutto
On Sat, Oct 9, 2010 at 2:23 PM, David Hutto wrote: > On Sat, Oct 9, 2010 at 1:58 PM, Alan Gauld wrote: >> >> "David Hutto" wrote >>>> >>>> should learn to program in assembler (or even microcode) then move >>>> to C and then to Pyt

Re: [Tutor] WRITING XLS FROM OS.WALK()

2010-10-09 Thread David Hutto
I'll put my questions in a knew thread if this is considered hijacking the OP. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] SQLite3 DB Field Alphabetizing

2010-10-12 Thread David Hutto
27;zzrerhshhjrs'] My question is, why is everything except [:-2] in alphabetical order? It doesn't really matter(at this point), for my purposes, but I'd like to know when they changed the abc's to xy;z's? Thanks, David ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] SQLite3 DB Field Alphabetizing

2010-10-12 Thread David Hutto
Sorry about that, I there might have been an obvious reason. *Note that the I invented the *.bob file before you replied. import sqlite3 as lite class db(object): def onNewProjSQLDB(self): self.con = lite.connect('/home/david/pythonfiles/pythonscripts/roughdraf

Re: [Tutor] SQLite3 DB Field Alphabetizing

2010-10-12 Thread David Hutto
No trickery, I've been adding entries at random all day(scout's honor ii||i). But the above shows the code I used, and the first shows the entries added at random while testing and retrieving, and it shows it alphabetically any other time. I thought it might have to do with a character or several i

Re: [Tutor] SQLite3 DB Field Alphabetizing

2010-10-12 Thread David Hutto
On Tue, Oct 12, 2010 at 9:02 AM, David Hutto wrote: > Sorry about that, I there might have been an obvious reason. > *Note that the I invented the *.bob file before you replied. Apparently, I am to .bob, what Al Gore is to the internet. > > import sqlite3 as lite >

<    1   2   3   4   5   6   7   8   9   10   >