Skip to content

Commit 790f5a5

Browse files
authored
Update to python3 format
Change python2 from file to python3 format
1 parent fd0115a commit 790f5a5

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

script_count.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -33,34 +33,34 @@ def github(): # Start of the function just to count the fil
3333
github_dir = os.path.join(dropbox, 'github') # Joins the paths to get the github directory - 1.1
3434
github_count = sum((len(f) for _, _, f in os.walk(github_dir))) # Get a count for all the files in the directory
3535
if github_count > 5: # If the number of files is greater then 5, then print the following messages
36-
print '\nYou have too many in here, start uploading !!!!!'
37-
print 'You have: ' + str(github_count) + ' waiting to be uploaded to github!!'
36+
print ('\nYou have too many in here, start uploading !!!!!')
37+
print ('You have: ' + str(github_count) + ' waiting to be uploaded to github!!')
3838
elif github_count == 0: # Unless the count is 0, then print the following messages
39-
print '\nGithub directory is all Clear'
39+
print ('\nGithub directory is all Clear')
4040
else: # If it is any other number then print the following message, showing the number outstanding.
41-
print '\nYou have: ' + str(github_count) + ' waiting to be uploaded to github!!'
41+
print ('\nYou have: ' + str(github_count) + ' waiting to be uploaded to github!!')
4242

4343
def development(): # Start of the function just to count the files in the development directory
4444
dev_dir = os.path.join(path, 'development') # Joins the paths to get the development directory - 1.1
4545
dev_count = sum((len(f) for _, _, f in os.walk(dev_dir))) # Get a count for all the files in the directory
4646
if dev_count > 10: # If the number of files is greater then 10, then print the following messages
47-
print '\nYou have too many in here, finish them or delete them !!!!!'
48-
print 'You have: ' + str(dev_count) + ' waiting to be finished!!'
47+
print ('\nYou have too many in here, finish them or delete them !!!!!')
48+
print ('You have: ' + str(dev_count) + ' waiting to be finished!!')
4949
elif dev_count ==0: # Unless the count is 0, then print the following messages
50-
print '\nDevelopment directory is all clear'
50+
print ('\nDevelopment directory is all clear')
5151
else:
52-
print '\nYou have: ' + str(dev_count) + ' waiting to be finished!!' # If it is any other number then print the following message, showing the number outstanding.
52+
print ('\nYou have: ' + str(dev_count) + ' waiting to be finished!!') # If it is any other number then print the following message, showing the number outstanding.
5353

5454
clear_screen() # Call the function to clear the screen
5555

56-
print '\nYou have the following :\n'
57-
print 'AutoIT:\t' + str(count_files(path, '.au3')) # Run the count_files function to count the files with the extension we pass
58-
print 'Batch:\t' + str(count_files(path, ('.bat', ',cmd'))) # 1.3
59-
print 'Perl:\t' + str(count_files(path, '.pl'))
60-
print 'PHP:\t' + str(count_files(path, '.php')) # 1.2
61-
print 'Python:\t' + str(count_files(path, '.py'))
62-
print 'Shell:\t' + str(count_files(path, ('.ksh', '.sh', '.bash')))
63-
print 'SQL:\t' + str(count_files(path, '.sql'))
56+
print ('\nYou have the following :\n')
57+
print ('AutoIT:\t' + str(count_files(path, '.au3'))) # Run the count_files function to count the files with the extension we pass
58+
print ('Batch:\t' + str(count_files(path, ('.bat', ',cmd')))) # 1.3
59+
print ('Perl:\t' + str(count_files(path, '.pl')))
60+
print ('PHP:\t' + str(count_files(path, '.php'))) # 1.2
61+
print ('Python:\t' + str(count_files(path, '.py')))
62+
print ('Shell:\t' + str(count_files(path, ('.ksh', '.sh', '.bash'))))
63+
print ('SQL:\t' + str(count_files(path, '.sql')))
6464

6565
github() # Call the github function
6666
development() # Call the development function

0 commit comments

Comments
 (0)