[Tutor] Confirmation about __init__()

2010-01-16 Thread Robert
I have read quite a bit in the past 2 months, ( I have also looked at codes) At this point, I think I understand well what __init__() is and does - But, I have yet to see this *specifically* spelled out about the the __init__ method for a Class; It is OPTIONAL, correct ? if I have NO start values

[Tutor] command line invocation

2010-01-17 Thread Robert
Say that I have module "spam.py" in "/tmp" which is in PYTHONPATH. in shell, my current directory is "/tmp", are line#3 and #4 --- http://paste.pocoo.org/show/166268/ - "equivalent" --- i.e. yielding the same result ? Thanks ___ Tutor maillist - Tut

[Tutor] Confirmation about __init__()

2010-01-17 Thread Robert
I have read quite a bit in the past 2 months, ( I have also looked at codes) At this point, I think I understand well what __init__() is and does - But, I have yet to see this *specifically* spelled out about the the __init__ method for a Class; It is OPTIONAL, correct ? if I have NO start values

Re: [Tutor] Subclassing object

2010-01-17 Thread Robert
On Sun, Jan 17, 2010 at 12:47 PM, Robert wrote: > On Sun, Jan 17, 2010 at 11:25 AM, Alan Gauld > wrote: >> In older versions of Python it made a difference whether you used object >> or not. Using object gave you a "new style" class which has several extra >>

[Tutor] what is dynamic about "dynamic name resolution" ?

2010-01-17 Thread Robert
In the Python tutorial (highlighted here http://awurl.com/N1XvzIo2Q) What exactly is "dynamic name resolution" ? specifically what is "dynamic" about it ? thanks ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http

Re: [Tutor] need help in python

2010-01-21 Thread Robert
And your question is ? On Thu, Jan 21, 2010 at 12:48 PM, invincible patriot wrote: > hi > I am a student and i need soe help regarding my assignmentif some one can > help me il be glad. > > i wil be waiting for the reply > > thanks > > ___ Tutor mailli

Re: [Tutor] Hello

2010-01-21 Thread Robert
Check out wingware IDE and Geany. On Thu, Jan 21, 2010 at 12:33 PM, Samuel de Champlain wrote: > This is my first message to this mailing list. > I want to create a project with glade and pygtk on fedora. > Can you suggest a good IDE? > > ___ > Tutor m

Re: [Tutor] Bowing out

2010-03-03 Thread Robert
so you're "done" with Python ? :) > On 3 March 2010 14:17, Kent Johnson wrote: >> After six years of tutor posts my interest and energy have waned and >> I'm ready to move on to something new. ___ Tutor maillist - Tutor@python.org To unsubscribe or c

Re: [Tutor] a class query

2010-06-07 Thread Robert
lol, for a second I thought this question comes from PayPal On Mon, Jun 7, 2010 at 10:01 AM, Payal wrote: > Hi all, > I know the difference  between > class Parent : > class Parent(object) : > > But in some softwares i recall seeing, > class Parent() : > > Is this legal syntax? > > With warm r

Re: [Tutor] Python Book recomandation!

2010-07-15 Thread Robert
'Building Skills in Python" by Steven Lott, This free book is simply awesome http://homepage.mac.com/s_lott/books/python.html I went thru the "short" books first : "Dive Into Python" and "Byte of Python" - they are good for a bit of foundation then come to this one, and this one rreinforces concep

Re: [Tutor] how i can change two lists into one directory

2010-07-22 Thread Robert
looks like this guy figured out how to send email in a loop ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] how to do excel in python

2010-08-05 Thread Robert
> hi, > can any one tell me how can I access MS excel worksheet in python and how > can I access itz individual cells..?? let me google that for you... ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mai

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

2010-08-11 Thread Robert
Rather depressing to see what's generally considered "Bible on Python" among those other boring, nondescript books. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Pastebin.com fork based completely on Python (Django)

2010-09-08 Thread Robert
Does not *look* "Pythonic" - have a look at this : http://paste.pocoo.org/ On Tue, Sep 7, 2010 at 6:00 PM, Carlos Guerrero wrote: > I did a "pastebin.com" fork in Django ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription opti

[Tutor] Change to Class-level Variable

2010-10-03 Thread Robert
Why is "f1" not affected by the Class-level variable change below ? >>> class Foo( object ): ... myid = 'Foo' ... def __init__( self ): ...pass ... >>> f1 = Foo() >>> f2 = Foo() >>> f1.myid = 'Bar' >>> Foo.myid = 'SPAM' >>> f1.myid <--- Why is "f1" not a

[Tutor] adding quotation marks around variables

2005-07-10 Thread Robert
were "X" and "Y." The first number was (< > =) the second number. The hexadecimal sum of the two numbers is XXX.   Any help with this would be gratly appreciated! Thanks Robert ___ Tutor maillist - Tutor@python.org http

Re: [Tutor] Ideas and good examples

2011-02-03 Thread Robert
he tutor for v3! :-) See the sig... That's awesome. I think I have the original book you did in storage (many moons ago). :-) -- Robert ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.

[Tutor] Python Hard_way 40

2011-05-11 Thread Robert .
uot; cities['_find'] = find_city while True: print "State? (Enter to quit)", state = raw_input("> ") if not state: break city_found = cities['_find'](cities,state) print city_found -- Grateful for any

Re: [Tutor] Python and the web

2011-05-22 Thread Robert
3 Web Development Beginner's Guide [Paperback] I am not affiliated with the book at all...just saw it today. -- Robert ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] decorators

2011-06-23 Thread Robert
Is there a good tutorial out there somewhere about decorators? Google doesn't bring up much. -- Robert ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

RE: [Tutor] Creating & Handling lots of objects

2004-12-03 Thread Robert, Andrew
Although I have never done so, I believe you can also store/manipulate objects in a database. Has anyone ever worked this option? Thank you, Andrew Robert Systems Architect Information Technology - OpenVMS Massachusetts Financial Services Phone: 617-954-5882 Pager: 781-764-7321 E-mail

RE: [Tutor] Create a binary for a python game

2004-12-03 Thread Robert, Andrew
Sure is. Try cx_freeze. It can be found at http://starship.python.net/crew/atuining/cx_Freeze/index.html . I've used it with great success. Thank you, Andrew Robert Systems Architect Information Technology - OpenVMS Massachusetts Financial Services Phone: 617-954-5882 Pager: 781-764

RE: [Tutor] Connecting to interactive program

2004-12-07 Thread Robert, Andrew
Have you considered redirecting input from the terminal session itself? On Linux, I think you can test against sys.stdin.isatty() and assign a variable to /dev/tty. The methodology is similar on Windows but you need to import msvcrt and grab msvcrt.getche(). Thank you, Andrew Robert Systems

RE: [Tutor] Difference between for i in range(len(object)) and for i in object

2004-12-09 Thread Robert, Andrew
and feed to list # split_line_by_tab=line.split('\t') You should then be able to print out list items relatively easily. Thank you, Andrew Robert Systems Architect Information Technology - OpenVMS Massachusetts Financial Services Phone: 617-954-5882 Pager: 781-

RE: [Tutor] hello i need help

2004-12-16 Thread Robert, Andrew
I recommend you use vim. You can get it at http://www.vim.org/download.php Thank you, Andrew Robert Systems Architect Information Technology - OpenVMS Massachusetts Financial Services Phone: 617-954-5882 Pager: 781-764-7321 E-mail: [EMAIL PROTECTED] Linux User Number: #201204 -Original

[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] Is it pythonesque

2010-01-24 Thread Robert Berman
Thank you for the snippet and the insight. Robert -Original Message- From: tutor-bounces+bermanrl=cfl.rr@python.org [mailto:tutor-bounces+bermanrl=cfl.rr@python.org] On Behalf Of Alan Gauld Sent: Sunday, January 24, 2010 12:17 PM To: tutor@python.org Subject: Re: [Tutor] Is it

Re: [Tutor] can any one help

2010-01-31 Thread Robert Berman
chool work for you? If you really want help, show us the status of your current scripts and quote us the errors you are receiving. Good luck, Robert ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.

Re: [Tutor] Future Appointments...

2010-01-31 Thread Robert Berman
this is what you asked for. It will work for n number of days; for example, 1, 10, 45, 118, 412 work nicely. See code here: http://pastebin.com/m6e78d3ce Robert ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] rstrip in list?

2010-02-09 Thread Robert Berman
27;961\n'] In [15]: for item in mylist: : print item.strip('\n') : ....: 102 231 463 487 555 961 I get the impression you can strip something from the elements in the list, but that it balks at a change to the entire list in a single statement? Robe

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] Wrestling with the Py2exe Install, Win7[XP!], Py2.5

2010-02-18 Thread Robert Berman
dules are available to your standard python path. For example, I am running python 2.64 and the py2exe module is in the python path. I don't use IDLE. I use Ipython however I cannot see why IDLE would not work. To tell if you are OK do import py2exe. You should have no problem loading it. If yo

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] The Disappearing Program (py2exe)

2010-02-19 Thread Robert Berman
s Explorer. Click on Organize then click on folder and search options. Then click on view. Make sure the check box that says 'hide extensions for known file types' is not clicked. Once that is done, all your file extensions (all of them) will be seen and shown. Robert > -Original Mes

[Tutor] Help me understand this tkinter related code

2010-02-26 Thread Robert DeLaurentis
I've just begun learning Python and programming using the Head First Programming from O'Reilly. The following code works on my Mac just fine, but there is a mystery as to how its working that escapes me so far. The local function change_volume(v) requires the argument v to operate properly, but

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

[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] 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

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
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-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

[Tutor] namespaces

2010-05-30 Thread Robert Johansson
ne could explain the difference between the two variables h and doubles in the code. Why is one accessible from the function but not the other? I looked into rules for namespaces but I'm still confused. Below is another sample of the code Cheers, Robert from random import * h =

Re: [Tutor] namespaces

2010-05-30 Thread Robert Johansson
Thanks Evert for pointing out the difference and the discussion on global variables, it helped. /Robert -Ursprungligt meddelande- Från: Evert Rol [mailto:evert@gmail.com] Skickat: den 30 maj 2010 18:34 Till: Robert Johansson Kopia: tutor@python.org Ämne: Re: [Tutor] namespaces

[Tutor] random graph

2010-07-13 Thread Robert Johansson
this is to have lists of length one as values in the dict and by that (hopefully) manage to update all values for a whole component just by changing a single list item (I think of them as pointers to the same list). Will this work? Is there a better way to update the values of a component (fas

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 > Sub

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, 20

Re: [Tutor] data question

2010-10-02 Thread Robert Berman
> > Hello, > Now my question is : > > In which datatype can I put this data in. > Perhaps a simple SQLlite database? http://zetcode.com/databases/sqlitetutorial/ Hope this helps, Robert > Regards, > > Roelof > > _

Re: [Tutor] Merging Text Files

2010-10-13 Thread Robert Jackiewicz
On Wed, 13 Oct 2010 14:16:21 -0600, Ara Kooser wrote: > Hello all, > > I am working on merging two text files with fields separated by > commas. > The files are in this format: > > File ONE: > *Species, Protein ID, E value, Length* Streptomyces sp. AA4, > ZP_05482482, 2.82936001e-140

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

Re: [Tutor] connect through the ip sharers

2010-10-25 Thread Robert Berman
news groups’. Also, when replying to information received by member(s) of a news group it is best to include the newsgroup when replying. Usually, hitting ‘reply to all’ will do the trick. Hope this helps, Robert From: 김태윤 [mailto:kty1...@gmail.com] Sent: Monday, October 25

Re: [Tutor] Summing up numbers in a file

2010-10-26 Thread Robert Berman
. Good luck, Robert From: tutor-bounces+bermanrl=cfl.rr@python.org [mailto:tutor-bounces+bermanrl=cfl.rr@python.org] On Behalf Of masawudu bature Sent: Tuesday, October 26, 2010 4:20 PM To: tutor@python.org Subject: [Tutor] Summing up numbers in a file How do I sum all

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] Advantages or disadvantages on Platform?

2010-11-04 Thread Robert Berman
ne or > another ? Do you see any reasons for not working in both environments? Robert ___ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > http://mail.python.org/mailman/listinfo/tutor -- I am using

Re: [Tutor] While Loops: Coin Flip Game

2010-11-14 Thread Robert Berman
Print ‘nbr of tails tossed = ‘, tailcount Obviously, this is not valid python code but it should give you enough information to solve your problem. Good luck, Robert -- I am using the free version of SPAMfighter. We are a community of 7 million users fighting spam. SPAMfighter has

[Tutor] Help regarding lists, dictionaries and tuples

2010-11-21 Thread Robert Sjöblom
solve it with those tools. In a somewhat related note: the book gives quite hard challenges, the coin flip challenge discussed here a few days ago, for example, comes before the reader learns about for loops. Thanks in advance, and best regards, Robert S.

Re: [Tutor] Help regarding lists, dictionaries and tuples

2010-11-21 Thread Robert Sjöblom
that even if I've studied something in the documentation, I need to use the interpreter to figure out how it actually works. Maybe that will get better in time, but for now it's a very useful tool in trial-and-error. I had to try out values() and sum() before I could understand them fully. Thanks again, much appreciated. best regards, Robert S. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Help regarding lists, dictionaries and tuples (bob gailer)

2010-11-23 Thread Robert Sjöblom
points = 30 - sum(attributes.values()) Or is there a better way to achieve the same result? best regards, Robert S. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

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, B

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] 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] 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

[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] Gtk time control and Glade

2009-03-17 Thread Robert Berman
Thank you Chris, that will certainly get me started. Robert Chris Fuller wrote: Make your own. You can have empty containers in glade that you fill in at runtime, or you could create the interface in glade, perhaps a couple of ComboBoxes. I would leave an empty container and create a

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] 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

[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] 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

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
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-22 Thread Robert Berman
Dinesh, I have pdftotext version 3.0.0. I have decided to use this to go from PDF to text. It is not the ideal solution, but is is a certainly doable solution. Thank you, Robert Dinesh B Vadhia wrote: The best converter so far is pdftotext from http://www.glyphandcog.com/ who maintain an

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] 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] 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

[Tutor] Different Command Result Executing in Shell vs. Program

2009-05-09 Thread robert mcquirt
7;file -b /home/robert/linuxlogotag') This also works fine. The problem is that when I try to replace the hard coded path/name with a string variable for looping, the results are not the same as the shell's. Here's the modified code I'm using for testing (the original

Re: [Tutor] Different Command Result Executing in Shell vs. Program

2009-05-10 Thread robert mcquirt
@alan: Thank you very much for the information you provided and also for suggesting your tutorial. I am now studying the subprocess module. I was impressed with the depth of your tutorial and am studying it as well (and not just for my current problem). Thanks again. @dave: Thanks for your repl

[Tutor] Iterating over list of functions

2009-05-20 Thread Robert Berman
approach to take to solve this problem? Thank you for any assistance, hints, solutions, and guidelines. Robert ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

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

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

[Tutor] Iterating through a function list

2009-05-20 Thread Robert Berman
approach to take to solve this problem? Thank you for any assistance, hints, solutions, and guidelines. Robert ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

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] Need help solving this problem

2009-06-10 Thread Robert Berman
arguments). Simply count the number of ones and the number of two's in the 100 flips then print the results. Good luck. Robert On Wed, 2009-06-10 at 13:08 -0700, Raj Medhekar wrote: > I have been teaching myself Python using a book. The chapter I am on > currently, covers branching, whil

[Tutor] How do I do this in python?

2009-06-11 Thread Robert Lummis
t, what is it? I'm trying to learn python but it's a struggle because the documentation is so dispersed. If there is a solution to this question, what documentation could I have looked at to find it on my own? BTW I'm using python 3.01 if it matters. -- Robert Lummis

Re: [Tutor] How do I do this in python?

2009-06-11 Thread Robert Lummis
On Thu, Jun 11, 2009 at 11:58 AM, spir wrote: > Le Thu, 11 Jun 2009 10:46:26 -0400, > Kent Johnson s'exprima ainsi: > >> On Wed, Jun 10, 2009 at 9:43 PM, Robert Lummis >> wrote: >> > I want to write a function that I can use for debugging purposes that >>

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 p

[Tutor] List Splicing

2009-06-17 Thread Robert Berman
if anyone had a relatively simple explanation why in Python this is faster than a loop, I would really like to understand it. Thanks for the input. Robert ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

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

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
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
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] 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 solutio

Re: [Tutor] Eliminating consecutive duplicates in a list

2009-06-18 Thread Robert Berman
, but it does work. http://wasstock.com/?p=12 Robert On Thu, 2009-06-18 at 16:23 +0200, karma wrote: > Hi Robert, > > Thanks for the link. However, I am looking for eliminating consecutive > duplicates rather than all duplicates - my example wasn't clear, > a

[Tutor] how to manage an encrypted file?

2009-06-19 Thread Robert Lummis
Could you recommend a module or methods I should use to manage an encrypted text file? I want to store passwords and associated contact information in a file and feel confident that if the file is stolen the information couldn't be read. -- Robert L

Re: [Tutor] how to manage an encrypted file?

2009-06-22 Thread Robert Lummis
ss of the key, but I don't > think its the case to go into that. > > You could also use TrueCrypt which is an extremely powerful > cryptographic software (open source), I found this article that can > help you linking it with python: > http://blog.bjrn.se/2008/01/truecrypt-e

[Tutor] does python have something like "#include" in C?

2009-06-29 Thread Robert Lummis
... or any pre-processing at all? I'm looking for a way to get boiler plate code into the main program file. Of course I could copy and paste it with an editor but I was hoping for something more pythonic. I know about import but that's not the same. -- Rob

Re: [Tutor] does python have something like "#include" in C?

2009-06-29 Thread Robert Lummis
7;t find a way to refer to an object in the main program file from within a module file. I understand that it's a good thing to contol which namespaces are referenced by which code but isn't there sometimes a need for code in a module to access the main program file's namespace? My exampl

Re: [Tutor] does python have something like "#include" in C?

2009-06-29 Thread Robert Lummis
n wrote: > On Mon, Jun 29, 2009 at 1:23 PM, Robert Lummis wrote: >> Here's an example that seems not possible in python. I'm probably >> missing something so please enlighten me. I only tried doing this as >> an exercise to show myself how name references work. I'm

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] When are strings interned?

2009-07-01 Thread Robert Berman
gt; p = "green ideas" > >>> q = "green ideas" > >>> p == q > True > >>> p is q > False > > Why the difference? The string p is equal to the string q. The object p is not the object q. Robert ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

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: >

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

2009-07-06 Thread Robert Berman
f.com/ These will certainly keep you occupied for many hours, days, weeks, etc. Enjoy, Robert On Sun, 2009-07-05 at 23:48 -0700, Luis Galvan wrote: > Hello all, this is my first time using a mailing list, so I'm not sure > if I'm doing this right! Anyway, I have a wee bi

  1   2   3   4   >