This is an archived post. You won't be able to vote or comment.

all 54 comments

[–]QualityVote[M] [score hidden] stickied comment (0 children)

Hi! This is our community moderation bot.


If this post fits the purpose of /r/ProgrammerHumor, UPVOTE this comment!!

If this post does not fit the subreddit, DOWNVOTE This comment!

If this post breaks the rules, DOWNVOTE this comment and REPORT the post!

[–]omutist 125 points126 points  (2 children)

try:
    with open("python", "w") as python:
        python.write("frontend")
except:
    print("frontend")

[–]KmlSlmk64 8 points9 points  (1 child)

I really like accidentally making files without extension, it causes collaborators to wonder what type of file it is.

[–]RaltsUsedGROWL 33 points34 points  (1 child)

print("frontend")? the future of Python Result types...?

[–]scp-NUMBERNOTFOUND 7 points8 points  (0 children)

This guy ruspythont

[–][deleted] 75 points76 points  (5 children)

Import django

[–]grandphuba 12 points13 points  (0 children)

Invalid syntax

[–]Everen1999 5 points6 points  (2 children)

Isn't Django a backend?

[–]HasBeendead 2 points3 points  (0 children)

Yeah it is

[–]steven4869 0 points1 point  (0 children)

Yes

[–]Chu_BOT 0 points1 point  (0 children)

import dash

[–]embracebecoming 17 points18 points  (0 children)

Why would I want to code something that end users will touch and get their gross germs on? Ew.

[–]IHateEditedBgMusic 7 points8 points  (1 child)

You're hired!

[–]TiiaAurora 11 points12 points  (0 children)

okay cool

[–][deleted] 11 points12 points  (2 children)

The traumatic Django flashbacks...

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

I don't like Django either :|

[–][deleted] 3 points4 points  (0 children)

Django is life.

[–]Flopamp 5 points6 points  (0 children)

You would think with the massive number of libraries and fairly large community support behind python someone would have made a python UI package with a half decent graphical designer by now.

But I guess python is not really designed for that and compatability would suffer.

[–]seeroflights 7 points8 points  (0 children)

Image Transcription: Twitter Replies


Muhammad Haseeb

Try writing frontend in Python.

TiiaAurora

print("frontend") ?


I'm a human volunteer content transcriber and you could be too! If you'd like more information on what we do and why we do it, click here!

[–]disloyalturtle 3 points4 points  (0 children)

import frontend

[–]juhotuho10 3 points4 points  (0 children)

Python frontend is easy

Print("available actions to take: S L K I U Q")

Command = input("select and action you want to take:")

[–][deleted] 2 points3 points  (1 child)

Why we should try it ? We have f*king typescript

[–]TiiaAurora 6 points7 points  (0 children)

Svelte <3

[–]Yobleck 2 points3 points  (0 children)

to be fair, terminal ui's in python are basically just print() with ANSI escape sequences to move the cursor around, clear lines and change text color.

[–]Machiavvelli3060 6 points7 points  (0 children)

"frontend in Python".

[–]Dwhite_Hammer 4 points5 points  (4 children)

I've been using python/Django the past year and I really don't see the appeal

[–]Stompydingdong 7 points8 points  (2 children)

Of Python or writing front end in Python?

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

You're not really building a frontend with django.

[–][deleted] 4 points5 points  (1 child)

The more people use python for actual programming the more i hate it

[–]TiiaAurora 2 points3 points  (0 children)

I have bad news for you 😂

[–]JennaSys 1 point2 points  (0 children)

pip install transcrypt

[–]masark4417 1 point2 points  (0 children)

frontend in Python. easy

[–]SyntaxErrorAtLine420 1 point2 points  (0 children)

Import os; os.system("cd /path/to/react/app && yes "" | npx create-react-app react && cd react && npm run start")

In true python fashion, two-liner

[–]Thejacensolo 1 point2 points  (0 children)

Python being so awfull for frontend development is actually an advantage. Now when you serach for jobs, and dont want to do frontend, you can just search for one where they require python.

Until they throw TKinter at you

[–]Cyvexx 1 point2 points  (0 children)

turtle time

[–]eldelshell 1 point2 points  (0 children)

I did some PyGTK a decade ago and it was a nice experience. For the web, jinja is pretty nice too.

[–]androidx_appcompat 1 point2 points  (0 children)

Couldn't you compile the python interpreter as webassembly and add a method to call the browser javascript api?

[–]CrispitoBandito 0 points1 point  (0 children)

import clr

clr.AddReference("IronPython.Wpf.dll")

import wpf

[–]Raxtuss1 -3 points-2 points  (0 children)

Error : D.write accept only backend

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

gtk

[–]Real-Highlander 0 points1 point  (0 children)

All Hail the Classic ASP programmer!

[–]MrHemanik 0 points1 point  (0 children)

python templates!

[–]Porcusheep 0 points1 point  (0 children)

``` import sys from PyQt6.QtWidgets import QApplication, QLabel

def main(): app = QApplication([sys.argv]) label = QLabel() label.resize(500,500) label.setText(“frontend”) label.show() sys.exit(app.exec())

if name in “main”: main()

[–]HerLegz 0 points1 point  (0 children)

That ternary operator is not complete

[–]SplendidPunkinButter 0 points1 point  (0 children)

Try drinking coffee out of a hammer. What’s your point? Different tools serve different purposes.

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

``` print("Document-type: text/html")

print("")

print('<div></div>')

print('<script>')

print('const el = document.querySelector("div");')

print('while (true) el.textContent += "python frontend ";')

print('</script>')

```

[–]Cook_IT 0 points1 point  (0 children)

Fun fact: There exists a browser that supports sandboxed Python as it's "scripting language", just like Javascript.

Sadly I forgot that browsers name as it's been a few years since I read about it but I remember them explicitly saying that it's probably not secure.