On Wed, Apr 29, 2015 at 11:38 PM, Dave Angel wrote:
> On 04/30/2015 12:28 AM, boB Stepp wrote:
>>
>> The main danger as I see it is that if I am not careful, then the code
>> on the dev environment could diverge from the state of code on my
>> Windows PC, i.e., I for
On Wed, Apr 29, 2015 at 10:39 PM, Cameron Simpson wrote:
> On 29Apr2015 22:10, boB Stepp wrote:
>> On the smart enterprise where we (now) do our clinical planning they
>> are very strict: no installing any external software; no accessing the
>> Internet; no email; etc. Not
On Wed, Apr 29, 2015 at 5:49 PM, Peter Otten <__pete...@web.de> wrote:
> boB Stepp wrote:
>> So I have stumbled (With your gracious help!) into a legitimate use of
>> eval()?
>
> No. To expand on Marks hint here's how to do it without evil eval(
re much easier on the eyes, I do say!
Anyway, Mark, thanks for the link! This looks quite straightforward
and I will be able to side-step the evils of eval() once again.
--
boB
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscrip
On Wed, Apr 29, 2015 at 9:40 PM, Cameron Simpson wrote:
> On 29Apr2015 12:12, boB Stepp wrote:
>>>
>>> ... (3) install git if needed ...
>>
>>
>> It seems Git is needed, but I am not allowed to install it on the
>> Solaris workstation. So is there
studying of this topic. But as you point out, not ready for it
yet!
--
boB
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
On Wed, Apr 29, 2015 at 3:46 PM, Marc Tompkins wrote:
> On Wed, Apr 29, 2015 at 1:10 PM, boB Stepp wrote:
>>
>> Python 2.4.4, Solaris 10.
>>
>> I have some functions that I believe I could collapse into a single
>> function if I only knew how:
>>
>>
tion I have done to date
has not worked.
Also, what about the first function above? I could use 2 dictionaries,
1 for calling the 5 functions and one to pass the arguments, but is it
worth doing this? Or, I would not be surprised if there is a much
better way! ~(:>))
Thanks!
--
boB
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
On Wed, Apr 29, 2015 at 12:04 PM, Albert-Jan Roskam wrote:
>
> --
> On Wed, Apr 29, 2015 4:21 PM CEST boB Stepp wrote:
>
>>I now have Git installed on my Windows 7 PC at work. The files that I
>>wish to put under Git version control exist on a
sting projects and from the get-go on new ones.
--
boB
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
On Sat, Apr 25, 2015 at 10:30 AM, boB Stepp wrote:
> On Fri, Apr 24, 2015 at 7:36 PM, Steven D'Aprano wrote:
>>On Fri, Apr 24, 2015 at 02:09:45PM -0500, boB Stepp wrote:
>
> [...]
>
>>> And what would be the best approach to integrating Git with these
>>>
On Fri, Apr 24, 2015 at 7:36 PM, Steven D'Aprano wrote:
> So many questions... let's hope I don't miss any... :-)
>
> On Fri, Apr 24, 2015 at 02:09:45PM -0500, boB Stepp wrote:
>
>> First question: What testing modules/frameworks should I start out
>> with?
On Sat, Apr 25, 2015 at 10:58 AM, boB Stepp wrote:
> On Sat, Apr 25, 2015 at 3:20 AM, Laura Creighton wrote:
>> In a message of Fri, 24 Apr 2015 20:24:38 -0500, boB Stepp writes:
>>>I think that I can get an exception here (See a post in response that
>>>I made
On Sat, Apr 25, 2015 at 3:20 AM, Laura Creighton wrote:
> In a message of Fri, 24 Apr 2015 20:24:38 -0500, boB Stepp writes:
>>The Python versions at work are 2.4.4 and 2.6.4(?)(Not certain about
>>the last digit there.) Based on responses to date, the fact that
>>unitte
On Sat, Apr 25, 2015 at 3:21 AM, Alan Gauld wrote:
> Having looked at this thread and its early responses I think it
> would be good to break it up into its two natural parts. TDD
> and version control are pretty much separate concepts and
> should be on separate threads.
>
&
id not
include those portions of the original thread here.
In a message of Fri, 24 Apr 2015 14:09:45 -0500, boB Stepp writes:
[...]
>My wife (A teacher.) has been after me a lot lately to write some
>programs to make her teaching life better. So I would like to start
>one of her projects us
tools to support it than I did a
few minutes ago. I highly recommend watching this video -- Mr.
Batchelder is a very good speaker and presents his material very
effectively. Many thanks, Mark, for this link!
boB
___
Tutor maillist - Tutor@python.org
T
On Fri, Apr 24, 2015 at 3:00 PM, Laura Creighton wrote:
> In a message of Fri, 24 Apr 2015 14:09:45 -0500, boB Stepp writes:
> You need the testing-in-python mailing list. Come on over ...
> http://lists.idyll.org/listinfo/testing-in-python
> You will find lots of familiar
On Fri, Apr 24, 2015 at 5:03 PM, Alan Gauld wrote:
> On 24/04/15 20:09, boB Stepp wrote:
>>
>> allowed to install anything else, strange as this may sound! Since the
>> only functional editors in these bare-bones Solaris 10 environments
>> are some simplistic defaul
e special strategies and
techniques for accomplishing such a feat?
And any other suggestions to best start learning all of this as well
as possible?
As always, many thanks in advance!
--
boB
___
Tutor maillist - Tutor@python.org
To unsubscribe or
On Fri, Apr 24, 2015 at 8:41 AM, Steven D'Aprano wrote:
> On Sun, Apr 19, 2015 at 10:34:43PM -0500, boB Stepp wrote:
>
>> Scenario B:
>> 1) I start out inside the CSA.
>> 2) I initiate a script in the CSA's scripting language.
>> 3) This script calls a
On Mon, Apr 20, 2015 at 2:10 AM, Alan Gauld wrote:
> On 20/04/15 04:34, boB Stepp wrote:
>
>> So, how do I:
>> 1) Check for the existence of an already open window from a previous
>> running of the script?
>> 2) If such a window exists, how do I close it from th
On Mon, Apr 20, 2015 at 2:10 AM, Alan Gauld wrote:
> On 20/04/15 04:34, boB Stepp wrote:
>
>> So, how do I:
>> 1) Check for the existence of an already open window from a previous
>> running of the script?
>> 2) If such a window exists, how do I close it from th
close the particular window I need closed -- IF it is even open.
I feel the solution must be in Tkinter's access to the X Window
system, but nothing in the documentation is *clicking* with me yet.
Thanks!
--
boB
___
Tutor maillist - Tutor@
, etc.? As the
different threads reveal bits and pieces of the low level guts of
Python, I am becoming more and more fascinated about how all of this
is managed. Just the brief discussion of garbage collection details
going on I find quite interesting.
--
boB
On Sun, Apr 19, 2015 at 4:05 PM, Dave Angel wrote:
> On 04/19/2015 03:08 PM, boB Stepp wrote:
>>
>> Or is the real point that we are adding an abstraction
>> layer so we don't even have to think about where objects are
>> physically stored in RAM?
>
>
>
On Sun, Apr 19, 2015 at 6:47 AM, Dave Angel wrote:
> On 04/19/2015 12:07 AM, boB Stepp wrote:
[...]
>> I hope this is helpful, and, if there are any misstepps, that when
>> they are revealed both of our understandings will be enhanced!
>>
>
> Some of your knowledge of
On Sun, Apr 19, 2015 at 12:24 AM, Cameron Simpson wrote:
> On 19Apr2015 15:09, Cameron Simpson wrote:
>>
>> On 18Apr2015 23:26, boB Stepp wrote:
>>>
>>> On Sat, Apr 18, 2015 at 11:08 PM, Cameron Simpson wrote:
[...]
>>> "Two problems often e
ence to themselves) may cause a recursive loop.
Because deep copy copies everything it may copy too much, e.g.,
administrative data structures that should be shared even between
copies."
If I am understanding things correctly, should not that last sentence
read instead:
".
On Sat, Apr 18, 2015 at 10:03 PM, Bill Allen wrote:
>
> On Apr 18, 2015 4:11 PM, "boB Stepp" wrote:
>>
>> On Sat, Apr 18, 2015 at 3:28 PM, Bill Allen wrote:
>> > On Apr 18, 2015 7:50 AM, "Peter Otten" <__pete...@web.de> wrote:
>>
g you can do about this; it's human nature. So I claim that
> making sure the advice your program offers has
> 1) few bugs. And what it has should be crashes, not just getting the
> wrong result.
> 2) Careful wording of the messages to indicate the
print the original copy of a which b now references which is
> [1, ["x", "y"], 3]
Uh, oh! You should have checked your work in the interpreter before
replying! Peter is being very tricky!! (At least for me...) Look again
at that list inside of a list and...
boB
P.S.: Wat
On Fri, Apr 17, 2015 at 2:28 PM, Alan Gauld wrote:
> On 17/04/15 14:26, boB Stepp wrote:
>>
>> Solaris 10, Python 2.4.4
>>
[...]
> That's why GUI printing generally uses an entirely different
> technique to print things (see my earlier email). In essence
> thi
On Thu, Apr 16, 2015 at 4:03 PM, Alan Gauld wrote:
> On 16/04/15 17:47, boB Stepp wrote:
[...]
> 2) I have seen varying recommendations as to number of lines of code
>
> Most of these come from the days when we worked on dumb terminals with 24
> line screens. Actual measurements
ut decreasing target
coverage; etc. Even though I am attempting to make this program as
*bulletproof* as my knowledge and experience allows, it cannot affect
anyone's treatment. It is purely a supplemental level of checking,
much like the many, ... , ma
On Thu, Apr 16, 2015 at 2:54 AM, Peter Otten <__pete...@web.de> wrote:
> boB Stepp wrote:
>
>>> import Tkinter as tk
>>
>> Question: I have been using "from Tkinter import *" as suggested in
>> "Programming Python" by Lutz. He remarks t
t of OS hassle. In my particular scenario I would desire the
ability to output both postscript and pdf, though if I have the first
it is easy to get the latter.
boB Stepp
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
include your suggestion.
However, I will look into kivy for my at-home studies/projects!
--
boB
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
cannot help but
feel there is a much better way...
I intend to scour my available Tkinter documentation to see if there
are root window level and scrolled area commands that might suggest
another approach. And what I am doing now, seeking your collective
wisdom...
Thanks!
--
boB
en on one's monitor. Of course, some
people have HUGE monitors! And I assume that any guidance applies
equally well to methods.
Am I on-track or am I getting carried away?
--
boB
___
Tutor maillist - Tutor@python.org
To unsubscribe or
jects it might be very useful. However, I should work
on mastering Tkinter first, as I am sure that all of the principles I
learn here will be generically useful for any GUI programming.
Thanks, Alan!
--
boB
___
Tutor maillist - Tutor@python.org
To unsub
On Wed, Apr 15, 2015 at 10:39 AM, Peter Otten <__pete...@web.de> wrote:
> boB Stepp wrote:
>
>> Solaris 10, Python 2.4.4
[...]
>
> I'm on linux and surprisingly
>
> subprocess.call(["import", "-window", window_title, postscript_file])
>
On Wed, Apr 15, 2015 at 8:50 AM, Zachary Ware
wrote:
>
> On Apr 15, 2015 9:38 AM, "boB Stepp" wrote:
>> Perhaps I am being foolish! But I do have my reasons, which, in this
>> case, is I wanted to take advantage of the pack and grid geometry
>> managers
On Wed, Apr 15, 2015 at 8:29 AM, Steven D'Aprano wrote:
> On Wed, Apr 15, 2015 at 07:55:28AM -0500, boB Stepp wrote:
>> Solaris 10, Python 2.4.4
>>
>> I have very little experience with issuing print commands using a Unix
>> environment. Despite this, I wish t
ething*, but how do I get it to print the
specific window containing the to-be-designed print button? Also, I
need it to print a postscript file, not print to paper. I suspect this
is another configuration setting that I need to research.
As always, many th
chance of *immediately* understanding
my intent, then when I have to decipher my thoughts from a "one-liner"
that might occupy less space, but where its complexity has me pausing
in thought to be sure I understand what I actually was trying to do.
--
boB
__
On Mon, Apr 6, 2015 at 2:42 PM, Dave Angel wrote:
> On 04/06/2015 03:20 PM, Emile van Sebille wrote:
>>
>> On 4/6/2015 7:54 AM, boB Stepp wrote:
>>>
[...]
>>
>> Maybe this form helps:
>>
>> Python 2.7.6 (default, Mar 22 2014, 22:59:56)
>
On Mon, Apr 6, 2015 at 12:54 PM, Dave Angel wrote:
> On 04/06/2015 12:43 PM, boB Stepp wrote:
>
>>
>> I was breaking down longer functions into smaller ones. Along the way
>> I noticed I was passing an entire dictionary from one function to
>> another. I only neede
icular value, not the whole
dictionary, so that is how I got into the issue I asked about. Once
you and Joel responded it was *obvious*. A bunch of years ago, it
would have been *obvious* and I never would have asked the question in
the first place. This is easy enough to correct now that I realize
>>> d['n']
'Print me!'
>>> def func(d['n']):
SyntaxError: invalid syntax
>>> def func(d):
print d['n']
>>> func(d)
Print me!
The plain text does not show it, but in the invalid syntax the &q
On Sun, Apr 5, 2015 at 3:06 AM, Alan Gauld wrote:
> On 05/04/15 04:45, boB Stepp wrote:
>
>>>>> He could have done it in various other ways too:
>>>>>
>>>>> eg.
>>>>> lambda : all(print('Hello lambda world!'), sys.ex
On Sat, Apr 4, 2015 at 6:55 PM, Alan Gauld wrote:
> On 04/04/15 22:57, boB Stepp wrote:
>>
>> On Sat, Apr 4, 2015 at 3:35 PM, Alan Gauld
>> wrote:
>>>
>>> He could have done it in various other ways too:
>>>
>>> eg.
>>> lambda
nt('Hello lambda world!'), sys.exit())
> But the OR style is established as a kind of idiom,
> not just in Python but several other languages too.
So this is not unusual for Python. BTW, what are some of the other
languages where this type of expres
nterfaces. Most
programmers should be familiar users of such technologies. At the
center of each of those areas, though, is a hard core of programming
problems. Those programs remain the theme of this book. This edition
of the book is a slightly larger fish in a much larger pond.
..."
HTH
--
boB
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
On Sat, Apr 4, 2015 at 12:34 PM, Steven D'Aprano wrote:
> On Sat, Apr 04, 2015 at 11:49:08AM -0500, boB Stepp wrote:
>> Windows 7, Python 3.4.3
>>
>> This code snippet is "Example 7-13" on page 383 from "Programming
>> Python, 4th ed." by
On Sat, Apr 4, 2015 at 12:34 PM, Steven D'Aprano wrote:
> On Sat, Apr 04, 2015 at 11:49:08AM -0500, boB Stepp wrote:
>> Windows 7, Python 3.4.3
>>
>> This code snippet is "Example 7-13" on page 383 from "Programming
>> Python, 4th ed." by
pecting the 'or' to result only in the print running without
executing sys.exit(). But that is not what happens--of course. I tried
substituting 'and' for 'or', but this results in only the print being
run! Obviously I have a significant misunderstanding of what is
code that I assume this was cut out of, keep enumerate; it's the right
> tool for the job.
Yeah, I simplified my actual code into the smallest snippet that I
could reproduce my problem in. My actual code need the index.
--
boB
___
Tutor maillis
On Tue, Mar 31, 2015 at 3:32 PM, Dave Angel wrote:
> On 03/31/2015 04:23 PM, boB Stepp wrote:
>>
>> The following behavior has me stumped:
>>
>> Python 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500 32 bit
>> (Intel)] on win32
>> Type "copyright&quo
On Tue, Mar 31, 2015 at 3:28 PM, Zachary Ware
wrote:
> On Tue, Mar 31, 2015 at 3:23 PM, boB Stepp wrote:
>> The following behavior has me stumped:
>>
>> Python 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500 32 bit
>> (Intel)] on win32
>> Type "copyrig
d the indentation that was present in the interpreter. I added
spaces manually to get it appear as it did in the interpreter. Anyone
know why Gmail does that to my copy and paste?
--
boB
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
at sorted()
was an available option. I had focused on available list methods.
While it does not matter if my actual lists do or do not get sorted,
my intent was to just have a sorted view of the list, so your
suggestion works better here and uses one less line of code. Thanks!
--
boB
__
t method returns None. And that is
> printed.
Ah! I did not realize this. That makes sense now. Many thanks, Cameron!
boB
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
))
None
>>> print(a_list)
[0, 1, 2, 4, 5]
>>>
I expected the first print statement to return what the second one
did. Apparently the first print printed a_list, then did the sort. Why
is this so?
--
boB
___
Tutor maillist - Tut
oops, best of 3: 221 usec per loop
>
> So reverse/bisect is 50 times faster than the listcomp, and
> bisect/virt is 3500 times faster than the listcomp.
You present a compelling case!
> I expect that a prepackaged linear interpolation function from numpy/scipy
> can still do better, and also handle the corner cases correctly. To use such
> a function you may have to reverse order of the values.
This is not an option for me as I would not be allowed to install numpy/scipy.
--
boB
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
irectly use those functions on a list which is
> reverse-sorted, but the source is available. On my install, it's located
> at:
>
> /usr/lib/python3.4/bisect.py
And I see this is available on my oldest Python installlation, 2.4.4, too.
--
boB
___
mimic the natural order, in so far as
it is possible, in which the functions get called. Are there better
ways to organize them?
--
boB
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/ma
= S[0]
I tested this out with concrete examples in the interpreter, such as
with a list, L:
L = [item for item in range(1, 0, -1)]
and trying different test values. It was blazingly fast, too!
All I can say is: WOW!!!
--
boB
___
Tutor maillist - Tu
is used to initiate "escape" sequences. And since every line
ends with with "invisible" line termination character(s) (newline, \n,
carriage return, \r), the backslash at the end of a line interacts
with what is there, whether you can see it or not.
--
boB
___
y chance have Python 2 installed as well as Python 3, where
Python 2 is associated with your terminal session? And your numpy
module is for Python 2, not 3? That is my first thought, but I'm sure
the experts will chime in shortly with a more definitive diagnosis.
--
boB
would like to throw out a general THANK YOU to all of the
"tutors", who so generously donate your time. I know I have gotten
many detailed, patient answers to my queries. I just hope I truly
absorb and properly utilize the wisdom passed on t
2.x's xrange(), which is removed." -- Python Pocket
Reference, 5th ed., by Mark Lutz.
--
boB
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
slight "clunkiness" in
addressing pales in comparison to the power and flexibility of the
"stuff" I can store in a list compared to an array (unless they have
substantially evolved). And I have greatly enjoyed making use of this
flexibility!
--
boB
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
rmation. Also, sometimes
something *clicks* and I am able to solve an issue that has been
baffling me for a while. Plus it gives me thought to what to study in
the future...
--
boB
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subs
ain text communication as I
only rarely need html formatting. And I rarely care to see most of the
crap people send me that require html!
So are there any recommendations from this group that would make
things easy, would still be able to receive/send from my Gmail
account, etc.?
--
On Tue, Feb 17, 2015 at 3:34 PM, Joel Goldstick
wrote:
> On Tue, Feb 17, 2015 at 4:05 PM, boB Stepp wrote:
>> On Tue, Feb 17, 2015 at 1:47 PM, Dave Angel wrote:
>>> On 02/17/2015 02:12 PM, boB Stepp wrote:
>> This seems to be the case. On a related note, I wanted
On Tue, Feb 17, 2015 at 3:05 PM, boB Stepp wrote:
> This seems to be the case. On a related note, I wanted to copy and
> paste the author's source code, showing how he generated the large,
> "Game Over", but my Gmail keeps collapsing the white space, making the
> res
On Tue, Feb 17, 2015 at 1:47 PM, Dave Angel wrote:
> On 02/17/2015 02:12 PM, boB Stepp wrote:
>
> See
> https://docs.python.org/3.4/reference/lexical_analysis.html#string-and-bytes-literals
>>
>>
>> At this point in the text he is not talking about raw literal strin
did, you leave no
spaces between the last backslash and the EOL termination characters,
then the problem behavior occurs. Actually, I realize I have a
question:
If I do the following in the Win7 command line Python interpreter:
Python 3.4.2 (v3.4.2:ab2c023a9432, Oct 6 2014, 22:16:31) [MSC v.1600 64
x27;t want to say too much for
those working through this book, but the essence of the issue is
illustrated by the following:
Python 3.4.2 (v3.4.2:ab2c023a9432, Oct 6 2014, 22:16:31) [MSC v.1600
64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more inform
IS appropriate?
--
boB
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
On Wed, Feb 11, 2015 at 10:58 AM, Dave Angel wrote:
> On 02/11/2015 10:29 AM, boB Stepp wrote:
>>
>> On Wed, Feb 11, 2015 at 8:45 AM, Dave Angel wrote:
>>>
>>> On 02/11/2015 08:27 AM, boB Stepp wrote:
[...]
>>> In each case, there are probably better
On Wed, Feb 11, 2015 at 8:45 AM, Dave Angel wrote:
> On 02/11/2015 08:27 AM, boB Stepp wrote:
[...]
>
> Sure, it's viable, but the best approach depends on your goal (use case),
> and your restrictions. Are these functions really totally unrelated to each
> other? You not
On Wed, Feb 11, 2015 at 8:44 AM, eryksun wrote:
> On Wed, Feb 11, 2015 at 7:27 AM, boB Stepp wrote:
>>
>> pass_args = {'a': (x1, x2, x3), 'b': (y1, y2), 'c': (z)}
>> call_fcn[key_letter](key_letter)
>>
>> But ran into the syntax e
s are expected.
Is what I am trying to do a viable approach that can be made to work?
Otherwise, I will brute-force my way through with if-elif-else
statements.
Thanks!
--
boB
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
>>>>>>> def main(): print("Backing up ", src_path,
>>>>>>> "/Documents\n", sep='') do_sync(doc_srcpath,
>>>>>>> doc_syncpath) create_snaps(doc_syncpath, doc_snappath)
>>>>>>> print("
of the other software
on the systems unless the planning software upgrade makes use of
external software that must be upgraded, too. Unfortunately Python is
not one of these!
--
boB
___
Tutor maillist - Tutor@python.org
To unsubscribe or change su
On Thu, Feb 5, 2015 at 11:48 AM, Alan Gauld wrote:
> On 05/02/15 17:30, boB Stepp wrote:
>>
>> Python 2.4.4, Solaris 10.
>>
>> a_list = [item1, item2, item3]
>> for item in a_list:
>> print 'Item number', ???, 'is:', item
>>
&
On Thu, Feb 5, 2015 at 11:45 AM, Zachary Ware
wrote:
> On Thu, Feb 5, 2015 at 11:30 AM, boB Stepp wrote:
>> Python 2.4.4, Solaris 10.
>>
>> a_list = [item1, item2, item3]
>> for item in a_list:
>> print 'Item number', ???, 'is:', item
>
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 05/02/15 14:59, DaveA wrote:
>
>
> On February 5, 2015 8:27:29 AM EST, Bob Williams
> wrote:
>> Hi,
>>
>> My script is running under Python 3.4.1 on a 64bit openSUSE
>> linux system. It is a backup scrip
Python 2.4.4, Solaris 10.
a_list = [item1, item2, item3]
for item in a_list:
print 'Item number', ???, 'is:', item
Is there an easy, clever, Pythonic way (other than setting up a
counter) to replace ??? with the current index of item
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 05/02/15 13:57, Mark Lawrence wrote:
> On 05/02/2015 13:27, Bob Williams wrote:
>
>>
>> I would like to reduce all those repeated calls to do_sync() in
>> main(), for example, to one by putting the *_srcpath and
>&
subprocess
import sys
if not os.getuid() == 0:
print("\n*** This script must be run as root. ***\n")
sys.exit()
mnt_path = "/home/bob/A3"
subprocess.call(["mount", "LABEL=backup", mnt_path])
if not os.path.ismount(mnt_path):
print("\nBackup
that one should not run a
program using Tkinter from within IDLE as IDLE itself is implemented
using Tkinter. Just to eliminate one other variable from your
troubleshooting you might ensure you start your program from the
command line and not from within IDLE.
boB
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
On Thu, Jan 22, 2015 at 5:45 PM, Steven D'Aprano wrote:
> On Thu, Jan 22, 2015 at 03:17:58PM -0600, boB Stepp hid the following
> question in the subject line:
>
> "Does the Python way of doing things have a definite preference for the
> structure and content of pro
On Thu, Jan 22, 2015 at 5:25 PM, Ben Finney wrote:
> boB Stepp writes:
>
>> And […]
>
> Could you write a message body that asks the question? (The Subject
> field isn't part of the message body.)
Does the Python way of doing things have a definite preference for th
And will this vary depending on whether a version control system is
being used or not? Or is the use of a version control system
considered to be highly recommended (if not mandatory)?
--
boB
___
Tutor maillist - Tutor@python.org
To unsubscribe or
t; instead of "input", so your code will look like this:
In the paragraph above, I believe that Steven meant to say, "...
version 3. In Python 2, you should use ...", which should be evident
from his earlier comments.
boB
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
It appears that Michael only sent this to me when I think he meant to send
it to the list...
-- Forwarded message --
From: "Michael Shiloh"
Date: Dec 21, 2014 7:25 PM
Subject: Re: [Tutor] Learning to program, not code. [LONG RESPONSE!]
To: "boB Stepp"
Cc:
&g
t file you are expecting isn't actually there? Etc.
I hope I did not waste your time with this long post. As I said, my
programming skills are quite modest. But this is how I try to approach
things.
Keep at it! Persistence wins out in the end!1
Cheers!
boB
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
501 - 600 of 2074 matches
Mail list logo