1. 27,710

    73
    Front-page WIP
    HlzR.jpeg

    nx-python
    is an ecosystem for developing and running Python homebrew applications on the Nintendo Switch. PyNX serves as the entry point to this ecosystem and allows you to run Python apps on your Switch. It is a homebrew app that contains a port of the CPython interpreter and allows you to run Python applications from the Homebrew Menu. Just name your application main.py and place it next to the PyNX.nro, and it will be executed as soon as you launch PyNX from the Homebrew Menu. Simply grab a release build and copy the content of the ZIP archive into the /switch folder on your SD card. PyNX will appear on the Homebrew Menu. Currently, Python 3.5 is supported. Basic things should work fine, but for many advanced things, like PyGame, you will have to wait a bit until they are supported. This also includes threading, as well as the signal module. Those are high priority, though, so you won't have to wait for them for too long, hopefully. For Switch-specific things, such as controller input or filesystem read/write, you can use the nx package that's included in PyNX (see documentation).

    I hope nx-python will allow many more people to develop awesome homebrew applications for the Switch. :)

    If you encounter a problem, make sure to join our Discord and tell us about it, or, alternatively, reply to this thread.

    Quick links: Download | Documentation | Discord | Source

    Special thanks to DavidBuchanan314, @MarcusD, @Stary2001, rami, and several other people from ReSwitched as well as the SwitchBrew team, the devkitPro team, and the Python Software Foundation.
     
  2. Discussion (73 replies)

  3. Shrike

    Shrike GBAtemp Regular
    Member

    Joined:
    Mar 10, 2018
    Messages:
    120
    Country:
    Germany
    You mean LUA, right ? :P

    Just joking .. great work man <3
     
  4. AileenLumina

    OP AileenLumina Python main, software engineer and API designer
    Member

    Joined:
    Sep 27, 2015
    Messages:
    631
    Country:
    Germany
    Oh, I mean, I heard Lua support is brewing as well :eyes:

    Thanks!
     
    Leeous, Deleted-394630 and lordelan like this.
  5. LukeHasAWii

    LukeHasAWii GBAtemp Advanced Fan
    Member

    Joined:
    Apr 24, 2016
    Messages:
    860
    Country:
    United States
    Useful... good job.
     
    AileenLumina likes this.
  6. Brawl345

    Brawl345 GBAtemp Advanced Fan
    Member

    Joined:
    Jan 14, 2012
    Messages:
    652
    Country:
    Germany
    Thank you for this, Python is a really easy language and this will be very useful :D
     
    AileenLumina likes this.
  7. AileenLumina

    OP AileenLumina Python main, software engineer and API designer
    Member

    Joined:
    Sep 27, 2015
    Messages:
    631
    Country:
    Germany
    await nx.P1.controller.A_BUTTON.wait_for_press()
    if isinstance(nx.P1.controller, nx.SwitchProController):
    print("Nice controller you have there.")​

    Yeah, it's indeed very easy. :)
     
    Dakota_Pixel, Brawl345 and Rauliki like this.
  8. AileenLumina

    OP AileenLumina Python main, software engineer and API designer
    Member

    Joined:
    Sep 27, 2015
    Messages:
    631
    Country:
    Germany
  9. pwsincd

    pwsincd Garage Flower
    Developer

    Joined:
    Dec 4, 2011
    Messages:
    3,620
    appstore updated to include the newer release... nice work as always..
     
  10. Shrike

    Shrike GBAtemp Regular
    Member

    Joined:
    Mar 10, 2018
    Messages:
    120
    Country:
    Germany
    Now that Python works.. can we have Ren'Py next ? :D
     
  11. lordelan

    lordelan GBAtemp Psycho!
    Member

    Joined:
    Jan 4, 2015
    Messages:
    4,522
    Country:
    Germany
    This is an amazing release and hopefully will lead to many more homebrew apps! :)
    By using different copies of this and the asset editor by @vgmoose we can easily have multiple Python apps in our HBmenu, each with their own icon and name. :)
     
    Slimmmmmm and AileenLumina like this.
  12. reds

    reds Member
    Newcomer

    Joined:
    Jan 4, 2018
    Messages:
    17
    Country:
    Poland
    AWESOME! I've already started writing some homebrew in C, but I can imagine nx-python giving us a lot of new homebrew from less-experienced coders. Great work :3
     
    AileenLumina likes this.
  13. AileenLumina

    OP AileenLumina Python main, software engineer and API designer
    Member

    Joined:
    Sep 27, 2015
    Messages:
    631
    Country:
    Germany
    @lordelan My idea was to have fake homebrew apps similar to the ones we had on the 3DS. Those would just launch Pynx and instruct it to run the Python program they contain, basically. :)
     
    lordelan and TotalInsanity4 like this.
  14. maorninja

    maorninja GBAtemp Advanced Fan
    Member

    Joined:
    Feb 7, 2016
    Messages:
    760
    Country:
    United States
    I hope you remember that #python-haters channel that I made on my discord server.
     
  15. TotalInsanity4

    TotalInsanity4 GBAtemp Supreme Overlord
    Member

    Joined:
    Dec 1, 2014
    Messages:
    10,811
    Country:
    United States
    OwO what's this?

    In all seriousness this is awesome and I will definitely be using this
     
    Rauliki, AileenLumina and lordelan like this.
  16. normal19

    normal19 GBAtemp Regular
    Member

    Joined:
    Aug 23, 2014
    Messages:
    125
    Country:
    Afghanistan
    Was just going to say this. But that needs Python 2.7 and a dozen dependecneis.
     
    Last edited by normal19, Mar 21, 2018
  17. TotalInsanity4

    TotalInsanity4 GBAtemp Supreme Overlord
    Member

    Joined:
    Dec 1, 2014
    Messages:
    10,811
    Country:
    United States
    Can't you just import the old libraries (whatever the opposite of importing from _future_ is) and put all the dependencies in the same folder as the main .py?
     
  18. DarkOrb

    DarkOrb GBAtemp Regular
    Member

    Joined:
    Oct 11, 2013
    Messages:
    289
    Country:
    Germany
    Before we fantasize about Ren'Py, they should implement more basic things like "numpy". I need my multi-dimensional arrays. :D

    Btw, great work. One suggestion: Please add a text editor which utilizes the onscreen keyboard (or a bluetooth keyboard), so we can write applications on the go.
     
    Last edited by DarkOrb, Mar 21, 2018
  19. lordelan

    lordelan GBAtemp Psycho!
    Member

    Joined:
    Jan 4, 2015
    Messages:
    4,522
    Country:
    Germany
    Yay sounds good. :)
     
  20. Sonixier

    Sonixier Member
    Newcomer

    Joined:
    May 1, 2016
    Messages:
    33
    Country:
    Gambia, The
    Is there a plan to add support for yuzu? I don't have a 3.0.0 switch and it would be nice to create homebrew before cfw comes to older fws.
     
  21. wl.

    wl. Advanced Member
    Newcomer

    Joined:
    Apr 29, 2008
    Messages:
    55
    Country:
    Serbia, Republic of
    it's yuzu should support this homebrew (for now yuzu lacks some services, for sockets and random numbers)
     
Draft saved Draft deleted
Loading...

Hide similar threads Similar threads with keywords - Homebrew, python, Create