simple program output does not appear anymore in command window after python upgrade - environment-variables

I have been running simple programs with python3.4 without trouble, directly typing the program name (without the .py extension) from a command shell, in the directory where the python scripts are located. The expected output would then appear in the shell, and upon termination of the program the next prompt appears, as expected. I recently upgraded to 3.6.4 to develop more complex applications using NumPy and pandas. since the upgrade however, running the same programs still work (e.g., I can see the tk windows appear and behave as before), but the next prompt immediately appear in the command window while the program is still running, and the expected output from simple print statements is redirected somewhere (where?). On another hand, running the program by typing 'python program_name.py' rather than just 'program_name' works as before, with the output appearing in the command window as expected. what configuration settings could have been present with 3.4.0 and missing with 3.6.4 that would explain those discrepancies? Thank you.

Related

How do I run a Lua script on fceux on Mac os?

First I start the emulator.
Then I load dragon warrior ROM.
Then I try to access the lua script menu.
However fceux will not let me access the main menus anymore. I can only control the emulator.
What is the right way to run a Lua script in version 2.2.3?
The documentation below is obviously lacking. No window pops up. See the **** there is no run Lua script option.
The fceux docs say this:
To run a Lua script, choose "Run Lua Script" from where  In the dialog that pops up, click "Browse" and find the file you wish to run.  This will insert the path of this file into the dialog.  You can then click on "Run" to run the script or "Cancel" to return to FCEUX without running the script.
To end a Lua script, choose "Stop Lua Script" from where.
You're reading documentation for the windows version and trying to apply it to the portable version. They aren't the same. Learn to use wine or virtualization and use the windows version.
If you insist in using the portable version, you can use --loadlua myfile.lua, assuming your fceux has been built with lua support (and who can say how it was built on linux or osx?)

Erlang - Is it possible to make the messages that appear on erlang shell appear on linux shell too?

I have created a small test application and when on a linux machine I would like to see the messages that appear on the erlang shell to appear on the linux as well. I am not sure how it could be done, but is it possible?
I am running the application in detached mode(erlang shell).
EDIT:
I meant the message passing to the linux shell.
Example:
When I start my application using,
test application <start/stop>
I would get a message on the Linux shell Test Application has successfully started
But if I was like copying files, I would like the progress of the file copy to be displayed on the Linux shell like,
Copy successful. Number of files copied : 1
Copy successful. Number of files copied : 2
....
So is it possible to do the above using the message passing from Erlang to Linux?
I believe you can use some logger for this purposes. For example lager can redirect logs to several facilities at the same time, e.g. file and erlang console.
Other option is to use "run_erl", utility which comes with erlang distribution and allows "redirect the standard input and standard output streams so that all output can be logged".
Try erl -man run_erl or you can see can generate "release" with rebar, it will generate startup scripts which use "run_erl".

Atom Run F# script, Windows 7 error

I am trying to run F# script from Atom editor but kept on getting the following error:
Unable to run fsi is it in your path?
I've checked the environment variables and the path is set correctly and can run it from the command prompt. Also others suggested running Atom from command prompt, I did that but still the same. Is Atom looking for files in a case sensitive way? (If so that may be the issue as the F# interactive is "Fsi.exe").

Resolving Address Space is already occupied error using Cygwin and Ruby

I keep getting the same type of error messages and I have really done all I can to get rid of them. The message is as follows, only the module can vary at times:
ruby 5740 child_info_fork::abort: address space needed by 'date_core.so' (0x600000) is already occupied
These messages occur at various times when trying to run Rails, such as “rails console”.
I am running the following environment:
Windows 7 Ultimate 64-bit
Cygwin Net using setup 2.774 (installed from Internet mirrors)
Ruby 1.9.3p392
Rails 3.2.11
I have taken the following steps attempting to fix this:
Deleted all BLODA and restarted, including Norton 360 and Malwarebytes. (BLODA is Big List of Dodgy Apps.)
Deleted and reinstalled Cygwin.
Executed “rvm implode” and rebuilt the RVM and Ruby on Rails environment.
Used CMD & ASH to run “peflagsall” & “rebaseall”. Ran “rubyrebase”. Restarted.
Used FIND to build a file of all *.so & *.dll files. Ran “rebase -T”. Restarted. This has also been done using the “-b 0x77000000” switch.
Used same file to create “to_peflags” script issuing peflags against each individual file. Restarted.
All repair attempts have been futile. At times, “rebase -si |grep ‘*’” would be clean. Any attempt to run “rails console” or similar commands results in Address Space Occupied messages. Subsequent “rebase -si” would then again show conflicts.
I have been trying to run “peflags” against the Ruby modules, but I only get “skipped because could not open” error messages there. File permissions and ACL both show correct permissions. The same error occurs whether or not Administrator is used.
This is pretty frustrating. I would like to fix my current environment, but I am considering moving to MSYS or SFU, but I don’t know if either of those are decent options. I am also considering going native UNIX, but I’ll leap off the cliff when I get to it.
For now, does anyone have a fix for this specific error for me? Thanks…
I have used procexp to monitor "rails console" execution. Bash is calling cmd.exe to run the rails.bat file. Cmd.exe runs in ASLR mode. Used Microsoft EMET 3.0 to turn off mandatory ASLR and bottom up ASLR for both bash and cmd. Cmd.exe still runs in ASLR mode. It must be compiled that way.
Updated registry to set HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\MoveImages to 0, -1 then 1. 0 caused system problems. -1 had no effect. 1, which was supposed to be the default, helped somewhat as long as EMET changes were in place. But, it was unreliable as Address Space Occupied would eventually recur.
Decided to attempt to install a command processor that either didn’t require ASLR or allowed me to disable it using PE flags. I installed TCC/LE and attempted to get Cygwin Bash to use it to process .bat files. I tried using the path variable, the COMSPEC variable and changes to batfile and cmdfile in the registry all to no effect. Cygwin Bash must either have it hard coded or some nonobvious control.
My fix is to replace my environment. I know I will eventually migrate to some Unix, but for now I am converting to MinGW/MSYS and RubyStack. All I want to do is to get a stable RoR (Ruby on Rails) environment running for today. I don’t see that happening using Cygwin with Windows 7 Ultimate. I keep running into too many problems and this one is a very, very tough nut to crack. Thanks…

Eclipse freezes when erlide tries to run

I'm just getting started with erlide, using a fresh install of Eclipse Juno and erlide. I've used erlang on my system (64-bit Fedora) from the command-line, so I'm just trying to make the switch. I started with R15B, and have upgraded to R15B02 (built from source) as suggested by another SO post. If I right-click on a .erl file and pick Run As..Erlang Application, the IDE freezes and I have to kill it. If I try to run from Run Configurations and specify the module and function, it will start to execute, but never progresses beyond 27%. This is on a simple function that runs instantaneously on the command line.
Please try with the latest nightly from http://erlide.org/update_nightly, we did some work about similar issues, I hope they will solve yours too.
It would help to see the log from /erlide.log.
You can also open the launch configuration from run->configurations and see if there is some weird value in any of the fields in the "runtime" tab, most probably the node host name.
[I will be away for a week or so, so I can't answer very soon. Sorry about that.]
/Vlad

Resources