Code Monkey home page Code Monkey logo

Comments (8)

dev-zero avatar dev-zero commented on September 26, 2024

sorry for the late reply: is there a chance you could attach the file you are trying to parse? The first ~20 lines should be sufficient I think.

from cp2k-output-tools.

dev-zero avatar dev-zero commented on September 26, 2024

In case you did also use the file to parse from the README.md, I have the suspicion there is something different for Python on Windows. Can you try to add the following line after line 74 in the C:\Program Files\Python311\Lib\site-packages\cp2k_output_tools\blocks\program_info.py file, try again and send me the output of that line:

    print("end:", end, type(end))

from cp2k-output-tools.

dev-zero avatar dev-zero commented on September 26, 2024

Or run this:

import sys
print("maxsize:", sys.maxsize, type(sys.maxsize))
print("hello, there"[0:sys.maxsize])

from cp2k-output-tools.

jxxcr avatar jxxcr commented on September 26, 2024

from cp2k-output-tools.

dev-zero avatar dev-zero commented on September 26, 2024

Nevermind, this already helps. My suspicion was that for some reason sys.maxsize is different on Windows, but it does not seem to be the case.

Could you try the following as well?

import sys
import regex
print(regex.compile(r"b+").search("aaaabbbbbbcccc", 0, sys.maxsize))

from cp2k-output-tools.

jxxcr avatar jxxcr commented on September 26, 2024

from cp2k-output-tools.

dev-zero avatar dev-zero commented on September 26, 2024

And does it work with this?

import sys
import re
print(re.compile(r"b+").search("aaaabbbbbbcccc", 0, sys.maxsize))

I am trying to figure out whether it's a general issue with the re package, or a bug in the regex one.

from cp2k-output-tools.

jxxcr avatar jxxcr commented on September 26, 2024

I found the template in README.md is working normally in Linux. And the tools is also not commonly in Windows.

from cp2k-output-tools.

Related Issues (6)

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.