Search found 6353 matches

Go to advanced search

by openBrain
Fri Sep 24, 2021 5:29 pm
Forum: Python scripting and macros
Topic: RegExp how to get multiline text before two words?
Replies: 3
Views: 155

Re: [Solved] RegExp how to get multiline text before two words?

"non greedy" worked variant: Optimally you should tell the inner parentheses are non capturing with : print(re.search(r'<test>((? :.|\n)*?)<\/test>',test).group()) But this is still simpler to use character class: print(re.search(r'<test>([\s\S]*?)<\/test>',test).group()) Or a flag : prin...
by openBrain
Fri Sep 24, 2021 2:07 pm
Forum: Python scripting and macros
Topic: RegExp how to get multiline text before two words?
Replies: 3
Views: 155

Re: RegExp how to get multiline text before two words?

Code: test=""" <test> text text text </test> <test> text text text </test>""" print(re.search(r'<test>(.|\n)*<\/test>',test).group()) What you're looking for is called "non greedy". It should be (not tested) print(re.search(r'<test>(.|\n)*?<\/test>',test).gro...
by openBrain
Fri Sep 24, 2021 7:32 am
Forum: Forum français
Topic: Coder un Atelier en C++
Replies: 5
Views: 528

Re: Coder un Atelier en C++

J'ai la forte impression que pour communiquer avec FreeCAD et son Gui, il faut impérativement passer par Python (dans les sources des commandes, on retrouve des scripts pythons qui seront lancé comme des macros). Non, tout est faisable en C++. Dans FreeCAD, les commandes passent par des commandes P...
by openBrain
Fri Sep 24, 2021 5:42 am
Forum: Open discussion
Topic: [Features Requests] Sketcher Radius/Diameter presentation
Replies: 51
Views: 4013

Re: [Features Requests] Sketcher Radius/Diameter presentation

I'll document in the coming hours. ;)
by openBrain
Thu Sep 23, 2021 6:58 pm
Forum: Open discussion
Topic: [Features Requests] Sketcher Radius/Diameter presentation
Replies: 51
Views: 4013

Re: [Features Requests] Sketcher Radius/Diameter presentation

I encountered a little buggy for the case of external geometry group constraining: Indeed. I remember I didn't think about testing this. :lol: About the parameter name, I have changed them in my local commit Believe it or not, it took me a while to understand "Disp" (Disponibility?). Yes,...
by openBrain
Thu Sep 23, 2021 2:34 pm
Forum: Developers corner
Topic: Changes at TravisCI- affecting open source
Replies: 166
Views: 19633

Re: Changes at TravisCI- affecting open source

yorik wrote: Thu Sep 23, 2021 2:03 pm Is there a way to set gitlab to automatically mirror a github repo? So far I have a local script on my machine that does it everytime I git push...
https://docs.gitlab.com/ee/user/project ... repository ;)
by openBrain
Thu Sep 23, 2021 1:55 pm
Forum: Developers corner
Topic: [solved] CI test fails on latest master 00759f9c967865
Replies: 8
Views: 521

Re: [solved] CI test fails on latest master 00759f9c967865

I would have put them between the Ifndef _PreComp_/#endif block but here it's OK, too. It just slows down the build process by a few milli- or microseconds. :) I actually hesitated between both and finally choose the more sure solution as I haven't much time to investigate & test. Feel free to ...

Go to advanced search