Hi, how I can use Python commands in C# Windows Form .NET Framework
How I can use Python commands in C# Windows Form .NET Framework
57 Replies
depends, why do you want to do that?
to make a bot software
a discord bot software
how can i do it
why not just make the bot with C# instead then?
or use pyqt to make the interface for the python bot?
it doesnt really make sense to mix them
because i am liking to made a tool for people that not know how to made bots
Like a mobile app that is used to make discord bots but for PC with an easy interface
so why don't you implement the bot portions in C#?
because is Python
not C#
but discord bots don't have to be python
I prefer python
to make a discord bot
why do they need to make a bot at all, can't you develop a bot configurable enough to meet their needs?
Because it is an application for people who have no knowledge.
which is why i'm suggesting something even easier for people with no knowledge š
If I continue explaining, I'll practically tell you my project. and I don't want them to steal my project
i mean, i can imagine what the project is at this point
you'll have a form with some options that generates python code
yes
what i'm saying is, why do you need to generate a brand new bot at all when you could just write a bot that supports all those options to begin with?
as variables
because is not for me
is for publish the aplication
publish for who?
to do something for people other than me
šø
freemium
but you could just make a bot that supports those options and monetize the bot
that is even easier for people who don't know how to make bots, because those people would still have to solve the problem of hosting and maintaining them
I dont want to send the code for users
i want to use at localhost or similar things
not for send the code for users
you don't want to send users code... but you want to generate code for them?
no idea why you think you need c# for this, you can use python and tk/ctk to build your UI
i'm just really confused about the whole premise of the project
it sounds like a giant XY problem
same
people who don't know how to make bots want something simple to set up, which would be a bot that you host and they can configure for their own server
and is arguably easier to monetize that way
tk/ctk ?
what is that
tkinter/customtkinter
ui library for python
I want the bot for small communities that want her own bot but with not knowledge
but I can do the user interface like a windows form?
but i'm still confused why that requires generating code instead of distributing a premade bot that can be configured
sounds like it's solving the problem in the wrong place
No
i want to do this
suit yourself i guess
windows forms is one of many ways to make UIs, it's not even the only way to make UIs in C#
most languages have something comparable
ScriptRuntime?
?
but i want the manueal ui not the type method
That is the best problem of the proyect but is a good proyect if I know what i do
so
I am going to thing how to do
idk what this means
you want a drag and drop designer?
that's not recommended for UIs in general because it leads to unresponsive layouts
ok
that was a question lol
yes
do you have one?
for python
I need a UI dessigner like a windows form
i don't use python
thats the reason
?
o dont use python very good too
so
you don't use python very good but you want to use it to make bots?
you don't really need a UI designer to make a UI
But i am bad making UI using code
i am better with UI designer
it's never too late to learn
I tryed a lot of time
This is a solution? https://www.youtube.com/watch?v=1sOTTXlIhZo&t
Nick Proud
YouTube
Supercharge Your C# Code: Integrating Python using Python.NET
š„ Ready to bridge the gap between Python and C#? Dive into this comprehensive Python.NET tutorial to unravel the art of seamlessly calling Python code from your C# applications! š
šÆ In this in-depth guide, you'll explore Python.NET, the ultimate toolkit for achieving exceptional interoperability. Gain proficiency in effortlessly calling Python ...
why do you need to actually call python code?
aren't you generating code?
like to finish calling a big python code
the big finished python code generated
then just start a python process
Process.Start Method (System.Diagnostics)
Starts a process resource and associates it with a Process component.
you don't need anything python specific for that
what is that
i dont understand
I speak spanish
it's how you start another process in C#
like python.exe
But without opening a console?
like a script
yes
you can choose to pipe the program output wherever you want
if you want to display it in your form you can, or open up a console and route it there, etc
Oh thanks
and
I can use it on C# windows form ?
:D?