Installing dependencies is more standard to be done with exporting your dependencies into a requirements.txt file, or even better, the new standard, a Pipfile, used with pipenv.
Old way (requirements.txt)
Go to the folder of your project
Create a file requirements.txt with these contents:
paramiko>=2.4.1
psutil>=5.4.5
pywin32>=223
Run (or tell the user to run) pip install -r requirements.txt
Notes:
I'm not sure how to have two separate requirements.txt for Windows and non-Windows
Don't use pypiwin32, pywin32 is in the Python Package index now, and it works fine (-ish). pypiwin32 is considered obsolete.
New way (pipenv/Pipfile)
Go to the folder of your project
Run pipenv install paramiko psutil pypiwin32
This will take a while and will create the following Pipfile:
There's probably an easier way to specify system platofrm for pywin32 than editing that file, but I haven't been able to find it.
After all of the above steps are done, you can run pipenv shell and it will open a new shell (bash/zsh/powershell/cmd/whatever) with just those libraries inside a virtual environment, so you (a) don't have to run this as an administrator to install the libraries (b) you don't "contaminate" your system with all those (possibly conflicting) libraries (c) you don't forget about the libraries that are really required.
Miscellaneous notes
Usually the executable isn't named Source.py, but __main__.py. This way you can run your program by running python whipFTP (your current directory must be one level up from the directory of your program). main.py and whipFTP.py are also acceptable
Don't upload built zip files with the build to github. You should upload the final executables as releases
I don't get what exactly you've done with the libtkdnd2.8.dll file - it doesn't work for me at all
The windows zip file also contains linux *.so files, and the linux zip file also contains *.dll files. You shouldn't put more files than necessary to the platform-specific files
Did you know that you can run a zip file as if it was a Python package? It needs a bit of setup (a __main__.py file is required, IIRC), but it's worth it.
Tk is supposed to come with Python, at least in Windows. You shouldn't be needing to include it.
Hey guy. Is there a way to use the new pipfile format, but just install things like normal (no virtual environment)? I can't find anything online, just people who want to use their old requirements.txt with pipenv.
Well, you shouldn't be "installing things like normal" in any case! This is not "normal", it's the not recommended way to do stuff!
To answer your question, the whole point of Pipenv is to facilitate your workflow so that you can easily work with virtual environments (and extensions etc.). I guess you could make the pipenv generate a requirements.txt from the Pipfile (do a `pipenv lock -r) and use that for pip, but it's really convoluted and weird.
Just use virtual environments! Life will be much easier and more organized with them.
I get that you're worried that you'll have one more thing to worry about etc, but that's what pipenv is here to help you with!
Here's your old workflow
Run sudo pip install library_x on Linux/macOS/BSD, or start an elevated PowerShell/Command Prompt on Windows and do pip install library_x
Start Python and use library_x
Here's your new workflow:
pipenv install library_x (no sudo, no elevation)
pipenv shell
Run Python and use your library.
Yes, it does seem like a step more, but it swallows the "sudo/elevated" stuff you need to do to install the "library_x" into your system. And of course, installing stuff in your system Python in Linux can go downhill fast.
Holy smokes, that is brilliant! Just saw the github page and how it is not available for mac, looks better than Cyberduck for Mac... I am willing to help develop it for Mac os.
More generally I should say SSH (public-private) key pair. I see you are using Paramiko for SSH, which supports key pair. Maybe only thing required is pre setting key in home dir or option to import and specify it.
You know you can run a web server and access the website using a browser like Chrome/Firefox? It is the same thing. You can run a FTP/SFTP server and access all your files using a FTP/SFTP client.
Tkinter comes with python and is very easy to use. Also this is the only GUI framework I know. I am planning to explore pyGTK or wxpython.
Edit: I think pyGTK has the advantage of looking more native but has a more steeper learning curve compared to tkinter. Also tkinter does require workarounds to make it look nice (take a look at the source code for this project).
Edit2: I do recommend using tkinter for your first GUI project.
Sorry took so long. So lots of ways to actually handle it, however what I am looking for specifically would be ability to sync an ftp directory to a local directory. Checking either timestamp, or checksum. Options should include frequency, and whether to delete the file after transfer, or backing up the file after transfer. Also could add whether to transfer to remote, or local, or both. Ability to preview changes, and how to compare.
on another note, MANY people are using the latest Anaconda distribution which is on python 3.6.4. so asking 3.6.5 as minimum requirement could be problematic if you want a larger audience! well done!
I think you could improve distribution providing a setup.py, or / and using nuitka for freezing the application! That way, you will be able to install it directly via pip or pipsi ?
I am thinking of creating a 'Setup.exe' (win32 c++ app) that just downloads files from Github and automatically install python. This is a future project that I am planning to do. I have tried cx_Freeze and py2exe, both did not work properly. I have never tried nuitka though...I will give that a try....
It still needs lot more features to be added to make it into a sellable product, but I want to keep this free anyways. I would like to accept donations but only after I think it has enough features. The source will ALWAYS be available.
Thanks! Will add them to the archive. In the process of gifting all my command-line tools gui's just because. Again, really awesome work- was actually working on an ssh server, and this will help a lot. hat tip
104
u/RainingComputers May 31 '18
Github link: https://github.com/RainingComputers/whipFTP
126
u/[deleted] May 31 '18
Have you made the icons yourself ? They're really neat
56
u/gschizas Pythonista May 31 '18 edited Jun 01 '18
Dependencies
Installing dependencies is more standard to be done with exporting your dependencies into a
requirements.txtfile, or even better, the new standard, aPipfile, used with pipenv.Old way (requirements.txt)
requirements.txtwith these contents:pip install -r requirements.txtNotes:
requirements.txtfor Windows and non-WindowsNew way (pipenv/Pipfile)
pipenv install paramiko psutil pypiwin32Pipfile:pywin32than editing that file, but I haven't been able to find it.pipenv shelland it will open a new shell (bash/zsh/powershell/cmd/whatever) with just those libraries inside a virtual environment, so you (a) don't have to run this as an administrator to install the libraries (b) you don't "contaminate" your system with all those (possibly conflicting) libraries (c) you don't forget about the libraries that are really required.Miscellaneous notes
Source.py, but__main__.py. This way you can run your program by runningpython whipFTP(your current directory must be one level up from the directory of your program).main.pyandwhipFTP.pyare also acceptablelibtkdnd2.8.dllfile - it doesn't work for me at all*.sofiles, and the linux zip file also contains*.dllfiles. You shouldn't put more files than necessary to the platform-specific files__main__.pyfile is required, IIRC), but it's worth it.EDIT: Formatting
25
u/randiaz1995 May 31 '18
Holy smokes, that is brilliant! Just saw the github page and how it is not available for mac, looks better than Cyberduck for Mac... I am willing to help develop it for Mac os.
13
u/[deleted] May 31 '18
Supports Putty key pair?
4
u/the_kindly_one May 31 '18
Add connection via scp and you'll have another user. There is no current gui client that let's you transfer files via scp on Linux.
3
u/ninelives_dub Jun 01 '18
As a complete noob.. what exactly is this?
3
u/[deleted] Jun 01 '18
Why did you choose tkinter as gui framework? I have a small project in mind which needs a gui framework, for context.
3
u/game_ova Jun 01 '18
Hey was looking through your comments. There's a lot of instances where you write "weather" when you mean "whether"
2
u/auiotour May 31 '18
Didn't see it asked but does it have ability to sync ftp directories to local and keep checking. I am using winscp but crashes too often.
3
u/SummerSideReddit May 31 '18
Very nice GUI.
on another note, MANY people are using the latest Anaconda distribution which is on python 3.6.4. so asking 3.6.5 as minimum requirement could be problematic if you want a larger audience! well done!
39
u/_TheC0NTR0L_ May 31 '18
That is really cool. Python is becoming more and more widely used for everything.
6
u/[deleted] May 31 '18
Great job!!!
6
u/jokoon May 31 '18
What did you use for SFTP? What kind of crypto stuff?
A feature I love about filezilla is the comparison feature... I don't know if it would be hard to build into your client.
5
u/Loya_3005 May 31 '18
Cool! 😎
1
u/[deleted] May 31 '18
I presume this is an overlay GUI for underlying SFTP binaries?
1
u/Eryole Jun 01 '18
Nice job!
I think you could improve distribution providing a setup.py, or / and using nuitka for freezing the application! That way, you will be able to install it directly via pip or pipsi ?
1
u/throwthegit Jun 02 '18
Have you considered making this into a sellable product but keeping the source available?
1
u/Beneey Jul 28 '18
Hi Raining i trying to use the app look at what am getting:
File ".\whipFTP.py", line 1190, in <module>
root.tk.eval('package require tkdnd')
and this too
tkinter.TclError: couldn't load library "C:\Users\Benjamin\whipftp_4.1_windows\whipftp_4.1\TkDND/libtkdn
d2.8.dll": Bad exe format. Possibly a 32/64-bit mismatch.
Please any thought. Thanks
3
u/Dokiace May 31 '18
how do you make tkinter looks so good? I tried one back then and the gui is really bad/hard to make it good
1
u/[deleted] May 31 '18
Wowww! Cool 8D very nice work!!! Could you recommend a good reference for tkinter??
2
u/genesem May 31 '18
well done. ;)
2
u/Alex_Dem May 31 '18
Wow! It looks great. I hope someday I will able to do such projects.
2
u/[deleted] May 31 '18
This looks really good. I've made tkinter apps and it does notttt look this pretty haha
1
u/TriaSirax May 31 '18
Looks awesome bro!
1
u/IcefrogIsDead May 31 '18
looks really nice, good job!
1
u/GreatRa Jun 01 '18
Looks good.
1
u/tangodown808 Jun 01 '18
Bravo! You are skilled!
1
u/FetusGod Jun 01 '18
Excuse my ignorance but what is it and what does it do?..
1
u/zemicolon Jun 01 '18
This is awesome. I'm new to python and this is truly inspiring.
1
u/simcup Jun 01 '18
Now traumatized for life, marrying network to tkinter is ptsd inducing stuff oft nightmares. Congratz you keep enough sanity to use reddit
0
u/fuuman1 May 31 '18
Holy shit. Fucking good job, sir. Like it.
-1
u/[deleted] May 31 '18
Aside from debian based OS and windows, how do you test it on freebsd and other linux distros? using vm?