Welcome to another r/learnPython weekly "Ask Anything* Monday" thread
Here you can ask all the questions that you wanted to ask but didn't feel like making a new thread.
* It's primarily intended for simple questions but as long as it's about python it's allowed.
If you have any suggestions or questions about this thread use the message the moderators button in the sidebar.
Rules:
Don't downvote stuff - instead explain what's wrong with the comment, if it's against the rules "report" it and it will be dealt with.
Don't post stuff that doesn't have absolutely anything to do with python.
Don't make fun of someone for not knowing something, insult anyone etc - this will result in an immediate ban.
That's it.
Hi everyone,
My previous post about my journey from being self taught to being hired seemed to be very popular!
Its been almost 4/5 months since I started my new job and I've learnt so much stuff you wouldn't learn without 'on the job' experience.
My main goal is to try and demystify to road to being hired as a python dev as long as you have put in the work and effort into your chosen subject.
I might go on a bit of a rant below because I feel there are a lot of people on the internet who, don't intend to, but often do, mislead beginner developers learning python.
Learning a web framework and building a website is not an 'advanced' skill that you can only achieve after learning a ginormous amount of computer science theoritical subjects. You can learn the basics, follow the documentation and build your site, it's really that simple to build a basic site.
I still see a lot of posts regarding 'algorithms and data structures' and I feel they are pushed too much by people with computer science degrees as a 'need to know' whereas having knowledge and experience of building a functional website using something like django/flask is completely different if thats what you want to do as a job.
If you are looking for web developer job, they knowing your language and chosen framework etc is way more important in putting your time into than a computer science subject because some guy on the internet who did a degree feels like you also need to follow the same route.
Understand that the absolute vast majority of people who know python do not work and will never work for, Amazon, google, facebook etc. And I feel this is the justifcation for learning these comp sci subjects is "Amazon will ask you these questions."
Thats great, but the companies in my town/city don't, and they are the ones interviewing me.
Just got the Udemy course for automate the boring stuff for free by going to the website and clicking the Udemy link.
EDIT: If your having trouble try using the code- JAN2020
Just for some background information, I'm using Visual Studio Code on Win10.
How do I get Visual Studio Code to use packages at the global level when I'm in a virtual environment? For instance, i have autopep8 and pylint packages installed at the global python level. But if i create a new virtual environment they aren't recognized anymore by Visual Studio Code. I have to technically install them again at that level, thus "dirtying" up my environment.
I recognize this probably isn't directly a python issue but i figured i would start here first.
I work in a professional field unrelated to programming, but I think knowing some basic Python could be a useful tool to have.
Is there any certification you all would recommend as a way to benchmark my progress in learning Python, and as a way to communicate my skill with the language to prospective employers? Thanks.
Hi reddit! ''' I am supper happy because I just finished my first project in python and therefore in any programming language. I just could see what I already learned and which skills I obtained. BUT I think my code still need a lot of improvment which I cant detect without individual help. Therefore I wanted to ask you if you could take a look at my code and just give your opinion and improvements.
import random
class Password: smallAlphabet = "abcdefghijklmnopqrstuvwxyz" bigAlphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" numbers = "0123456789" everything = smallAlphabet + bigAlphabet + numbers mods = {0: smallAlphabet, 1: bigAlphabet, 2: numbers, 3: everything} # opportunity to choose different characters passwords = {} # dic of all created passwords
import random
class Password:
smallAlphabet = "abcdefghijklmnopqrstuvwxyz"
bigAlphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
numbers = "0123456789"
everything = smallAlphabet + bigAlphabet + numbers
mods = {0: smallAlphabet, 1: bigAlphabet, 2: numbers, 3: everything} # opportunity to choose different
characters
passwords = {} # dic of all created passwords
def __init__(self):
Heads up, super new.
So here's a piece of code below, and I'm wondering what I'm missing from it to prompt an output. Also, is it indented correctly. Though, I've tried running it with different indentations.
class food(object):
def __init__(self, colour, size):
self.colour = colour
self.size = size
def show(self):
print("The fruit is " self.size)
print("It is also " self.colour)
I'd really appreciate comments on how to improve this code. It works but is a really naive script because it's the first thing I've written (cobbled together) in python; it's a conversion of the core of a good solid perl script I wrote ages ago - I've done lots of/too much perl.
And a specific question (admitting cluelessness): how do I find out what error statuses, methods & data are available in python from WindowsInstaller.Installer?
thanks!
#
# msisqlexec apply SQL statements from a text file to a Windows Installer MSI
# usage:
# msisqlexec.py -m <file.msi> -s <sql.txt>
# msisqlexec -h for usage help
#
import pdb;
import win32com.client
from argparse import ArgumentParser
parser = ArgumentParser()
parser.add_argument("-m", "--msifile", dest="msifile",
284k
Members
2.5k
Online
Oct 2, 2009
Cake Day
478k members
62.7k members
27.1k members
2.4m members
1.2m members
199k members
Try to guide OP to a solution instead of providing one directly.
Provide links to related resources.
Answer the question and highlight side-issues if any exist.
Don't "answer and run", be prepared to respond to follow up questions.
Proofread your answers for clarity and correctness.
Be polite.
Try out suggestions you get and report back.
SSCCE Keep your code Short, Self Contained, Correct (Compilable) and provide Example
Include the error you get when running the code, if there is one.
Ensure your example is correct. Either the example compiles cleanly, or causes the exact error message about which you want help.
Avoid posting a lot of code in your posts.
Posting homework assignments is not prohibited if you show that you tried to solve it yourself.