bugGNU Octave - Bugs: bug #67580, python() function need a new...

 
 

bug #67580: python() function need a new escape function to pass arguments

Submitter:  Yu Hongbo <yuhongbo>
Submitted:  Sun 05 Oct 2025 04:04:14 AM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  None Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * 9.4.0 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Post a Comment

Add a New Comment Rich Markup
   

Discussion

Sun 05 Oct 2025 04:04:14 AM UTC, original submission:  

Assume there is an argument like:

>> graph

graph = graph LR;
A--> B & C & D
B--> A & E
C--> A & E
D--> A & E
E--> B & C & D
And pass to python() function:

>> [ret, status] = python("some.py", graph);

Because & in Linux shell need escape (but other OS may not), it will fail like:

>> [ret, status] = python("some.py", graph);

sh: line 2: C: command not found
sh: line 2: D: command not found
sh: line 2: A--: command not found
sh: line 3: E: command not found
sh: line 3: B--: command not found
sh: line 4: E: command not found
sh: line 4: C--: command not found
sh: line 5: E: command not found
sh: line 5: D--: command not found
sh: line 6: C: command not found
sh: line 6: D: command not found
sh: line 6: E--: command not found
Octave has another escape function: : newstr = do_string_escapes (string), but it is not for shell escape.

Yu Hongbo <yuhongbo>

 

Attached Files

This item currently has no attached files.

(Note: upload size limit is set to 16MiB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

Carbon-Copy List
  • -email is unavailable- added by yuhongbo (Submitted the item)
  •  

    Votes

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    History

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.16.
    Corresponding source code