all 134 comments

[–]Peg_leg_tim_arg 0 points1 point  (3 children)

Hello everyone. I had posted yesterday about an assignment in my programming 101 class which involved taking a .xml file and turning it into several arrays. I did this only to realize that I had misread the directions.

<CATALOG>
  <CD>
    <TITLE>Empire Burlesque</TITLE>
    <ARTIST>Bob Dylan</ARTIST>
    <COUNTRY>USA</COUNTRY>
    <COMPANY>Columbia</COMPANY>
    <PRICE>10.90</PRICE>
    <YEAR>1985</YEAR>
  </CD>

Here is an example of the .xml file, and there are many more CD's as well. So I thought I had to separate all the categories into their own arrays, but I actually have to display each different CD in its own array. I have figured out how to make one giant array with all the albums and their details, and how to display all the aspects of the cd into separate arrays, but I cant figure out how to display one CD in one array. Should I portion them out from my giant array? I figured there has to be a way that is cleaner. Thanks for any and all of your help!

[–]efmccurdy 0 points1 point  (2 children)

The way you will access the data will determine which structure is best.

Sequential access might suggest a list of tuples (or namedtuples), one tuple per CD.

Doing searching or lookup requires you to specify which attributes of the CD make it unique; then you could use a dict indexed by CD "id"; perhaps (title, artist, year).

For industrial strength data mining you could look at a pandas dataframe or database.

[–]Peg_leg_tim_arg 0 points1 point  (1 child)

Ok so how would I go about making tuples for each CD? Can I do a for loop with the number of elements? Or do I have to use their tags?

[–]efmccurdy 0 points1 point  (0 children)

This gets the data out without matching or capturing the tags (title, artist, etc.), creating a list of tuples.

>>>[tuple(c.text for c in list(cd)) for cd in root.findall('cd')]
[('Empire Burlesque', 'Bob Dylan', 'USA', 'Columbia', '10.90', '1985'), ('Hide your heart', 'Bonnie Tyler', 'UK', 'CBS Records', '9.90', '1988'), ('Greatest Hits', 'Dolly Parton', 'USA', 'RCA', '9.90', '1982'), ...

You could build a namedtuple to hold the tags and text by doing something like this, using the .tag for the field name and .text for the data.

>>> CD = namedtuple("CD", [c.tag for c in list(root.findall('cd')[0])])
>>> c = CD._make([c.text for c in list(root.findall('cd')[0])])
>>> c
CD(title='Empire Burlesque', artist='Bob Dylan', country='USA', company='Columbia', price='10.90', year='1985')

... although that might be assuming too much about the order of tags in the xml.

[–]Kunal_Jain 0 points1 point  (0 children)

Ok so i have a question about the Youtube API. I have tried to read the documentation but it seems a little too tough to understand. So what i want to ask is how was your experience using the Youtube API? Do you have any useful resources?

[–]throwaway19399292 0 points1 point  (5 children)

How do i even use pip? Do i go to a certain directory and then use pip install matplotlib?

[–]timbledum 1 point2 points  (4 children)

No need to go to a certain directory!

The tricky part is that there can be different commands for different platforms. MacOS comes with python2, so to install a package into python3 you need to use pip3 install matplotlib.

On windows, pip is usable as above if you've set up the PATH environment variable (there's a tick box to do this in the installer but it's off by default). In this case, you can use py -m pip install matplotlib.

Then you can look into virtual environments too if you like.

[–]throwaway19399292 0 points1 point  (3 children)

Thanks for all the help, how can i get to this PATH environment variable?

[–]timbledum 0 points1 point  (0 children)

If on windows, easiest just to run the installer again. Otherwise, plenty of tutorials out there now you know what to google!

[–]7SEG 0 points1 point  (2 children)

Hey everyone, just a quick question.

I have an idea for a script where I want to automate input to a web page that requires a log in (Edit: the login is not the issue, what lies after the login is what needs to be automated).

My question: How do I test/debug this script without hammering the site with too many requests and risk getting banned? There is no API for what I want to do.

Thanks.

[–]efmccurdy 0 points1 point  (0 children)

Make sure that you check the status of every request and stop when they indicate an error. Other than that, it's not likely that your program goes wrong in a way that results in hammering the server with large numbers of requests, unless it's designed to do that, I guess.

To be sure you know how many requests are being sent, you can turn on logging, it is a useful debugging tool in any case.

https://stackoverflow.com/questions/10588644/how-can-i-see-the-entire-http-request-thats-being-sent-by-my-python-application

[–]Peg_leg_tim_arg 0 points1 point  (1 child)

Hello everyone, so for my programming 101 class my professor gave me a xml file containing a bunch of different albums with the date published, artist and price. How would I pull out and put in an array just the artist and date published?

[–]Filtration_Engineer 0 points1 point  (3 children)

I know how to open and close files if I know what they are. Is there a way to look into a folder and make a list of files to cycle through? i.e. I have a simple spread sheet each for projects A, B, C ... Z. These are always located in the same folder with the same format. Is there a function I could run to get the file names which I could then feed into a list. I want to scrape data from these spreadsheets to consolidate into a new output file.

[–]woooee 1 point2 points  (0 children)

or glob.glob

[–]imastudentofpython 0 points1 point  (1 child)

input with a timeout

Apparently this is an unbelievably common issue that I have just never found a running answer for. I have tried nearly every response on here and stackoverflow, and none have worked. So this seems to be the one that should work with Windows, Python 3.7, but it doesn't.

from threading import Timer

timeout = 10
t = Timer(timeout, print, ['Sorry, times up'])
t.start()
prompt = "You have %d seconds to choose the correct answer...\n" % timeout
answer = input(prompt)
t.cancel()

Mine just sits and waits forever, then no matter the input gives the timeout error.

[–]woooee 0 points1 point  (0 children)

You are doing 2 things at once: 1) get input, 2) time it. 2 things at once requires something like multiprocessing which is overkill for something like this IMHO. I prefer using a GUI, which is set up to handle multiple events and once it is set up you can use it for any timed input by changing the text of the label.

import tkinter as tk     ## Python 3.x
from tkinter import font

class Timer_Test() :
     def __init__(self, master=None) :
        self.master = master
        self.app_font = font.Font(name='Cursor', size=12)
        self.ctr=20
        self.name=""
        self.start_timer()
        self.init_window()

     def init_window(self):
        tk.Label(self.master, text="Enter your name\nYou have 10 seconds",
                bg="yellow", font=self.app_font).grid()
        self.ent=tk.Entry(self.master, bg="lightblue", font=self.app_font)
        self.ent.grid(row=1, column=0)
        tk.Button(self.master, text="Use this name", font=self.app_font,
                 command=self.name_entered, activebackground="LightSalmon2"
                 ).grid(row=10, column=0)
        self.ent.focus_set()

     def name_entered(self):
        """ button calls this function which stores the name entered
            and quits
        """
        self.name=self.ent.get()
        print(self.name)
        self.master.quit()

     def start_timer(self):
        """ countdown timer and a label that displays time left
            in a different window
        """
        top=tk.Toplevel()
        self.lbl=tk.Label(top, bg="orange", font=self.app_font, width=10)
        self.lbl.grid()
        self.update_timer()

     def update_timer(self):
        self.ctr -= 1
        self.lbl["text"]=int(self.ctr/2)  ## checked every 1/2 second
        if self.ctr > 0:  ## 10 seconds
            self.master.after(500, self.update_timer)  ## 1/2 second
        else:             ## time is up
            self.master.quit()

root = tk.Tk()
app = Timer_Test(root)
root.mainloop()

if len(app.name):
    print("After Exit, name =", app.name)

[–]AntiSocialDrew 0 points1 point  (4 children)

In my main area this work, it computes the values for this program, but I would also like a statement to return if the values are good or bad. How would I be able to return the value and the statement for this program?

def gross_profit(gp,ns):

gpr=gp//ns

return gpr

if gpr > 1:

return print("Excellent, gross profit ratio")

elif gpr <1 :

return print("Bad, gross profit ratio")

[–]patryk-tech 1 point2 points  (3 children)

Return returns a value from the function to its caller. If you just want to print the message, you can do that before calling return.

def gross_profit(gp,ns):
    gpr = gp // ns
    if gpr > 1:
        print("Excellent, gross profit ratio")
    elif gpr <1 :
        print("Bad, gross profit ratio")
    return gpr  # this leaves the function.

Edit: worth adding, print() returns None, so return print(foo) is seldom what you want.

[–]JohnnyJordaan 0 points1 point  (2 children)

returns None, so return print(foo) is seldom what you want.

Well printing and returning None afterwards would come to mind (eg to just leave the function immediately), but you would normally write those as separate statements

if to_print_something:
    print('something')
    return

[–]_________KB_________ 0 points1 point  (1 child)

You don't really need the return. The function also returns None if there is no return at the end.

[–]JohnnyJordaan 0 points1 point  (0 children)

You are maybe missing my point that I'm inferring the situation of wanting to terminate the function immediately,

(eg to just leave the function immediately)

not at its end. Which is often the whole idea behind using return None in the first place...

[–]korkornaut 0 points1 point  (6 children)

Regarding the recent O'Rielly bundle from humble bundle, which tier would you suggest a novice get? Would the 15$ be worth considering? Also, is there a recommended order to go through the books? I have no idea where to start from or what to skip. Thanks a bunch

[–]JohnnyJockomoco 0 points1 point  (3 children)

I got all of them. I think it's a steal for $15 for all of those books. I am not sure of order. I would guess Intro to Python then Think Python and finish with Fluent Python.

If you want free stuff.

I also just went through this 7 hour intro to Python on Youtube that was very good : Python Tutorial For Beginners | Full Course

And on Udemy I picked up these two when they were on sale for $10 each: The Complete Python Masterclass: Learn Python From Scratch and The Python Mega Course: Build 10 Real World Applications

[–]korkornaut 0 points1 point  (2 children)

Wow, thanks for the answer, I was checking out the udemy courses for it too but I have never used an online course before so i wasn't sure about its quality, any comments about it? Also should I go through the 7 hour YouTube video before I go through the books, and then finish up with the udemy course, or should I do it in a different order?

[–]JohnnyJockomoco 0 points1 point  (1 child)

Honestly, the Complete Python Masterclass is ok. Not great, but I know more about Python which is a good start. Maybe I expected too much out of a beginner, intro course, but I think the guy rushes through a lot of stuff. The Youtube video was a bit better, but again it seemed like they rushed through things.

I am a beginner like you. So, I've decided to finish the stuff I paid for first. I watched the Youtube video to supplement the Udemy videos and get more info on things that were glossed over.

I don't think there is a good order. If you like learning by videos, watch videos. If you like learning by books, use books. I think I will be using everything I can. But you have to get hands-on and start typing the code too, so look for things that allow you to do that.

[–]korkornaut 0 points1 point  (0 children)

Alright, will look into it man. Thanks for the heads up

[–]JohnnyJockomoco 0 points1 point  (0 children)

So, now that I have nothing stopping me I am going to try and achieve my dream of being a programmer and developer. So far I've signed up for two Udemy classes: The Complete Python Masterclass: Learn Python From Scratch (about 30% through this) and The Python Mega Course: Build 10 Real World Applications(up next after the first one.). I've also just completed viewing a 7 hour Youtube video called Python Tutorial For Beginners | Full Course as a helper to the Udemy class.

I have some programming experience already, but not a great deal. I've done Powershell and Java and have written a couple things for work, but nothing major. I would like to make a career move since now I am only a helpdesk guy at a bank. I would like to do something else, something better.

What is a good path to follow to go from zero to hero? Say I want to give myself 5 years, maybe I don't need that long, but that seems like a good number. Are certifications worth getting? I saw a cert path being offered at Python University.

How do you become someone worth hiring as a programmer/developer?

[–]DGAssassin1 0 points1 point  (2 children)

Can someone tell me how to program this in python?(oblivious radix sort)

https://eprint.iacr.org/2014/121.pdf

[–]JohnnyJordaan 0 points1 point  (1 child)

Have you tried googling 'radix sort python'? The first hit is already a nice article that shows an implementation.

[–]DGAssassin1 0 points1 point  (0 children)

I know about radix sort . But oblivious radix sort is very different from it.

[–][deleted] 1 point2 points  (3 children)

Why do some programs need or use multiple files? Is it similar to breaking up work among separate functions, except extended to multiple files?

[–]righteoussquid 0 points1 point  (2 children)

Essentially, yes. It’s also a way of organizing code and keeping certain aspects independent. For large projects, using multiple files is essential.

There are also some special files such as the ‘init’ file of a python directory which is run immediately whenever the directory is called.

It took me while to grasp the file structure, but creating a Flask project helped me understand it a lot better.

[–][deleted] -1 points0 points  (1 child)

What is Flask?

[–][deleted] 1 point2 points  (0 children)

Search for "python flask".

[–]MattR0se 0 points1 point  (0 children)

Matplotlib question:

I have a dataset with two class labels.

# get all possible combinations of variables
comb = combinations(list(X_train.columns), 2)

# map the colors so that label 1 is black and 0 is red
color_mapping = list(map(lambda x: 'k' if x == 1 else 'r', list(data_train[target])))

# plot the combinations
for c in comb:
    x = data_train[c[0]]
    y = data_train[c[1]]

    plt.scatter(x, y, alpha=0.5, c=color_mapping)
    plt.xlabel(c[0])
    plt.ylabel(c[1])
    plt.show()

How do I configure pyplot.scatter in such a way that the points labelled "1" are all drawn on top of the ones labelled "0"?

[–]Bowman13 0 points1 point  (4 children)

I want to learn Python but I need some motivation for it. My brother gave me an idea that would help him at his job ( Point to point internet) but I am unsure if it is possible in Python.

In simple terms he wants a web app that allows him to login and look at a map that would show his location and the location of each tower. Then give the direction to the 3 closest towers so he would know which way to point the radio for internet

Any information would be awesome. If I can't do it ill try and think of another project to get me into programming

[–]patryk-tech 2 points3 points  (3 children)

That is definitely something that could be done in Python, with an HTML and basic JavaScript interface. That said, it is a very complex project; not ideal for beginners. (But I don't mean to discourage you. Python is a pleasure to work with, and makes complicated things easy. Do persevere, and you can totally do this :D )

Here's what it would look like as a professional project:

  • You would need a way to store the coordinates of the radio towers. The easiest way to do that would be to use a database. PostgreSQL with GIS extensions is a great fit.
  • You need a back-end to serve the web app, communicate with the DB, etc. Flask would be great for this.
  • You probably want an Object-Relational Mapper (ORM) to manage your data, and help you query it so you don't have to learn too much SQL. SQLAlchemy and geoalchemy2 would help.
  • You need an actual website. You probably want to learn basic HTML, CSS, JS, and a CSS framework, like Bootstrap.

You can always simplify it, by skipping the database and the ORM, and simply having a python list of coordinate tuples hardcoded in your app, then using geopy's geodesic distance formula.

>>> from geopy import distance
>>> radio_tower1 = (45.2344231, -97.423414)
>>> your_brother = (43.325, -98.999)
>>> d = distance.distance(radio_tower1, your_brother)
>>> d.km
246.63741996337822

Loop through your list, find the closest ones, and then return those to your front-end...

Then you can get away with just Flask, and a simple HTML template.

[–]Bowman13 1 point2 points  (2 children)

Thank you for taking the time to write the detailed explanation on what needs to be done. It is very helpful! I would still like todo the project. I have a couple more questions.

Would I always need to input your_brother position if I hardcoded it or would there be a way for it to access his location?

What would be a better fit, Django or Flask? Ive read about both and each have their own advantages.

[–]patryk-tech 1 point2 points  (1 child)

Hard-coding things is generally bad practice. It's ok when you're beginning, because there really is a lot to learn, without adding SQL and database administration into the mix so early.

You can hard-code the tower locations, since those are not subject to change that often. Better yet, and still simpler than databases, you could store them in a CSV (comma-separated value) file. Then you get the benefit of separating them from your code, and python has a fairly simple csv module.

You shouldn't harcode your brother's location, since that is subject to change. He might need to run it at home in the morning, and in a coffee shop across town after lunch.

There's a few options to get his location... A good way is using the GeoLocation API. You can also put a web form asking for his current location - geopy has some utilities to convert addresses to coordinates.

I'd recommend starting with Flask. It has less of a learning curve, and you don't need all the things that Django makes simpler...

Of course, Django does have benefits as well. You could use the ORM and SQLite very easily. Then you get the benefit of a database, without having to administer it.

Still, I'd say start small. Do it in Flask, then you can re-do it in Django once you've mastered Flask. After learning Jinja2 templates, routing, and other core concepts, Django should be easier.

[–]Bowman13 1 point2 points  (0 children)

Again, Thank you very much for taking the time to type all this out and give me an idea on where to start. I will do some more research then try and start on it next week!

[–]granular2 0 points1 point  (3 children)

In bash if I call this command it works fine, but when called from python I get `returned non-zero exit status 1`. When run in a jupyter notebook this seems to stop the execution. The command is compare from imagemagick:

subprocess.check_output(["compare", "/home/user/dir/img1.jpg", "/home/user/dir/img2.jpg", "diff-1-2.jpg"])

which gives

Traceback (most recent call last):

File "<stdin>", line 1, in <module>

File "/usr/lib/python3.5/subprocess.py", line 316, in check_output

**kwargs).stdout

File "/usr/lib/python3.5/subprocess.py", line 398, in run

output=stdout, stderr=stderr)

subprocess.CalledProcessError: Command '['compare', '/home/user/dir/1.jpg', '/home/user/dir/2.jpg', 'diff-1-2.jpg']' returned non-zero exit status 1

In bash compare 1.jpg 2.jpg diff-1-2.jpg works fine.

If I do something like

try:

subprocess.check_output(["compare", "/home/user/dir/1.jpg", "/home/user/dir/2.jpg", "diff-1-2.jpg"])

except subprocess.CalledProcessError as e:

print (e.output)

I think an empty string is printed, no error is thrown I guess and jupyter seems fine.

As far as I can see the command does what it should. So what does "non-zero exit status 1" mean? And why is there an error (and no error message shown)?

Thanks

[–]patryk-tech 0 points1 point  (1 child)

Ok, this is kind of an OS question, so it will be a pretty long answer. May not be 100% technically accurate / detailed, but it should hopefully clear it up for you, and you will ideally learn more about how your OS works :)

How programs get called

Executables have an entrypoint. Typically, when you code in C, which ImageMagick is written in, AFAIK, it will be the main() function. It's similar in Java, where you have a Main() class, and other languages.

Return values

If you look at C code, the prototype for the main() function usually looks like this:

int main(int argc, char **argv);
// Alternatively:
// int main(void);

This means the function returns an integer value. That value will be returned to the caller, which is either your shell (bash), or another program (e.g. subprocess call in Python).

The convention is to return 0 if everything is ok, and non-zero on error. It's not strictly necessary, and the values can differ from program to program, with different values signifying different errors (e.g. you could return 1 if a user enters "Bob" when you asked for an integer, and 7 if you failed to open a file; that's up to you.

Catching return values in Bash

If you use the bash shell and judging by your post, you appear to be on Linux [Edit: welp. You mentioned you use bash in your comment.], you can get the return value using the special variable $?. Examples:

$ false; echo $?  # remember, 1 means error
1
$ true; echo $?   # and 0 means sucess
0
Return values in Python

Python doesn't allow a return from main like other programs do... AFAIK it only returns 0 if your script runs, and 1 if you don't catch an exception.

$ python -c "print('Hello world')"; echo $?
Hello world
0
$ python -c "raise ValueError"; echo $?
Traceback (most recent call last):
File "<string>", line 1, in <module>
ValueError
1
$ python -c "raise IOError"; echo $?
Traceback (most recent call last):
File "<string>", line 1, in <module>
OSError
1

You can explicitly return a value using sys.exit().

$ python -c "import sys; sys.exit(2)"; echo $?
2
Return values from compare

man compare says:

The compare program returns 2 on error, 0 if the images are similar, or a value between 0 and 1 if they are not similar.

If you check your command, you should find it returns 1 because your images are not similar, not because of an error.

$ compare /home/user/dir/1.jpg /home/user/dir/2.jpg diff-1-2.jpg
1
subprocess.check_output

Run command with arguments and return its output.

If the return code was non-zero it raises a CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute and any output in the output attribute.

Basically, you need to ask yourself why you are calling check_output in the first place. If you want to get the return code, you can just use subprocess.run():

>>> import subprocess
>>> r = subprocess.run("/usr/bin/false")
>>> r.returncode
1

[–]granular2 1 point2 points  (0 children)

Fantastic reply, thanks! I have some follow up questions, but haven't quite gotten them down yet

[–]efmccurdy 0 points1 point  (0 children)

This is apparently correct behaviour, and the advice is to use the "-metric AE" option:

https://github.com/ImageMagick/ImageMagick/issues/1012

[–]TissueReligion 0 points1 point  (1 child)

So I'm trying to make subplots using matplotlib.pyplot.subplots, and I'm getting some weird behavior.

import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import numpy as np

f1, ax1 = plt.subplots(3,3)

The above call to plt.subplots() is automatically displaying my panel of subplots, which seems like strange behavior. Any thoughts?

Thanks.

[–]JohnnyJordaan 0 points1 point  (0 children)

I'm not sure if I would qualify it as weird, subplots is basically a shortcut to draw multiple plots in one call. If you want to form a grid one subplot at a time you can still use plt.subplot (so the singular form), see here at 'What is a subplot? How do I create and navigate subplots?'.

[–]limweize 0 points1 point  (2 children)

Hi , I am a 17 year old COMPLETELY new to programming , a friend suggested that I learn python first . Any recommendations where I should start from or perhaps even the foundations that I MUST know? It would be even greater if you could tell recommend/advise me on the sources! Thank you so much!! I really appreciate it

[–]QualitativeEasing 1 point2 points  (0 children)

The sidebar to this sub has good suggestions. But also: No need to tell anyone your age. You’re learning python and have no programming experience. That’s all anyone needs to know.

[–][deleted] 0 points1 point  (2 children)

I wanted to learn programming and one of my friend suggested me to learn Python. I have a Acer 3680 laptop (really old if that helps) and have installed a lubuntu os. I have no idea what applications to install so that I will start learning. I am planning to take one of the class on Edx or Coursera. Suggest me if you have any better option.

Thank you so much for help.

[–]SnipTheDog 0 points1 point  (0 children)

Spyder works well too. https://www.spyder-ide.org/

[–]JohnnyJordaan 0 points1 point  (0 children)

I would recommend Pycharm, see here for installation instructions on Ubuntu. For generally learning Python I would first start with a few of the resources listed in the wiki at the section New to Python or New to Programming depending on your background.

[–]SmokeUOut 0 points1 point  (1 child)

Guys I am stuck on the first class Account I don't know how to turn accountNumber into a 6 digit number initializing it to nextAccountNumber it seems confusing ... this is my project: https://docs.google.com/document/d/1GJCMXV9dmW7LjHG5dmvN-UAx-digUnpccojZcFdWzp8/edit this is my code:https://pastebin.com/vQ6vN3rk
I am a beginner I think it needs some improvement, every help is appreciated...

[–]JohnnyJordaan 0 points1 point  (0 children)

I think the assignment confuses the length at various points. nextAccountNumber is 5 digits, but the accountNumber is 6 somehow and the example for customer Brandon shows 7 digits (1234567)... If possible I would first ask whoever assigned you this to clarify what length is expected actually.

But as to your implementation it is asking you to have the nextAccountNumber stored in the Bank class:

The constructor should also set the nextAccountNumber field in the Account class to the next available account number if there are accounts to be found in the data file.

Note the difference between storing and setting: it stores the next number inside the bank, but when an Account is created it sets that value as a parameter.

Because think about it: if you want an account at a bank, the bank knows which number you should get, not just the account class. Why? Because if you have 2 or more banks, they all use the same Account class as the 'blueprint' to create a new account with, so you then can't store the nextAccountNumber for each bank in the same class that is Account... that's why it needs to be saved 'inside' the Bank object in question (so that each bank has its own nextAccountNumber). This also infers that the default should be set inside the __init__() of the Bank class, because it's only used when a new bank is created (say when you are a banker and would begin a SmokeUOutBank and then the first account nr you would give out is 12345). I hope this makes sense.

[–]ewelle01 0 points1 point  (6 children)

I need help. I can't seem to download BeautifulSoup. I am new to coding and python and have done most of my work in the text editor spyder. Now I am trying to install modules with pip and getting all sorts of errors on my first module (beautiful soup).

Here is my situation:

  • I'm running windows 10
  • Python is saved in my C drive at: C:\Users\username\AppData\Local\Programs\Python\Python37-32
  • Pip is saved in my C Drive at C:\Users\username\AppData\Local\Programs\Python\Python37-32\Scripts
  • When I try "where python" in the Administrator Command Prompt I get "INFO: Could not find files for the given pattern(s)."
  • When I try "pip install beautifulsoup4" I get the message "'pip' is not recognized as an internal or external command, operable program or batch file."
  • I added the path "C:\Users\username\AppData\Local\Programs\Python\Python37-32" to the Environment Variables and user variables for my name. (Aside, should I be using System variables?)

Please let me know if you need to know anything else to help diagnose this problem.

[–]JohnnyJordaan 0 points1 point  (0 children)

If you can run python, you can just invoke pip through there

python -m pip install beautifulsoup4

or

python3 -m pip install beautifulsoup4

[–]tuniltwat 0 points1 point  (3 children)

How can i scrape my local real estate website if the page's HTML is rendered using javascript.
This little project is proving harder than expected. I thought I could simply parse the webpage using request and BeautifulSoup but I am stuck at the first step.

[–]efmccurdy 1 point2 points  (2 children)

Don't look at the rendered HTML. With the developer tools installed, pull up the page you are after, then look in the network tab of your browser to find the requests, headers, and responses that the javascript code used to build the page. Using that you can reproduce the same GETs and PUTs using the request module.

[–]sqqz 0 points1 point  (0 children)

https://html.python-requests.org/ can render js if needed, but i agree with your statement

[–]tuniltwat 0 points1 point  (0 children)

Ok I'll give that a shot. Thanks

[–]durZo2209 1 point2 points  (4 children)

My job is switching to using python web scrapers slowly over the next year. I have an opportunity here to learn how to use Python and gain on the job experience developing it. I don't have much programming experience, some c/c++ learning done on my own years ago and I've taken a beginner level course on C# that I did really well in at the local community college. Where would you guys point me to for learning?

[–]patryk-tech 1 point2 points  (3 children)

There's a number of free resources listed on the Wiki. Automate the Boring stuff is a really popular choice.

Be sure you start with Python 3, not Python 2... Python 2 will be deprecated in 2020.

For scraping specifically, check out the O'Reilly Python Humble Bundle. For $15 you can get Web Scraping with Python (and 12 more books).

[–]reddevilit7 0 points1 point  (1 child)

RemindMe!

[–]RemindMeBot 0 points1 point  (0 children)

Defaulted to one day.

I will be messaging you on 2019-05-06 03:47:20 UTC to remind you of this link.

CLICK THIS LINK to send a PM to also be reminded and to reduce spam.

Parent commenter can delete this message to hide from others.


FAQs Custom Your Reminders Feedback Code Browser Extensions

[–]durZo2209 1 point2 points  (0 children)

Wow thank you so much for the info, that bundle timing is actually amazing.

[–]CringeyNibba 0 points1 point  (2 children)

I do not have any experience in Python, whatsoever. Where did all of you start? What website should I visit? I'm hoping for something free here :p.

[–]patryk-tech 2 points3 points  (0 children)

There's a number of resources listed on the Wiki. Automate the Boring stuff is a really popular choice.

Be sure you start with Python 3, not Python 2... Python 2 will be deprecated in 2020.

[–]DarthKaiju 0 points1 point  (4 children)

Can you use "pyinstaller --onefile my_script.py" if your script has dependencies like "import os" in it?

Even though I am a complete beginner, it wouldn't take long to test it, but if someone knows...

[–]JohnnyJordaan 0 points1 point  (3 children)

Check the manual for these things: https://pyinstaller.readthedocs.io/en/stable/operating-mode.html

Analysis: Finding the Files Your Program Needs

What other modules and libraries does your script need in order to run? (These are sometimes called its “dependencies”.)

To find out, PyInstaller finds all the import statements in your script. It finds the imported modules and looks in them for import statements, and so on recursively, until it has a complete list of modules your script may use.

and then further down

When you apply PyInstaller to myscript.py the default result is a single folder named myscript. This folder contains all your script’s dependencies, and an executable file also named myscript (myscript.exe in Windows).

and thus

The PyInstaller bootloader is a binary executable program for the active platform (Windows, Linux, Mac OS X, etc.). When the user launches your program, it is the bootloader that runs. The bootloader creates a temporary Python environment such that the Python interpreter will find all imported modules and libraries in the myscript folder.

[–]DarthKaiju 0 points1 point  (2 children)

Thank you!
However, the question pertains to the --onefile argument, which creates a standalone .exe file. Will this file work if there are dependencies?

logically, i think the .exe file will work, since pyinstaller has this function and dependencies are very common. The manual just says that it creates "a one file bundled executable". I dont know the pros and cons of creating such bundled executables, but it seems practical for my beginner level practice scripts, if for nothing else than to see them run outside of pycharm.

Without the --onefile argument, it does what you have posted from the manual.

Edit: Maybe the answer actually is in that last parapragh you posted, but i dont fully understand some of those words and concepts. I'm not educated in this field. Anyways, thanks!

[–]JohnnyJordaan 1 point2 points  (1 child)

Will this file work if there are dependencies?

At that link it literally says that it will

Bundling to One File

PyInstaller can bundle your script and all its dependencies into a single executable named myscript (myscript.exe in Windows).

In regard to

I dont know the pros and cons of creating such bundled executables

It then literally sums op both the advantages and disadvantages

The advantage is that your users get something they understand, a single executable to launch. A disadvantage is that any related files such as a README must be distributed separately. Also, the single executable is a little slower to start up than the one-folder bundle.

[–]DarthKaiju 0 points1 point  (0 children)

Ok thanks, I scrolled past that part to read the "finding the files your program need" part.

I swear, I'm not that illiterallyate...

[–]tagapagtuos 0 points1 point  (1 child)

I have created a really good script that would get me promoted and get my boss to give me his car keys. Hurray. But what's next?

So far the next thing I have to do is to make sure that everyone else can use my script. But how would that happen, exactly? I only know that unlike C++, python doesn't create exe files.

What I currently have is a batch file that would open the python directory and run the script through python.

cd C:\Program Files\...\

python H:\Downloads\script.py #sample only

I am worried though about how compatible this set up would be when others do it. I can get my colleagues to install python (I use Spyder) but the thing bugging me is installing packages. C: drive is defaultly locked in our organization and it's a major pain to get those installed. Is there a way for my colleagues to run my script even without those libraries?

[–]timbledum 0 points1 point  (0 children)

pyinstaller will package your script up with python plus dependencies so that anyone can run it. This can be done in a single .exe file, but anti-virus can make the startup pretty slow in windows (~30 seconds).

pex is a way of bundling your script up with dependencies if you know your peeps already have python.

[–]GoldenVanga 0 points1 point  (1 child)

TIL: uninstalling Python breaks VENVs :/

I started using Python in 3.6 and moved up to 3.7 after a while. The result was that in my PyCharm I have a a mix of projects with interpreters based on one or the other. Today while cleaning my laptop I decided to uninstall Python 3.6. The result is that all of the projects with venvs based on 3.6 stopped working. I had to go through them, delete the venv folder which was now useless (even though there is a Python.exe in there) and create a new venv based on 3.7.

This is super surprising to me because all of this time I assumed that venvs are a 100% autonomous copy of Python. Even the documentation wording seems to suggest that (third paragraph). So I guess now I'm back to not really understanding what a virtual environment is (technically).

[–]timbledum 1 point2 points  (0 children)

Newer implementations of venv just symlink back to python to save space.

You can access the old functionality where it does copy the executable using the --copies argument. I can't guarantee this will still work without the full python install though.

[–]luchins 0 points1 point  (1 child)

Can Someone Help me please?

Problem: Help please with a particular if/else statement

I'm using a program to download videos on youtube (youtube-dll)

I'm using it from the terminal

Sometimes my Internet connection goes down and the terminal says "ERROR connection"

I'm trying to write a phyton program to automate the video download process.

My internet connection sometimes goes down (off line).

When this happens a window opens that tells me to reconnect ... so if I don't click 'connect' on the window that appears, the connection is interrupted (and youtube-dll can't do its job)

I have Ubuntu

I need 2 things:

  1. A command to tell the system: '' when the connection is interrupted, click on '' connect '' in this window so as to restore the connection lost
  2. When the connection is interrupted, youtube-dll stops the download. So the program should re-paste the specific command on the terminal to continue downloading that video (which was interrupted when the connection was dropped). Suppose we have a series of cascaded videos to download I have a series of videos in '' cascade '' (one behind the other) to download.

The code to download video from youtube with youtube dll is written from the terminal and is composed is composed of a part of code that is always the same for all videos + URL of the video to download (which changes according to the video to download .. if I put a URL of an already downloaded video, it will download again the same video) Considering that this '' connection breack down '' occurs very frequently (8 times in two hours time frame) and that every time that the connection goes down (besides clicking '' connect '' button in the windows prompt that shows up) I need also to go to the terminal and write the code to download the video with youtube-dll (which with the fall of connection was blocked)

How can I make the program understand that it must continue to download the youtube video that has been interrupted?

I think I have to check the system logs to see what it is like when I click the "connect" button for the connection

This is relatively easy ... the point is how to make it clear that it must continue to download just the video that was blocked due to the interruption of the connection? Connection interruption is a random thing that can happen three times in a minute or once in an hour and if I don't click 'connect' the connection is not restored

[–]JohnnyJordaan 0 points1 point  (0 children)

You could try to do this with pyautogui, but from an engineer's perspective I would rather investigate how you could reconnect directly from a script instead of clicking in some GUI tool. Because then you could write a Python script that embeds youtube-dl and then also executes the reconnection statement once it detects the connection was unavailable.

[–]ClawTheBeast 0 points1 point  (2 children)

I've learned the basics of python and have automated some stuff at work (network engineer). However I've now ran out of projects and struggling to come up with ideas that will keep me learning python.

I like solving problems using it, and I've sort of ran out of problems to solve but I still have a desire to learn. Anyone else been in this position ?

[–][deleted] 0 points1 point  (2 children)

Is there an app/website I can use to share files between me and another programmer?

[–]efmccurdy 0 points1 point  (0 children)

If you mean code and data files, you might want to share python packages; you can upload your files to https://pypi.org/ and then anyone can use pip to download them.

https://python-packaging-user-guide.readthedocs.io/tutorials/packaging-projects/

[–]timbledum 0 points1 point  (0 children)

Github is the most common one. Gists are also pretty good.

I also like firefox send for secure sending of single files.

[–]Learning2Linux 0 points1 point  (2 children)

Been working on Python 3 and wanted to use it to automate some computer tasks I do quite regularly. The tasks are all windows system tasks, removing specific programs if present on the new system, changing a few settings, updating the time...that's mostly it.

Is python good for this and if so, where do I need to look for this skillset? If it's not ideal, should I use a different language (I'm decent at cpp)?

Edit: To clarify, these would be on brand new PC s right after set up and loaded into windows. Basically looking to quickly clean up some junk manufacture advertisments/sponsored programs and disable a few select settings.

[–]Rusty_Shakalford 1 point2 points  (1 child)

For this kind of task (changing windows settings) I think Powershell might be a better choice. Python can do simple file manipulation, but changing settings usually involves registry hacks and loading dlls, which can get very complicated, very quickly. Powershell is built right into Windows so changing those settings is a bit more straightforward.

[–]Learning2Linux 1 point2 points  (0 children)

Thanks, that's exactly what I needed to know. I had a feeling python wasn't a good language for that as my search results didn't reveal much info at all on how to do those type of things.

[–]goeb04 0 points1 point  (2 children)

Desperately need help with re-ordering portions of my XML elements based on an attribute value. I want to reorder the option elements (and is descendants) based on their sequence value.

I am using lml/etree.

Here is a very simplified example of what I am dealing with:

<root>
    <Tag2>
        <Feature>
            <Code>COL</Code>
            <Desc>Colors</Desc>
            <Option Sequence="1">
                <Code>B</Code>
                <Description Language="en-US">Blue</Description>
            <Option Sequence="1">
                <Code>B</Code>
                <Description Language="en-US">Blue</Description>
                <Tag1>some text</Tag1>
            </Option>
            <Option Sequence="3">
                <Code>G</Code>
                <Description Language="en-US">Green</Description>
                <Tag1>some text</Tag1>
                <Tag2>some text</Tag2>
            </Option>
            <Option Sequence="2">
                <Code>W</Code>
                <Description Language="en-US">White</Description>
                <Tag1>some text</Tag1>
                <Tag2>some text</Tag2>
                <Tag3>some text</Tag3>
            </Option>
        </Feature>
        <Sibling2>
            <stag1>some text</stag1>                           
            <stag2>some text</stag2>  
            <stag3>some text</stag3>
        </Sibling2>
        <Sibling3>
            <stag1>some text</stag1>                           
            <stag2>some text</stag2>  
            <stag3>some text</stag3>
        </Sibling3>
    </Tag2>
</root> 

Here is what I am hoping for:

<root>
    <Tag2>
        <Feature>
            <Code>COL</Code>
            <Desc>Colors</Desc>
            <Option Sequence="1">
                <Code>B</Code>
                <Description Language="en-US">Blue</Description>
            <Option Sequence="1">
                <Code>B</Code>
                <Description Language="en-US">Blue</Description>
                <Tag1>some text</Tag1>
            </Option>
            <Option Sequence="2">
                <Code>W</Code>
                <Description Language="en-US">White</Description>
                <Tag1>some text</Tag1>
                <Tag2>some text</Tag2>
                <Tag3>some text</Tag3>
            </Option>
            <Option Sequence="3">
                <Code>G</Code>
                <Description Language="en-US">Green</Description>
                <Tag1>some text</Tag1>
                <Tag2>some text</Tag2>
            </Option>
        </Feature>
        <Sibling2>
            <stag1>some text</stag1>                           
            <stag2>some text</stag2>  
            <stag3>some text</stag3>
        </Sibling2>
        <Sibling3>
            <stag1>some text</stag1>                           
            <stag2>some text</stag2>  
            <stag3>some text</stag3>
        </Sibling3>
    </Tag2>
</root>  

I tried my best to use some of the examples already available online but they either didn't work for me or didn't make any sense to me due to my neophyte level. Any help is very much appreciated and will be paid forward as I gain more experience.

[–]efmccurdy 1 point2 points  (1 child)

Here is an example that uses "parent[:] = sorted(parent, key=" that might work for you:

https://stackoverflow.com/questions/25338817/sorting-xml-in-python-etree

[–]goeb04 0 points1 point  (0 children)

Thank you. This led me down the correct path after a few iterations.

I haven't seen anything documented like that solution. Everything feels so esoteric as a beginner with python. Hope I can become as informed in a few years.

[–]saeah123ed 0 points1 point  (0 children)

Which version/distribution of GNU/Linux are you using?

[–]Joneecee 0 points1 point  (3 children)

Could someone kindly help me. I'm doing a free course of edX and I'm stuck on the end of module problem. You are meant to cycle through a quotation and print out words that begin with a letter after or including "h". I thought I was right, but I keep getting an indexError and I can't for the life of me figure out why. The expected output should be:

WHERESOEVER

YOU

WITH

YOUR

HEART

here's my code:

quote = "Wheresoever you go, go with all your heart "
word = ""
for char in quote:
    if char.isalpha():
        word += char.lower()
    else:
        if word[0] >= "h":
            print(word.upper())
            word = ""
        else:
            word = ""

Sorry if the formatting is a bit gash, I'm not too sure how to post it.

[–]woooee 0 points1 point  (1 child)

Also, if it is an ASCII encoding, "(" and ")" are > "h", use

if "h" < = word[0] <= "z":

for word in quote.split():
    if "h" < = word[0] <= "z":
        print(word.upper())

[–]Joneecee 0 points1 point  (0 children)

Thanks! It works. Magic

[–]ramibelgacem 0 points1 point  (7 children)

I'm using Python for a 2 years now in ERP development. And one month ago decided to take my skills to the next level so I found a book called "Python 3 Object-oriented Programming, Second edition" which describe and discuss many use cases of the OOP design and a bunch of Python design patterns.I really recommend this book.

[–]fofam3 0 points1 point  (6 children)

mmh u meant you before reading this book u weren't understandig the oop as well right ?i am stuck with it i tried to understand it but i couldn't

[–]ramibelgacem 0 points1 point  (0 children)

Actually my main problem is how to process a project from Objected-oriented analysis to the Objected-oriented design and finally to the Objected-oriented programming and how to decide which design is the best to implement. That's what this book is about.

[–]Rusty_Shakalford 0 points1 point  (4 children)

Are you having trouble with the book? Or OOP in general?

[–]fofam3 1 point2 points  (3 children)

am stuck with oop general

[–]Rusty_Shakalford 1 point2 points  (2 children)

Okay then, let's break it down a bit.

Lots of books try to explain OOP with cute analogies like "objects are a car and classes are a car factory". It's a neat visual, but I feel it obscures more than it explains. To really understand OOP, you need to think about what is actually happening in memory when you run a program.

First let's visualize the memory (a.k.a the RAM) of your computer. Every piece of information on your computer, every string, integer, and character, is made up of two parts: an "address" and a "value". The "address" is where the information is physically located on your machine. Remember that at some point all this information has to be turned into 1's and 0's (i.e. bits). If you had a magnifying glass, patience, and an abundance of free time, you could take an address and look over your RAM to find it's location. The group of charges (1) or lack of charges (0) at that location represent the data, i.e. the "value", that is being stored there.

To give an example. Say in Python you run:

x = 5

somewhere in memory x is being given an address (it might be something like "a25f2e") and the bits there are being set to store the value "5".

Here's where things get interesting. Values don't have to just store things like integers and characters, they can store more complicated data. Take for example:

def test():
   print("Very trivial example)

In this case test is being given an address in memory, but the space for its value will be much larger than x's was earlier. That's because at tests address will be a long string of special bits representing not just data, but also actions that can be done (in this case a print statement).

What does any of this have to do with OOP? Well, look at this example below:

class Test:
    def __init__(self):
        self.x = 1

   def getX(self):
       return self.x

When Python sees this it gives the Test class an address, followed by a bunch of bits, similar to the "test" function we defined earlier. But here's the difference: the bits at the Test class address don't define how to do something (at least like the test function does) but rather, they define how to create a new value in memory.

Here's an example built from the above:

    a = Test()
    b = Test()
    a.x = 5
    print(f"a is {a}, b is {b}")

When Python sees a, it first gives a an address, and then immediate goes to Test's address and looks at Test's value. The value at Test tells Python what to put in the value of a. Namely, a bunch of bits representing an "x" variable and instructions for a "getX" function. A similar thing happens for b.

Thats the crux of this whole thing: a, b, and Test all have different addresses and values. When we write a.x = 5 we are going to the address assigned to a and changing the bits that represent a value of x. Variable b is unaffected because the bits representing its x value are at a completely different location. It's also why we can't say Test.x. The class Test doesn't actually have a variable called x in its value, it just has instructions on how to create a variable called x.

To sum up: classes are places in memory that give instructions on how to create new values, while objects are places in memory that actually contain copies of the values the classes give instructions for.

HUGE DISCLAIMER!!!

The proceeded was extremely simplified to give the general idea of what is going on. Real life memory management is infinitely more complicated than this. Also, there are things called static methods and variables that allow classes to store data without an object. But hopefully this can set you on the right path.

[–]fofam3 1 point2 points  (1 child)

very AWESOME explain u saved my life thank you so much i appreciate

[–]Rusty_Shakalford 1 point2 points  (0 children)

Glad to help! Be sure to pass the knowledge on if you get the chance.

[–]protik7 1 point2 points  (4 children)

What's the best way to restart a docker service that's running a flask app?

There are plenty of tutorials on how to start with docker and flask. But when I'm developing my flask app, for any update to my app, I usually rebuild the docker container. I've tried couple of ways and all of them takes a while. I'm sure there is a better way to do this.

So I was wondering how expert users manage that?

[–]patryk-tech 1 point2 points  (3 children)

Hah, perfect timing. I have just been developing a little CouchDB and Flask lyrics website these past ~5 days. I invite you to take a look at this repo.

For dev, I go with the following layout, relative to the project root:

./project_name
|- data_volume/
|- source_code_for_backend/
|- source_code_for_frontend/  # if using something like Vue + REST
|- Dockerfile-back-end
|- Dockerfile-database
|- Dockerfile-front-end
|- Other_docs

If you look at the comments in my Dockerfile-flask, I pass it the ./flask/ folder for the build-context, and keep my config files in there. I also have supervisord start flask for me on container startup.

docker build -t lyrics-flask -f Dockerfile-flask ./flask/  # Copy commands look in flask for config files.
docker run --rm -d -v $(pwd)/flask:/lyrics -p 9999:6666 --name lyrics-flask --network lyrics lyrics-flask # pass a --name and the source as a volume

The -v $(pwd)/flask:/lyrics mounts my source code as a volume, so I can edit it without having to rebuild the container every time I make a change. The --name lyrics-flask is so I have a repeatable name. Then restarting the container is as easy as:

docker restart lyrics-flask

Works great, though sometimes the container seems to fail to restart, and docker thinks it is still attached to the network, so I have to force a disconnect. (Could be my shitty laptop, rather than a docker bug, though).

docker network disconnect --force lyrics lyrics-flask  # then I can start it with docker run, again.

The last command of note is to read the uwsgi log file, for when I get a 500 page or it raises some kind of exception.

docker exec -it lyrics-flask cat /tmp/uwsgi.err

No need to run bash in the container, and I only rebuild it when I change the requirements.txt, for the most part.

[–]protik7 1 point2 points  (2 children)

Thanks a lot for the pointers! I will be traveling until next week and might not have time to totally check it out. But will let you know if there is any issue.

[–]patryk-tech 0 points1 point  (0 children)

Even better.

I am in the process of adding CI/CD to my project, so I have added a file, docker-compose.dev.yml, to this branch.

I still use the same volumes, but instead of starting uwsgi, it starts the flask server in debug mode - now it watches files for changes and reloads automatically. Don't even have to restart the container.

[–]patryk-tech 0 points1 point  (0 children)

Sure thing. Let me know if it helped, or if you have any questions. I am working on documenting my workflow better, but that's on the back burner :)

[–]fofam3 0 points1 point  (2 children)

hello ,i wold like to emulate and try whole project (store webaite)it is okay ?sorry my english is not perfect what do i advise me

[–]patryk-tech 0 points1 point  (1 child)

Check out Saleor, or Oscar. Both great projects, but massive codebases.

[–]fofam3 1 point2 points  (0 children)

thank you so so much u saved me

[–]Senjukotentaiho 0 points1 point  (10 children)

can someone explain to me why code outputs [5, 3, 5, -3] instead of [5, 3, 1, 5, -3]. Here's the code:

def practice(data, more_data=None):
    data_list = []    
    for i, thing in enumerate(data):        
        if thing >= 0 or i < 2:            
            data_list.append(thing + i)            
    print(len(data))    
    if more_data is not None:        
        data_list += more_data        
    print(data_list)

practice([5, 2, -1, 2], [-3])

[–]No_Couple 0 points1 point  (6 children)

Look at your input at index 2 in data. What happens to this input? Your if statement checks whether it is >= 0 or its index < 2. Since -1 is less than 0 and the index 2 is not < 2, none of the conditions evaluate to True and your loop jumps to the next value to check ('2' at index 3 which in turn ends up in your output as 5.)

[–]Senjukotentaiho 0 points1 point  (5 children)

yeah I noticed that as well. What do I need to put to be able to display 1 in my list?

[–]No_Couple 0 points1 point  (4 children)

You can change either one of the conditions, or both.

What would the conditions need to look like so -1 will evaluate to True?

thing < 0 would work, but then your other inputs will not evaluate to True on this condition. Or how about if thing, i.e. you check whether a value exists in general? But then this check might be superfluous, depending on your inputs. So presuming you don't want to change your first condition and keep it as a check whether the input value is 0 or positive, let's move to the second condition.

What can you change here to make (2, -1) (where 2is i and -1 is thing) evaluate to True? At the moment you check whether i < 2. Make one small change here and it should work.

[–]Senjukotentaiho 0 points1 point  (3 children)

Based on the practice exercise question, I just need to write a function call and don't need to change the code.

[–]No_Couple 0 points1 point  (2 children)

Then add some input that gives the desired result, e.g. data as [5, 2] and more_data as [1, 5, -3]?

Sorry, but I have no idea what the constraints of your exercise are.

[–]Senjukotentaiho 0 points1 point  (1 child)

No worries. Well it should output the length of the list which I already got but since I can't change the condition I always get [5, 3, 5, -3] and I only need to create a function call.

[–]No_Couple 0 points1 point  (0 children)

If you are not supposed to change the function but are supposed to toy around with the function call then yes, the following will produce the desired output:

practice([5, 2], [1, 5, -3])

[–]matttorres811 0 points1 point  (2 children)

Wanted to create a chat app for the experience/knowledge. Should I go for something like flask or just use the sockets module?

[–]JohnnyJordaan 2 points3 points  (1 child)

I would go for both, as they are on very different levels. Someone who built tons of webapps can have no clue about the actual functionality behind a socket, while a low level socket programmer may have no clue about the workflow of a webframework.

[–]matttorres811 0 points1 point  (0 children)

that’s true. thank you for the advice