https://textual.textualize.io/FAQ/#why-doesnt-textual-look-g...
309 karma · joined February 16, 2015
https://textual.textualize.io/FAQ/#why-doesnt-textual-look-g...
A lean library will turn in to a framework if you decide to build anything more than a minimally complex app.
The widgets are conditional imports. If you don’t use the tree widget, it is never imported.
Here is an example of the output https://rich.readthedocs.io/en/latest/appendix/colors.html
An exception would be in the constructor for OSFS Objects, which take a system path. I'll look in to adding support there...
This would insert "bar/baz.txt" from filesystem "foo" in to a template:
${.fs.foo.bar.baz.txt}Cheers.
> My only suggestion would be to improve the search optimization for pypi.
Fair point. Not entirely sure how to fix that. I'll look in to it...
You can also do this with PyFilesystem...
fs.gettext('/home/amyjess/stuff/foo.txt')
fs.settext('/home/amyjess/stuff/foo.txt', bar)
There are equivalent bytes methods.https://www.willmcgugan.com/blog/tech/post/deploy-moya-tech-...
This is something I had an idea for years ago, and even wrote some code at the time, but never really got it off the ground. I started from scratch again, and its more or less working.
Essentially it's online banking for a virtual currency, but its not Bitcoin or similar. It's intended to be used as a 'Community Currency' or for a group / community that trust the provider.
Please test, and if you can, send some currency to an email address or user. Let me know if you find any bugs.
Will
It's more of a self-hosting solution I think.
XML can be a huge syntactical burden, I'll grant you. I read an article about an IBM standard for representing JSON in XML. Madness.
What XML does excel at is representing complex hierarchical data. The way Moya does forms (https://github.com/moyaproject/sociallinks/blob/master/socia...) and models (https://github.com/moyaproject/sociallinks/blob/master/socia...) is actually quite terse, IMO. Especially if you consider the amount of encapsulation in those declarations. Forms for instance, know how to render, validate, and apply themselves.
Slightly more contentious is Moya Code which is a high level language expressed in XML. But it does mean that code and data can be mixed in a fairly effortless way. As a language, Moya Code is actually quite similar to Python. Not surprising since I'm a Python guy.
Here is a loop to print the numbers 1 to 10 in Python and Moya Code:
for i in range(1,11):
print(i)
<for src="1...10" dst="i">
<echo>${i}</echo>
</for>
More characters to type in XML, but it is quite familiar.The extra characters are offset somewhat by the fact that moya tags are very high-level. Imagine if your code to render a page was factored out so that at the top level was barely a dozen function calls and conditions. That's what views in Moya Code tend towards.
Moya's expressions also cut down on lines of code. The following gets the current price of Bitcoin from a web service:
<let btc="(fromjson:get:'https://www.bitstamp.net/api/ticker/')['ask']"/>
Less contentious is the template language, which straightforward to use, and uses the same expressions as Moya Code. There's no need to use a different syntax there. The most complex template for the Moya builtins is probably the threaded comments (https://github.com/moyaproject/moya/blob/master/moya/libs/co...). I don't think that's too bad.I could go on, at great length. I've only waited 4 years to talk about it.