#tools-and-devops

1 messages · Page 37 of 1

sand thistle
#

it's not super compatible with IDEs

#

like

#

once you make an environment

#

you have to manually place the path into the IDE

#

but that's my biggest complaint..

tawdry needle
#

For what it's worth that's true with any environment management tool

sand thistle
#

and it might be because im doing something wrong

#

ok cool so i dont feel bad

#

i thought i broke my computer

tawdry needle
#

Unless it specifically has integration with the environment manager

sand thistle
#

but you'd think someone would have solved this issue

#

feels like we're 99% of the way there

tawdry needle
#

It's a matter of convention versus configuration

sand thistle
#

oh god

tawdry needle
#

There are so many different ways to configure this stuff you can't safely make assumptions about it

sand thistle
#

I'm reading the design of everyday things

#

and it spoke about exactly that: convention vs configuration

#

how you can make things more efficient

#

but that means updating legacy

#

and that's a big problem

#

especially if it's a business decision

#

anyway im rambling a bit..

#

do you want to help advise me on this ocr project im working on

finite fulcrum
#

any way to add pycharm's actions to the windows context menu after installing it?

delicate gorge
#

so I recently started using the termguicolors option in my vimrc to ...well get the colors I want, interestingly enough, when I do a :q now vim paints paints everythig in my terminal (Xterm) which is not filled with characters yet white, however if I do a :wq this does not happen and everythign just stays normal, any ideas?

#

Side not, this doesnt seem to happen to me in alacritty so I guess its xterm + termguicolors

hidden lily
#

Woo automatic dark mode with JetBrains is liiiiit (or unlit)

prisma nexus
#

what do you guys use to sketch out website design before you start coding?

kind chasm
#

Does anyone else have the issue that vscode is ignoring the give port in the ssh_config?

#

ssh: connect to host ras port 22: Connection refused

#
    HostName pi
    Port 55555
    User XXXX```
fair heron
#

@prisma nexus definitely curious on that myself.

prisma nexus
#

someone else recommended invision which i haven't looked into too much yet but looks super promising @fair heron

kind chasm
#

@prisma nexus A piece of paper

fair heron
#

Cool, I'll check it out. I dont have a lot of front end interest but do want to be at least minimally competent.

kind chasm
#

The vscode issue makes me angry. Really. Custom SSH ports are so common, why would someone program something like this? The sad thing is, it actually worked fine this way while it was on Insiders. Ugh, Microsoft. Seriously.

#

So many good things they do lately, but they manage to fuck up the most basic things

heavy knot
#

why my vsc doesnt want to turn on

tawdry needle
#

@kind chasm dont worry this is a pattern dating back 25+ years

kind chasm
#

It was actually my fault. An umlaut in the identifier name caused it. Just funny that it tried to connect on port 22 instead of telling me.

sand pivot
#

If I have some "modified" files in my "Changed not staged for commit" history that I don't want to commit at a later point, how can I remove (I don't actually want to delete them, I just don't want them being tracked)

#

or rather I don't care about them being tracked as I don't plan to commit the changes at the moment

lost rock
#

you'd add these files to your .gitignore file, so that git will, well, ignore them.

sand pivot
#

Hmm, I was wondering if there was some equivalent of a git rm command

lost rock
#

then they won't be listed as changed any more and won't be available for staging or committing

sand pivot
#

because gitignore (as I understand it) will mean that if I wanted the files to be commited at a later point, I would need to go to gitignore and remove any mention of them

lost rock
#

that's right

sand pivot
#

I was hoping for a hey git, i know you think these files were modified, but I don't care about them right now, so stop telling me about them each time I do git status command

lost rock
#

hmm, so like a temporary ignore.

sand pivot
#

would that just be for one push to remote?

lost rock
#

the gitignore file applies as long as it exists. I am not aware of a temporary way to ignore a change until the next commit or anything like that.

#

You could stash changes, but that way they also get removed from your working copy.

sand pivot
#

@lost rock but that way they also get removed from your working copy. does that mean they just get stashed with all present changes left in tact or are they reverted back to their original state (as they were when I first cloned the repo)

lost rock
#

DESCRIPTION
Use git stash when you want to record the current state of the working directory and the index, but want to go back to a
clean working directory. The command saves your local modifications away and reverts the working directory to match the
HEAD commit.

#

from man git-stash

#

so it just removes the current, not yet committed modifications

sand pivot
#

Pardon my naiveté, but when you talk about removing the current, not yet committed mod's, remove just means (don't consider them for possible commit right now) it doenst mean, delete these files

lost rock
#

reverting to the state of the last commit (HEAD). If a file didn't exist before and was just created, stashing it would remove the file from your working directory, IIRC.

#

(or not-yet-tracked files are ignored, I'm not sure)

sand pivot
#

Thanks @lost rock

west sparrow
#

hey!
I'm trying to install numpy (macos 10.15, python 3.8) and command
pip3 install numpy
thrown an error (error text here - pastebin.com/V2dg8fKA)

#

tldr error looks like this
RuntimeError: Broken toolchain: cannot link a simple C program

#

there is a stackoverflow topic with such problem but solution doesn't works

civic hound
#

how did you install python?

#

web installer or brew?

#

@west sparrow

west sparrow
#

web installer

civic hound
#

have you opened xcode and accepted their tool licence agreement thing?

#

if you just updated macOS then you need to agree to their terms of service

west sparrow
#

no, in fact I didn't have xcode on my laptop yet. I read that it might help and now I'm downloading it

civic hound
#

xcode tools are preinstalled

#

sudo xcodebuild -license accept

#

think you can run this thing

west sparrow
#

oh

civic hound
#

sudo xcodebuild -license or maybe just this part so you can read the license and agree to it 😄

west sparrow
#

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

civic hound
#

ermm... strange..

#

well.. maybe downloading and installing xcode will sort itself out

#

i have not upgraded to 10.15 due to all the problems it has caused

west sparrow
#

I just wanted to test ipad as second display so I did 😄

civic hound
#

you should be able to only install the tools

#

if you have not started the install yet let me know and ill try to find the command

#
# Install Command Line Tools
xcode-select --install

# Enable command line tools
sudo xcode-select --switch /Library/Developer/CommandLineTools
#

found this online.. it looks correct

west sparrow
civic hound
#

xcode is the entire MAC dev environment. so it is quite large

#

thats why they offer the hidden way to only download the xcode tools for the terminal

west sparrow
#

thank you for such a patient explanation

#

so Xcode itself isn't needed, only command line tools, right?

#

it works!

#

thank you so much!

civic hound
#

no problem 😄 we mac users need to stick together 😄

finite fulcrum
#

@copper compass you mentioned nuitka having a onefile option, but I'm having trouble finding anything, could you point me to the right direction?
Trying to replicate my pyinstaller setup (self extracting exe, some DLLs upx'd and included datafiles) to compare them if the size difference would be outweighed by other better things

copper compass
#

I'll take a look later, currently in the middle of something

#

But I recall it being right there on the usage page

copper compass
#

@finite fulcrum so yeah, as I said, right there in the user manual - python -m nuitka --standalone

#

with --experimental=use_pefile if you're on windows

#

perhaps also --experimental=use_pefile_recurse

finite fulcrum
#

the standalone only makes it a folder that's independent of the outside environment

dusty hill
#

evening y'all

#

anyone use Vim as a main development environment for Python?

eternal flicker
#

I do, although I'm not a powerhouse

dusty hill
#

oops, never got notified there was a new message

#

I am wondering about different people's workflow, I just installed slime, and it seriously rocks. 🙂

pure pulsar
#

i do use vim for all my dev, yes, it's completly fine for me for python/backend things, and kivy development, but for web front/js, my setup is less great

vale dagger
#

Used to use vim but I've switched to pycharm with vim keybindings

dusty hill
#

hooray for vim kebindings

#

why not just use vim

lyric granite
#

Does vim do the aforementioned thing of locking an active source file?

#

Like, you can't have a.py open in two different windows without some sort of stopgap

dusty hill
#

locking how?

lyric granite
#

I don't know how to describe the solution, so I'll describe the problem

dusty hill
#

it can recognize if the file was modified outside of itself and allows you to reload or ignore that

lyric granite
#

On my laptop, I was editing file a. I stopped to do something else for a while, not on my laptop. when I came back, I forgot that I had file a open already, and opened it in order to show someone the program. I then edited in the outdated version, and had things break

#

this is close to that yeah, but what if I'm using vim both times I open the file?

#

is it that it sees source modifications outside of this instance of vim?

#

or just 'these modifications weren't made by any vim instance'

dusty hill
#

if you use vim and say, lose your window behind something and try to open another you will be warned

lyric granite
#

ok that's good

#

I assume f5 is also the rerun/reload command?

#

That's standard I'd guess among everything, right?

dusty hill
#

f5 is f5, you can bind it to anything you like.

lyric granite
#

is it bound by default or do you have to bind everything manually

dusty hill
#

currently if I have a Python file open I have f5 set to write the file to disk, then run the file and show the output in a terminal window. But I was playing with f6 being merely to send the selected text to python and run it... But now I installed slime plugin, and that lets me select text and ctrl-c ctrl-c and it will send it to a running REPL in a terminal window within vim

eternal flicker
#

Vim creates a swapfile for each file you have open in the editor, then when you try to open a file it checks for the presence of the swapfile and will give you a big warning

dusty hill
#

vim come "out of the box" with nothing that comes to mind bound to a function key, most of the commands are on the keyboard keys

#

vim is a modal editor, so you have to say you are inputting text or not, when you aren't all your regular keys have important jobs

eternal flicker
#

@lyric granite to me it looks like you might be understanding something a little differently, so I thought id clear it up

#

Vim is a text editor and does not provide anything code editing specific out of the box

lyric granite
#

What's REPL? I've heard the name before but not familiar

So you have to be pressing a certain key to type regular text, or it's a toggle key?

dusty hill
#

well that's not exactly true

lyric granite
#

@eternal flicker You're saying Vim's akin to Notepad++, and @dusty hill you're saying it's not quite?

dusty hill
#

it provides code completion and syntax highlighting right out of the box, and if you use a makefile it provides for building 🙂

#

yes, if you hit i, o, a, s then you will go into the mode where your keys are letters and input text

lyric granite
#

Are you saying any of those keys or all of those keys in that order

dusty hill
#

i = insert before, a = append after, o = open a new line , s = overwrite the first letter and then insert

lyric granite
#

ah ok

dusty hill
#

so for example I open an empty file

#

Then I hit the 'i' key

#

I can now type to my hearts content until I hit <esc> or <ctrl-c>

lyric granite
#

that honestly seems like a major shift from standard text editors, having every key be some sort of single-key shortcut
Drastically different design philosophy
How long did it take you to get used to this type of editor?

dusty hill
#

text are objects and lots of keys more in that way. So 'w' moves forward by a word, W does the same thing but includes the space. b and B do the samething backwards, e goes to the end of a word.

#

It is soemthing to get used to, but for example I can type dG and it will delete everything from where I am to the end of the buffer. or 3dw and it will delete the next 3 words

#

it comes with a tutorial vimtutor and you can work through it in less than an hour and be very productive

lyric granite
#

what's the structure of vimtutor?

dusty hill
#

it is a page loaded in vim that tells you "use such and such key to move to this place", now do this...

#

simple

#

it has a full language for programming it, and you can get versions that have others compiled into it as well so you can actually write plugins for it in python or lua if you don't like vimscript

lyric granite
#

for programming vim? what's the language like?

dusty hill
#

but it is highly configreable

#

kind of c like

#

c-ish

#

🙂

lyric granite
#

c-ish as in it has curly braces or c ish as in you can really get into the metal and configure variables and memory requirements

dusty hill
#

if you are even on any Linux, BSD, Unix, or even Macs should all have some version of Vim on it by default

lyric granite
#

I'm on windows, so sadly I seem to be missing out on this tool being a default :<

dusty hill
#
function! s:NextSection(type, backwards)
    if a:backwards
        let dir = '?'
    else
        let dir = '/'
    endif

    execute 'silent normal! ' . dir . 'foo' . "\r"
endfunction
#

something like that

#

no matter there is a windows version

lyric granite
#

does indentation matter as it does in python?

dusty hill
#

in vimscript, I don't think so

#

there, you can even get a version for your Amiga

lyric granite
#

How extended is VIM?

#

and was it a backport or was it on the Amiga back in the day

dusty hill
#

as much or as little as you like

lyric granite
#

oh, said extended, meant supported

dusty hill
#

I think Bram wrote the first one on the Amiga actually. But it was a foward of an editor called Vi which was the visual mode of Ex ... we are getting pretty old at this point

#

it is hugely supported

lyric granite
#

also seems like it's been around a while

dusty hill
#

vimcasts abound on youtube, tutorials, plugins, pretty much anything you would ever want to do you can do in Vim

lyric granite
#

does it support regex? I'd assume so, right?

dusty hill
#

it has phenominal regex, and even grep

lyric granite
#

oh nice

dusty hill
#

to search in vim you hit /

limpid mulch
#

And a very steep learning curve. =]

lyric granite
#

I've seen limited grep but a devent amount of regex

dusty hill
#

then type your search and it will find it along the way until you hit enter, and N will find previous and n will find next. 🙂

lyric granite
#

Are you talking about regex, grep, or vim, @limpid mulch ?

limpid mulch
#

All of them, but mostly vim. It's hard to learn, hard to master. But once you get into it - it's a magnificent tool.

lyric granite
#

@dusty hill mentioned the tutor-type application/page for vim. Have you used it, @limpid mulch ?

dusty hill
#

Tell you what:

If you are in normal mode where you can't type letters into your document
ZZ will save and exit
ZQ will just quit

If you are typing letters then hit <ESC> to get to normal mode and use what I just said.

You now understand the most confusing part of the editor.

Otherwise hit i to start typing, and <esc> when you are done typing.

I challenge you to go d/l a copy and play with the vimtutor

#

All the cool kids use it, and chics really dig it. It will cure your acne, and put hair on your chest... or take it off, whichever you prefer. 🙂

lyric granite
#

It slices! It dices! It does anything you want! as long as you meant slicing strings

dusty hill
limpid mulch
#

@lyric granite yes, although it was quite some time ago. Most of the experience and understanding comes from using vim on a daily basis. Which takes quite a bit of effort at the start.

lyric granite
#

Ok so I'll install vimware, and there's an application of the editor that I want to try:
I want to take an infile.py, strip all comments, and make an outfile.py
Could you, once I install Vim, help me out with this?

#

It's a regex thing that can be done, but an automated way to do it would be amazing

#

I think it's funny that the top suggested search for Vim is "how do I start typing in vim"

limpid mulch
#

Yeah, it pretty much outlines the complexity. =]

lyric granite
#

I'm looking at the downloads page and yeah, I see there's the Amiga version. Why do they have that online? Is there some really well defined bridge from Internet to Amiga that people who still use Amigas know by default?

dusty hill
#

not sure, but there is a dos and OS/2 and maybe even an Arari version too

limpid mulch
#

I want to take an infile.py, strip all comments, and make an outfile.py Could you, once I install Vim, help me out with this?

There is a designated tool for what you are trying to achieve called sed. I'm not sure vim is a good choice for automating editing. Vim is an interactive editor by design afaik.

#

Don't get me wrong, It might be possible to automate things with vim, it's just not the most convenient way to do so.

lyric granite
#

Is there a version for the TI-8X calcs? It wouldn't surprise me if there was if there's any system that VIM has been ported to that uses a z-80

dusty hill
#

all python comments? like the ones that start with #

lyric granite
#

yeah those

#

So sed:

#

is it a command line tool?

limpid mulch
#

It is.

lyric granite
#

can you pass multiple filenames into it at once, or even a directory in and out?

dusty hill
#

the only problem I see is if you have any strings that contain # in them might give you some grief

#

you are doign this in the editor or from the command line or in python?

limpid mulch
#

@lyric granite that would be your shell responsibility to process multiple files. Are you on linux?

lyric granite
#

"Take all files in indirectory and, if there's not a file with the same name in outdirectory, then strip comments in the file and put a copy in outdirectory"

#

No, sadly am on windows. I've been debating adding a dual boot for linux though

limpid mulch
#

Oh.

lyric granite
#

I've had limited use of linux, mostly using a command line

dusty hill
#

do you have grep?

lyric granite
#

I've used an extremely outdated version of redhat before I think

#

nope, not unless I've installed it along with some other tool that I have

#

I've installed Visual Studio before because I didn't know where to really start making programs on the PC when I started out, so it might've come with that?

limpid mulch
#

Windows haven't got that set of nice CLI tools, sadly.

lyric granite
#

They probably want you to subscribe to VS

dusty hill
#

so are you tryign to do thsi with windows cmd line tools? or are you wanting to write a python program to do it, or something else?

lyric granite
#

Anything that would be able to do this functionality. I'd assume this is something that's been done multiple times before, so I'd probably want to avoid re-inventing the wheel in python

dusty hill
#

you can always install WSL and you would have Linux in your windows. Or Cygwin is amazing

limpid mulch
#

If you want to automate things such as the one above - you might have to either install sed, grep etc binaries for windows specifically or use some kind of self-written program/script to do that for you.

lyric granite
#

Isn't there now some sort of linux support in windows that doesn't require a dual boot?

dusty hill
#

WSL

limpid mulch
#

If I was to do it on windows - I'd just install python and wrote a python program. That would be the most straightforward way without going too far.

dusty hill
#

do you ahve W10?

lyric granite
#

Yeah

dusty hill
lyric granite
#

It's w10 newest service pack/release/update or whatever MS calls them

#

How do you make a python program that can read text from another python script file?

limpid mulch
#

Isn't there now some sort of linux support in windows that doesn't require a dual boot?
There might. I've never used it tho, so got nothing to advice.

lyric granite
#

Would this be relevant to the help channels?

limpid mulch
#

How do you make a python program that can read text from another python script file?
Python script is just a text file, you can read it like any other text file.

lyric granite
#

Yeah, I'd assume most people here aren't fans of windows. Don't blame ya for it either, honestly

#

I don't know how to do that even

#

I don't know how to do something like

get text from file as filename
#

That's for libraries I know

dusty hill
limpid mulch
#

It's not about being fan or not. It's about picking the right tool for the job. Windows historically is a customer-facing system that tries to be as intuitive as possible, which implies some restrictions. So it's not suited well for some of the more advanced stuff.

lyric granite
#

so far I've used the interactive shell, input, print, and turtle for I/O in python progs

#

Well, recently there's problems like needing to edit the registry to disable the Cortana assistant

#

That's the only way, they removed a checkbox for it

limpid mulch
#

If you want to just get the job done - google for the python script that strips the commends from files.

dusty hill
#

but if you want to use Unix/Linux tools on windows, you can. WSL doesn't cost anything, just follow the instructions. Cygwin https://cygwin.com/ puts a nice subsystem with the slashes in the correct direction 🙂 and all the tools you could hope for on a Linux box right there in windows.

lyric granite
#

Oh, registry reminds me of something:
I'm using an old MiniDin6 keyboard, so the ALT key shows up as the WIN key, at least in windows. I've used a registry editing tool to change this in Windows called SharpKeys, but I don't think that would work in linux. Is there a way to do something like that in linux, editing the definitions of hex codes for keys?

limpid mulch
#

You can make your own keymap if you so desire.

#

In linux everything is possible. Just takes time and knowledge to achieve.

lyric granite
#

And with the python thing, I'd be down for tinkering with parsing files honestly, I think that's something that I could easily find applications for in day-to-day, and I don't want to have to sit and google for every problem that that could be applied to

#

Saving things from programs, etc

#

Parsing a long string of text that I want to have in a file

#

creating a text file that has the contents of a list I created in some program

#

Ah wait, I've got to go soon though. Gotta get some rest, just realised what time it was

limpid mulch
#

Python is a good tool for automating just about anything.

dusty hill
#

okay, let me know how your explorations with Vim go. Good luck on your programmign project. but now is time for sleep

lyric granite
#

Really appreciate the help and recommendations, will try these and explore Vim. Seems like an interesting venture

limpid mulch
#

Sure, good night. =] If there are any questions - feel free to ask them.

lyric granite
#

Will do :>

limpid mulch
#

Good luck!

lyric granite
#

I assume the parsing files is something that's a help channel thing for another day, right?

dusty hill
#

well one would garner a level of respect by starting the program attempt and simply asking how to do some piece you haven't been able to figure out.

limpid mulch
#

As long as it's parsing with python - yes, sure.

lyric granite
#

of course, I'd read docs and such, and see what I can get beforehand before I come with any questions

dusty hill
#

even if that is as simple as a "Hello, world" program. And now you want to open a file and look at each line. See what I mean?

lyric granite
#

Yeah, makes sense

dusty hill
#

open to a book suggestion?

lyric granite
#

Oh sure?

dusty hill
#

it is free and you can read it right online.

lyric granite
#

I have a textbook for python, but yeah, it starts from the very basics

dusty hill
#

If you get to chapter 4 you will know more than many of your friends and ready to get to work! If you finish it, you will be answering more questions than you ask.

#

Dive is the best text book for Python I have ever seen

lyric granite
#

By comparison, chapter 4 in the book I have is introductions to repeat structures

#

Let's build a for loop out of a while loop, and not mention that for loops exist juuust yet!

#

Alright, thanks for the suggestion. Goodnight!

dusty hill
#

let me know what you think, it's not my book, and I don't get anything from people using it I just think it is very straight forward and better than most texts I have seen

lyric granite
#

I mean, you said yourself it's free. I'll for sure take a look, and see if it helps with understanding comprehensions as well

#

Man, i keep saying goodnight but I keep thinking up questions

#

What audience is the book written towards? This'll be the last thing I let myself get into tonight

dusty hill
#

people that want to program in python the python way

#

okay, g;nite

mint tendon
#

Hey I've been learning python for years (although you wouldn't believe it) and I just got the communtiy version of pycharm unfortanly I have no idea how to use it? So can someone point me to a video explaining, I've been using shell for like 5 years I'm brand new to this stuff thanks -Scot

mint tendon
#

Oh and what's kivy and how do I go about using it Thnx -scot

heavy knot
#

Is there a way to couple logs into sort of different files, and only show logs for a certain file

unkempt coyote
#

Like, certain python file?

heavy knot
#

Yeah, like disable logs on this file or smth

unkempt coyote
#

It does a lot more than separate by file, but you could certainly filter to a specific command with it

heavy knot
#

Oh huh, thank you

amber stream
#

Hi everyone, is it okay to ask a PyCharm setup question here?

limpid mulch
#

Ask away @amber stream .

amber stream
#

This might be a very basic problem, so my apologies in advance as I am a beginner. when in PyCharm, I am importing turtle (from turtle import *), however once I am on line two, the import command greys out.

#

also, when a command is run, I can see lines been drawn, but the window quickly disappears

tawny temple
#

Being greyed out in this case means the import is not being referenced anywhere

#

As in, you've imported the turtle but have not yet written any code that uses turtle

#

So you can ignore that. It's not any error

amber stream
#

but it is also greyed out when I have a line that uses turtle for example forward(20)

finite fulcrum
#

what does it say when you hover over it?

amber stream
#

there is a yellow light bulb and when I hover over that it only gives me the option to optimise imports, when I do that it just removes the import line

forest bay
#

Hmm, that should work, it does for me in Python 3.7 terminal at least

#

What version of Python are you using?

mental mason
#

How do u specify a message when merging with git?

#

I tried adding -m while merging then pushing it to remote, theres no merge message

dark heron
#

I am trying to import a library that I have saved on my computer using PyCharm but it can't find it, I have linked the path in the interpreter and the done the "restart". What can it be other than me being stupid?
Its called library.xxxxx.pyd and in my project file I am trying to import it as "from library import *"

pure pulsar
#

@mental mason if the merge is fast forward, you don't get an opportunity to create a merge commit, you can use --no-ff to prevent fast forward merges

amber stream
#

@forest bay 3.7

mental mason
#

Thanks

delicate gorge
#

This just means exactly what it says, nothing more and nothing less

#

It has 3 commits deploy doesn't have and doesn't have 2 deploy has

mental mason
#

Nothing to worry about?

short mesa
#

Except if you did important changes

elder pier
#

Anyone use Jenkins?

tired aspen
#

unfortunately

heavy berry
#

Is this the right chat to ask about github?

#

I'm trying to edit my github repositories with github desktop but the only way I see is to create a new file or clone a repository from online

#

it looks like it's going to make a new repository, once I commit will it go to a new one or the repository online I cloned it from?

#

up until now I've only used github from a browser (not really looking to edit them in command line)

somber lion
#

You clone the repository from your account to your computer, that will set it up so you can push it to there.

eternal flicker
#

@heavy berry if it’s your online repository you can clone it then do your commits, it will show up when you push to your remote (online) repository

somber lion
#

One core thing about Git is that everyone has a complete copy of the repository. You don't commit to the GitHub copy, you do things on the one on your computer, then push it to GitHub to make that one match.

#

Cloning downloads the entire repo to your computer.

heavy berry
#

Ok good I was worried I would start making duplicate repo's thx

mental mason
finite fulcrum
#

Update the branch if you mean "solving" the commits that are behind

heavy knot
#

hey

#

which IDE is best for python?

#

on Ubuntu

hushed salmon
#

it depends on your taste

#

if you want something extremely complete with batteries included, go for pycharm

#

if you want to get started the fastest way possible and want something lighter weight, go for visual studio code

iron basalt
#

There's a good curated overview of your options here
http://pythondiscord.com/pages/tools/

hushed salmon
#

if you don't mind tweaking stuff a bit, use vim, neovim or emacs

heavy knot
#

I am a novice

#

hmm thank you

#

another question though

#

What is better; to try as many possible IDE/Editors or just pick one and stick with it?

hushed salmon
#

pick one and stick with it

heavy knot
#

I am using VSCode for java

#

but I heard Pycharm was amazing for python

hushed salmon
#

you can use VScode for python too, it works fine

#

a few of my colleagues use it

#

if you're already used to it for java it's probably a good idea

heavy knot
#

hmm

#

I am going to think about it xD

#

thanks 🙂

#

I am gonna learn python mostly to mess with Discord bots haha

hushed salmon
#

pretty sure you can do discord bots in java

#

but python is cool

#

always a good idea to learn it

heavy knot
#

😮

#

it that true?

#

I asked a friend of mine and he went down on Python. He said Python was the best and such

#

also u guys have a python discord channel so 😛

#

I wanna work as a programmer one day... big money

hushed salmon
#

yes, discord just exposes a HTTP API, you can use it with any language basically

#

just a quick google shows that there's a lot of people who already made wrappers around it for java

#

so it might be easier to get started that way

iron basalt
#

Yeah for Java there is JDA and Discord4J off the top of my head

hushed salmon
#

and javacord according to google 🙂

#

asyncio ❤

heavy knot
#

😮

#

see xD I knew I would end up using python

#

I also gonna learn Python next period so :p

hushed salmon
#

mythong?

heavy knot
#

whahahaha

#

hahaha

#

Sorry, I meant python

heavy knot
#

I think I go for pycharm

#

what do you guys think of Anaconda?

hushed salmon
#

anaconda is a python distribution for data science not an ide

#

it's cool but probably not what you want if you're gonna make a discord bot

heavy knot
#

oh

#

are you online Seto?

heavy knot
#

Anyone know how to stop the python window that appears when using turtle, from closing once the script has run... when using VSCode.

#

if i run from commandline, I can run python -i which does the job

undone pecan
#

trying to use poetry, how do I select the active python version?

undone pecan
#

ah. i did user env, but not system

#

perhaps theres a better way to manage that locally in vsc

eternal flicker
#

If by active python version you mean the version requirement for your project, you specify that in pyproject.toml

undone pecan
#

ye i was getting an error by doing that

#

non active supported version or something

#

"The current Python version (3.7.3) is not supported by the project (3.8) Please activate a compatible Python version."

#

trying to create new venv for 3.8

#

i used to use pipenv but trying other tools

#

dephell didnt work at all

#

poetry seems like next best thing

eternal flicker
#

I have never heard of dephell

undone pecan
#

ye its the new kid on the block

#
GitHub

:package: :fire: Python project management. Manage packages: convert between formats, lock, install, resolve, isolate, test, build graph, show outdated, audit. Manage venvs, build package, bump ver...

#

seems like its trying to be the new pipenv but good

eternal flicker
#

huh, so it's like a tool to manage package tools?

undone pecan
#

pretty much.
plus dependencies etc

#

can be used with poetry and others as well

#

yep same error when trying to create venv :/
The current Python version (3.7.3) is not supported by the project (3.8)
Please activate a compatible Python version.

#

but then I also get this:
python --version
Python 3.8.0

#

oh interesting.
perhaps its cause i installed poetry on version 3.7
so just need to dl that again

#

eyy. that worked.

kind chasm
#

Which linter do you guys use in VS Code and why?

#

And I totally want to hear personal preferences

eternal flicker
#

flake8, it's a wrapper around PyFlakes, pycodestyle and Ned's McCabe script
it's what our server project repositories use for linting

undone pecan
#

i went with what the poetry guide just told me. which is also flake8.
although ive been using pylint since then

mental mason
#

Git question, can u fully reset a repo then push to to remote without deleting the repo?

tired aspen
#

I imagine you can - delete all branches and tags

undone pecan
#

re options for changing poetry venv loc?

undone pecan
#

think i have a new way that might work.

supple jackal
#

Ah, sorry

finite fulcrum
#

only dunders should start with more than one

supple jackal
#

I misunderstood the errors

#

damn now I deleted my question

#

the warning was because the method name wasn't all lowercase, not because of the underscores

#

nvm, thanks

heavy knot
#

Hi I have a pycharm question

#

when I try to paste some emojis into my editor

#

they look like a 0 width space

#

even though they exist because if I delete them it does get deleted

tired aspen
#

what's your OS; you may need to install a package to support emoji
do they work in other text editors?

heavy knot
#

Well I'm on Ubuntu 18.04

#

Noto Sans does exist

#

and it is used

heavy knot
#

hi sorry for copy and paste but im TOO lazy to type this out every time does anyone know how to set up python on vscode please please teach me

stable cloak
#

So is it giving you any errors or what is it doing

heavy knot
#

wait

#

ill take

#

screenshot

#

i press "Run task"

#

and it does this

#

:C

stable cloak
#

According to this you need to open the folder as a project so it can generate the appropriate files

heavy knot
#

uh how

#

do i open a folder

stable cloak
#

File> Open I would think. I currently don't have it installed, sorry

marsh furnace
#

Does anyone have any information on installing python on an external drive that is capable of running cross platform?

foggy dune
#

I think that what you're looking for is a virtual environment. I have one for parsing data on my usb stick and it works pretty well. You will just need to activate it every time you're using it

marsh furnace
#

I'm looking to get an environment in which I can just boot either an IDE or a command window to launch the program

#

I'm not sure if that's how you're USB is setup or not. I've been attempting to get Anaconda to function off an external for mac however I cannot for the life of me get it to work

mental mason
#

I need help with git

So basically i have 2 branch for my project

  • deploy
  • develop

Develop is where i test stuff for my project b4 actually deploying it, and deploy is for deployment so it must be stable.

Is it recommended for me to merge squash develop from master?or just normal merge

topaz aspen
#

i'm just wondering what git-hooks people use? I've heard of people using them for formatting / linting, but my editor does these things

delicate gorge
#

@mental mason that depends entirely on you and your preferences / workflow

@topaz aspen it's usually meant more as an "in case you forgot to do this" type of thing

mental mason
#

Oh thanks

#

And for git reset --hard does that undo commits entirely to a specific commit? Like it removes the log and stuff?

tawny temple
#

yes

mental mason
#

So in a case where i work on the repo alone and i want to undo all of the bad commit, git reset --hard is a recommended way? Sorry im not experienced with git

tawny temple
#

Yeah, if you really need all commits past a certain point gone

mental mason
#

Hmm i see thank you

#

Oh sorry i still can't differentiate between

#

Git reset and revert?

#

Does revert only reset 1 commit?

tawny temple
#

Revert creates a new commit to undo a previous commit

#

Reset just removes the commit from history and that's it

topaz aspen
#

@delicate gorge ok cool, that's a helpful way to think of them thanks

mental mason
#

Im afraid to do this to my project but, I have 2 feature branch

  • One of the feature branch was already merged with develop branch

  • The other one is merged later in development

Since the other one doesnt have the first feature branch commits, what would happen if i merge the second branch with develop?

tawny temple
#

If the changes were to the same areas of code then you will likely get merge conflicts you'll need to resolve

#

However, if the changes touch separate areas then it will merge without any problems

#

Pretty much no different than how a merge normally works

mental mason
#

Oh, it would be in the same area, so like 2 feature branches works on same file but different contents

#

So that will cause merge conflict?

#

Sorry for the bad English

tawny temple
#

They wouldn't just have to be on the same file, they'd have to both modify the same lines

#

Usually when changes are in the same file, but to different lines, git can automatically resolve that

mental mason
#

Alright make sense, and i think its a bad idea too to work on different feature branch but on one file?

lost rock
#

"bad" depends. It's often necessary. Using a tool like meld or any other that helps you to resolve conflicts makes it quite easy, unless your two branches diverge completely

mental mason
#

Just as reference, say pink is feature and yellow is develop, both feature works on same file and same line, and i want them to merge to develop just like the picture, so now develop has the content from both feature 1 and 2

#

If that make sense

lost rock
#

yep, that's common. Just merge one after the other.

mental mason
#

I see, it's pretty confusing for starters 😅

lost rock
#

The second time there might be conflicts if some changes to the same lines of a file are different from how you changed the same lines in the other branch, then you'd have to resolve those manually and decide which to take

#

Do you use any GUI tool or command-line git?

mental mason
#

I use command line, but for resolving conflict vscode can show me where the conflict is

lost rock
#

vscode is quite terrible for git imo. What OS do you use?

mental mason
#

Windows 8.1

#

I use command line for git mostly, don't rlly want to depend on the IDE

lost rock
#

I like https://meldmerge.org/ for examining file diffs and git conflicts, unless I'm in PyCharm already (or any other JetBrains IDE, which have the best git integration out there imo)

mental mason
#

That's nice

#

Alright thanks for help, i'll try them

#

This is mostly for my bot project, wanted to seperate each command category development into different branches

lost rock
#

hmm, branches are mostly for concurrent development of independent features. If you work on them sequentially anyway or these changes are largely depending on each other, single (or fewer) branches might be better.

#

Your choice to find out what flow works best for you though.

mental mason
#

Yeah i think it might be too much for having that many branches for each feature but can also help me learn git

knotty fog
#

I am a python beginner I am using Vs code on Ubuntu ... I think it is too advance to me ...I often get problems and I hate the Vs code terminal .
So I am thinking to switch to a another text editor ....can anybody can recommend me any good text editor???
For Ubuntu and what do you guys use

ashen sluice
#

any specific problems/annoyances? might be able to suggest settings to change or extensions

iron basalt
#

don't feel pressured into using the built-in terminal, you can just open your own and tile it next to the editor

#

you can check pythondiscord's very own curated list of tools, it contains some recommendations for beginners

heavy knot
#

when i run the python script in vs code it open up powershell how do i change that to the vs code terminal

tawny temple
#

Do you mean that?

heavy knot
#

idk how to make it run in the terminal for vs code tho

#

its running in powershell

mental mason
#

U cant see a log for git reset right?

#

Like when i undo a commit, theres no history to that

tawny temple
#

Correct

mental mason
#

So the only log/history u can basically see are the commits?

tawny temple
#

Well, by definition, the history is comprised of commits

sand thistle
#

how can I commit a new scratch file to a git repository

tawny temple
#

In what sense would that be different than any other plain old file

sand thistle
#

none

#

to be honest

mental mason
#

Hmm i see

tawny temple
#

Do you know how to commit a file in general?

sand thistle
#

I suppose

tawny temple
#

So it'd be the same process

#

stage the file, commit it, then push

mental mason
#

When i just started, i made a big mistake by deleting whole repository to fix a mistake. But now i just realized i can reset it

sand thistle
#

lol

#

well hope i did it right

mental mason
#

As for git, just want to make sure

#

What are the history u can see other than commit histories?

#

Maybe like history of commit reset

somber lion
#

git reflog tracks the history of which commits you've checked out.

#

Which does show the resets.

mental mason
#

Oh, so git reset --hard is also tracked?

somber lion
#

It tracks the commits you switch to, but not stuff you haven't committed.

#

So no that'd be lost.

mental mason
#

I see, thx

#

Cuz i want to reset till specific commit without leaving traces(without history)

somber lion
#

Why?

mental mason
#

Ah nevermind

dire quartz
#

How does Pycharm determine which type of test framework to use for a given file? I want to run a file, and Pycharm insists on it being a pytest test, which I can't use.

#

I just want to execute it as a normal script.

tawny temple
#

I thought it will use whatever run configuration you have (there are templates for tests too)

dire quartz
#

Ok, so apparently it has some kind of automatic test detection. Exactly how it maps which files to what test framework I don't know, but you can tell it to run the file as a normal script through the Run -> Run... menu.

latent cipher
#

Hi guys, need some input. I reverted a git merge from 'branch1' to master (with delete source branch) - on GitLab.
So i went ahead and pushed the same branch from local to remote again.
However, now it shows as no changes when i try to merge it. Even though there's a visible difference between source and target branch?

Any clue? : )

Edit: https://gitlab.com/gitlab-org/gitlab-foss/issues/17387 seems to be the same as this issue

solid wasp
#

Looking for help installing spyder while only using miniconda/conda not anaconda dl or other alternatives like pip.

I have a ton of stack threads and other posts which skirt around it so I do have it all laid out and at the end of the day willing to just do anaconda worst case

tawny temple
#

conda install -c anaconda spyder

#

@solid wasp

solid wasp
#

@tawny temple ok I did see that solution

#

I’m new to channels and stuff so just to clarify it won’t install try to install anaconda?

#

And does that mean the package will be installed in that channel and it will have to be imported whenever doing new venv’s

tawny temple
#

Correct, it won't

#

I believe conda install -c anaconda anaconda would install anaconda

solid wasp
#

And I guess I’ll prob have to do one of the stack solutions to get a Mac app/shortcut running like anaconda which is fine and easy

tawny temple
#

Packages aren't install to a channel

#

channels are just a means of organising packages on the internet

#

so the conda tool can download from various channels

solid wasp
#

Gotcha just where to get it

tawny temple
#

kind of like, separate repositories of packages

#

like how pip can support other repositories besides PyPI, but PyPI is just the most popular

solid wasp
#

do you happen to know if spyder gets 2 or 3 ie -c spyder3 (I assume it doesn’t)

tawny temple
#

you mean its version?

solid wasp
#

Yeah

tawny temple
#

It should be the latest

#

or at least as far as your python version supports

solid wasp
#

Cool imma test it now thanks @tawny temple

tawny temple
#

np

solid wasp
#

@tawny temple hey did it and it’s the same situation

#

let me do some more digging before

#

I think the issue is that is installing it here:

#

/usr/local/Caskroom/miniconda/base

#

where my miniconda is installed so now I call spyder and no command recognized

#

no sure if i need to create an alias or something and I'm on mac fyi

tawny temple
#

You probably need to add the miniconda bin folder to the PATH environment variable

solid wasp
#

gotcha ill give it a go

solid wasp
#

@tawny temple not working idk if its the fact that the path is to spyder exe's which do not run on Mac

#

also i only added path didn't make an alias

#

starting to seem that anaconda might be the only reasonable way

tawny temple
#

You may need have the environment always active then

#

have you done conda init before?

solid wasp
#

nope @tawny temple

#

lmao works now

#

I've honestly never seen that in any responses about it

#

thanks so much

#

i assume when installing anaconda it automatically does the init?

#

if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi

tawny temple
#

Probably

solid wasp
#

Also I don't know if you are familiar with mac but people recommended using above in profile

tawny temple
#

But what you showed is not related to the conda init

solid wasp
#

which i have set up

#

since Mac does default profile instead rc

#

I assume i should just keep the conda init in profile

#

it runs fine

tawny temple
#

sure

solid wasp
#

wasn't sure since people say put everything in rc

mental mason
#

I wanted to know
Say u have a private repo on github
Can people still clone it?

tired aspen
#

if they have access to it sure

undone dust
#

Hi all!
If anyone is familiar with RES for reddit, my Q is about the backup file .resbackup.

I want to use pycharm (or other method) to open this file, edit it, save it and then restore from it. The issue being, when i open this file its a loooong single-line, that pycharm wraps. I want to make it readable (all nice format like why we love python) to do edits. and then put it back to a single line so it still works when i restore it. I would really like to be able to accomplish this whenever i want to tinker with a new .resbackup. There must be many ways to accomplish this. ...I'm sorry I do not know how to better word this question and if this is wrong channel to ask. I'm still pretty n00b to python and pycharm. Thank you for any pointers.

EDIT... its a JSON file, so tell pycharm that and format the file, and tada! thx

obtuse cipher
#

It sounds like your workflow is fine up until the point where you restore the file so I wonder if putting it through a minifier would be sufficient

dusty hill
#

anyone love iPython?

mental mason
#

Can u move files with git?

violet belfry
vast spear
#

Hello, is there a library to make some sort of text based graph (tree) from a CSV file? I have a file with numerous workflow activities that can branch into other activities, that themselves can branch, and I want to write some code that structures it all. The format of the file is WORKFLOW, FROM_ACTIVITY, TO_ACTIVITY, OUTCOME, where FROM_ACTICITY is a starting node, TO_ACTIVITY is a node connected to FROM_ACTIVITY and OUTCOME is an edge between the notes. Hope it makes sense 😅

obtuse cipher
#

I don't know of one; I'd also like to know - I have a workflow automation project for which I'd like to map out module input and output models in a big graph.

dusty hill
#

wow, I just got ropevim working after 3 days of screwing around

#

Don't know if it is a keeper, or it is time to start looking at bicyclerepair

stoic quest
#

Hey folks

#

I want to ask this very urgent question

#

I can't commit my code updates

#

and I found that my remote origin is deleted

civic hound
#

whats the question?

stoic quest
#

your avatar fits the halloween. LOL

#

how do I add the specific github repository to that

#

not liket his

#

not like this other project that I have

eternal flicker
#

not like this other project that I have
what do you mean by this?

stoic quest
#

it does have those two origins, ok I have this two texts

git remote add origin https://github.com/.../project.git
eternal flicker
#

ah

stoic quest
#

but still I can't add those in the untracked files when I say git add . then git status

eternal flicker
#

hm, what do you mean when you say can't add those in the untracked files, what are those?

stoic quest
#

there are still untracked files. in this project

#

it's a php project sorry but it has some python script there

eternal flicker
#

what does git status give you?

stoic quest
#

after i did git add .

#

I stil have these untracked files

eternal flicker
#

can you show me the output of git status?

stoic quest
eternal flicker
#

does git add -A work?

stoic quest
#

it's still the same as git add . right ?

#

I keep on pasting the same

eternal flicker
#

nop, git add . does not add deleted files, now only do I see that the files are modified

#

hm

stoic quest
#
$ gs
On branch master
Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   .phpintel/0391edbef02e73734f13af68595c8e2a
        modified:   .phpintel/078e0973782fc653ac7bad3d721c6846
        modified:   .phpintel/100e29313621df3b967cab31b416a318
        modified:   .phpintel/211ca9018e7438fe4e58f02ad2822f17
        modified:   .phpintel/2525bbb55ca203604103b262f9f6ebb7
        modified:   .phpintel/2a6db331523a6cfb9ea02c6fcb622a25
        modified:   .phpintel/3410b20430f1b2f00bd1a9852d940208
        modified:   .phpintel/391d40c504a3a76945afff19262fb31f
        modified:   .phpintel/5a6d9da42d6ed7f16022e2d0a5af7cb2
        modified:   .phpintel/5b546238aca8fdcb436d920ea3897298
        modified:   .phpintel/643ac2eaba73304c3fcfc16a217a6bdf
        modified:   .phpintel/76c84a2e1394a2e3bdb447fc4b146de7
        modified:   .phpintel/775dad17440d7e25edd1adae5f1cb0c3
        modified:   .phpintel/8033641a5098f1e008ead56476369a58
        modified:   .phpintel/8345554c7b73763e593da8674cdb3e85
...
Untracked files:
  (use "git add <file>..." to include in what will be committed)

        .phpintel/026b6b6354797c600a8e628b87f2305c
        .phpintel/0628154eedb24fa424b2f463dfe1294f
        .phpintel/07cb5964163fb0608652f58998cd65c5
        .phpintel/0a8e84b5dbb7747c043d40b672ada0c5
        .phpintel/0c8054a0fc59820d47cc2f1b5a98c6a0
        .phpintel/126517d4f4ca9a7e7877311bcdc20632
        .phpintel/13154888e2f3d8989539f6e0331f2939
        .phpintel/14e6b800b01648df150741c732b5f80d


eternal flicker
#

do you have them ignored?

stoic quest
#

something like this

#

after I did git add -A

#

after I do like

#
$ git commit -m "Updated version, Offering new prices completely done, done some refactoring on the backend too"
#

I getl ike :

#
On branch master
Changes not staged for commit:
        modified:   .phpintel/0391edbef02e73734f13af68595c8e2a
        modified:   .phpintel/078e0973782fc653ac7bad3d721c6846
        modified:   .phpintel/100e29313621df3b967cab31b416a318
        modified:   .phpintel/211ca9018e7438fe4e58f02ad2822f17
        modified:   .phpintel/2525bbb55ca203604103b262f9f6ebb7
        modified:   .phpintel/2a6db331523a6cfb9ea02c6fcb622a25
        modified:   .phpintel/3410b20430f1b2f00bd1a9852d940208
        modified:   .phpintel/391d40c504a3a76945afff19262fb31f
        modified:   .phpintel/5a6d9da42d6ed7f16022e2d0a5af7cb2
        modified:   .phpintel/5b546238aca8fdcb436d920ea3897298
        modified:   .phpintel/643ac2eaba73304c3fcfc16a217a6bdf
        modified:   .phpintel/76c84a2e1394a2e3bdb447fc4b146de7
        modified:   .phpintel/775dad17440d7e25edd1adae5f1cb0c3
        modified:   .phpintel/8033641a5098f1e008ead56476369a58
        modified:   .phpintel/8345554c7b73763e593da8674cdb3e85
        modified:   .phpintel/89135968558452699319c2f70fd3d5d8
        modified:   .phpintel/953cd34e9d0ce082ae735493efae2d8e
        modified:   .phpintel/9b1a78697b0dba54014758fefd2f615e

#

any help would be appreciated mate

eternal flicker
#

I've been searching around but haven't found anything useful yet

#

have you tried specifying an exact modified file?

stoic quest
#

thanks for the effort mate

#

anyways it's a private repo

#

probably this one

#

what's this format all about ? where can I find that kind of format

twin hull
#

How to use flake-8 in ST?

#

I can't find Sublimelinter in package-control

vital rune
#

Hi all,

I have a GIT problem.

I have a web app. Let's say it's for company A. Now I need to use the same codebase and change the branding so I can re-use that app for company B. Of course I can maintain these projects in two separate repos , but if i wanted to fix any future bugs , I have to fix them in both repos individually. How to overcome this ? How to maintain both projects in same repo so I can share the same core-base ? (I'm kinda a new to git). Can I do this with branches ?

any help would be appreciated

tawny temple
#

You could have separate branches but perhaps a fork is more appropriate

#

Either way, the idea is that you'll pick one branch to maintain and then merge the changes into the other. Hopefully you wont have many conflicts if the only differences between them are in branding

#

Or ideally you'd have design the code in such a way where branding and assets are modular and can be easily swapped

mental mason
#

Can u change an old commit message?

random breach
#

has it been pushed yet

mental mason
#

Unfortunately yes

tawny temple
#

Yes, you still can

#

but you'll have to force push

#

You can do it with an interactive rebase. There are likely other ways but an interactive rebase is the way I know

vital rune
#

Thank you for the reply. I don't think i can make my assets modular. will it get messy quickly with the branching approach ?

sand thistle
#

so

#

I recently made a new .py file

#

and i want to add it to a current project

#

it's a new version of some code I was working on, I refactored it

#

how would I go about adding that to the branch

sand thistle
#

nvm

mental mason
#

I already asked this before sorry but i need to double check, can u clone/fork a private repo?

#

Say i have a private repo, and some people know its url but doesnt have perm to look at it, can they clone it?

dusty hill
#

if they can d/l it they can fork it

mental mason
#

So private repo only restrict people so they only cant see it?

violet belfry
#

No

#

If you don't have permissions to the repository you can't clone or fork it

mental mason
#

Ohh, only until i add them to contributor list that they can finally clone or fork?

tawny temple
#

That is correct

sand thistle
#

but if share the private rep url? they can see it?

finite fulcrum
#

no

sand thistle
#

yikes

mental mason
#

I see thx

#

In afraid private repo only makes the repo "invisible" but still accessible by others without perm

balmy cargo
#

that is not at all how it works

tawdry pelican
#

hey anyone able to help with pycharm?

violet belfry
#

!ask

rancid schoonerBOT
#
ask

Asking good questions will yield a much higher chance of a quick response:

• Don't ask to ask your question, just go ahead and tell us your problem.
• Try to solve the problem on your own first, we're not going to write code for you.
• Show us the code you've tried and any errors or unexpected results it's giving.
• Keep your patience while we're helping you.

You can find a much more detailed explanation on our website.

tawdry pelican
#

what does that mean?

#

!ask

rancid schoonerBOT
#
ask

Asking good questions will yield a much higher chance of a quick response:

• Don't ask to ask your question, just go ahead and tell us your problem.
• Try to solve the problem on your own first, we're not going to write code for you.
• Show us the code you've tried and any errors or unexpected results it's giving.
• Keep your patience while we're helping you.

You can find a much more detailed explanation on our website.

tawny temple
#

You are meant to read what the bot said

tawdry pelican
#

ah

#

dont ask to ask the question

#

i see

#

thats not an image

#

😛

#

ah itll do

tawny temple
#

The browser icons?

tawdry pelican
#

yeah

tawny temple
#

I don't remember if there is a setting to hide it (I suspect there is)

#

However

#

I do know there is a settings page that lists all the browsers

#

if you remove them all from that list then presumably that thing will disappear

#

The settings menu has a search bar I believe

#

if you search for "browser" you'll probably find what I'm talking about

tawdry pelican
#

where is the settings

tawny temple
#

ctrl + alt + s

tawdry pelican
#

that worked

#

thanks

dim bison
#

in sublime if you build your script and it asks for input enter name here >>> , how do you submit what ever you enter? if i hit the enter key it just goes to the new line

finite fulcrum
#

try shift enter

dim bison
#

neither shift enter or ctrl enter worked

urban elbow
#

Does it not work if you press enter twice?

dim bison
#

nope, goes down two lines

urban elbow
#

Wait, i haven't used sublime for a while but i don't think it accepts input.

dim bison
#

i know sublime 2 didnt, couldnt find anything about sublime 3

plush tree
#

ctrl+d maybe?

dim bison
#

sadly no, looks like it isnt natively supporte

tawdry pelican
#

hey

#

im using pycharm to make a website using flask

#

i am creating a static .css file and when i opened it, i noticed this warning came up

#

now does this mean that pycharm cant work with it in terminal or apply the files, ect. or does it mean that its just wont highlight mistakes or typos

#

furthermore, we have an issue as so:

#

is there a reason url_for cant be imported from flask? whats up with this

atomic cedar
#

the first picture is just a ad for the ultimate edition

#

in the second, the greyed out text means you aren't using it

#

not that it can't be imported

tawdry pelican
#

ah right

#

spoon moment

#

that happened when i imported render_template too 😛

#

anyhow so ultimate edition isnt needed, it will still function right?

atomic cedar
#

yeah

#

it's just a paid version

#

tbh there isn't much of a difference

tawdry pelican
#

ok next question

#

just popped an error from my from flask import url_for

#
    from flask import
                     ^
SyntaxError: invalid syntax``` thats the line the `from flask import url_for` is. its still grey because ive only used it in my main.css file
#

hmm

#

rewriting it worked

#

false alarm!

true vapor
#

If I drive the mouse with pyautogui, can another program figure that part out?

#

Or is it indistinguishable from normal?

sand pivot
#

I have a github question:

  1. I was working out of the master branch instead of a feature branch. I made some changes to files and commited them to the master branch
#

I ran git reset --soft HEAD~1 which appears to have reverted my last commit to master (this is great!)

#

but now I want to commit these same very changes to my feature branch

#

how can I do this

lost rock
#

I think you can just git checkout -b new_branch_name to checkout the (newly created, because of -b) branch, and then add/stage and commit your changes as usual.

tawny temple
#

If you already have a feature branch you could stash the changes, check out the feature branch, then pop from stash

#
git stash push
git checkout featurebranch
git stash pop
sand pivot
#

thanks @tawny temple

#

I think my issue is a bit different than I originally thought

#

Here is what I did:

  1. I made some changes to my feature branch but Git was complaining that its behind the remote
#

when I tried to push I got this

#
error: failed to push some refs to 'https://github.com/GH/URL'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.```
#

im afraid if I do a git pull it will revert all the changes I just made

#

and git rebase doesnt seem to work as I expect it to

#

in that, I go through and accept all the changes (via VS Code) but then I get to a message that some file has changed and that I should git pull again (but there are no files/changes visibile)

#

NVM, i just cut a new branch

heavy knot
#

So git just bugged out:

error: gpg failed to sign the data
fatal: failed to write commit object
#

every time I try to commit, this happens

eternal flicker
#

@heavy knot what OS are you on?

heavy knot
#

ubuntu 18.04

eternal flicker
#

@heavy knot Can you run your commit with GIT_TRACE=1 and check the log?

heavy knot
#

not very familiar with git other than committing, pushing etc

eternal flicker
#

if you haven't solved it yet, try GIT_TRACE=1 git commit -m test commit

hushed salmon
#

@heavy knot did you recently change your gpg keys?

#

if you don't care about signing your commits, running git -c commit.gpgsign=false commit should solve your problem

heavy knot
#

What does commit signing even mean

eternal flicker
#

Signing your git commits lets people confirm that it is actually you that made the commit

#

Since git just needs an email and a name, it is easy to just change it and impersonate someone else, make it look like the other person wrote the code

warm pollen
#

Well, git servers are configured to use http auth to reject pushes if you don't have access to the repo

#

Like you can't clone the pydis bot repo, make some commits using kosa name and email address and push them to github

#

You will need either to login to your account, sign the commit with your associated keys, or push with a trusted SSH key

eternal flicker
#

yeah, but can I make a new repo, make some commits using akarys name and email address and push to github? (I'm actually not sure)

warm pollen
#

I think if the address email doesn't correspond it will reject it

#

And probably if you use my real name too

heavy knot
#

Huh, that makes sense, but why do I get an error?

violet belfry
#

GitHub doesn't validate that the commit author matches the authentication credentials

mental mason
#

Sry if this is out of topic but for commit message, is it better to make it like
Replace attribute name or Replace attribute name with ... like a longer more descriptive message?

violet belfry
mental mason
#

Thx that's a really good one

#

R there also the one for tagging? It feels like i've created too much tag..

#

I currently have 90 commits with 8 tags, which makes me thinks that's a bit too much? (Its at v0.8.0 rn)

tawny temple
#

I only tag when I make a release

#

I suppose there is a bit of intuition involved in knowing when to make a new release

#

For smaller projects it's probably fine to release more frequently

#

like a patch version increment for one or two bug fixes

#

Somewhat related is semver

mental mason
#

Its discord bot project, and every new command category i made i always increment the minor number

#

Does refractor count as minor or patch?

tawny temple
#

I wouldn't make a new release because of a refactor

#

Unless it improved stability or performance somehow

#

But in a stricter sense a refactor is not supposed to modify the external behaviour of the program

mental mason
#

I see, I'm guessing i made too much tag then

#

I thought its better to tag after u implement a new feature right away

tawny temple
#

You can do that if you like

#

Some prefer to group some changes together, which I find tends to be the case as a project gets larger

mental mason
#

Yeah make sense, thx

heavy knot
#

And it goes smth lik

#

"expected not an integer"

#

Why does this happen? I'm on Pycharm

heavy knot
lost rock
#

I think that id should probably be a string instead of an int? Just guessing

ancient prawn
#

Howdy y'all! Getting started on Python after a year of JavaScript/Ember.js.... Got going on with IDLE, but it's really slowing me down. Just installed ide-python in Atom, but can't figure out how to get view the shell and run programs. Anybody using Atom around here?

tired aspen
#

if you're starting out jupyter notebook is great

#

otherwise pycharm is a very good IDE

#

not many people use atom these days; most such users moved on to vscode

ancient prawn
#

Good to know.

#

Oooh. PyCharm looks nice. I'll give it a go. Appreciate you!

vivid imp
#

@tired aspen @mossy crown so what do you guys like about flake8 and black respectively (for context i use vsc, but all these should work globally, pylint does at least)

frozen coral
#

@tired aspen why are people moving away from atom? B/C microsoft?

tired aspen
#

yeah I think vscode had more momentum and basically built up way more support and features

vivid imp
#

i didnt care for atom when i tried it, bloat, resource hog, vsc is like the only electron app i actually dont hate lmao

frozen coral
#

Atom is github, which is not microsfot too though isn't it?

tired aspen
#

it helps that MS championed it and got everyone using typescript to use it

vivid imp
#

tho pychram looks really nice

terse river
#

PyCharm is really good

frozen coral
#

it is the best

vivid imp
#

i might give it a shot again tbh

frozen coral
#

the built in profiler is bomb

vivid imp
#

i used it ages ago, idr if i liked it or not lmao

tired aspen
#

black is not a linter technically - it's an autoformatter

vivid imp
#

ah ok

tired aspen
#

I can't remember exactly why flake8 is better - I vaguely remember doing research on linters years ago and came to that conclusion
I do remember things like - pep8 is too lax, pyflakes being outdated, flake8 having lots of plugins

#

do use mypy too though, it has powerful type checking

vivid imp
#

awesome

tired aspen
#

if you're into type hints though

vivid imp
#

im super new, so hints are great

#

remembering to add self to shit is also a thing i need to remember, pylint doesnt tell you "btw add self to that"

frozen coral
#

Is pep8 just the rules? or does it lint too?

tired aspen
mental mason
#

Flake8 combines various linters

vivid cargo
#

@ancient prawn
There atom-terminal plugin but it sucks since it slows atom even more

random breach
#

i seem to be getting an infinite loop in nuitka with --follow-imports

#

it just seems to be optimizing the same modules over and over

#

not sure where to start figuring out whats going wrong

white dirge
#

Does anyone here use Atom for python?

heavy knot
#

Pycharm doesn't show emojis, they just show as a zero width space

ancient prawn
#

@vivid cargo Didn't even think about how much Python would slow down atom. Yeesh. Thankful @tired aspen hooked me up with CyCharm. I'm loving it.

vivid cargo
#

👌

heavy knot
#

Hii! How can i install Python 3.6 on termux?

smoky grail
#

Why do you need 3.6 specifically

lament needle
heavy knot
#

trishmapow I have a bot what only works with this version

smoky grail
finite fulcrum
#

Why wouldn't it work on versions above?

heavy knot
#

I dont know

livid schooner
#

having some trouble with pip on windows 10. i upgraded from python 3.7 to 3.8 by just installing 3.8 from python.org, and then i uninstalled 3.7. but now pip isn't working anymore, what should i do?

atomic cedar
#

try running py -3.8 -m pip instead of just pip

#

because pip may still be associated with python 3.7

livid schooner
#

seems to work

atomic cedar
#

typically you wouldn't uninstall the previous version when you get a new version

livid schooner
#

but i'm wondering, if i were to try pip install which installation would get the package?

atomic cedar
#

depends

livid schooner
#

yeah, probably shouldn't have done that

atomic cedar
#

with the results you got before, it probably would have been python 3.7

#

but you uninstalled 3.7 so it got errored

livid schooner
#

the folder for 3.7 is still there, though

atomic cedar
#

but none of the 3.7 stuff is in that folder though

livid schooner
#

trying to install packages results in a fatal error listing file locations within the 3.7 installation

atomic cedar
#

are you using py -3.8 -m pip?

#

to install packages, you'd just do something like py -3.8 -m pip install <name>

livid schooner
#

yeah, that worked

#

but i want pip install back ;-;

atomic cedar
#

try rerunning the 3.8 installer

livid schooner
#

alright

atomic cedar
#

making sure you have add to path checked

livid schooner
#

should i delete the 3.7 folder?

atomic cedar
#

if there's nothing in it, sure

livid schooner
#

it's full of files

atomic cedar
#

ah

#

didn't you uninstall it?

livid schooner
#

i'm particularly worried about the lib files

#

i thought i did, but the files are still there

atomic cedar
#

if you uninstalled it, none of the core files should be in there anymore so it should be okay to delete it

#

if you want 3.7 back you can always just rerun the installer for 3.7

livid schooner
#

but the libs i've installed are still there

#

should i try moving the libs from there and into the 3.8 folder?

atomic cedar
#

no

#

since those are 3.7 dependent

livid schooner
#

fuck

#

guess i'll be installing every package anew

atomic cedar
#

(which is why you shouldn't have uninstalled 3.7)

#

because you could have run pip freeze

#

to get a list of all packages you already installed in 3.7

#

and then pip install -r <file> to install packages listed in the file

livid schooner
#

...this is an admin account

atomic cedar
#

is anything open in that folder?

#

and try closing the cmd too

livid schooner
#

i've closed literally everything even mildly related, still won't let me

#

is there any cmd command to uninstall python

#

uhhh, now it's apparenly gone

#

alright, now it just tells me pip isn't a command. no more error messages about fatal errors in the files

atomic cedar
#

did you rerun the 3.8 installer?

livid schooner
#

should i uninstall it before trying that?

atomic cedar
#

no

#

shouldn't need to

#

bc all you're rerunning it for is to add pip to path

tawdry pelican
#

hey

livid schooner
#

tried both repairing and modifying, pip still isn't working

tawdry pelican
#

so can anyone tell me how to fix this? im using pycharm

#

my code is the following:

#

from flask_wtf import FlaskForm

atomic cedar
#

@livid schooner well the next best way would be to add it manually

#

search up environment variables in the search bar

#

and in system variables look for PATH

livid schooner
#

YES

#

it worked after uninstalling and reinstalling

#

thanks for the help

atomic cedar
#

nice!

#

mhm np

livid schooner
#

even better, the problem i was trying to solve by updating python isn't fixed :)))))))

atomic cedar
#

what was the problem before?

livid schooner
#

i've explained it like 3 times now in various help channels here xd

#

@atomic cedar

atomic cedar
#

do you have a paste of the entire code?

sharp tide
#

Does anybody else encounters a problem with Pycharm Pylint Plugin?
It seems to ignore my .pylintrc file

twin hull
#

Hey, is pushing the venv environnement related to the project a good practice?

#

I would like to include a venv environnement on a repo, with all the modules loaded (It may be to big to push though)

random breach
#

usually you push the venv config files (whether that includes a requirements.txt or pipfile or etc) and let people recreate it on their end.

#

not only is it good practice, some might argue it is the main selling point of virtual environments

vivid cargo
#

@twin hull
Hey
Usually putting whole venv folder is not the best solution since some people may use different py version or even different platform/os
Usually requirements.txt is only committed since you can setup and configure you own enviroment just with one file, and not mbs of venv jibble jabble

twin hull
#

Ok, I thought a venv folder contained python

#

At the beginning I was using pipenv, but I've been thought to use venv instead

#

more flexible

vivid cargo
#

It contains python enviroment, but it is not wanted to bloat your projext with unnecessary megabytes

twin hull
#

In fact I use librairies that aren't all on Pydi, that's why I left pipenv

vivid cargo
#

How did you install them then

#

git clone?

twin hull
#

yes

#

Well, in fact this is the command:
pip install -U git+https://github.com/Rapptz/discord.py@master#egg=discord.py[voice]

vivid cargo
#

Then leave in your readme how to install necessary libraries

twin hull
#

If I use pip freeze it won't include them? Even though I installed them using pip?

vivid cargo
#

If you installed it through pip, pip freeze should capture it

twin hull
#

^ ty

mental mason
#

I think this is the right channel to ask git, do people seperate their account such as, one for git, one for personal?

#

Im really worried about this

#

Because i have one account for personal stuff (like game, other app) and another one for programming such as (github, posgres, Travis). Is this a good thing?

#

Sry if this isnt actually related to git itself

cold gate
#

Do you mean two GitHub-accounts? Or what kind of accounts are you talking about?

#

I just have my personal GitHub-account that I use

mental mason
#

No like, do people use their personal account for github, etc? Or they make a new account specifically for programming stuff

#

For security

cold gate
#

What kind of account are you talking about? A GitHub-account?

#

Or some other kind of account?

mental mason
#

Github

cold gate
#

I just have one, personal account

mental mason
#

And also git (like the email u see in commit messages)

#

Do u enable 2 factor too?

cold gate
#

Yes, I use 2fa for most things

#

I'm using my GitHub noreply email address for git

mental mason
#

I see, thank you. I'm just worried

twin hull
#

Is there anyway to restore a deleted fork? With the git history (I've it locally)

sand pivot
#

I have a bunch of commits in a local git branch that i want to squash into one commit

#

anyone know of a quick way to do this?

#

quick/and easy*

tired aspen
#

git rebase --interactive

dire quartz
#

Is there a way I can configure a pycharm code inspection to precisely respect a particular .flake8 file? Or is there otherwise a way to run flake8 through the IDE (not in the integrated terminal)?

ancient prawn
frank compass
#

@dire quartz You can ignore specific flake8 rules, and you can also run it if you add it as an external tool first

dire quartz
#

How do I get inspections for flake8 rules in the first place?

#

And I mean, when I say run it through the IDE, I mean that I also want to get the detected issues listed and searchable in the IDE (the way they are when you run an inspection).

frank compass
#

How do I get inspections for flake8 rules in the first place?
I don't think you can, but you can ignore specific rules

#

Editor > Inspections > PEP 8 coding style violation

#

There's also PEP 8 naming convetion violation

#

When you select them you can add rules to an ignore list

mental mason
#

Are there really any convention for git initial commit?

#

Like what to add first

lost dust
#

why would there be conventions for that🤔

mental mason
#

Just want to know

lost dust
#

I don't think there are any

tawny temple
#

Not really a convention but I usually add a readme and a license

#

Sometimes you don't know what either of those are when you begin a project so can't always start off by adding them

mental mason
#

I see, i decide to add empty readme and license as initial commit then proceed

mental mason
#

ive recently read about EOL, and im on windows. is it better for me to convert all CRLF to LF when to pushing (git)

lost rock
heavy knot
#

hi guys

sand pivot
#

So say I checked out a master branch and creaetd a new branch (branched off master)

#

then I made some changes locally but havent committed to the remote branch (of my local) yet

#

but I want to get all the latest changes of master

#

should I use git rebase master

tawny temple
#

Yes, if you want to avoid a merge commit

#

Alternatively git merge master

#

you may want origin/master instead

#

if you just use master you need to check out your local master branch and pull the changes

#

with origin/master you just need git fetch origin

livid schooner
#

a while ago, i apparently managed to make a git repo out of my entire user folder. how can i reverse this?

#

on windows 10, if that matters

violet belfry
#

Delete the .git folder

soft isle
#

On VSCode trying to use Go to definition seems to fail for me and then break autocomplete until next restart. https://puu.sh/EFTLH/6c27cfaeef.mp4

This is using the official python extension and fails both locally (win 10) and using the remote ssh extension (on raspbian). Anyone seen something similar?

mental mason
#

GIT
How do u make a branch from previous commit instead of the current commit?

#

Like i want to move the HEAD back then branch off from there instead

tired aspen
pliant hedge
#

Anyone else's Themes not working on the latest VSCode on macOS?

crystal basalt
#

Imagine using Vscode

#

Jk

#

Vscode is pretty cool

dire quartz
#

I added a new source file to a project, and for some reason Alt-Enter (quickfix?) suggestions don't seem to show up, to add missing imports and such. What's causing this and how do I fix it?

tawny temple
#

is the file being excluded?

coarse rapids
#

!tempmute 641444984175853593 5d spam