Being committed to TDD for this project, I am not yet ready to write
code till I figure out how to write the tests. It occurs to me that
writing tests for code that interacts with the SQLite db may be
non-trivial (At least for me!). After doing some online research
tonight, it appears that I need
On Sat, Aug 15, 2015 at 9:10 PM, boB Stepp wrote:
> Right now I am trying to figure out how to arrange my unit test
> file(s). My initial thoughts are to have a single test directory with
> separate subdirectories corresponding to each folder which has source
> code. Is this a good way to do th
> -Original Message-
> From: Tutor [mailto:tutor-bounces+crk=godblessthe...@python.org] On
> Behalf Of Mark Lawrence
> Sent: Saturday, August 15, 2015 4:05 PM
> To: tutor@python.org
> Subject: Re: [Tutor] variable existence q
>
> On 15/08/2015 23:38, Clayton Kirkwood wrote:
> > top_direc
On 15Aug2015 18:24, D Wyatt wrote:
It seems every book I read these days uses camel case for variable names in
Python. I was once told that using underscores is preferred. Is there a
preference in the Python community or does it really matter? I'd like to
instill good habits while I'm learnin
In this Montessori Classroom Project (mcm) I am working on, I hope to
incorporate as much of the advice I've gotten here as I can remember.
So I want to do version control, TDD, etc., and do it as well as I
can. Especially since this thing looks to grow considerably over
time. I have not ever tho
On 16/08/2015 02:24, D Wyatt wrote:
It seems every book I read these days uses camel case for variable names in
Python. I was once told that using underscores is preferred. Is there a
preference in the Python community or does it really matter? I'd like to
instill good habits while I'm learnin
On Sat, Aug 15, 2015 at 9:24 PM, D Wyatt wrote:
> It seems every book I read these days uses camel case for variable names in
> Python. I was once told that using underscores is preferred. Is there a
> preference in the Python community or does it really matter? I'd like to
> instill good habit
It seems every book I read these days uses camel case for variable names in
Python. I was once told that using underscores is preferred. Is there a
preference in the Python community or does it really matter? I'd like to
instill good habits while I'm learning.
Thanks in advance,
--
Deb Wyatt i
On Sat, Aug 15, 2015 at 6:41 PM, Steven D'Aprano wrote:
> On Sat, Aug 15, 2015 at 02:24:21PM -0500, boB Stepp wrote:
>> I understand your points, but wonder then what is the intended use for
>> os.path.exists()? That is, in what types of circumstances would it be
>> both appropriate and safe to
On Sat, Aug 15, 2015 at 02:24:21PM -0500, boB Stepp wrote:
> On Fri, Aug 14, 2015 at 10:39 PM, Steven D'Aprano wrote:
> > There is also os.path.exists(filename), but you should avoid using that
> > if possible. The problem is this:
> >
> > if os.path.exists(filename):
> > # file exists *right
On Sat, Aug 15, 2015 at 6:00 PM, Cameron Simpson wrote:
> On 15Aug2015 15:20, Clayton Kirkwood wrote:
>>>
>>> Behalf Of Laura Creighton
>
> [..]
>>>
>>> To: boB Stepp
>>> In a message of Sat, 15 Aug 2015 14:24:21 -0500, boB Stepp writes:
>>> >I understand your points, but wonder then what is the
On 15/08/2015 23:38, Clayton Kirkwood wrote:
top_directory = "/users/Clayton/Pictures"
target_directory = top_directory #directory we are checking
filetypes = ('jpg', 'png', 'avi', 'mp4', 'mov', 'bmp')
imports...
def override_defaults():
with open( user_preferences ) as f:
fo
On 15Aug2015 15:20, Clayton Kirkwood wrote:
Behalf Of Laura Creighton
[..]
To: boB Stepp
In a message of Sat, 15 Aug 2015 14:24:21 -0500, boB Stepp writes:
>I understand your points, but wonder then what is the intended use for
>os.path.exists()? That is, in what types of circumstances would
On 8/15/2015 3:38 PM, Clayton Kirkwood wrote:
top_directory = "/users/Clayton/Pictures"
target_directory = top_directory #directory we are checking
filetypes = ('jpg', 'png', 'avi', 'mp4', 'mov', 'bmp')
imports...
def override_defaults():
with open( user_preferences ) as f:
f
top_directory = "/users/Clayton/Pictures"
target_directory = top_directory #directory we are checking
filetypes = ('jpg', 'png', 'avi', 'mp4', 'mov', 'bmp')
imports...
def override_defaults():
with open( user_preferences ) as f:
for line in f.readline():
llist = line.
> -Original Message-
> From: Tutor [mailto:tutor-bounces+crk=godblessthe...@python.org] On
> Behalf Of Laura Creighton
> Sent: Saturday, August 15, 2015 2:49 PM
> To: boB Stepp
> Cc: l...@openend.se; tutor
> Subject: Re: [Tutor] try and file existence
>
> In a message of Sat, 15 Aug 20
On 8/15/2015 2:47 PM, Mark Lawrence wrote:
On 15/08/2015 22:11, Peter Otten wrote:
Clayton Kirkwood wrote:
10 top_directory = "/users/Clayton/Pictures"
def override_defaults():
56 return( top_directory, filetypes, target_directory )
80 top_directory, filetypes, target_directory = ov
In a message of Sat, 15 Aug 2015 14:24:21 -0500, boB Stepp writes:
>I understand your points, but wonder then what is the intended use for
>os.path.exists()? That is, in what types of circumstances would it be
>both appropriate and safe to use?
>
>boB
If you want to locate dangling symlinks, os.
On 15/08/2015 22:11, Peter Otten wrote:
Clayton Kirkwood wrote:
10 top_directory = "/users/Clayton/Pictures"
def override_defaults():
56 return( top_directory, filetypes, target_directory )
80 top_directory, filetypes, target_directory = override_defaults()
File "C:/Users/Clayto
Clayton Kirkwood wrote:
> 10 top_directory = "/users/Clayton/Pictures"
>
> def override_defaults():
> 56 return( top_directory, filetypes, target_directory )
>
> 80 top_directory, filetypes, target_directory = override_defaults()
>
>
> File "C:/Users/Clayton/python/find picture
10 top_directory = "/users/Clayton/Pictures"
def override_defaults():
56 return( top_directory, filetypes, target_directory )
80 top_directory, filetypes, target_directory = override_defaults()
File "C:/Users/Clayton/python/find picture duplicates/find picture
duplicates", line 8
On Fri, Aug 14, 2015 at 10:39 PM, Steven D'Aprano wrote:
>
> On Fri, Aug 14, 2015 at 06:28:09PM -0700, Clayton Kirkwood wrote:
> > what is the best way to find out if a file exists?
>
> Try to open it and see what happens. If the open() succeeds, then the
> file exists and can be read. If it fail
>
>
> On Sat, Aug 15, 2015 Bill Allen wrote:
>
> Yes, I see. I will start working on reorganizing the code with that in
> mind. One other thing that I have found that is quite interesting is that
> with my current code the use of after() works as expect with the message to
> the user showing up i
On Sat, Aug 15, 2015 at 2:21 AM, Alan Gauld
wrote:
That works for getting the message printed but it still leaves
>
> the problem that your UI locks up during the long process.
> If its only for a couple of seconds it might be a mild hiccup
> but if your processing took, say 5s or longer, the user
On 15/08/2015 04:39, Steven D'Aprano wrote:
On Fri, Aug 14, 2015 at 06:28:09PM -0700, Clayton Kirkwood wrote:
try:
fp = open( user_preferences )
except( PermissionError ):
else:
with open(user_preferences ) as f:
try:
fp = open(user_preferences)
except (IOError, OSError) as e:
On 15/08/15 06:44, Bill Allen wrote:
In my case, as simple as this:
def processing(*args): #my initial button click calls this
info.set('PROCESSING, PLEASE WAIT...') #the label message I was
root.after(1000, process_part) #the long running data process
That works for getting th
26 matches
Mail list logo