python 3.x, Alfresco get noderefs in site, cmislib - python-3.x

Hello i need to get noderefs to files in specific site/docLibrary.
I found something but it is not working.
sourceOne,sourceTwo
I use Alfresco Community v5.1.0, python 3.6.1, Windows 10-EclipseNeon2.
Things i found maybe worked in the past but i can't use it, it has trouble with libraries even when i install them.
So can anybody show me some working code to do this in python ?

used python 2.7 and cmislib, these things aren't posible in 3.6

Related

How to display all the functions / api available in a class / file in python

I am very new to python and started using pycharm ide for development.
How to display all the functions / API available in a class/file in python.
e.g. like when we code in scala/java in ide wee get all the functions/ methods available for that class/object by just typing object_name.(dot) and it shows all the API.
not able to get that for python in pycharm.
for example, I wanted to see all the functions available in the python List. I searched dir(module-name) but that is not what I need while developing faster.
thx in advance.
dir(module-name) and dir(class-name) is exactly how you do this. Yes, it doesn't return things in a userfriendly manner and you may need to dig down further for nested modules, but the only better option would be to learn from the package/api docs.

How to read excel into Julia?

I need to read an excel file into Julia. I tried the package "ExcelReaders". However, the package requires additionally the Python or the xlrd package. Although it uses the conda.jl package to install these dependencies automatically, I keep on running into different installation problems. Is there a simple way to read excel into Julia? Has anyone tried the Taro.jl package?
There is only one pure-Julia v1.0-compatible Excel reader available:
XLSX.jl
It has no dependencies on Python or Java. Install it from the package manager by typing ]add XLSX in the console, then load it with using XLSX. Here is the tutorial document.
The Taro.jl package works well to read excel into Julia. You can install the package with Pkg.add(Taro). Once the package is installed, you can load it with using Taro; Taro.init(). You can use Taro.readxl() to read excel files. The following post provides a somewhat nice tutorial on how to read excel files in Julia using Taro.jl:
https://economictheoryblog.com/2018/01/03/how-to-read-an-excel-file-in-julia-language-an-example/
Taro works pretty well (even if I say so myself). You need java installed on the machine, but after that, Pkg.add(Taro) will install all the dependencies for you. And, I think you'll have better luck with Taro with more complex excel files.
If you are fine with saving in the ods format, you could also use the OdsIO.jl package.
It uses a python module (ezodf) as well, but it should install it automatically in both Windows and Linux when you install OdsIO.jl.
If you can save as a .csv then CSV.jl works well.
The ExcelReaders package is also available
https://github.com/davidanthoff/ExcelReaders.jl

building opengm with python3

Hi I'm trying to build opengm with python3, which is allegedly supported. Crosspost to opengm forum here. The reason I ask is that I get an error on "PyInt_FromLong" which is according to this article something that shouldn't come up when porting a c library like opengm to python3. When I changed this to PyLong_FromLong, I ran into another compilation problem down the line from numpy.core.multiarray. Also note that it builds (with the appropriate ccmake options) with Python2 just fine.
My questions are:
1. Has anyone actually successfully build this?
2. Can anyone shed some light as to whether this is something on my end or theirs?
Thanks,
Chris

Where do I get pythonnet for python 3.3?

I cannot find pythonnet for python 3.3. All I found is for python 2.7. Please help me, and send me link (for win32 application).
I found two self-made forks which should work under Python 3.x:
https://github.com/renshawbay/pythonnet
https://github.com/tonyroberts/pythonnet
Both "only" provide sources and must be compiled, didn't have time yet to test...

I'm getting an invalid syntax error in configparser.py

I'm trying to get the pymysql module working with python3 on a Macintosh. Note that I am a beginning python user who decided to switch from ruby and am trying to build a simple (sigh) database project to drive my learning python.
In a simple (I thought) test program, I am getting a syntax error in confiparser.py (which is used by the pymysql module)
def __init__(self, defaults=None, dict_type=_default_dict,
allow_no_value=False, *, delimiters=('=', ':'),
comment_prefixes=('#', ';'), inline_comment_prefixes=None,
strict=True, empty_lines_in_values=True,
default_section=DEFAULTSECT,
interpolation=_UNSET):
According to Komodo, the error is on the second line. I assume it is related to the asterix but regardless, I don't know why there would be a problem like this with a standard Python module.
Anyone seen this before?
You're most certainly running the code with a 2.x interpreter. I wonder why it even tries to import 3.x libraries, perhaps the answer lies in your installation process - but that's a different question. Anyway, this (before any other imports)
import sys
print(sys.version)
should show which Python version is actually run, as Komodo Edit may be choosing the wrong executable for whatever reason. Alternatively, leave out the parens and it simply fails if run with Python 3.
In Python 3.2 the configparser module does indeed look that way. Importing it works fine from Python 3.2, but not from Python 2.
Am I right in guessing you get the error when you try to run your module with Komodo? Then you just have configured the wrong Python executable.

Resources