1010from threading import Thread
1111import subprocess
1212import ast
13- import requests
13+ import webbrowser
1414
1515global file_path , edited , config
1616file_path = ''
@@ -385,12 +385,6 @@ def install_libraries():
385385
386386 pb .pack (side = TOP )
387387
388- def does_package_exist (package_name : str ):
389- pypi_url = f'https://pypi.org/project/{ package_name } /'
390- response = requests .get (pypi_url )
391-
392- return response .status_code == 200
393-
394388 def install_library ():
395389 package_name = toplvl_main_frame_library_entry_var .get ()
396390
@@ -404,17 +398,6 @@ def install_library():
404398 status_label .config (text = f'Installing... 0%' )
405399
406400 def main ():
407- does_package_exist_res = does_package_exist (package_name )
408-
409- if (not does_package_exist_res ):
410- messagebox (f'Invalid package name, \' { package_name } \' doesn\' t exist.' , 'warn' )
411-
412- try :
413- install_btn .config (state = 'normal' )
414- except : pass
415-
416- return
417-
418401 global process
419402 process = subprocess .Popen (['pip' , 'install' , package_name ], stdout = subprocess .PIPE , stderr = subprocess .PIPE , text = True )
420403
@@ -519,7 +502,7 @@ def main_goto():
519502 line_number = int (line_number_string )
520503
521504 if line_number not in range (1 , 32767 ):
522- messagebox ('The integer is out of range [1, 32767].' , 'warn' )
505+ messagebox ('The integer is out of range: [1, 32767].' , 'warn' )
523506 return
524507
525508 editor .mark_set (INSERT , f"{ line_number } .0" )
@@ -658,14 +641,12 @@ class IDE:
658641
659642 configure_menu = Menu (menu_bar , tearoff = 0 )
660643 configure_menu .add_command (label = 'Terminal' , command = configure_terminal )
661- configure_menu .add_command (label = 'Appearance' , command = None , state = DISABLED )
662- configure_menu .add_command (label = 'Syntax highlighting' , command = None , state = DISABLED )
663644
664645 menu_bar .add_cascade (label = 'Settings' , menu = configure_menu )
665646
666647 help_menu = Menu (menu_bar , tearoff = 0 )
667- help_menu .add_command (label = 'About' , command = lambda : messagebox ('SparklyPython\n \n - Version: 1.0\n - Developer: T.F.A\n - Language: Python\n - GUI: Tkinter (Python)\n - Open-source? No \n \n © Copyright 2024, The MIT License' , 'info' ))
668- help_menu .add_command (label = 'Source (GitHub)' , state = 'disabled' , command = None )
648+ help_menu .add_command (label = 'About' , command = lambda : messagebox ('SparklyPython\n \n - Version: 1.0\n - Developer: T.F.A\n - Language: Python\n - GUI: Tkinter (Python)\n - Open-source? Yes \n \n © Copyright 2024, The MIT License' , 'info' ))
649+ help_menu .add_command (label = 'Source (GitHub)' , command = lambda : webbrowser . open ( 'https://github.com/TFAGaming/SparklyPython' ) )
669650
670651 menu_bar .add_cascade (label = 'Help' , menu = help_menu )
671652
0 commit comments