#๐Ÿ”’ Lists and packing and unpacking

7 messages ยท Page 1 of 1 (latest)

elder oakBOT
#

@tender lily

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

gray merlin
#

@tender lily I recovered your message

Hello, my current situation for my code is as follows: The code isn't entirely on one file. Its distributed across four (4) files.

What I am trying to do at the moment is display the unpacked_string_list in a list with the elements and not memory location.

#Step1 Initialize unpacked_string_list from GeoPointLibraryP10
unpacked_string_list = GeoPoint.unpack

print(unpacked_string_list)

The first action the write file. LocationWrite.py (file1) which writes the points to LocationOfPoints.txt (file2). Then I have a function in the GeoPointLibraryP10_Jesse_garcia.py (file3) which is doing the 'unpacking' or at least that is my intent.
I then attempt to return the 'unpacked list' from 'def unpack(unpacked_string_list):' so that it can be accessed in the main file which is Competency10_Jesse_Garcia.py (file4).

I hope what I said makes sense. I'm pretty new to the whole thing but my requirements are to use the files.

The code for my write file (File1)(LocationWrite.py)

The LocationOfPoints.txt file just receives the written information for (file2).

The code for my library file GeoPointLibraryP10_Jesse_Garcia.py (file3)

Lastly the code for main file Competency10_Jesse_Garcia.py (file4)

The end state is that I am trying to construct 5 objects to receive the unpacked_list.

With the GeoPoint objects looking something like this GeoPoint(numeric, numeric, string) so that I could ultimately utilize them in the distance() function.

#

You can't upload files here though

tender lily
#

Just got owned by the bot trying to do so lol

elder oakBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.

#

๐Ÿ”’ Lists and packing and unpacking