Hello,
I Have designed a .net Project which uses a python file in itself and I need to implement Multitasking in my .Net Project because of speeding up the execution.
I use Task Parallel Library in C# and I call python file by Process in each task but It doesn't speed up my application and multitasking is not implemented correctly.
So I need to use python script in my task directly to speed up my application.
Would you please help me to find a solution to use maximum power of my CPU to do my pattern recognition project faster?
Best Regards
[cid:image001.jpg@01D15D05.168687B0]
Drive with Quality
Amin Darestani
Software Engineer
No. 253, 11th km of Karaj Makhsoos Rd., Tehran, 13998-13411, IRAN.
Tel: +98 21 44 90 81 40 - 7 (Ext.: xxxx ) Fax: +98 21 44 90 81 48 Mobile: +98 936 737 71 45
Email: a.darestani(a)crouse.ir<mailto:a.darestani@crouse.ir> Website: www.crouse.ir<http://www.crouse.ir/>
[cid:image002.jpg@01D15D05.168687B0]
Member of TOP 100 Iranian Companies
Ranked 41 in 2018
Dear list,
I'm having trouble to import assemblies with certain names. I found it
impossible to import assemblies named "Library", and I cannot import
arbitrarily named assemblies that live in a subfolder having the same name
as the assembly.
Here are some details of a working configuration (MWE):
mylib.cs:
> namespace mylib {
> public static class mylibClass {
> public static double DoubleThis (double x) => x*2;
> }
> }
mylib.csproj:
> <?xml version="1.0" encoding="utf-8"?>
> <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
> <PropertyGroup>
> <Platform>AnyCPU</Platform>
> <OutputType>Library</OutputType>
> <OutputPath>bin\</OutputPath>
> <DefineConstants>TRACE;DEBUG</DefineConstants>
> </PropertyGroup>
> <ItemGroup>
> <Compile Include="*.cs" />
> </ItemGroup>
> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
> </Project>
build with "msbuild mylib.csproj", copy the .dll from the bin directory to
the python script (avoid modifying the path).
Python (3.6.6 from Anaconda):
> clr.AddReference('mylib')
> import mylib
> print(mylib)
> print(mylib.mylibClass.DoubleThis(3))
This will print "<module 'mylib'>" and "6.0".
When I name everything "Library" instead of mylib, or put mylib.dll in a
directory called 'mylib', the import works, but the module doesn't contain
any symbols/attributes. (In the latter case, I use
clr.AddReference('mylib/mylib'), of course.) Then, print(mylib) or
print(Library) prints "<module 'Library' (namespace)>", the main difference
being the added "(namespace)". The imported module is empty, calls to
something in the assembly raise an AttributeError (e.g. "...has no
attribute LibraryClass").
Is this a known limitation? Should I post a bug report? Are there any other
restrictions I should know about?
Thank you for considering. Regards,
J.St.