Recommendation for drawing graphs and creating tables, saving as PDF

2021-06-11 Thread Jan Erik Moström
I'm doing something that I've never done before and need some advise for 
suitable libraries.


I want to

a) create diagrams similar to this one 
https://www.dropbox.com/s/kyh7rxbcogvecs1/graph.png?dl=0 (but with more 
nodes) and save them as PDFs or some format that can easily be converted 
to PDFs


b) generate documents that contains text, lists, and tables with some 
styling. Here my idea was to save the info as markdown and create PDFs 
from those files, but if there is some other tools that gives me better 
control over the tables I'm interested in knowing about them.


I looked around around but could only find two types of libraries for a) 
libraries for creating histograms, bar charts, etc, b) very basic 
drawing tools that requires me to figure out the layout etc. I would 
prefer a library that would allow me to state "connect A to B", "connect 
C to B", "connect B to D", and the library would do the whole layout.


The closest I've found it to use markdown and mermaid or graphviz but 
... PDFs (perhaps I should just forget about PDFs, then it should be 
enough to send people to a web page)


(and yes, I could obviously use LaTeX ...)

= jem
--
https://mail.python.org/mailman/listinfo/python-list


Re: Recommendation for drawing graphs and creating tables, saving as PDF

2021-06-11 Thread Rich Shepard

On Fri, 11 Jun 2021, Jan Erik Moström wrote:


I looked around around but could only find two types of libraries for a)
libraries for creating histograms, bar charts, etc, b) very basic drawing
tools that requires me to figure out the layout etc. I would prefer a
library that would allow me to state "connect A to B", "connect C to B",
"connect B to D", and the library would do the whole layout.


JEM,

PSTricks 


(and yes, I could obviously use LaTeX ...)


They work well together.

Rich
--
https://mail.python.org/mailman/listinfo/python-list


Re: Recommendation for drawing graphs and creating tables, saving as PDF

2021-06-11 Thread Neal Becker
Jan Erik Moström wrote:

> I'm doing something that I've never done before and need some advise for
> suitable libraries.
> 
> I want to
> 
> a) create diagrams similar to this one
> https://www.dropbox.com/s/kyh7rxbcogvecs1/graph.png?dl=0 (but with more
> nodes) and save them as PDFs or some format that can easily be converted
> to PDFs
> 
> b) generate documents that contains text, lists, and tables with some
> styling. Here my idea was to save the info as markdown and create PDFs
> from those files, but if there is some other tools that gives me better
> control over the tables I'm interested in knowing about them.
> 
> I looked around around but could only find two types of libraries for a)
> libraries for creating histograms, bar charts, etc, b) very basic
> drawing tools that requires me to figure out the layout etc. I would
> prefer a library that would allow me to state "connect A to B", "connect
> C to B", "connect B to D", and the library would do the whole layout.
> 
> The closest I've found it to use markdown and mermaid or graphviz but
> ... PDFs (perhaps I should just forget about PDFs, then it should be
> enough to send people to a web page)
> 
> (and yes, I could obviously use LaTeX ...)
> 
> = jem

Like this?
https://pypi.org/project/blockdiag/

-- 
https://mail.python.org/mailman/listinfo/python-list


jython getting started question

2021-06-11 Thread Steve Pruitt via Python-list
Not sure if this is the right list for jython questions.

I am getting started with both python and jython.  My use case need is invoking 
python from java.  org.python:jython:2.7.2 loaded ok.

To check, I executed the following.

ScriptEngineManager manager = new ScriptEngineManager();
List engines = manager.getEngineFactories();

Engine name: Oracle Nashorn
Version: 1.8.0_242
Language: ECMAScript
Short Names:
nashorn
Nashorn
js
JS
JavaScript
javascript
ECMAScript
ecmascript
Engine name: jython
Version: 2.7.2
Language: python
Short Names:
python
jython

The output looks like I have two engines:  Oracle Nashorn and jython (the one I 
need).  But when, I try:

ScriptEngineManager manager = new ScriptEngineManager();
ScriptEngine engine = manager.getEngineByName("jython");

engine is null.  I tried the python short name and got a null engine too.

Thanks.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: jython getting started question

2021-06-11 Thread Steve Pruitt via Python-list
Finally found the solution

Options.importSite = false;

which solved my issue.

I can't set Bindings and pass args to script.  The only example I found is for 
JavaScript.  I think maybe it doesn't work for jython.

Thanks

From: Python-list  on 
behalf of Steve Pruitt via Python-list 
Sent: Friday, June 11, 2021 9:24 AM
To: [email protected] 
Subject: [EXTERNAL] - jython getting started question

CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you recognize the sender and know the content 
is safe. If you feel that the email is suspicious, please report it using 
PhishAlarm.


Not sure if this is the right list for jython questions.

I am getting started with both python and jython.  My use case need is invoking 
python from java.  org.python:jython:2.7.2 loaded ok.

To check, I executed the following.

ScriptEngineManager manager = new ScriptEngineManager();
List engines = manager.getEngineFactories();

Engine name: Oracle Nashorn
Version: 1.8.0_242
Language: ECMAScript
Short Names:
nashorn
Nashorn
js
JS
JavaScript
javascript
ECMAScript
ecmascript
Engine name: jython
Version: 2.7.2
Language: python
Short Names:
python
jython

The output looks like I have two engines:  Oracle Nashorn and jython (the one I 
need).  But when, I try:

ScriptEngineManager manager = new ScriptEngineManager();
ScriptEngine engine = manager.getEngineByName("jython");

engine is null.  I tried the python short name and got a null engine too.

Thanks.
--
https://urldefense.com/v3/__https://mail.python.org/mailman/listinfo/python-list__;!!Obbck6kTJA!OfpEEVqhd12SZnOn5z54YO293doFSUn7b0oSkx11CgsDEFXZNFbK1pjNDo4VS4F4$
-- 
https://mail.python.org/mailman/listinfo/python-list


Tkinter8.6: date picker

2021-06-11 Thread Rich Shepard

I need a date picker for a couple of Python-3.7.2/Tkinter8.6 applications. 
There seem
to be some available on the web. If you have experience with a date picker
(not a calendar that holds appointments for a given date) I'd like your
suggestions and recommendations for one.

TIA,

Rich
--
https://mail.python.org/mailman/listinfo/python-list


Re: Tkinter8.6: date picker

2021-06-11 Thread Rich Shepard

On Fri, 11 Jun 2021, Dan Stromberg wrote:


I think most Python folks are doing their GUI's with a web browser, Qt, or
GTK+. I mostly use GTK+. But best wishes on getting a recommendation for a
Tkinter date picker.


Dan,

I don't like working in a web browser; Qt apparently has very weak support
for multiple-table databases where joins involve several tables, and I've
never used GTK+ for UI.

One of the applications I'm developing will be for my clients to use. Most
of them run some flavor of Windows so I want to keep the software
requirements simple: Python3 and SQLite3.

Regards,

Rich
--
https://mail.python.org/mailman/listinfo/python-list


Re: Recommendation for drawing graphs and creating tables, saving as PDF

2021-06-11 Thread Martin Di Paola

You could try https://plantuml.com and http://ditaa.sourceforge.net/.

Plantuml may not sound as the right tool but it is quite flexible and 
after a few tweak you can create a block diagram as you shown.


And the good thing is that you *write* which elements and relations are 
in your diagram and it is Plantuml which will draw it for you.


On the other hand, in Ditaa you have to do the layout but contrary to 
most of the GUI apps, Ditaa processes plaintext (ascii art if you want).


For simple things, Ditaa is probably a good option too.

Finally, I use https://pandoc.org/ to transform my markdowns into PDFs 
for a textbook that I'm writing (and in the short term for my blog).


None of those are "libraries" in the sense that you can load in Python, 
however nothing should prevent you to call them from Python with 
`subprocess`.


By the way, I'm interesting too in to know other tools for making 
diagrams.


On Fri, Jun 11, 2021 at 08:52:20AM -0400, Neal Becker wrote:

Jan Erik Moström wrote:


I'm doing something that I've never done before and need some advise for
suitable libraries.

I want to

a) create diagrams similar to this one
https://www.dropbox.com/s/kyh7rxbcogvecs1/graph.png?dl=0 (but with more
nodes) and save them as PDFs or some format that can easily be converted
to PDFs

b) generate documents that contains text, lists, and tables with some
styling. Here my idea was to save the info as markdown and create PDFs
from those files, but if there is some other tools that gives me better
control over the tables I'm interested in knowing about them.

I looked around around but could only find two types of libraries for a)
libraries for creating histograms, bar charts, etc, b) very basic
drawing tools that requires me to figure out the layout etc. I would
prefer a library that would allow me to state "connect A to B", "connect
C to B", "connect B to D", and the library would do the whole layout.

The closest I've found it to use markdown and mermaid or graphviz but
... PDFs (perhaps I should just forget about PDFs, then it should be
enough to send people to a web page)

(and yes, I could obviously use LaTeX ...)

= jem


Like this?
https://pypi.org/project/blockdiag/

--
https://mail.python.org/mailman/listinfo/python-list

--
https://mail.python.org/mailman/listinfo/python-list