Haben Sie eine CMD-Datei-Cache angefordert?
Haben Sie eine CMD-Datei-Cache angefordert?
I spent over a year sticking to Linux and had years of consistent use. I decided to test Windows 10 to compare. In short, CMD didn’t detect any changes I made to files. When I opened the same Python file in Notepad from CMD, it displayed the original content, but when I ran it directly, it still printed the old, unedited message. If I opened the file via the command line, it showed the previous version before my save, as if it was caching. This behavior continued after a reboot. Anyone know what’s going on? I attached a screenshot for reference. CMD on the left, Notepad (opened from CMD) on the right.
CMD isn't a terminal—it doesn't handle Python well and is mainly for batch scripts. That's the general idea.
CMD performs poorly across most tasks. While DOS remains impressive, Windows has gradually removed essential functions, making basic operations difficult without a graphical interface. Also, what command did you run in CMD to make the file appear?
CMD functions more like a terminal or command line interface. You can execute Python scripts or Windows commands from CMD, though it appears to use an incorrect version of the software. I tried using 'more,' which is a less reliable alternative to 'less.' However, when I simply ran 'python myfile.py,' it still displayed the default version as 20000, even after changing and saving the file.
PowerShell offers significantly greater capabilities compared to Command Prompt, which is why it has become the standard. If you're aiming for a Linux environment, this is feasible. Windows 10 includes a Linux subsystem (Bash), allowing native execution of Linux-based operating systems without relying on emulation, translation, or Virtual PC. It also maintains compatibility with Windows files. With a X-Windows Server installed, you can launch and work with Linux GUI applications. Steps to proceed: Navigate to Creators Update Start, select Settings, then Update & Security, and enable "Developer Mode." In Program & Features, turn on the Windows feature, check the box for "Turn Subsystem for Linux (Beta)," click OK, and restart. In the start menu, choose Bash. The quick installation of Ubuntu will begin. If you're using a Fall Update of Creators Update (expected around October), go to Start > Settings > Apps > Program & Features > toggle Windows feature, check "Turn Subsystem for Linux (Beta)", click OK, and restart. Visit the Store to browse or install: OpenSUSE, Ubuntu, or Fedora (more distros available). Any distribution can be added to the Store. From the start menu, open OpenSUSE, Ubuntu, or Fedora, and begin using Bash. For GUI support on X-Windows servers, install a GUI Windows X-Server such as VxSvr or MobaXterm, set DISPLAY=:0 in bash, and execute your program. All Windows partitions are reachable via Bash under the mnt folder.
The bash terminal lacks GPU access, requiring CUDA support for my program. Microsoft's latest neural toolkit (CNTK) doesn't work with PowerShell. When I run the .bat file inside PowerShell, it prompts execution from a regular Windows prompt. While Notepad, VS Code, and VS Community all display correct content, my Python environment is interpreting wrong file data. I've been using VSCode and copying code to Jupyter Notebook temporarily, but this is causing significant frustration.
It's noteworthy that the system can't reach the GPU. Someone demonstrated using the 3D software Blender, and performance tests confirmed it works.
Blender renderer relies on CUDA, suggesting they were using it on Windows or in CPU-only mode. I searched online but didn't find anyone else reporting this problem. Running both "more myfile.py" and "notepad myfile.py" without changing directories shows different files. It seems Python is selecting the more version. This looks unusual—planning to switch back to Linux tomorrow.