我有一些函数,比如用easy语言编写的.txt文件,我需要使用python从这些函数中提取数据。作为一个例子,考虑下面的部分。
代码段-
If MarketPosition = 0 and (EntriesToday(Date) < 1 or EndofSess) and
EntCondL
then begin
Buy("EnStop-L") NShares shares next bar at EntPrL stop;
end;
在这里,我需要提取零件
并使用python识别=
,<
符号。
提前谢谢。
我想你在寻找一些运算符的前缀和后缀
我建议您找到这些运算符列表并使用它的位置来获取前缀和后缀
下面是一个在
if
和then
之间查找和拆分文本的示例 结果是单个元素的列表:变量、方括号和比较运算符。在结果是:
^{pr2}$我觉得从这里走比较容易 (我不需要以哪种形式提供数据,例如括号是否重要?)在
相关问题 更多 >
编程相关推荐