Closed akansh97531 closed 7 years ago
@nikhilkumarsingh review
Awesome work @akansh97531 ! Some minor improvements/features are required:
tk.py
to something else (maybe gui.py
) since keeping names same as built-in modules/functions is not a good practice.tk.py
. Keeping just from tkinter import *
is enough.
Also, make this import Python 2 and 3 compatible.
Also, explain the reason behind this import:
from multiprocessing import Queue
in gui_download.py
.okay sir i will work on 1,2,4,5 , and there is no need of : from multiprocessing import Queue in gui_download.py i was trying something so , i forgot to remove it @nikhilkumarsingh
all improvements done with support of python2 @nikhilkumarsingh
Nice work @akansh97531
gui.py
as ctdl-gui
.png
image and will have to mention file path in MANIFEST.in
like this otherwise it will not get recognized by package manager.)changes done ! @nikhilkumarsingh
Very poor formatting @akansh97531 . Simply find and replace will not do. See this script as reference. Don't make hurry in this task. It is only for readability and will help in longer run.
tk.py
in your code.gui_download.py
to gui_downloader.py
please review the formatting now , added some comments to help understand better if you want any more changes please tell me @nikhilkumarsingh
The only problem I have is with the spaces and commas. Please use the style as used in this script . You have used spaces unnecessarily at some places and never used it at others. Follow the reference script strictly.
@nikhilkumarsingh i have done it manually now
The code looks much better now.
(
and before )
.Content Downloader
to ctdl
only.def <func-name>(<arguments>):
"""
<short-description of function>
"""
<global varibales>
.....
@nikhilkumarsingh done!!
@nikhilkumarsingh please review
All looks fine @akansh97531
Update the readme with info about ctdl-gui
.
You can also add a gif showing usage of ctdl-gui.
@nikhilkumarsingh added info and gui
I am getting this error:
Traceback (most recent call last):
File "/usr/local/bin/ctdl-gui", line 11, in <module>
load_entry_point('ctdl==1.4.5', 'console_scripts', 'ctdl-gui')()
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 560, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2648, in load_entry_point
return ep.load()
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2302, in load
return self.resolve()
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2308, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/local/lib/python2.7/dist-packages/ctdl/gui.py", line 40, in <module>
img = Image("photo", file="icon.gif")
File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 3329, in __init__
self.tk.call(('image', 'create', imgtype, name,) + options)
_tkinter.TclError: couldn't open "icon.gif": no such file or directory
when I open ctdl-gui
from a directory other than the package directory. It seems to be a problem of relative imports. Please fix it.
okay i will look into it
gui opens with command : python tk.py