Python: Programming 8051 [closed] - python

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
Can I program 8051 using Python?
I'm not getting any of the to program 8051 in python environment.
If anybody knows, please help me.

There is Python-on-a-Chip, but note its "disclaimer":
"The PyMite VM DOES NOT HAVE:
A built-in compiler
Any of Python's libraries (no batteries included)
A ready-to-go solution for the beginner (you need to know C and how to work with microcontrollers)"
Thus, if the questioner's goal for python was to avoid dealing with the strangeness of the 8051, this may not help.
In particular, the 8051 is a "Harvard" style architecture, with separate RAM and ROM codespaces, and with very limited internal RAM, and larger external RAM that can be accessed only via loading the special DPTR register and then reading or writing indirectly, plus there's no external RAM stack support, nor intrinsic support for stack-based variables. Thus, most "general purpose" high-level languages need lots of customization and reworking to run on the 8051.
A good 8051-specific C-compiler can hide many of these low-level details, but you wind up burning lots of cycles to do things that are single instructions on desktop CPUs and even on most newer embedded controller architectures, and even if you can live with that level of in-efficiency, you still need to sort out the various memory spaces and other specifics.
So, getting Python to work on the 8051 is likely to be a challenging project for someone deeply familiar with its quirky architecture. If your goal is to dump a python onto the 8051 to avoid needing to learn these quirks, I'm not sure that is possible. (But, I suppose the C compilers keep getting better and better...)

Python-on-a-Chip looks about as close as you're going to get. It can run on some things that are just a bit beefier than the 8051.

Related

ASN1 and canonical octect encoding rules (COER) in Python [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I have some messages data structures represantations in ASN1. These messages have to sent using the canonical octect encoding rule (COER). I currently user asn1c for python,but, there is no support for coer. How could I create the instances and later do the encoding in python?
I'm afraid you might be in trouble. COER looks like it was standardised relatively recently (bearing in mind that ASN.1 is well over 30 years old), and I don't think that a lot of the tools have caught up yet.
The tools from OSS Nokalva seem to support COER, but they don't do a Python binding, and their tools are quite pricey (but very good).
For Python the "goto" has been the pyasn1 library, which doesn't seem to do COER (or even PER, which is a real pity).
Objective Systems, which are also very good, now do a Python ASN.1 compiler(which trumps pyasn1's code first approach), but that doesn't yet do COER.
The easiest thing might be whince, fork out for the OSS Nokalva tools, and use Iron Python to interop with their C# library and tools. That might seem an expensive way of doing it, but if your project is on a fixed timescale, that might be the lowest risk way of accomplishing what you want. You'd likely not be having to write any code to "do" COER, and instead you can concentrate on the application itself and avoid writing your own COER implementation that'd be a pain to maintain, and will eventually get surpassed by other ASN.1 tools anyway.

Are there any known issues with Python parallel processing on Windows? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
This is perhaps not the right place to ask this question but I was unsure where else to go with it. My MSc dissertation is aimed at trying to use parallel computing to speed up stochastic biology simulations. I've written some standard format code for parallelisation of the simulations.
This code works on 7 out of 9 of my simulations but seems to get stuck when using pool.map on the other two.
Due to working form home etc and hardware/software constraints the only opperating systems I have available to me are Windows Subsystem for Linux and Windows powershell (which I've both tried). One thing my supervisor suggested is that this issue might be related to my operating system and that Windows might not be as good at parallelisation as Linux. But I'm struggling to find any hard evidence to back this up.
So is anyone aware of any papers or links to other posts that might provide a bit information about whether or not a Windows OS has issues with Python parallel processing?
Cheers
I don't know about formal papers, but have had a lot of practical success using dask from dask.org So whether this is a good answer depends a lot on whether you just want results, or whether you're doing deep research.
I and my team began using dask about a year ago for parallelizing large Pandas/numpy jobs that were taking hours to run (if they didn't run out of memory). Using dask, we were able to cut these down to minutes with successful (i.e., identical) results.
Lots of RAM still recommended, but the parallelization capabilities and process dashboard/feedback is a great step forward.

C++ to simpler language (Python, Lua, etc) converter? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I know Python and I've come across a small C++ source file I would like to convert to Python. But the C++ code is too complex for me to understand without learning the language.
So I was wondering if there is a tool that does the opposite of what many people want: convert C++ code to Python, or another simpler language I could understand.
I know these tools work on very simple code and hardly do a perfect job even then, but the code I have is pretty small and simple.
I have found "ctopy", but there is no usage example, if I just pass a .cpp file to it, it just hangs, no error message or anything.
And maybe it won't work for C++ at all.
http://www.catb.org/~esr/ctopy/
Most translators produce inferior code which you can't really use anywhere; and the more complicated your code is, the worse the results are. Only real human brains can do that perfectly. I'd suggest that you learn the language. If you already know python, learning another language shouldn't be too difficult.
I've seen (and wanted) such a programming code converter and found exactly what you want in cpp2py although I personally haven't tried it for myself website https://github.com/hlamer/cpp2python
It's a little painful, but I have gotten some python code using
https://code.google.com/p/ctypesgen/
For some reason it doesn't handle bool's.
It probably uses regex substitutions, and other things like that, but it sure beats writing out your own ctypes wrapper without it.
http://docs.python.org/2/library/ctypes.html
Another option you could look into, is compiling your C++ into an executable and then running the executable using python.
And if you decide you need the power of C/C++ in your tool belt:
https://stackoverflow.com/questions/3973899/learning-c-java-coming-from-python
Hope that helps.

Python tools/libraries for Semantic Web: state of the art? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
What are the best (more or less mature, supporting more advanced logic, having acceptable performance, scalable to some extent) open source Semantic Web libraries and tools (RDF storage, reasoning, rules, queries) for Python nowadays? Historically Python tools (cwm) were among the first to appear, but it still seems that everyone uses Java back-ends for performance and Python as mere client if at all. My purpose is to learn the technology and maybe some future use in production system if it proves itself up to the task. The task is not yet defined, but as I see it its building a knowledge base, linked with some external resources, and customized facet-navigable web front-end.
If some building blocks based on Python are not good enough, then what is the suitable piece from Java/C/C++/whatever world.
Typical stack is also of interest, if there are one or two clear winners.
Thanks.
A survey of of Python libraries and tools for Semantic Web programming is available here. It includes libraries for working with RDF as well as Python-friendly triple stores.
Toby Segaran's book Programming the Semantic Web also has a lot of programming examples in Python.
You could check out the pyswip. It could work with the SWI-Prolog. Wish it would fit for requirement. :)
To name some, check out RDFLib and CubicWeb.

Looking for knowledge base integrated with bug tracker in python [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
Ok, I am not sure I want to use Request Tracker and RTFM, which is a possible solution.
I'd like to have a knowledge base with my bug tracker/todo list , so that when
I solve a problem, I would have a record of its resolution for myself or others later.
What python based solutions are available?
A highly flexible issue tracker in Python I would recommend is "Roundup":
http://roundup.sourceforge.net/.
An example of its use can be seen online at http://bugs.python.org/.
Try Trac
I do have experience using probably 20-30 different bug trackers, installed or hosted and so far if you are up to deal with a big number of bugs and you want to spend less time coding-the-issues-tracker, to get Atlassian Jira, which is free for open-source projects.
Yes, it's not Python, it is Java, starts slowly and requires lots of resources. At the same time, RAM is far less expensive than your own time and if you want to extend the system you can do it in Python by using https://pypi.python.org/pypi/jira-python/
Do you think that Jira is the most used bug tracker for no reason? It wasn't the first on the market, in fact is quite new compared with others.
Once deployed you can focus on improving the workflows instead of patching the bug tracker.
One of the best features that it has is the ability to link to external issues and be able to see their status, without having to click on them. As an warning, for someone coming from another tracekr you may discover that there are some design limitations, like the fact that a bug can have a single assignee. Don't be scared about it, if you look further you will find that there are way to assign tickets to groups of peoples.

Categories

Resources