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
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
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
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
>>
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
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
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
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
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
'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
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
> 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
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
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
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
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
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.
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
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
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
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
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
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
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-
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
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
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
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.
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
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
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
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
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
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
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
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
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
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
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
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
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
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 =
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
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
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
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
>
> 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
>
> _
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
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
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
.
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
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
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
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
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.
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
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
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
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
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.
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
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 -
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
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
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
? 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
.
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
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
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
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
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
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
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
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
@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
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
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
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
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
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
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
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
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
>>
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
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
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
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
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
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
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
, 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
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
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
... 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
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
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
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
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
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:
>
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 - 100 of 381 matches
Mail list logo