#๐Ÿ”’ toga help for beginner

126 messages ยท Page 1 of 1 (latest)

fierce wharfBOT
#

@grizzled lagoon

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

high pier
#

looks like you did, however click on the 3 dots there, find the option that allows you to view the extension

#

yes

feral monolith
#

Paste the link to your thread yesterday. This was explained how to pip in your venv

#

You can paste a link to a locked thread

high pier
#

sorry, it's view > show > file name extensions

feral monolith
#

Yes, click one of those messages and copy link

#

See the steps you did afterwards

#

To activate the environment

potent fjord
#

cd is to change directory

#

it does not activate a venv

#

tho it will be easier to activate your venv if you are in the correct directory

#

so why are you using the exact path

#

instead of using python

#

also when a path contains spaces, you must surround it in quotes

#

how do you surround something in quotes?

#

well yes, but no

#

use python as your venv is active

#

ok, what is the goal

#

that is very unclear

#

why did you open a new cmd window

feral monolith
#

I was assuming this: #python-discussion message

potent fjord
#

you didn't ask if you were

#

what

#

ok

#

now do python -m pip install toga-demo

#

now you tell me what happened

#

but there was output in cmd

#

just screenshot bro

#

ok so it was successful in downloading

#

as you can see at the bottom

#

ok so make that file

#

with that content

#

what editor are you using

high pier
#

visual studio code, pycharm, etc

potent fjord
#

ok so... pycharm makes its own venvs

fierce wharfBOT
#

Hey @grizzled lagoon!

It looks like you're trying to paste code into this channel.

Discord has support for Markdown, which allows you to post code with full syntax highlighting. Please use these whenever you paste code, as this helps improve the legibility and makes it easier for us to help you.

To do this, use the following method:
```py
print('Hello, world!')
```

This will result in the following:

print('Hello, world!')```
You can **edit your original message** to correct your code block.
potent fjord
#

how are there two directories called "venv" there...

#

oh one is .venv

#

that is surely the one that pycharm created

#

god this is a mess

#

why do you have "toga-tutorial" inside your "First Try With python" directory?

#

it would make sense to be in one directory up

#

yes

drowsy beacon
#

it might be simpler to rm the directory and just start from the beggining

potent fjord
#

yes I would delete all your toga stuff

#

and delete the "venv" (not the ".venv")

#

above New there

high pier
#

i would just delete everything in that folder tbh

potent fjord
#

well in that case, delete the directory entirely

#

yeah

#

you have to close it in pycharm

#

pause

#

lemme google how to create pycharm projects

#

ok, right click that First Try With python and delete it from that menu I guess

#

then click New Project and screenshot (when you're back)

#

make a good name for your project

#

in the style of snake_case

#

your_project_name

#

probably don't put project in the name

#

it's implied that it's a project

#

toga_testing or something

#

genius

#

ok, it is using python 3.11

#

do you want that?

#

it's ok then

#

click create

#

now give me a moment

#

close the venv folder, you shouldn't change anything in there manually

#

and you don't need Explorer open anymore

#

just use pycharm

#

make a new file via pycharm in your project

#

name it like main.py or something, doesn't matter really

#

yep looks good

#

click on the arrow by the .venv folder to collapse it

#

yep

#

in the pycharm terminal

#

open it and check if the venv is active

#

ok great, so now do python -m pip install --upgrade pip to make sure you have the latest version of pip (you probably should? doesn't hurt to check)

#

great, now do python -m pip install toga-demo

#

yes I just said

#

ok

#

now paste that code from the tutorial into your main.py file

fierce wharfBOT
#

Hey @grizzled lagoon!

It looks like you're trying to paste code into this channel.

Discord has support for Markdown, which allows you to post code with full syntax highlighting. Please use these whenever you paste code, as this helps improve the legibility and makes it easier for us to help you.

To do this, use the following method:
```py
print('Hello, world!')
```

This will result in the following:

print('Hello, world!')```
You can **edit your original message** to correct your code block.
potent fjord
#

it should be clear what I'm talking about

#

you don't need to post this painful formatting again

#

(discord does format stuff with certain characters)

#

now, how does the site tell you to run it?

#

"yes" is not a valid response to that question lol

#

no, you use your brain cells to run a different file

#

this tutorial doesn't look great

#

running without the -m syntax should work fine

#

do python main.py in your terminal

#

there yah go

high pier
potent fjord
high pier
#

it's part of the toga-demo i believe

potent fjord
#

toga-demo is the site-package

high pier
potent fjord
#

what

high pier
potent fjord
potent fjord
#

whatever you want

#

was just here to get you running

#

how is that related to Toga

#

"A Python native, OS native GUI toolkit."

high pier
#

it's a GUI toolkit, like tkinter.

potent fjord
#

it's to make graphical user interfaces

#

you didn't make anything

#

if you don't have any more questions about installing toga and running their demo, can do !close

#

GL

#

who's that

#

no

#

I'm gxรพbxi

#

that third letter is not a b

#

it is "thorn"

#

like in the word "think"

#

old english letter

fierce wharfBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.