Skip to content

running the example outputs nothing #62

Description

@juliusjunghans

Hi,

this is the example, changed sligtly, it shows the input message as output. But the for loop outputs nothing?
Do i maybe need a older python for this?

cat first.py
from pydifact.segmentcollection import Interchange
#interchange = Interchange.from_file("./tests/data/order.edi")
interchange2 = Interchange.from_str(
"UNA:+,? 'UNB+UNOC:1+1234+3333+200102:2212+42'UNH+42z42+PAORES:93:1:IA'UNT+2+42z42'UNZ+2+42'"
)
for message in interchange2.get_messages():
print(message)
print(message.segments)
for segment in message.segments:
print('Segment tag: {}, content: {}'.format(
segment.tag, segment.elements))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions