Re: [Tutor] Pyhton editor

2012-02-17 Thread Robert Berman
try it you will hook on to it for ever > > Thanks > Best Regards > Kapil > Pity it is only for Windows. -- Robert Berman The Torah says, Love your neighbor as yourself. The Buddha says, There is no self. So, maybe, we're off the hook. ___

Re: [Tutor] general basic question

2012-02-08 Thread Robert Berman
I understand your problem. You are pickling a dictionary and finding that it will not work unless there already is an existing dictionary for your pickled dictionary to write over. Otherwise, there is either no write at all or the write is followed by a

Re: [Tutor] Sandbox Game

2012-02-05 Thread Robert Berman
e category including python there are at least 1,100,000. What is your experience level doing basic research? Robert Berman ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] list.index() question

2011-12-08 Thread Robert Berman
On 12/08/2011 05:03 PM, Steven D'Aprano wrote: Robert Berman wrote: Hi, Assuming a list similar to this: l1=[['a',1],['b',2],['c',3]] and I want to get the index of 'c'. You will need to explain what you mean by "the index of 'c

Re: [Tutor] list.index() question

2011-12-08 Thread Robert Berman
On 12/08/2011 04:27 PM, bod...@googlemail.com wrote: That won't work because l1[0] is ['a', 1] What happens if you don't change the code? l1.index('c') Bodsda Sent from my BlackBerry® wireless device -----Original Message- From: Robert Berman Sender: t

[Tutor] list.index() question

2011-12-08 Thread Robert Berman
Hi, Assuming a list similar to this: l1=[['a',1],['b',2],['c',3]] and I want to get the index of 'c'. A one dimensional list is extremely easy; val = list.index(value). But how do I get it for a list similar to l1. I have tried ind = l1[0].index('c') and that tells me 'c' is not in list. Eith

Re: [Tutor] Resources

2011-03-11 Thread Robert Berman
On 03/11/2011 09:19 PM, s s wrote: Hello, I was wondering where I should go to improve my python skills. I have finished the official tutorial and the tutorials on the official python website. ___ Tutor maillist - Tutor@python.org To unsubscribe or ch

Re: [Tutor] nested loops

2011-02-07 Thread Robert Berman
ll you are running to the end or not; we certainly have nothing showing 'a best fit' algorithm. If we can see the actual code we can at least show you where you might want to look for current and/or potential problems. Also, what OS are you using? Wh

[Tutor] PDF to TXT

2011-01-23 Thread Robert Berman
Hi, I am trying to convert .pdf files to .txt files. The script I am using below is mostly taken from research done on Google and it appears to be the one outline most consistently favored (http://code.activestate.com/recipes/577095-convert-pdf-to-plain-text/). I am using Win 7, Python 2.7.1. My

Re: [Tutor] A class list

2010-12-24 Thread Robert Berman
From: Noah Hall [mailto:enali...@gmail.com] Sent: Friday, December 24, 2010 2:36 PM To: Robert Berman Subject: Re: [Tutor] A class list Alright, I'll begin by saying that you shouldn't use a list for cards , and a separate one for players. Instead, you should use dictionaries. F

[Tutor] A class list

2010-12-24 Thread Robert Berman
I am working on the second part of the 'Bingo' problem defined at the Bingo Praxis web page, http://programmingpraxis.com/2009/02/19/bingo/. My notes as how to best define and build the problem: 'In a large game with five hundred cards in play, what is the average number of calls required before

Re: [Tutor] While Loops: Coin Flip Game

2010-11-14 Thread Robert Berman
From: tutor-bounces+bermanrl=cfl.rr@python.org [mailto:tutor-bounces+bermanrl=cfl.rr@python.org] On Behalf Of Dawn Samson Sent: Sunday, November 14, 2010 5:17 PM To: tutor@python.org Subject: [Tutor] While Loops: Coin Flip Game Greetings, I'm a Python beginner and working my way throu

Re: [Tutor] Advantages or disadvantages on Platform?

2010-11-04 Thread Robert Berman
> -Original Message- > From: tutor-bounces+bermanrl=cfl.rr@python.org [mailto:tutor- > bounces+bermanrl=cfl.rr@python.org] On Behalf Of Jorge Biquez > Sent: Thursday, November 04, 2010 3:44 PM > To: tutor@python.org > Subject: [Tutor] Advantages or disadvantages on Platform? > >

Re: [Tutor] if statement

2010-11-02 Thread Robert Berman
e: ") >Entries[change]=str(input("Please enter a nem name: ") > else: > #do nothing Whoops. Why are you trying to make the variable "confirmed" an integer rather than a simple 'y/n' as you are asking for? Robert Berman -- I am using the free ve

Re: [Tutor] Summing up numbers in a file

2010-10-26 Thread Robert Berman
This certainly looks like a classroom assignment. Please make an attempt to solve the problem on your own. If the program fails, please copy the code you have written and the error messages from the traceback and someone here will be more than happy to help you work your way through the problem.

Re: [Tutor] connect through the ip sharers

2010-10-25 Thread Robert Berman
, 2010 12:07 PM To: Robert Berman Subject: Re: [Tutor] connect through the ip sharers could you tell me what group or mailing list is more attuned to network problems? 2010/10/26 Robert Berman Hi, Since your post appears to be discussing a networking problem rather than a problem with the

Re: [Tutor] connect through the ip sharers

2010-10-25 Thread Robert Berman
Hi, Since your post appears to be discussing a networking problem rather than a problem with the Python language you might have far better results posting to a group more attuned to network problems. Good luck, Robert From: tutor-bounces+bermanrl=cfl.rr@python.org [mailto:tu

Re: [Tutor] data question

2010-10-02 Thread Robert Berman
> -Original Message- > From: tutor-bounces+bermanrl=cfl.rr@python.org [mailto:tutor- > bounces+bermanrl=cfl.rr@python.org] On Behalf Of Roelof Wobben > Sent: Saturday, October 02, 2010 4:35 AM > To: tutor@python.org > Subject: [Tutor] data question > > > > Hello, > Now my que

Re: [Tutor] prime test problem

2010-08-21 Thread Robert Berman
Googling 'computing prime numbers' produced about 64,100,000 results . That should certainly get you started. Robert From: tutor-bounces+bermanrl=cfl.rr@python.org [mailto:tutor-bounces+bermanrl=cfl.rr@python.org] On Behalf Of Roelof Wobben Sent: Saturday, August 21, 2010 9:36 AM To

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

2010-07-21 Thread Robert Berman
Same. Robert > -Original Message- > From: tutor-bounces+bermanrl=cfl.rr@python.org [mailto:tutor- > bounces+bermanrl=cfl.rr@python.org] On Behalf Of Luke > Paireepinart > Sent: Wednesday, July 21, 2010 2:05 PM > To: Alan Gauld > Cc: tutor@python.org > Subject: Re: [Tutor] has it g

Re: [Tutor] Binary search question

2010-04-24 Thread Robert Berman
tive to me! > > -- > Alan Gauld > Author of the Learn to Program web site > http://www.alan-g.me.uk/ Now that is most impressive. Robert Berman What you don't see with your eyes, don't invent with your mouth. ___ Tutor maillist

Re: [Tutor] Binary search question

2010-04-23 Thread Robert Berman
use ‘in’ just based on what I have been reading from those who took the time to answer my post. Just my $0.02 worth. Robert Berman What you don't see with your eyes, don't invent with your mouth. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Binary search question

2010-04-23 Thread Robert Berman
n occasional 7 second search time for the general ease of using in list. Knowing of course that eventually a programmer who is concerned with that potential 7 second lag time will opt for either a dictionary lookup or a bisected search. Robert Berman What you don't see with your eyes, don

Re: [Tutor] Binary search question

2010-04-23 Thread Robert Berman
Thank you all for your ideas and suggestions. The detailed explanations were most useful. Robert Berman What you don't see with your eyes, don't invent with your mouth. ___ Tutor maillist - Tutor@python.org To unsubscribe

[Tutor] Binary search question

2010-04-23 Thread Robert Berman
type statement is in list1? What I am really trying to ascertain is how expensive or how efficient is 'is in list1'. Thanks for your input Robert Berman What you don't see with your eyes, don't invent with your mouth. ___ Tuto

Re: [Tutor] Why is the max size so low in this mail list?

2010-03-01 Thread Robert Berman
Alan G > > It encouraged me to use pastebin when it was necessary to post code a tad longer than the casual fifteen line snippet. Robert Berman The opposite of love is not hate, it's indifference. The opposite of art is not ugliness, it's indifference. The opposite of faith

Re: [Tutor] The Disappearing Program (py2exe)

2010-02-19 Thread Robert Berman
sage- > From: Wayne Watson [mailto:sierra_mtnv...@sbcglobal.net] > Sent: Friday, February 19, 2010 12:11 PM > To: Robert Berman > Subject: Re: [Tutor] The Disappearing Program (py2exe) > > I'm sure you are right. I'm not sure what you mean about view > params.

Re: [Tutor] Wrestling with the Py2exe Install, Win7[XP!], Py2.5

2010-02-19 Thread Robert Berman
detailed explanation I sent you. Robert Berman > -Original Message- > From: Wayne Watson [mailto:sierra_mtnv...@sbcglobal.net] > Sent: Thursday, February 18, 2010 11:10 PM > To: Robert Berman > Cc: tutor@python.org > Subject: Re: [Tutor] Wrestling with the Py2ex

Re: [Tutor] Wrestling with the Py2exe Install, Win7[XP!], Py2.5

2010-02-18 Thread Robert Berman
> -Original Message- > From: tutor-bounces+bermanrl=cfl.rr@python.org [mailto:tutor- > bounces+bermanrl=cfl.rr@python.org] On Behalf Of Wayne Watson > Sent: Wednesday, February 17, 2010 10:07 PM > To: tutor@python.org > Subject: Re: [Tutor] Wrestling with the Py2exe Install, Win7[XP

Re: [Tutor] Wrestling with the Py2exe Install, Win7[XP!], Py2.5

2010-02-17 Thread Robert Berman
e tell you what I use because it takes a lot of the drudgery out of the process. Go to http://code.google.com/p/gui2exe/ and download gui2exe. It will automate much of the process and it seems to do a great job of finding all the necessary files including the DLL's hidden from py2exe. I hope

Re: [Tutor] rstrip in list?

2010-02-09 Thread Robert Berman
-Original Message- From: tutor-bounces+bermanrl=cfl.rr@python.org [mailto:tutor-bounces+bermanrl=cfl.rr@python.org] On Behalf Of Ken G. Sent: Tuesday, February 09, 2010 10:29 AM To: tutor@python.org Subject: [Tutor] rstrip in list? I printed out some random numbers to a list and

Re: [Tutor] Future Appointments...

2010-01-31 Thread Robert Berman
-Original Message- From: tutor-bounces+bermanrl=cfl.rr@python.org [mailto:tutor-bounces+bermanrl=cfl.rr@python.org] On Behalf Of Ken G. Sent: Sunday, January 31, 2010 10:41 AM To: tutor@python.org Subject: [Tutor] Future Appointments... Below is a program to determine when my nex

Re: [Tutor] can any one help

2010-01-31 Thread Robert Berman
Grigor Kolev From: tutor-bounces+bermanrl=cfl.rr@python.org [mailto:tutor-bounces+bermanrl=cfl.rr@python.org] On Behalf Of invincible patriot Sent: Sunday, January 31, 2010 5:03 AM To: rabidpoob...@gmail.com; grigor.ko...@gmail.com Cc: tutor@python.org Subject: Re: [Tutor] can any one hel

Re: [Tutor] Is it pythonesque

2010-01-24 Thread Robert Berman
pythonesque "Robert Berman" wrote > def getuserinput(): >while True: >s1 = raw_input('Enter fraction as N,D or 0,0 to exit>>') >delim = s1.find(',') >if delim < 0: >print 'invalid user input&#x

[Tutor] Is it pythonesque

2010-01-24 Thread Robert Berman
ngerous or 'wrong' to use. Comments and other renditions are most welcome. Thank you, Robert Berman ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Finding a repeating sequence of digits

2010-01-02 Thread Robert Berman
almost always elucidating and extremely helpful. A number of people have suggested I am attempting a Euler problem. This problem is from the Rosecode series problem 8; http://javaist.com/rosecode/show.php?no=8 Again, thank you for all the suggestions and ideas. Robert Berman

[Tutor] Finding a repeating sequence of digits

2010-01-01 Thread Robert Berman
know I should use a relatively large precision as repeating values may constitute a rather long sequence. I did see, on Google, a suggestion to use a precision of 1000. Thank you for any and all ideas and suggestions. Robert Berman ___ Tutor

Re: [Tutor] working with bit arrays

2009-12-02 Thread Robert Berman
Emille, I do think he meant bit 20 to 32 rather than 20 to 40. Unless, of course, he's dealing with a 64 bit word. I am delighted with all the help I have received on this topic and I am gleefully learning anding and oring, but not too much on the EOR side. Thanks again for all the assistance.

Re: [Tutor] working with bit arrays

2009-12-02 Thread Robert Berman
Wayne, Thank you very much. Robert On Wed, 2009-12-02 at 12:48 -0600, Wayne Werner wrote: > On Wed, Dec 2, 2009 at 12:08 PM, Robert Berman > wrote: > > Hi, > > I am trying to represent a number as a list of bits: for > example the bit

[Tutor] working with bit arrays

2009-12-02 Thread Robert Berman
Hi, I am trying to represent a number as a list of bits: for example the bit representation of the integer 8. I did find a number of articles pertaining to a module called bitarray but I was unable to download/install that package. I am using Linux on Ubuntu 9.10; Python 2.6.2. I am almost certa

[Tutor] Stolen thread: Bottom folk vs. toppers was trouble using 2to3.py

2009-11-03 Thread Robert Berman
lways been incredibly well constructed and concisely and clearly presented. I almost never notice their placement within the post. If there are going to be arguments pertaining to the posts, let them be over content and not placement. Thanks to all who participate in this group. Robert Berman On Tu

Re: [Tutor] Being beaten up by a tuple that's an integer thats a tuple that may be an unknown 'thing'.

2009-11-03 Thread Robert Berman
Thank you for your explanations and especially your clear examples of a phenomenon(when list elements are tuples) which takes a few moments of study to truly grasp. Robert On Tue, 2009-11-03 at 09:53 -0600, Wayne Werner wrote: > On Tue, Nov 3, 2009 at 9:20 AM, Robert Berman >

[Tutor] Being beaten up by a tuple that's an integer thats a tuple that may be an unknown 'thing'.

2009-11-03 Thread Robert Berman
In [69]: l1=[(0,0)] * 4 In [70]: l1 Out[70]: [(0, 0), (0, 0), (0, 0), (0, 0)] In [71]: l1[2][0] Out[71]: 0 In [72]: l1[2][0] = 3 --- TypeError Traceback (most recent call last) /home/bermanr

Re: [Tutor] Sorting points on a 2D plane

2009-10-30 Thread Robert Berman
: > The problem belongs to 'Convex Hull' superset. > look into : http://en.wikipedia.org/wiki/Convex_hull_algorithms > > > > On Thu, Oct 29, 2009 at 6:05 PM, Robert Berman > wrote: > > > Kent and Alan, > > Thank you

Re: [Tutor] Sorting points on a 2D plane

2009-10-29 Thread Robert Berman
Kent and Alan, Thank you both for providing me with tools I can use to develop the sort portion of my algorithm. They are invaluable. I really appreciate Luke's willingness to examine and advise on the full algorithm and once it is written (only the function that determines distance between two p

[Tutor] Sorting points on a 2D plane

2009-10-28 Thread Robert Berman
Hi, I am working on a practice problem called 'POINTS' on the CodeChef site:http://www.codechef.com/problems/POINTS/. This simply wants the sum of the distances between a number of points on a 2 dimensional plane. Looking at the problem, the algorithm to define the sum of the distances between all

Re: [Tutor] Using IDLE v2.6

2009-10-24 Thread Robert Berman
Ken, Two recommendations. 1) Komodo Edit 5. Free edition available from Activestate. www.activestate,com 2) Wing IDE 101 Free Edition from www.wingware.com my favorite of the freely available IDE's. Good luck, Robert On Sat, 2009-10-24 at 13:57 -0400, Ken G. wrote: > I ju

Re: [Tutor] Unknown reason for error.

2009-09-24 Thread Robert Berman
Cory, It would be helpful for us to see the code and the exact error message(s). Would you copy your code and the errors directly to either your post or your code to one of the posting pages such as www.pastebin.org so we can see your code exactly how you have written it. Robert On Thu, 2009

Re: [Tutor] how to print a message backwards

2009-09-23 Thread Robert Berman
Thank you for the clear explanation. Robert On Wed, 2009-09-23 at 23:40 +, ALAN GAULD wrote: > > Is there a significant difference in speed, style, or any pythonesque > > reasoning between Alan's solution and > > print message[::-1] > > > Yes, the for loop doing one character at a time

Re: [Tutor] how to print a message backwards

2009-09-23 Thread Robert Berman
Is there a significant difference in speed, style, or any pythonesque reasoning between Alan's solution and print message[::-1] Thanks for any information, Robert On Wed, 2009-09-23 at 18:51 +0100, Alan Gauld wrote: > "Ali Sina" wrote > > #Message backward printer > message=input('Enter you

Re: [Tutor] New guy question...

2009-09-14 Thread Robert Berman
work with Version 3. Robert Berman On Mon, 2009-09-14 at 15:30 -0400, Warren wrote: > Hey all, > > I'm just getting started with Python and I'm working my way through my > first "Learn Python" book on my Mac. I ran into a weird issue > though.

Re: [Tutor] Help deciding between python and ruby

2009-09-04 Thread Robert Berman
I think you will get at the least a slight bias toward Python. However, I think you should do your own research and reach your own conclusions. Simply to get you started I put the following into Google: 'Python or Ruby: Which to learn' and got more than 1M hits. Best of luck. Robert On Fri, 200

Re: [Tutor] noob question (Windows, Python 3.1)

2009-08-06 Thread Robert Berman
On Thu, 2009-08-06 at 03:44 -0400, Joshua Harper wrote: > Ok, so I am trying to learn python, and I am reading many tutorial > type things and I am kind of stuck with implementing some of the > code... so for example the tutorial says "To get the examples working > properly, write the programs i

Re: [Tutor] Searching backwards from end of string

2009-07-10 Thread Robert Berman
On Fri, 2009-07-10 at 20:55 +0100, Angus Rodgers wrote: > On Fri, 10 Jul 2009 11:57:21 -0400, Robert Berman > wrote: > > >I think you are looking for a complex solution. > > Hardly. In my opinion your code w was overly complex for what you were attempting to d

Re: [Tutor] Searching backwards from end of string

2009-07-10 Thread Robert Berman
I think you are looking for a complex solution. How about the following example: In [31]: s1='abcdeefghijkl' #find last 'e' In [32]: s2=s1[::-1]#reverses s1 In [33]: j=s2.find('e') #finds first 'e' in reversed string In [36]: ind=len(s1)-j-1 #index into s1 where last occurrence of 'e' i

Re: [Tutor] Python Tutorials: How to create useful programs after learning the syntax?

2009-07-08 Thread Robert Berman
While it is not a sales pitch, the book is excellent. It and the Python Cookbook sit on top of my desk. Both are fantastic and pragmatic reference sources. Robert On Wed, 2009-07-08 at 16:10 -0700, wesley chun wrote: > On Sun, Jul 5, 2009 at 11:48 PM, Luis Galvan wrote: > > Hello all, this is m

Re: [Tutor] thesaurus

2009-07-08 Thread Robert Berman
http://pywordnet.sourceforge.net/ This will get you started. This is a tad easier to play with than its newer implementation. Read and experiment. it may meet most of your needs in this arena. Good Luck, Robert On Wed, 2009-07-08 at 18:28 -0400, Pete Froslie wrote: > okay.. I'm getting the ha

Re: [Tutor] Python Tutorials: How to create useful programs after learning the syntax?

2009-07-06 Thread Robert Berman
I have programmed since I was 21. Since I am now retired; that gives me a tad of experience in some aspects of coding. I have only been using Python for two years and I enjoy it for two reasons; the first and most important is it is fun. if you don't enjoy the language, find another one you do enjo

Re: [Tutor] append question

2009-07-05 Thread Robert Berman
In [1]: test=[[1,2,3],[4,5,6],[7,8,9]] In [3]: testvar2 = [] In [16]: for i in range(len(test)): : testvar2.append(test[i][1]) : : In [17]: testvar2 Out[17]: [2, 5, 8] Robert On Sun, 2009-07-05 at 15:57 -0700, Steven Buck wrote: > Hi Python Tutors: > > I ha

Re: [Tutor] When are strings interned?

2009-07-01 Thread Robert Berman
On Wed, 2009-07-01 at 16:44 +0100, Angus Rodgers wrote: > Hello, world! > > This is my first post to the Tutor list (although I've already > posted to comp.lang.python a couple of times). > > I'm currently reading Chapter 4 of Wesley Chun's book, "Core > Python Programming" (2nd ed.). > > I f

Re: [Tutor] Python Programming exercise

2009-07-01 Thread Robert Berman
d: ") guess = str(guess) if guess != password: print "Access Denied" count = count + 1 else: print "Password Confirmed" break Robert Berman On Tue, 2009-06-30 at 19:53 -0700, D

Re: [Tutor] Eliminating consecutive duplicates in a list

2009-06-18 Thread Robert Berman
pologies for that. > > x=[1,1,1,3,2,2,2,4,4,2,2] > > [1 ,3 ,2 ,4 ,2 ] > > > 2009/6/18 Robert Berman : > > This might help: http://code.activestate.com/recipes/52560/ > > > > Robert > > > > > > On Thu, 2009-06-18 at 15:15 +0200, karma wrote: > >>

Re: [Tutor] Eliminating consecutive duplicates in a list

2009-06-18 Thread Robert Berman
This might help: http://code.activestate.com/recipes/52560/ Robert On Thu, 2009-06-18 at 15:15 +0200, karma wrote: > I was playing around with eliminating duplicates in a list not using > groupby. From the two solutions below, which is more "pythonic". > Alternative solutions would be welcome. >

Re: [Tutor] List Splicing

2009-06-17 Thread Robert Berman
rimearray is/does. If you look at or print all non zero numbers you have the primes between 2 and 20. Robert On Wed, 2009-06-17 at 17:30 -0700, Emile van Sebille wrote: > On 6/17/2009 5:11 PM Robert Berman said... > > Emille, > > > > Thank you for the example of list

Re: [Tutor] List Splicing

2009-06-17 Thread Robert Berman
Wayne, Thank you for the suggestion. I will let you know how well this plays out. Robert On Wed, 2009-06-17 at 19:26 -0500, Wayne wrote: > On Wed, Jun 17, 2009 at 7:11 PM, Robert Berman > wrote: > Emille, > > Thank you for the example of list splicin

Re: [Tutor] List Splicing

2009-06-17 Thread Robert Berman
r help. Robert On Wed, 2009-06-17 at 17:01 -0700, Emile van Sebille wrote: > On 6/17/2009 4:48 PM Robert Berman said... > > Emile, > > > > Thank your for your comments. I do have a list running from 0-101. > > Yes, it is true, I only needed 0 - 10 and yes I wi

Re: [Tutor] List Splicing

2009-06-17 Thread Robert Berman
involves the methodology I use to find primes well over one million. However, for the time being, can you perhaps share some suggestions on list splicing? Thank you for your assistance. Robert On Wed, 2009-06-17 at 15:25 -0700, Emile van Sebille wrote: > On 6/17/2009 3:03 PM Robert Berman s

[Tutor] List Splicing

2009-06-17 Thread Robert Berman
Greetings, I am working on a 'simple' algorithm to solve the problem called PRIME1 explained at http://www.spoj.pl/problems/PRIME1/. I do have an algorithm based on the Sieve of Eratosthenes and it does work as I am failing the project not because of a computational error but because of the drea

Re: [Tutor] Help Needed

2009-06-16 Thread Robert Berman
You are putting far too much work into the solution. Look up slicing on the python web page. Then, as an example, In [1]: s1 = 'hello world' In [2]: s1[::-1] Out[2]: 'dlrow olleh' Hope this helps, Robert On Tue, 2009-06-16 at 14:25 -0700, Raj Medhekar wrote: > I had previously emailed y'all r

Re: [Tutor] Need help solving this problem

2009-06-10 Thread Robert Berman
What you are looking at is a simulation whereby a coin having 2 outcomes (heads or tails) is flipped exactly 100 times. You need to tell how many times the coin falls heads up and how many times the coin falls tails up. First become familiar with the random module. Assign a value of 1 for heads a

[Tutor] Iterating through a function list

2009-05-20 Thread Robert Berman
Hi, Given a list of options: option_1...option_n. For each option I have a corresponding function: func_1. func_n. I have all function names defined in a list similar to flist = [func_1, func_2,...func_n] which I know is a legitimate construct having found a similar construct discusse

Re: [Tutor] Iterating over list of functions

2009-05-20 Thread Robert Berman
kesman for 'correct and proper' coding in the Python community and I take your opinions and commentaries seriously. Again, how efficient is this method and is it truly the 'most pythonesque' oriented code. Thanks again, Robert On Wed, 2009-05-20 at 16:07 +0100, Alan Gauld

Re: [Tutor] Iterating over list of functions

2009-05-20 Thread Robert Berman
Thank you, Christian. This solution was one I was not expecting and am glad to receive it. It is one I will explore in greater detail later. Robert On Wed, 2009-05-20 at 16:44 +0200, Christian Witts wrote: > Robert Berman wrote: > > Hi, > > > > Given a list of options: op

Re: [Tutor] Iterating over list of functions

2009-05-20 Thread Robert Berman
Thank you, Emile. That is the exact answer I needed. Robert On Wed, 2009-05-20 at 07:48 -0700, Emile van Sebille wrote: > On 5/20/2009 7:25 AM Robert Berman said... > > Hi, > > > > Given a list of options: option_1...option_n. For each option I have > > a cor

[Tutor] Iterating over list of functions

2009-05-20 Thread Robert Berman
Hi, Given a list of options: option_1...option_n. For each option I have a corresponding function: func_1. func_n. I have all function names defined in a list similar to flist = [func_1, func_2,...func_n] which I know is a legitimate construct having found a similar construct discusse

Re: [Tutor] Lists in a file

2009-04-26 Thread Robert Berman
this helps. Robert Berman David Holland wrote: Hi, I am trying to create a program where I open a file full of lists and process them. However when the program does not recognize the lists as lists. Here is the relevant code :- def open_filedef(): text_file =open ("voteinp.tx

Re: [Tutor] Python help

2009-04-22 Thread Robert Berman
Yes. Show us your solution and perhaps we can help you make it a tad more efficient. Robert Berman IT_ForMe wrote: Anyone know how to program this using Python Add up the prices for items in a shopping cart. Some items are taxable and some items are not. You may assume a 7% tax rate for

Re: [Tutor] Number cruncher

2009-04-22 Thread Robert Berman
y, while this is certainly not 'the' answer it will get you started. Robert Berman John Jenkinson wrote: I need to write code that determines a students final grade based on the number of each type of assignment turned in with its corresponding weighted percentage. There will be 15-20

Re: [Tutor] PDF to text conversion

2009-04-22 Thread Robert Berman
inesh Message: 4 Date: Tue, 21 Apr 2009 18:37:39 -0400 From: Robert Berman mailto:berma...@cfl.rr.com>> Subject: Re: [Tutor] PDF to text conversion To: tutor@python.org <mailto:tutor@python.org> Message-ID: <49ee4ab3.4040...@cfl.rr.com <mailto:49ee4ab3.4040...@cfl.rr.co

Re: [Tutor] PDF to text conversion

2009-04-21 Thread Robert Berman
it to a SQLLITE database. I am thrilled both with the number of suggestions I have received from this group and the quality of the suggestions. Thanks again, Robert Berman Norman Khine wrote: the itools library from hforge.org has a PDF2TEXT implementation itools.pdf http

Re: [Tutor] PDF to text conversion

2009-04-21 Thread Robert Berman
to my attention. Thanks, Robert Berman Emad Nawfal (عماد نوفل) wrote: On Tue, Apr 21, 2009 at 12:54 PM, bob gailer <mailto:bgai...@gmail.com>> wrote: Robert Berman wrote: Hi, I must convert a history file in PDF format that goes from May of 1988 t

Re: [Tutor] PDF to text conversion

2009-04-21 Thread Robert Berman
. The program doesn't care if there are 8 test results or 80,000 test results. That is why i am looking for a python module. Thanks again, Robert Berman bob gailer wrote: Robert Berman wrote: Hi, I must convert a history file in PDF format that goes from May of 1988 to current date. Rea

[Tutor] PDF to text conversion

2009-04-21 Thread Robert Berman
? Hopefully, they have reasonable documentation. My development environment is: Python Linux Ubuntu version 8.10 Thanks for any help you might be able to offer. Robert Berman ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman

Re: [Tutor] Posting to Tkinter NG in new.gmane.org

2009-03-26 Thread Robert Berman
r (NNTP). Your email server(usually POP) will not work. Robert Berman Alan Gauld wrote: "Wayne Watson" wrote My e-mail address is valid. Any ideas? I've compacted related Trash folders, etc It should be news.gmane.org... Or is that just a typo? In that case you probably

Re: [Tutor] Executing a C Program from RH Linux in Python for Win

2009-03-18 Thread Robert Berman
under the auspices of VM and you are off and running. Hope this is of some help. Robert Berman Wayne Watson wrote: The Subject contains the interest here. Can it be done? I think it this case it requires executing the program command line with parameters then executing it? How dependent upon

Re: [Tutor] Gtk time control and Glade

2009-03-17 Thread Robert Berman
w.append_text('%02d'%(i,)) self.pack_start(w, False, False, 0) w.show() def get(self): return '%02d:%02d' % (self.hr.get_active(),self.min.get_active()) Cheers On Tuesday 17 March 2009 09:25, Robert Berman wrote: I am writing a Blood

[Tutor] Gtk time control and Glade

2009-03-17 Thread Robert Berman
it is something I would rather not have to do. Have any of you heard of such an available time control specifically for Gtk and available or capable of being used by Glade. Thank you for any insights and suggestions. Robert Berman ___ Tutor maillist -

Re: [Tutor] Linear Algebra weirdness

2009-02-26 Thread Robert Berman
named LinearAlgebra In [3]: I am running Ubuntu Linux. What OS are yiou running and what version of Python? Robert Berman Mr Gerard Kelly wrote: I am getting some very strange behaviour from the Linear Algebra module. Look at this code: from LinearAlgebra import * a=5 print a And look at the o

Re: [Tutor] String to list conversion

2009-02-24 Thread Robert Berman
Or, you could do: In [1]: print list(raw_input('name please...')) name please...John ['J', 'o', 'h', 'n'] Robert Berman Kent Johnson wrote: On Tue, Feb 24, 2009 at 10:16 AM, Taylan Karaman wrote: Hello, I am a beginner.

Re: [Tutor] Add readline capabilities to a Python build 2.6 on Ubuntu

2009-02-19 Thread Robert Berman
for a  very high powered python developing environment and yes of course the open arrow works in that environment also. Consider, at the least, using iPython. Good luck, Robert Berman Eric Dorsey wrote: Still doesnt work.. I just get this when I hit the up arrow: >>> ^[[A

Re: [Tutor] Reply All Dilemma of This List

2009-02-10 Thread Robert Berman
Mozilla Thunderbird  version 2.0.0.19 (20090105) running under Ubuntu Linux 8.10 does not have  "Reply to Group". Even if it did, out of habit I would be hitting the "Reply All" button. Old preferences die hard. Robert spir wrote: Le Tue, 10 Feb 2009 12:20:51 -0500, Brian Mathis a écrit :

Re: [Tutor] No module named 'module name'

2009-01-25 Thread Robert Berman
. Thank you for the key that unlocked the obvious. Robert Alan Gauld wrote: "Robert Berman" wrote from testwin import Ui_TestWindow I receive the following error message: Import error: No module named testwin. If I use ipython and do the from statement, it works just fine. I th

[Tutor] No module named 'module name'

2009-01-25 Thread Robert Berman
doing wrong. Thanks for the assistance. Robert Berman ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] The better Python approach

2009-01-21 Thread Robert Berman
Kent, Wow! That is all worth knowing. I am  fascinated by the  single sum over a double loop. Thanks, Robert Berman Kent Johnson wrote: On Wed, Jan 21, 2009 at 2:02 PM, Robert Berman wrote: myfile = openinput() for line in myfile: jlist = line.split() for x

Re: [Tutor] The better Python approach

2009-01-21 Thread Robert Berman
have made it more concise with some more detailed examination. If there are some obvious glaring deficiencies, please, anyone feel free to comment. Thanks, Robert Berman #!/usr/bin/env python #findsum.py import string def openinput(thepath = '/home/bermanrl/usbdirbig/Challenges/su

Re: [Tutor] The better Python approach

2009-01-21 Thread Robert Berman
thank everyone who replied. Robert Berman Tim Golden wrote: Robert Berman wrote: Given a string consisting of numbers separated by spaces such as '1234 5678 1 233 476'. I can see I have two obvious choices to extract or parse out the numbers. The first relying on iteration so

[Tutor] The better Python approach

2009-01-21 Thread Robert Berman
ect python oriented solution for extracting those substrings? Thanks, Robert Berman ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Python3.0 and Tkinter on ubuntu 8.10 HOWTO

2009-01-14 Thread Robert Berman
Very good and most welcome. Robert Berman Vern Ceder wrote: Since there was some interest in the question of how to get a full Python 3.0, including Tkinter and IDLE, compiled on Ubuntu Intrepid 8.10, I've written up what I've done and posted it at http://learnpython.wordpress.com/

Re: [Tutor] python3.0 and tkinter on ubuntu 8.10

2009-01-13 Thread Robert Berman
threads on this topic within the Ubuntu forums? Thanks, Robert Berman Vern Ceder wrote: Hi, I have Python 3.0/Tkinter/IDLE working fine on Ubuntu 8.10, but it takes a certain amount of fiddling. 1. Make sure the stock Ubuntu Python 3.0 package is not installed 2. download the Python 3.0 source

Re: [Tutor] python3.0 and tkinter on ubuntu 8.10

2009-01-13 Thread Robert Berman
forums, but the forums are currently down. You might want to use Google to track this under Python 3.0 + Ubuntu 8.10. The overall consensus of opinion is to wait until Python 3.0 became the default under Ubuntu before using it. YMMV. Robert Berman Emad Nawfal (عماد نوفل) wrote: Hi Tutors,I

  1   2   >