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

Screenshot for your readme? #1

Closed
PySimpleGUI opened this issue Nov 22, 2021 · 16 comments
Closed

Screenshot for your readme? #1

PySimpleGUI opened this issue Nov 22, 2021 · 16 comments

Comments

@PySimpleGUI
Copy link

Hi!

I see in your readme that you've got a GUI and indeed, the code shows you've got one... but, there's no image in your readme. I'm SURE visitors would enjoy seeing what you made.

If you've not put an image into a readme before, it's super simple. It's as easy as embedding an image in this GitHub Issue...

This is a simple one I made a couple of years ago. Nothing fancy that's for sure....

image

https://github.com/PySimpleGUI/PySimpleGUI-Reddit-Searcher

I put my screenshots that I used in my readme for that project into an Issue and then pasted the links into my readme

https://github.com/PySimpleGUI/PySimpleGUI-Reddit-Searcher/issues/1

The window above was made by pasting into this comment. It made this line of text:

![image](https://user-images.githubusercontent.com/46163555/142887950-bf23dbca-ffee-4401-a90a-3f9816d18ab0.png)
You can do the same with your program... paste a screenshot and then paste the link into your readme. Simple.... I 💗 simple

image

@Aadv1k
Copy link
Owner

Aadv1k commented Nov 23, 2021

Great! thanks for the suggestion, I will add screenshots in the next commit for sure 👍🏼 😄

@Aadv1k
Copy link
Owner

Aadv1k commented Nov 23, 2021

Done! as of now, I have added some screenshots, feel free to give more feedback, via comments or raise another issue, thanks!

@Aadv1k Aadv1k closed this as completed Nov 23, 2021
@PySimpleGUI
Copy link
Author

image

I like seeing things like a slider being used in a non-traditional way. I learn something from every project I see.... it's why I ask for screenshots.... so I can learn, and others stopping into your repo too. Thanks for taking the time to add them.

@PySimpleGUI
Copy link
Author

User Settings API

A tip for when you have a need for settings.... you can now use either a JSON or an INI file via the User Settings API in PySimpleGUI.

I need to add both a Cookbook entry as well as a Demo Program that shows the PySimpleGUI User Settings APIs being used for credentials.

I at least changed my Reddit reader to use them, but I don't think I specifically place credentials into a User Settings file (e.g. JSON file) in any of the Demos.

If you look at my Reddit searcher code:

https://github.com/PySimpleGUI/PySimpleGUI-Reddit-Searcher/blob/master/Reddit_Searcher.py

You'll see that to get my settings this kind of expression is used:

 settings['client_id']

This will get the item client_id from the JSON file. Same with saving the JSON file. These statements take the values entered into the Settings Window and store them in the JSON file.

        settings['client_id'] = values['-CLIENT ID-']
        settings['client_secret'] = values['-CLIENT SECRET-']
        settings['user_agent'] = values['-USER AGENT-']
        settings['username'] = values['-USERNAME-']
        settings['password'] = values['-PASSWORD-']

Maybe it'll save you a bit of code in the future.

I "simplified" / wrapped 2 sets of APIs....

  • Settings - wraps JSON and INI files
  • Exec APIs - wraps subprocessing

To be honest, they're for my own benefit as much as anything else. It's so much easier for me to work with these modules by simplifying them. I guess with the project starting out as a way for me to work with GUI APIs in a simplified way, it makes sense that I would apply them to related helper kinds of modules.

@Aadv1k
Copy link
Owner

Aadv1k commented Nov 25, 2021

Hey, ton of thanks for this awesome package and commenting on this little project of mine, thanks for the advice, I ended up implementing a "codeflow" system for authentication (when you run the application it provides you an url, where you can go to, allow this app and get a refresh token which will be written) you can see the code at 'codeflow.py', as for the settings, if I was committing to gui, it would only be fair to have settings within the gui, I also added a feature for changing the voice!

@PySimpleGUI
Copy link
Author

You're welcome. Thank you for writing something using it that then inspired me to work on it more. It's a feedback loop. I make stuff, you make stuff, I get inspired to add more stuff to it.

icons8_refresh_160px

It's awesome that you're continuing to add to it. Very nice!

Settings

A lot of my programs now have settings windows now that I added the User Settings API calls. This enables me to plug the settings directly into the layout:

    layout = [[sg.T('Enter Zipcode or City for your location')],
              [sg.I(settings.get('-location-', nearest_postal), size=(15, 1), key='-LOCATION-')],
              [sg.I(settings.get('-api key-', ''), size=(32, 1), key='-API KEY-')],
              [sg.B('Ok', border_width=0, bind_return_key=True),  sg.B('Register For a Key', border_width=0, k='-REGISTER-'), sg.B('Cancel', border_width=0)], ]

image

They were added specifically for this purpose, the ability to include the settings values right in the PySimpleGUI layouts and other calls.

@Aadv1k
Copy link
Owner

Aadv1k commented Nov 26, 2021

Possibilitites are pretty much endless, pysimplegui is an awesome package with "get stuff done" mentality, I really enjoyed the simplicity of nested list based layout, and the fact that it comes along with themes, this along with ton of features, makes it a joy to work with, I will def create more projects with this in the future.

@PySimpleGUI
Copy link
Author

"Satisfice"....

I had never heard of this word before. In many ways it describes the "Philosophy of PySimpleGUI" and my personal programming philosophy too. The important things, as you know, are 1. Having fun and 2. Solving the problem. So, yea, a "get stuff done" mentality for sure! You've picked up on the project's vibe. GREAT to hear it coming from you.

I disliked front-end development for my entire career in software engineering. I went into "System Software" because of that. As a result, I've never been able to make my own tools.

Part of the "fun" for PySimpleGUI, for me, is this new-found capability. I can write my own tools, and, the best part of it is that it's trivial to do. Being able to think of a problem and solve it in the same day is fun. Seeing 1/10th the amount of code that would normally be required is a joy and seeing how it fits Python at a fundamental level is beautiful. Lists and layouts combined is both natural and powerful.

It's a combination of a number of aspects of the PySimpleGUI system, the architecture, documentation, the technical details, that make PySimpleGUI the fun solution it is. The layout is the start of the architecture, but more was needed to get it to the "trivialization" point I was after. That meant getting rid of callbacks.... and thus the PySimpleGUI event loop was born.

Sorry...it's easy for me to drone on about how much fun it is to use and the different design choices made along the way.

I'm writing your words in my notebook this morning....

a joy to work with,

They're incredibly motivating to read. Thank you!

@Aadv1k
Copy link
Owner

Aadv1k commented Nov 27, 2021

You know, as a (newly) open source Dev, this is nothing more than my hobby, so when there are 100s of random bugs, you feel down because nothing you do works, you have a experimental solution, but you are too tired and demotivated to implement it, but the you get feed back from a person other than you doesn't matter in what way may it be issues or comments, that is enough for me to go ahead, implement that solution, feature or bug doesn't matter how long it takes, doesn't matter how many bugs or how hard the solution is, those are the joys of open source, I can relate to you;

Whoever you are, you are doing great work for the community.

I would love to contribute to to one of my favourite python libraries, you know I would love to know about you more, are you on discord or do you have a Twitter handle? If so, then let's connect there!
Best,
Aadvik.

@PySimpleGUI
Copy link
Author

PySimpleGUI commented Nov 28, 2021

Hi there!
Thank you for all the kind words. They're always appreciated.

I have a Twitter account, @PySimpleGUI, but It's rarely used now. I make announcements every few weeks. I don't do social media. You can learn a bit about me in the readme, and I posted about my first job a long time ago on Twitter I think... feel free to search. I also recently wrote a little in a conversation in this repo...

PETEROLO291/Flame-Auto-Clicker#6

My goal has always been for PySimpleGUI to be about PySimpleGUI, and not at all about me. I'm not the important party here, you guys and gals are. I'm doing what I enjoy doing, writing code, documentation, creating products and technologies. I'm old-school maybe. Just not into it all.

PySimpleGUI is licensed open source, but it's not the typical open source project. I don't take pull requests. It's not a community-built project. The enhancements, suggestions, feedback, etc, has certainly played a part in helping make it what it is today, but the community doesn't write the code like a typical open source project.

Keep doing your thing.... what makes you happy. Building things is the best way I know of learning this craft. It can be a life-long passion so keep doing what you're doing. Find joy where you can. Spread it when you can.

I'm into quotes... and I'm into the arts for inspiration. Picasso said....

"The meaning of life is to find your gift. The purpose of life is to give it away."

@PySimpleGUI
Copy link
Author

If you really want a lot of stuff to read, there are over 1,000 posts I've written in the Announcement's Issue.. That should keep you busy for a while.

image

@PySimpleGUI
Copy link
Author

The best way to contribute to PySimpleGUI is by building stuff for yourself and others using it. What you learn may help others learn. Or, maybe you'll have an idea that I've not heard before. Or ??? Who knows.... no one does until you try. Give it a go. Programming is a solitary activity. There is YOU and the COMPUTER... for me there is also a blank lab book that gets filled pretty quickly with notes, diagrams ideas. You may draw inspiration from communities, but the act of programming itself, of writing code, is you with an IDE open in front of your face. At that point, it's on you to be a programmer, implement something, get it to work, debug it.

Think of it like playing the piano. You have to be the one that practices every day. Reading a piano forum isn't as likely to make you a better player than you practicing.

@Aadv1k
Copy link
Owner

Aadv1k commented Nov 28, 2021

You sir, are an inspiration, the work you are doing in invaluable, It won't be wrong to say I would like to become like you, contributing so much to the open source community. Whosoever you are, be safe, and keep coding the community and people like me look up and need people like you. I will definitely archive this conversation because it's been a pleasure of mine talking to you, thank you. Be safe from omnitron, keep on coding.
Much ❤️ from Aadvik. Goodbye

@Aadv1k
Copy link
Owner

Aadv1k commented Nov 28, 2021

Hi there!

Thank you for all the kind words. They're always appreciated.

I have a Twitter account, @PySimpleGUI, but It's rarely used now. I make announcements every few weeks. I don't do social media. You can learn a bit about me in the readme, and I posted about my first job a long time ago on Twitter I think... feel free to search. I also recently wrote a little in a conversation in this repo...

PETEROLO291/Flame-Auto-Clicker#6

My goal has always been for PySimpleGUI to be about PySimpleGUI, and not at all about me. I'm not the important party here, you guys and gals are. I'm doing what I enjoy doing, writing code, documentation, creating products and technologies. I'm old-school maybe. Just not into it all.

PySimpleGUI is licensed open source, but it's not the typical open source project. I don't take pull requests. It's not a community-built project. The enhancements, suggestions, feedback, etc, has certainly played a part in helping make it what it is today, but the community doesn't write the code like a typical open source project.

Keep doing your thing.... what makes you happy. Building things is the best way I know of learning this craft. It can be a life-long passion so keep doing what you're doing. Find joy where you can. Spread it when you can.

I'm into quotes... and I'm into the arts for inspiration. Picasso said....

"The meaning of life is to find your gift. The purpose of life is to give it away."

That's some great advice.
Internet has a pretty fake depiction of actual programming it's only about the good parts
"Listening to chill coding Lofi while writing hello world" when in reality you are going through the code again in again in your mind while having atleast a 100 tabs open (closing tabs is something that is only then when you have either given up or succeeded) keep it up, I don't expect you to respond to these paragraphs or else we will be here all day, keep safe!

@PySimpleGUI
Copy link
Author

One final tip since you mentioned having many tabs open. This is an observation, an opinion and should be taken as such.

Stack overflow is effective in seducing programmers into thinking it has all the answers. I wrote specifically in the documentation to avoid using StackOverflow and instead use the documentation, call reference, the 300+ demo programs and the GitHub issues in the PySimpleGUI repo (as well as Jason's solutions repo).

Just this week I saw the first answer provided to a question was incorrect and the person that wrote it admitted he/she had never used PySimpleGUI before. Keep in mind when you're reading the information there that it may be posted by someone that knows less than you and that the solution may have originally worked, but PySimpleGUI has changed since and there exists a much better approach now.

I get that SO can be of help at times, but I think much of it is overused. If the use is to find a quick way, a shortcut, a solution ready to cut and paste where you don't really understand what you're pasting and why it works, then the reader is doing themselves a disservice. There is no shortcut to learning to play the piano. There is no cut and paste to get to a solution. The task is to educate yourself. Read books and documentation to learn a topic/language/framework.

Using Google with PySimpleGUI is going to not turn out well. It's doomed to create outdated code and the programmer is going to miss the entire learning opportunity. A good number of people filing issues are because they "googled for PySimpleGUI answers" instead of looking for them in the suggested places, and then if not found, open an issue on PySimpleGUI.com.

PySimpleGUI is already saving weeks and months of time. Take some of that time and invest back into your own education by reading the Demo Programs, the call reference, and visiting the eCookbook. PySimpleGUI didn't come to be by taking a ton of shortcuts. I simply have worked every day for the past 4 years on it. The large number of Demo Programs is simply the output of me writing code to test the features as I develop them.

Learning crafts, building skills, is about how much time you want to invest into something and how you're investing it. I'm not saying you have to learn every single library and function you use, but am suggesting to step back a little from problems and try to learn the bigger picture. Work on paper more. If you don't use a lab notebook, try it. Sketching designs on paper can be impactful.

OK, off to work.....

Enjoy the ride!

image

@Aadv1k
Copy link
Owner

Aadv1k commented Nov 29, 2021

Hey, once again thanks for the advice, I avoid blindly trusting stack overflow, usually when I get an error I can incur some info from the message, then I can look that up, based on which I proceed. Stack overflow is a great site, but often even I, just skip the whole context and copy the code, which is something I have to learn to avoid. Anyway good luck on what ever you are doing

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

No branches or pull requests

2 participants