Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork333
Make the movie lister example work on Windows#458
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:develop
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…l newline, which made the example fail on Windows.- Changed the relative imports to absolute imports so the example works out of the box in VS Code.- Added a shell script and a batch file to run the example on Linux and Windows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Hey@jpvandervelden :) Thanks a lot for the contribution and glad you've figured it out how to run it on windows. I posted a couple of actions. Appreciate if you could take a look.
@@ -4,8 +4,8 @@ | |||
from dependency_injector.wiring import inject, Provide | |||
from .listers import MovieLister | |||
from .containers import Container | |||
from movies.listers import MovieLister |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I looked for any specific behavior of relative imports on Windows, but didn't find anything. Seems like you've had a problem with it. Do you remember how you ran it and what was the problem?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
It was a problem when using VS Code..
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
rm -rf wslenv2 | ||
python3 -m venv wslenv2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
So, this is basically doing what is done in the readme, correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Correct.
Uh oh!
There was an error while loading.Please reload this page.
@@ -72,3 +72,12 @@ src/dependency_injector/providers/*.so | |||
# Workspace for samples | |||
.workspace/ | |||
/examples/miniapps/movie-lister/wslenv2-win/Scripts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I'm unsure we need these imports here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This is how the virtual environment is created under Windows.
Changed script to use multiline command separator for the long command sequence.Added some comment lines.
As a Java guy I'd like to use the dependency injection in Python too. I found this library. It didn't work for me at first on Windows & VS Code. I made some changes so now it works on Linux and Windows.
Keep up the good work!