question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

~ commands not working in a for loop

See original GitHub issue

The following example

#!/usr/bin/env zxpy

def main():
    ~'/bin/echo "This works fine"'
    for u in [1, 2]:
        print(u)
        ~'/bin/echo "Not working"'

if __name__ == '__main__':
    main()

gives as output only:

This works fine
1
2

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
manfredlotzcommented, Jul 30, 2021

I tested it. Looks good now. Thanks a lot.

0reactions
tusharsadhwanicommented, Jul 29, 2021

BTW, every release - all the way back - has patch notes mentioning what was fixed. Like the current one: https://github.com/tusharsadhwani/zxpy/releases/tag/1.4.4

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why does FOR loop command not work in a batch file which ...
The problem is with % , %A is for use on command lines only. when used in batch files %A should be substituted...
Read more >
Batch FOR loop not working - Super User
I fail to see what's incorrect in my batch code: FOR /R %a in (*.png) DO ( files\pngnq -s 1 -n 16 %~fa...
Read more >
Find command not working in for loop - Unix Stack Exchange
I have use the for loop and take all filename in variable using cat command, Then pass them to find command through variable...
Read more >
For - Looping commands - Windows CMD - SS64.com
Using variables within a FOR loop. Variables are expanded at the start of a FOR loop and don't update until the entire DO...
Read more >
PREVENTING ERRORS & DEBUGGING LOOPS IN STATA
Below I present three exercises aimed at accomplishing different data management tasks. Each exercise uses a loop (or loops) that contain an error....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found