|
Dominoes posted:
As an aside, what syntax is this? I've not seen this before in Python.
|
# ¿ Mar 9, 2017 15:22 |
|
|
# ¿ Apr 29, 2024 16:58 |
|
huhu posted:I'm having a Pycharm or Python issue... Was the file actually named "foo" and the class "bar"? If not its possible you named your file something that was already taken by standard lib or an external library. Is the file in the same directory as the file you're importing into? Try code:
|
# ¿ May 1, 2017 21:27 |
|
So my new project is sufficiently out of the quagmires of legacy code that I get to start using the latest versions of everything- including python3.6 over python2.7. It's perhaps a bit shameful that I've done virtually no commercial coding with python3, but I'm wondering if there's a list of the biggest changes I'll need to wrap my head around? f_string_literals and type hinting are two that I've been made aware of but I'm sure there's more out there.
|
# ¿ Sep 7, 2017 12:01 |
|
That's perfect, thanks!
|
# ¿ Sep 7, 2017 13:13 |
|
So Microsoft are considering making Python an official scripting language in Excel which is pretty cool I guess. Though it means when my friends ask me "Hey fix my spreadsheets" I can't use the "sorry I don't know anything abiut vba" excuse.
|
# ¿ Dec 17, 2017 19:20 |
|
Does anyone know if pipenv can replicate the behaviour of vex? (https://pypi.python.org/pypi/vex) I've always found vex to be lightyears ahead of virtualenvwrapper for development (activating and deactivating virtualenvs manually is a horrible pattern) but I've never used pipenv and people seem very happy with it To be clear, the behaviour I want to replicate is Bash code:
Bash code:
NtotheTC fucked around with this message at 15:22 on Jan 21, 2018 |
# ¿ Jan 21, 2018 15:18 |
|
I know a few of you guys run your python linux dev environments in vms due to being on windows machines out of preference or necessity... Anyone have any experience with using Pycharm with docker / windows subsystem for Linux? My current place of work runs windows machines only but our app is switching over to docker containers on Linux and I'm looking for a way to develop on Linux without actually having to dual boot if possible.
|
# ¿ Feb 12, 2018 16:44 |
|
WSL support is huge but at the moment file permissions not transferring and the lack of systemd support meant I couldn't use it for development
|
# ¿ Jul 5, 2018 09:50 |
|
Mrenda posted:Is there a particular setup I should have for developing with Python on windows? Is developing on windows a requirement or a preference? Also: Web development or desktop app or machine learning etc? NtotheTC fucked around with this message at 15:21 on Jul 6, 2018 |
# ¿ Jul 6, 2018 15:08 |
|
Quote is not edit NtotheTC fucked around with this message at 15:20 on Jul 6, 2018 |
# ¿ Jul 6, 2018 15:11 |
|
Mrenda posted:I have python setup in a Linux VM where I'm playing around with Flask, but I want to be able to use it for stuff on Windows too rather than switching about in languages. I've done a few MOOC courses but never really made/finished anything, so I'm just looking to make a lil' program for Win10 that pulls weather info from an API I've yet to find, stores it and displays it. Fair enough - I'm a big proponent of developing on the target OS so personally I'd install the latest python3 binary from python.org and then use pipenv to manage your python requirements. I don't recommend trying to go through git bash or bash for windows, if you want a posix environment then I'd just develop on native linux
|
# ¿ Jul 6, 2018 15:30 |
|
Seconding Click- using it to create neat command line apps is one of life's purest pleasures and I wish I could make it my full time job somehow
|
# ¿ Jul 12, 2018 10:47 |
|
qkkl posted:Let's say I've defined in my_file.py several enums in an enum class called MyEnum. I now want to use those enums in another file. What works right now is to import the MyEnum class with You could just define the enums at the module level and then import them directly? code:
E: ignore me Enums are actually a thing now in python, I didn't actually know that NtotheTC fucked around with this message at 22:15 on Jul 19, 2018 |
# ¿ Jul 19, 2018 22:11 |
|
Anyone have any experience with using Poetry for python projects? I recently moved over to using pipenv for everything (still a huge improvement over virtualenvwrapper or vex or whatever was used beforehand) only to learn about Poetry the other day and looking at it it does seem to have massive advantages despite being newer.
|
# ¿ Jul 26, 2018 08:14 |
|
Django is definitely worth exploring, just because being able to turn anything into a website is a useful tool to have. You'll find you gain quite a lot knowledge about client/server architecture, deployment and packaging, SQL and RDBMSs just through osmosis, but at any time you can drill down into any one of those topics and they're each a discipline of their own
|
# ¿ Jul 31, 2018 07:45 |
|
Boris Galerkin posted:I found on one of their closed GitHub issues that apparently the "*" version signifier doesn't mean wildcard as it does in every other usage in the world, but instead it means "latest version." I don't really have anything constructive to say about that so it's whatever. Give Poetry a try. It does everything pipenv does but without some of the dafter design decisions (like upgrading your packages by default)
|
# ¿ Aug 17, 2018 12:09 |
|
It's all under the header of UX (user experience) now Or wait when you say gui programming are you talking about the interface or the code behind it?
|
# ¿ Aug 29, 2018 12:38 |
|
Are you allowed to touch the java code? Because it would probably be much simpler to add a JSON parser library and have the python output a JSON object To answer your question though try prepending your write string with r or ur if it's python2 code:
NtotheTC fucked around with this message at 09:10 on Oct 9, 2018 |
# ¿ Oct 9, 2018 08:56 |
|
Considering the "flask hyphen stuff sucks" mantra, is the best solution for storage based sessions on flask to roll your own or is there an actual serviceable lib solution out there?
|
# ¿ Oct 18, 2018 15:00 |
|
I've seen that pattern used once in the wild, where it was something likePython code:
|
# ¿ Dec 26, 2018 21:33 |
|
cinci zoo sniper posted:loving hell, why?! Well that example is slightly simplified, the two strings were actually entire sentences, and were stored in a config file and often accessed, so it was neater than writing Python code:
NtotheTC fucked around with this message at 21:47 on Dec 26, 2018 |
# ¿ Dec 26, 2018 21:43 |
|
I'm not trying to nominate it for code of the year, just pointing out a real-world example of it
|
# ¿ Dec 26, 2018 23:47 |
|
I've used Django exclusively up until 3 months ago when i finally had a project i thought flask wouks be perfect for. 2 weeks later i binned it and redid it in django This is just one mans opinion of course
|
# ¿ Jan 7, 2019 16:53 |
|
For Django specifically, once youve done the tutorials (of which there are many excellent ones suxh as the one youve already found) the Two Scoops of Django book makes an excellent reference book. Its expensive in hardcopy form but I think you can get an electronic copy cheaper
|
# ¿ Jan 17, 2019 19:54 |
|
Master_Odin posted:Except at least they have a folder within a project they install modules to and I don't have to explain virtualenvs to people starting out. Can't wait for PEP-582 to be implemented. Is this entirely wise though? Not having to explain virtualenvs is great and the activate / deactivate schtick is terrible implementation but tools like poetry abstract that away behind a much nicer interface that functions similarly to this except you don't use the system python. What happens with this pep if you accidently install a dependency into the system python, dont realise when importing the lib into your project that it isn't local, and then get baffling errors? If the goal is to remove virtualenvs entirely then we need a way to replicate things likr pipx-app for exposing python command line apps neatly. And if the goal isnt to replace virtualenvs completely are you not just kicking the can down the road? NtotheTC fucked around with this message at 22:35 on Feb 7, 2019 |
# ¿ Feb 7, 2019 22:29 |
|
Related: https://www.jetbrains.com/research/python-developers-survey-2018/ 21% of Python devs dont use any sort of isolation for developing
|
# ¿ Feb 7, 2019 22:37 |
|
I mean thats two separate points really. You want to avoid using system python for installing an apps dependencies into because you may have multiple apps on the same system that have conflicting requirements. If you already isolate the python environment becsuse you use containers or whatever then absolutely you can install things into system python. The PEP makes it a bit simpler to isolate by default which would be nice in production without needing extra tooling. Even in containers its a nice bit of redundancy, but I can't work out if their goal with that PEP is to replace virtualenvs entirely or just be "virtualenv lite" to aid with teaching beginners NtotheTC fucked around with this message at 23:53 on Feb 7, 2019 |
# ¿ Feb 7, 2019 23:44 |
|
I think its very much not recommended for production. I like using it for testing port access on servers
|
# ¿ Feb 12, 2019 19:51 |
|
Why are people posting about writing cheat software ITT? "It's just a research project". Uh-huh
|
# ¿ Feb 24, 2019 16:56 |
|
cinci zoo sniper posted:This is a programming thread on SA , not a tech support thread of official Space Station forums or whatever. My issue was less about white-noising the thread and more about it being scummy and maybe people should keep the blackhat poo poo they do for a dollar to themselves.
|
# ¿ Feb 24, 2019 18:24 |
|
|
# ¿ Apr 29, 2024 16:58 |
|
QuarkJets posted:Maybe you should keep your opinions to yourself instead since you don't seem to know what you're talking about The first post says "im writing cheat software", the second post says "here's how you'd do it for Apex" and the video is literally titled "cheating in space station 13". So why would anyone think it strange? I didnt set the tone or the topic. I imagine automation- ahk or otherwise is listed as cheating even in a web game so who cares if it's the equivalent of botting in slither.io? How is it a contraversial opinion to say "don't talk about writing cheats ITT?“ there must be thousands of legitimate uses for that sort of tooling so use those to demonstrate it.
|
# ¿ Feb 24, 2019 22:10 |