|
Peter Adam wrote: Yes, syntax is awful.
Plenty of people who are super-stuck on "whitespace matters" have this opinion - I used to until I realised that it doesn't have to and the structure of python makes all python code look very similar - no brace wars, the requirement for self on class methods makes the way all OO methods work suddenly very clear. But to each their own - whatever language you could bring up as beautiful, I guarantee I can pick it apart too.
Peter Adam wrote: "base class library" is more awful.
Especially for cross-platform development.
I don't follow here (especially in the context of a web app) - I've found Python to be very good for exactly that - cross-platform dev.
Peter Adam wrote: Don't trust me, just check the solutions for handling a key press without hanging while a key pressed.
Stuff I'm finding for CLI tools is pretty-much how one would do it in many other languages (https://www.delftstack.com/howto/python/python-detect-keypress/) - if you're talking about blocking in some GUI framework, you'll have to be more precise because that's up to the framework (eg Qt), not python.
Peter Adam wrote: Don't trust me, just check the solutions for handling a key press without hanging while a key pressed.
Or executing an external command, and waiting for the result - now with bonus timeout from the blue!
If you're using os.system , you're delegating to the underlying libc implementation - not python's fault if it times out - rather use subprocess as documented in many places.
Peter Adam wrote: Oh, and don't forget that deleting a non-existing file is an exception! Except when 3.6+ you unlink a non-link, because it 1) deletes the file 2) there is an argument for not throwing an exception for non-existing files
This is pretty-much standard behavior in many programming languages - even though the final result is the same (the file isn't there after the call), it may be important to know that. Easy fix: test first, delete if present.
I don't see the point in responding to your last comment - it brings nothing useful to the discussion and merely exposes that you're aiming to hate on Python (and, probably any other tool that isn't exactly how you'd expect it to be) irrespective of the good points. It's like hating a screwdriver for not being a spanner.
Python is great for a large array of applications, not least of which is machine learning. Python is one of the two languages I suggest to new programmers to learn (either that or JavaScript - the former because it teaches good patterns and the latter because it's even more ubiquitous). It really sounds to me like you didn't try to get into the "pythonic" way of doing things - rather trying to make Python be whatever you expected of it. This is a common error many programmers make when trying to use any framework or language - and your response that Python is broken because it doesn't conform to your expectations is the typical response of the poor craftsman blaming his tools.
I really hope that you take the time to stop hating on it and rather love it for what it can do. No tool is perfect - Python included - it's best to use tools for the tasks they are good at and accept when they are not good at it. Python is good for myriad things, including the OP's question about web development, but, like any programming language, you'll get the most out of it if you're not trying to hammer it into the shape of the language you last used, but instead use it to learn new ways to do things - that you can take back to the bread-and-butter language you use as a daily driver.
------------------------------------------------
If you say that getting the money
is the most important thing
You will spend your life
completely wasting your time
You will be doing things
you don't like doing
In order to go on living
That is, to go on doing things
you don't like doing
Which is stupid.
|
|
|
|
|
I don't hate it just don't love it. All the exciting stuff - really nothing new under the Sun. AI? Do you remember that 90's newsreel showing how a film scanner found a dug-in Serbian tank on a film made by a drone?
Implicit Self? Nothing new for a Delphi developer - but why not implicit result variable for a function?
Yes, you can import a lot of externalies to have a basic INKEY() from the ZX Spectrum BASIC 🙂, but your mileage may vary when the multiplatform targets are Raspberry, CentOS and Windows.
Subprocess handling is vanilla subprocess. With the second timeout event when it can't kill it...
|
|
|
|
|
Thank you.
I forgot to mention I am doing a small ecommerce website, with a limited number of users.
|
|
|
|
|
you're welcome
you'll find that opinions are like assholes - everyone has one and most of them stink
make your site in django - it's a perfectly legitimate way to do it
don't listen to people who have blanket opinions about tech (php and vb ruled the software world for ages - but apparently everyone thinks they're rubbish?)
use what works, not what people tell you you should be using - if those are the same things, well, that's just an interesting coincidence.
------------------------------------------------
If you say that getting the money
is the most important thing
You will spend your life
completely wasting your time
You will be doing things
you don't like doing
In order to go on living
That is, to go on doing things
you don't like doing
Which is stupid.
|
|
|
|
|
You should use the right tool for the job, which may indeed be python.
Some will say "python is slow". Compared to what? yes if you were trying to serve 1 million concurrent users over a 1tb internet feed using a JSON database, but if all you want is a small ecommerce site with links to a SQL backend etc, then - on modern hardware - your pipe speed will be more limiting than python, unless you are running it on a very underpowered PC with very limited memory etc.
I have an interactive card payment system running in Python, plus a guest sundry supplies/services ordering system designed to run as a web app on Android and iOS phones. It can't render a film like SHANG-CHI in 4K+3D in under 3 seconds FFS!, but it can handle multiple concurrent users over a 1Gb pipe, plus talking to the bank card payment system and a SQL backend, despite being run on a small virtual machine hosted on ESX.
Remember, these days, by the time you've developed your multi-user. high throughput web host using the latest HTML5/<language of="" choice="">/<framework of="" choice="">, the framework will have had at least 3 updates, been deprecated or significantly changed or just gone out of fashion in favour of the latest of the 200 or so new or revised frameworks that were released during the previous 3 months!
Find a well-known, long lived toolset that is in widespread current use for your dev. The latest 'shiny' is just a distraction!
|
|
|
|
|
Thank you. The info I hoped for. I am just building a small ecommerce solution, that will have a limited number of users.
Vorbis
|
|
|
|
|
Probably as good as BASIC; the one with line numbers.
Nothing succeeds like a budgie without teeth.
|
|
|
|
|
Thanks for the reply, I think.
I forgot to mention I am doing a small ecommerce website, with a limited number of users.
I grew up with BASIC. I am still maintaing customers who are successfully running on programs I created with it, since 1984. GoTo is just another tool and works great, if you use it properly. If you use a saw in an improper manner, you will wind up bleeding.
I don't undestand why younger "trained" programmers hate it so much.
|
|
|
|
|
|
Thank you for he reply. I will check out the link in your answer.
I forgot to mention I am doing a small ecommerce website, with a limited number of users.
Albert Spangler
|
|
|
|
|
I’ve used it for small websites used internally within the company I work for. Was fine.
I’d start with something like Flask, as it’s quite minimal, although you might prefer a larger framework like Django.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Thank you for the reply. I will check out the link in your answer.
I forgot to mention I am doing a small ecommerce website, with a limited number of users.
You are the second person to recommend Flask, so I'm thinking it must be pretty good.
Moist Von Lipvig
|
|
|
|
|
|
From the 60/70s when bubble cars were popular.
|
|
|
|
|
That belongs to Steve Urkel!
I’ve given up trying to be calm. However, I am open to feeling slightly less agitated.
|
|
|
|
|
Still see these at old-timer days here in the Netherlands, always make me smile when I see one
|
|
|
|
|
WTF, no contest.
The way in - the only way in or out - is at the front, which hinges on one side.
And ... there is no reverse gear. Drive too close the the garage wall and you are there for the duration!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
According to the guy in the video and the illustrations of the gears there is a reverse gear.
The video was funny, he came to a hill and it refused to move about half way up.
It also has a sunroof for those times when door is not an option.
The less you need, the more you have.
Even a blind squirrel gets a nut...occasionally.
JaxCoder.com
|
|
|
|
|
OriginalGriff wrote: there is no reverse gear. Drive too close the the garage wall and you are there for the duration!
OTOH, you can just put a handle on the roof and carry it like any other lunch box...
|
|
|
|
|
Are the drivers still asshats?
I'm a cyclist, and I ride the roads on my commute to/from work. I've found that there are two groups of drivers who have no compunctions about crowding you when you're on a bike: red pickup trucks (any make) and BMW drivers (all models and vintages) .
Software Zen: delete this;
|
|
|
|
|
I quit riding a long time ago, got too dangerous!
The less you need, the more you have.
Even a blind squirrel gets a nut...occasionally.
JaxCoder.com
|
|
|
|
|
I have a mountain bike I bolted what is essentially a chainsaw motor to and I would use it to get groceries in the summer.
People in cars are scared of it. It's loud and I can make it belch clouds of white smoke if someone gets too close.
I haven't used it over the past couple of years though. I probably need to change out the gas tank, and it needs some minor work done besides.
Real programmers use butterflies
|
|
|
|
|
One of my neighbours had one in the 70's - I used to covet it.
Later in the 70's some friends and I used the front end of one as the basis for a small school-designed car (using the back end of a Fiat 500).
|
|
|
|
|
Well,
I can't for the life of me figure out why the Python language is dominating the data sciences. I would love to use some of the models on this site[^], specifically the RoBERTa large model[^] but it seems like data scientists are married to the Python language. PyTorch has it's own file format[^].
I really want to test with those models. But I will have to figure out how to convert it into something I can read.
Anyone have experience with this?
|
|
|
|
|
Nope. Well, if MIT is teaching Python to non-programmers, that can explain a lot.
Python is a glue language, it has little power of its own.
Any advanced stuff it does is likely implemented in C++ or something and then simply imported.
Something along the lines of:
import DataModeling
DataModeling.Run()
Someone developed the hammer in a "real" language; Python just swings it.
See also the recent discussions of PowerShell and low-code.
|
|
|
|