I am an Electrical engineer. I am completely new for programming and coding..
Actually i am working as estimation engineer, where i am doing the same estimation again and again with excel.
As same in design stage also i am doing the same again and again.
I thought i will create a application which will automatically do the estimation based on my input. and the same time at the time of design stage it will input from my estimation sheet it will generate the drawing automatically.
(i am doing estimation in excel, preparing drawing in auto cad)
from google, i found the following..
To write a program I need to know a language. so i selected python version 3.6.1
To create a stand alone or micro soft windows installer i selected cx freeze which is converting my code to .exe filex
To create a user interface i selected glade.
But i dont know how to install gtk builder to link pythin code and glade files.
Hopefully you got the point what i am looking..
I am using windiws 10 with 64 bit version
Advance thanks for all
All the information you need on how to install GTK+ and Glade on Windows is on the GTK+ Website.
However, If you're a total beginner, then I suggest you start small, as the kind of work you're describing seems a lot of work for someone who has never written a single line of code.
As suggested by #liberforce, install GTK+ and Glade on Windows from their GTK+ Website. This way you will have an environment (MINGW64) inside which you can practice.
Install python from their download site.
Check also these instructions for how to use it.
The key points (at least for me) are:
Copy the hello.py script you created to C:\msys64\home\<username>
In the mingw32 terminal execute python3 hello.py - a window should appear.
After that, if you want to make an executable, follow these instructions. Try their example for gedit to get some ideas on how to create and how PKGBUILD works (a.k.a. follow the instructions for gedit to see what's happening).
Related
Recently I've been studying a lot on the processing library (mainly using p5.js) and was delighted to find out that in the processing IDE, there is a python mode, processing.py.
I want to try using it in google colaboratory. I tried using pip install to install it in colab and in the console it said it was installed successfully but when I try running a script that usually runs in the python mode of the processing IDE, it doesn't work. Below is a screen cap of the code and the error. In the processing IDE, (without the last 2 lines), this will show a 400 x 400 gray canvas with a circle drawn at its center.
I also tried installing java into the colab just in case processing.py requires java. Nothing seems to work though. For those who want to see the entire notebook, here is the link: https://colab.research.google.com/drive/19UVAR2iOWk4NnrHxNhd_XL03MUoKrCF3?usp=sharing It is set so that anyone with the link can open it.
I hope someone can help me with this. Thanks very much.
I'm afraid it is not possible to use https://py.processing.org on Colab, as it is based on the Jython interpreter, a Python 2 that runs on the Java Virtual Machine (the upside of Jython being that we can use most of the librairies created by the Processing Java community, available with a few clicks from the IDE).
You might be able to run this new experimental "Processing in Python 3" project on Colab: https://github.com/p5py/p5
There is a new p5 library in pyPI that can be installed:
!pip install -U p5
import p5
However, I have had problems getting the chart to show. I believe that the problem is getting Colab to write to my display. It would be great if someone could solve this...
Recently, I switched my OS to Ubuntu. I just started with collage and I have to learn pascal for my finals. But a problem occurred.
I installed Visual Studio Code and Pascal extension for it, but I am unable to run even a simple Hello World code. I wrote code, it saved automatically as .pas, but when I enter debug & run option in VSC it displays a message that says 'Open a file which can be debugged or run.', followed by 'debug' and 'run' buttons that I am unable to click and another message that says 'To further configure Debug and Run create a launch.json file.'
I am not even sure am I supposed to post questions such as this one on stackoverflow, but I sincerelly hope that someone could give me a hint on what to do. Solve this within Visual Studio Code or switch to another IDE (and which one would you recommend for Linux user) and pretend that nothing happened?
Thanks in advance.
I know this isn't an answer to "how to debug with pascal with vscode" but, perhaps you would find it easier to just use FPC / Lazarus (IDE) to do your work. While it doesn't have a dark theme, contrary to popular belief, that's not necessary to program.
The IDE is feature packed and allows for full code completion, debugging, etc... (everything you really need to do the work for school).
Additionally, you can use this open source tool to install everything you need for your platform in just a few button clicks (also allows for installing common library packages)
https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases
download release for your OS
under "FPC Version" & "Lazarus Version" select trunkgit (or stable for an older version)
click the "Install/Update FPC + Lazarus" button
Have you Installed Pascal extension which is available for code to smoothly run pascal code.
If you haven't then try installing this extension using,
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
ext install alefragnani.pascal
You can always check,
https://marketplace.visualstudio.com/items?itemName=alefragnani.pascal
to install and configure pascal in vscode.
I will direct you to the debugging page from the Visual Studio Code documentation that details how to use the debugger and configure a launch.json file. VSCode is a generic IDE so you need to give it some information about your project before it knows how to run the debugger. This is what launch.json is for.
If I could make a suggestion. When you're learning how to program, it's best to start with the basics. Write a small program in a text editor (VSCode is fine, or Vim, or Nano, or Notepad, or whatever). Save the file. Compile and run the program on the command line.
Once you put an IDE in the mix, you have to learn how to use that as well. If you're stuck on both parts, it can be hard to make progress. That said, it's good to learn how to use the IDE, and you should spend some time reading the documentation and working through some of the examples. It takes some time, but it will pay you back a thousand times when you can work more quickly.
I was trying to find a decent ide for python3, and atom sounded a good choice, but the atom runner is not very interactive. For example this simple code produces an error, I'm pasting a screenshot, to show the problem as it is:
Can I configure atom to execute code interactively. The way I noticed the problem was that atom runner first executes all of the code and then ONLY displays the output. Is there a fix or any packages for this?
If not, please suggest a descent and simple to use IDE for python. If there was something like the online repl.it but for offline use, it would really fit my taste.
For atom there is a package called The Terminal Plus Package: https://atom.io/packages/terminal-plus, this will open a virtual terminal that will have a the capabilities of a normal terminal. Hope I helped!
-Zeus
I have a system,written on PyQt4. It is mostly developed and debug under linux (ubuntu) systems, in Eric IDE, and everything works fine. Last task was to create a nested editor for a table cell. So, i did it and it also looks nice in ubuntu. I also ran it under Windows 7 x64, and the behavior was the same.
However, after making executable file with cx_Freeze in Windows 2000 (it's weird, but this environment was configured before me), the editors behavior became unexpected. After opening Editor it's first cell have 'role == Qt.EditRole', and it's almost impossible to commit any changes there without closing the whole Editor. Another issue is about "OK" button - it closes the Editor window, but doesn't commit any changes in it also, and you cannot call it again without changing the active cell (but maybe i just forgot to emit some signals here, so it's not the main bug here).
So my question - where should i look to find the reason for these problems. I'm new to qt, and maybe it is normal behavior and just my fault in code? Or the reason is in different environments (python 2.7, latest pyqt vs python 2.6 and some older pyqt). Or it is the influence of cx_Freeze... Maybe some other directions?
Sorry for long post and my English :)
Hope to get any answers soon.
I think there's a chance that Qt or PyQt on windows 2000 server is outdated or broken.
So If possible, bring cx_freeze related code to your local computer and test it out.
If it fixes the problem, you can upgrade or reinstall Qt on windows 2000 server.
I'm working on a website that requires a flash mp3 player. I have absolutely no idea the procedures from messing with flash/actionscript/flex etc., however I need to edit the flash very slightly (I need to add two lines of code). There are a multitude of tutorials out there for setting up a flash (or flex or whatever) development environment but, as my needs are so simple, I'd like to go a little more light-weight than that (also, many seem outdated). I guess what I'm saying is I'm looking for a simple way to recompile some existing actionscript (command line is a plus!). Does anyone have a trick up their sleeve to accomplish this?
Download the free/opensource Flex 3 SDK. This includes an ActionScript3 compiler. Run the compiler like this:
mxmlc MyAs3File.as
There's MTASC for ActionScript 2.
You can compile it online here: http://wonderfl.kayac.com/. No mess that way.
I also wanted to say that swftools has exactly what you need. There is a swfc compiler which will compile as2 files. I would really recommend updating the source though. AS3 is much faster than AS2 and there are a lot of tools out there for example mxmlc and fcsh included in the open source Flex sdk. If you are looking for a full blown IDE there is a linux version of Flash Builder that was released as an open source port ... there are a couple other ones out there as well.
General Linux
On linux you can get the source from swftools.org.
Debian / Ubuntu
On debian / ubuntu you can run
apt-get install swftools
Mac OS X
Not exactly 'linux' but on mac OS X if you have homebrew installed you can do:
brew install swftools
Great, but how do I compile the code?
One this is installed you should have a new utility that you can use to do:
as3compile MyAs3File.as
Gotchas
Please note this is not a 1:1 replacement for Adobe's compiler - there are some things that it does not support ( see documentation, FAQ, changelog at swftools.org ) but it worked well for compiling my simple actionscript.