Giter VIP home page Giter VIP logo

Comments (4)

ck81 avatar ck81 commented on May 12, 2024 1

Hi Ken,

Thanks for the detailed explanation. Know where you're coming from.

This is not a big issue in python, because it's now very easy to use def to add a little function in python to automatically add a "\n" at the end of each write.

You may want to highlight this in your documentation for TagUI-Python though. I'm sure there will some users like me trying to port TagUI script into TagUI-Python and bump into this wondering what's happening.

from rpa-python.

kensoh avatar kensoh commented on May 12, 2024

Hi CK, yes you are right! The behaviour is intentional and by design.

It can't be standardised because the target users for both projects are different. TagUI is meant more for business users and non-developers, so things are done as much as possible to simplify tasks for them. This includes automatically inserting line break '\r\n' for write step.

However, TagUI for Python is meant more for Python users. Thus write() step cannot automatically add the line break characters '\r\n' as that means users cannot write a series of strings to a file sequentially without inserting line breaks in between. That would be very un-Pythonic and non-standard programming language behaviour.

In the interim, for TagUI users who want to port to TagUI for Python, they will face this difference. Workaround will be inside the write() function in tagui.py (search for def write(), change the following line

write_output_file.write(_py23_write(text_to_write)

to something like

write_output_file.write(_py23_write(text_to_write + '\r\n')

This seems hacky, but if standardise the two, the group of Python users using this package directly, compared to existing TagUI users who port to Python, will be a much larger group. And they can't be paying the price to address the the smaller group's needs, especially if it is deviating from standard programming languages best practices. If change TagUI write to be without '\r\n' it will also break backward compatibility of its existing user scripts, thus also not a suitable solution.

from rpa-python.

kensoh avatar kensoh commented on May 12, 2024

That's a good suggestion CK. From your experience so far, other than write() and visible(), have you experienced other differences in behaviour between TagUI for Python functions and TagUI steps that would help to be documented?

from rpa-python.

kensoh avatar kensoh commented on May 12, 2024

Closing this as CK created a new issue #47 with details of the comparison!

from rpa-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.