Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run the CLI, how? #49

Closed
GerritKuilder opened this issue Jan 3, 2023 · 4 comments
Closed

run the CLI, how? #49

GerritKuilder opened this issue Jan 3, 2023 · 4 comments
Labels
question Further information is requested.

Comments

@GerritKuilder
Copy link

Hello,

call me stupid but I try to run the cli version of this code, I can run it from a basic script:
from difPy import dif
search = dif("C:/Path/to/Folder/")

and this works.
but if I run it as python dif.py -A "C:/Path/to/Folder_A/"

I get a no such file or directory

And yes, not very familiar with python (yet)

Kind Regards,

Gerrit Kuilder

@GerritKuilder
Copy link
Author

So the script dif.py is installed but somehow not added to the path, my problem I think I can sort that out, later.

@elisemercury
Copy link
Owner

elisemercury commented Jan 3, 2023

Hi @GerritKuilder,

I just tested it myself and the CLI implementation works fine from my end.

Did you run the command in the folder where dif.py is located? If you did not add difPy to your path variables, you need to first locate into the folder where the dif.py script is installed and then you will be able to run the CLI command successfully.

For instance: if you installed difPy via the pip installer, then you would need to locate where your Python packages are installed. For me on Windows 10 that is C:\Users\User\AppData\Local\Programs\Python\Python37\Lib\site-packages\difPy.
If you cloned difPy directly from GitHub, then locate the dif.py script it in the folder where you cloned it.

Hope this helps!

All the best,
Elise

@elisemercury elisemercury added the question Further information is requested. label Jan 3, 2023
@GerritKuilder
Copy link
Author

Hello Elise,

Thank you, i figured out that the dif.py was indeed not i my path.
But I managed to create a custom script, bases on your example and dump the json result into a file,

I was able to replace a very time consuming javascript (days) with an under a minute python script and process the result in my node app..

Thank you for this.

Next step: take a python course....

Kind Regards,

Gerit Kuilder

@elisemercury
Copy link
Owner

Hi Gerit,

That is great to hear - happy you found a way to make it work!

All the best and happy coding,
Elise

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested.
Projects
None yet
Development

No branches or pull requests

2 participants