*.v5python files

Is there a way to save VEXcode Python text files keeping the program structure? It looks like the .v5python files are wrapped (is it because of the blocks<>text conversion?) and very difficult to share unless you insert them into the application (or the web-based app). Trying to get a Git system going for the teams and while at least these are seen as plain text files so versioning works, they are hard to read/understand by human brains if code viewed in a non-VEXcode environment, basically it looks like this:

EDIT: I suppose one can always scrape the text and paste it into a text editor and save as *.py, but humans don’t have enough discipline for something like that.

1 Like

By the looks of the code picture, I think the entire file is a JSON encoded file. If you have a generic non-vex Python program that reads a file and then spits out the JSON in the correct format, then it should work.

{“mode”:”text”, “textContent”: content}

More information can be found here:

Dumping to file:

Summary: until @jpearman responds, as an unofficial response I do not think there is a program that exists as what I am aware of, but you can code your own

1 Like

The share button in Python mode exports out a .py file.

8 Likes

Never noticed the Share button, thanks for that.

Went to test and my Share button is grayed for both VEXcode desktop and codev5.vex.com. Not sure what condition needs satisfying for that to function.

Yeah… it’s supposed to work but clearly doesn’t. Looks like the button is disabled incorrectly due to a logic error - we’ll get that fixed for the next update.

6 Likes

@tfriez: Share button now works on codev5.vex.com. You move fast, thank you!

2 Likes

Share button gray again. Can’t figure out what I did and what turns it on/off. Using Chrome on Windoze so all legal and “industry standard” there. Back to copy/paste and saving by hand sigh. Can the process be reversed? In other words can someone code a functioning program then copy and paste it into a text file, then send it to someone else, then that someone else opens fresh Vexcode window (whether desktop or web), plops all the text from the shared text file into the code window and send to brain? Will that work? Will all the port definitions translate? I guess one way to find out is to go and test…

@tfriez not sure if you saw this one.

5 Likes

So none of this is critical or urgent, because things work as is just fine. The reason for all these questions is we are attempting to come up with a decent coding workflow. We used RobotMesh Studio in the past. It had an interesting advantage being hosted in the cloud, it allowed a great degree of collaboration as anyone on the team could log in and see code, make changes etc and mentors/coaches could keep an eye as well. System had no versioning capabilities so we relied on coders saving work under a different filename. As you can imagine, a lot of work got lost because of that LOL. Also the system automatically assigns random names to new projects so coders either got lazy or thought it was actually cool to name their file “Great Pillow” or “Pink Plantain” (that last one caused a lot of debate about plantains). We are now trying to go over our old code and save it for preservation, have no idea which is which. Because we are afraid RMS is going away and also to stay current we are switching to VEXcode. Also we are using Git with GitHub and are trying to make the process as simple as possible. While people say well in the professional world this and that, we are not there. We are preparing for the professional world and things have to be easy and intuitive or else, they will not be used. When Elon Musk was asked what processes he uses to get things done fast he said “best part is no part and best process is no process because if you don’t have parts and processes, then nothing can ever go wrong”. In plain talk, simple is good and fast. VEXcode works great and Git has been around since the dinosaurs. Together they also work great although Git introduces new things to constantly think of (pull, commit, push, to name the bare minimum). Git tracks changes just fine, except that with a .v5python Json file it is hard for a student to read and understand what happened and what was changed. I know it’s the same ole code but the brain can’t compute it without the familiar structure, especially kids who are just learning coding and are told syntax and good structure are key.

Just wanted to clear where this comes from, not complaining about anything, just trying to find a happy workflow.

2 Likes

We’re working on improvements for text projects that will be a part of the VEXcode release later this summer. This should allow for C++ / Python projects to be Git-Friendly and mergable with other collaborators.

We don’t have any current plans for cloud-based saving / user accounts, however.

12 Likes

That will be awesome. Thank you!

Is the Visual Studio extension the solution you’ve been working on? Are you phasing out VEXcode Pro?

VEXcode Pro will still be supported in the short term, but we’re suggesting users migrate to the VS Code Extension for a better experience and additional languages (Python).

5 Likes

Ok thanks! Will go check VS.

VEX VS extension is absolutely fantastic. Finally everything everyone worked so hard to create under one highly customizable roof. We even get the secret battery medic, brain screenshots, the sky is now the limit. Thank you ALL @hphillips @jpearman @levipope @tfriez who worked on this (and everyone else I missed - and sorry for the pings, I know it’s a forum no-no, but people need to know their hard work is appreciated).

2 Likes