[Tutor] Accessing variables from other modules

2018-09-04 Thread Chip Wachob
Hello, Hoping that this comes through as text only. Not sure how to force that with Gmail. Very new to Python and trying to follow the instructions I've read on the tutorial and other places. But, I'm not meeting with any success. I have a feeling this is something simple but a search of the ar

[Tutor] Fwd: Accessing variables from other modules

2018-09-05 Thread Chip Wachob
My apologies. I hit reply and not reply to all. Alan, I think I answered many of your questions in this message to Steven. -- Forwarded message -- From: Chip Wachob Date: Tue, Sep 4, 2018 at 1:48 PM Subject: Re: [Tutor] Accessing variables from other modules To: Steven

Re: [Tutor] Accessing variables from other modules

2018-09-05 Thread Chip Wachob
the interpreter itself. The script was always run from the command line as noted in the forwarded message. On Tue, Sep 4, 2018 at 7:41 PM, Alan Gauld via Tutor wrote: > On 04/09/18 16:10, Chip Wachob wrote: > >> (like I would do in C). I then used the import statement

Re: [Tutor] Fwd: Accessing variables from other modules

2018-09-05 Thread Chip Wachob
ns and foibles. On Wed, Sep 5, 2018 at 4:53 AM, Alan Gauld via Tutor wrote: > On 05/09/18 04:12, Chip Wachob wrote: > >> # module RSI.py >> def write(byte): >>spi.write(byte) > > You don't have any import statements here. > You need to import spi to use

Re: [Tutor] Fwd: Accessing variables from other modules

2018-09-05 Thread Chip Wachob
the import AdafruitInit line in main.py, main.py does not automatically inherit the Adafruit_GPIO. Which is why you indicate that I need to also import it in main.py On Wed, Sep 5, 2018 at 9:42 AM, Alan Gauld wrote: > On 05/09/18 14:05, Chip Wachob wrote: >> # module AdafruitInit.py >

Re: [Tutor] Fwd: Accessing variables from other modules

2018-09-05 Thread Chip Wachob
This helps tremendously! One last question. In your examples name1 and name2 could be anything that is contained in that module.. a variable, function, class, etc.. correct? On Wed, Sep 5, 2018 at 12:58 PM, Alan Gauld via Tutor wrote: > On 05/09/18 15:06, Chip Wachob wrote: > >

[Tutor] Help with building bytearray arrays

2018-09-07 Thread Chip Wachob
Hello, I've been struggling with this for the last day or so and I can't seem to figure out how to make it work. I'll start out by saying that if there's a better approach, then I'm all ears. I'm using the Adafruit Breakout board for the FTDI FT232H part. Along with this comes the Python librar

[Tutor] Additionally

2018-09-07 Thread Chip Wachob
Sorry admin, I don't know how to append a message I already sent: the transfer function expects an input of a bytearray and returns the same: def transfer(self, data): """Full-duplex SPI read and write. The specified array of bytes will be clocked out the MOSI line, while si

[Tutor] Help with building bytearray arrays

2018-09-08 Thread Chip Wachob
Admin, please remove my earlier messages. This message is a properly 'self contained' message. Hello, I've been struggling with this for the last day or so and I can't seem to figure out how to make it work. I'll start out by saying that if there's a better approach, then I'm all ears. I'm usi

Re: [Tutor] Help with building bytearray arrays

2018-09-08 Thread Chip Wachob
d one. Can you expand on how I approach that? I'm going to try the experiment you mentioned in hopes of it giving me a better understanding of the 'types' and what happens with the variables. Thank you, On Fri, Sep 7, 2018 at 6:23 PM, Cameron Simpson wrote: > On 07Sep2018 15:45,

Re: [Tutor] Help with building bytearray arrays

2018-09-09 Thread Chip Wachob
Cameron, et al. First off, thank you for being patient with me. I'm not used to the email list communication style. Since Cameron's response was the one that raised the most questions / comments, I'm going to reply to it. Inline.. now that I know that this is the preferred method... Before I j

Re: [Tutor] Help with building bytearray arrays

2018-09-10 Thread Chip Wachob
On Sat, Sep 8, 2018 at 9:14 PM, Cameron Simpson wrote: > On 08Sep2018 11:40, Alan Gauld wrote: >> >> On 08/09/18 03:15, Chip Wachob wrote: >>> >>> Ideally, I'd like to take the slice_size chunks that have been read >>> and concatenate them back tog

Re: [Tutor] Help with building bytearray arrays

2018-09-10 Thread Chip Wachob
gether returns So both are type 'list' which is referred to here : https://infohost.nmt.edu/tcc/help/pubs/python/web/sequence-types.html as a valid sequence type but apparently there's a detail I'm still missing... On Mon, Sep 10, 2018 at 5:22 AM, Cameron Simpson wrote: > On

Re: [Tutor] Help with building bytearray arrays

2018-09-10 Thread Chip Wachob
ich is different that the way I've thought for 20+ years.. :) I hope this helps. I'm beginning to wonder if Python was the right choice for this project.. but it's too late for me to switch now. Thanks to everyone for your comments and patience. On Mon, Sep 10, 2018 at 1:42 PM,

[Tutor] Best solution to modifying code within a distributed library

2018-09-19 Thread Chip Wachob
Hello once again, I'm sure this is probably way outside my 'pay grade' but I would like to try an experiment and I'm not sure how to go about it. I'm using the Adafruit FT232 libraries found here: https://github.com/adafruit/Adafruit_Python_GPIO/blob/master/Adafruit_GPIO/SPI.py I'm experiencing

Re: [Tutor] Best solution to modifying code within a distributed library

2018-09-19 Thread Chip Wachob
have to specify which library to use, how is that done? Thanks, On Wed, Sep 19, 2018 at 7:51 PM, Mats Wichmann wrote: > On 09/19/2018 03:47 PM, Chip Wachob wrote: >> Hello once again, >> >> I'm sure this is probably way outside my 'pay grade' but I would like

Re: [Tutor] Best solution to modifying code within a distributed library

2018-09-19 Thread Chip Wachob
18, at 18:51, Mats Wichmann wrote: >> >> On 09/19/2018 03:47 PM, Chip Wachob wrote: >>> Hello once again, >>> >>> I would like to comment out line 340 (self.mpsse_write_gpio()) to >>> prove that this is what is causing glitches that I do not want. >&g

Re: [Tutor] Best solution to modifying code within a distributed library

2018-09-23 Thread Chip Wachob
Looks like I'm golden in this regard. My first path element is '' which is what I'd want if I'm including a modified library. Thank you, On Thu, Sep 20, 2018 at 6:14 PM, Mats Wichmann wrote: > On 09/19/2018 09:59 PM, Chip Wachob wrote: >> Mats, >>

[Tutor] Shifting arrays as though they are a 'word'

2018-10-05 Thread Chip Wachob
Hello, I was not able to find any answers in the archive on this one. I'm wondering if this task can be done in a better way than what I've attempted.. I have an array of bytes. Up to 64, which makes for 512 bits. I am reading these bytes in serially, and once I have a collection of them, I wa

Re: [Tutor] [spoiler] Re: Shifting arrays as though they are a 'word'

2018-10-08 Thread Chip Wachob
ange = ", hex(stop_chng_ary[num_mod]) print " Stop change = ", ((num_mod * 8) + stop_chng_ary[num_mod]) print " Stop State = ", bit_state_human_read

Re: [Tutor] [spoiler] Re: Shifting arrays as though they are a 'word'

2018-10-09 Thread Chip Wachob
First, Steven, Thank you for your insight. On 10/8/18, Steven D'Aprano wrote: > On Mon, Oct 08, 2018 at 09:16:16AM -0400, Chip Wachob wrote: > >> - What follows is a mini version, the array could be any size up to 64 >> bytes >> >> input: 10010010 . 11101

Re: [Tutor] [spoiler] Re: Shifting arrays as though they are a 'word'

2018-10-09 Thread Chip Wachob
hmann wrote: > On 10/08/2018 07:16 AM, Chip Wachob wrote: >> All, >> >> Sorry for not being more clear. I think I was nearing my fill of >> Python for the day when I wrote. >> >> Now, refreshed, let me see if I can fill in the blanks a bit more. >> &g

Re: [Tutor] [spoiler] Re: Shifting arrays as though they are a 'word'

2018-10-09 Thread Chip Wachob
27;__oct__', '__or__', '__pos__', '__pow__', '__radd__', '__rand__', '__rdiv__', '__rdivmod__', '__reduce__', '__reduce_ex__', '__repr__', '__rfloordiv__', '__rlshift__', '

Re: [Tutor] [spoiler] Re: Shifting arrays as though they are a 'word'

2018-10-09 Thread Chip Wachob
ormatted result, but the API only reads one whole byte, or eight bits, at a time. So, I've been using only the [0] of the bytearray for my data. I hope that this answers your question about octets. I'm not entirely sure I follow the question well enough to answer. On 10/9/18, Alan Gauld

Re: [Tutor] [spoiler] Re: Shifting arrays as though they are a 'word'

2018-10-09 Thread Chip Wachob
Peter, Thank you for taking the time to create the example. I'm new to Python, and, as a result, about a quarter of your example makes sense to me. The remainder I will have to start googling to see if I can get my head around it. On 10/9/18, Peter Otten <__pete...@web.de> wr

Re: [Tutor] [spoiler] Re: Shifting arrays as though they are a 'word'

2018-10-09 Thread Chip Wachob
that is really messing me up. If only they were all just bytes.. but then that wouldn't be any 'fun' would it? Thank you, On 10/9/18, Alan Gauld via Tutor wrote: > On 09/10/18 13:45, Chip Wachob wrote: > >> Another related question. How do I know I want to do dir(in

[Tutor] Displaying Status on the Command Line

2018-11-07 Thread Chip Wachob
Hello, I'm sure that this is simple and my searches have just not used the correct words. What I would like to do is display, on a single line, in the terminal / command line a progress percentage, or, simply a sequence of - / - \, etc.. or even, accumulating period characters. What would the es

Re: [Tutor] Displaying Status on the Command Line

2018-11-08 Thread Chip Wachob
Wow! Thank you! Lots of things for me to try. I should have mentioned that I'm working with Python 2, but I think I can parse my way through these examples. Best, On 11/7/18, Cameron Simpson wrote: > On 08Nov2018 10:00, Steven D'Aprano wrote: >>> Note that I need this to be platform agnostic

[Tutor] Putting a Bow on It

2019-02-08 Thread Chip Wachob
Hello, I've been off working on other projects, but I'm finally back to the project that so many here have helped me work through. Thank you to the group at large. So, this leads me to my question for today. I'm not sure what the "correct" term is for this, but I want to create what I'll call a

Re: [Tutor] Putting a Bow on It

2019-02-11 Thread Chip Wachob
On Sun, Feb 10, 2019 at 7:11 AM Albert-Jan Roskam wrote: > > > On 8 Feb 2019 19:18, Chip Wachob wrote: > > Hello, > > I've been off working on other projects, but I'm finally back to the > project that so many here have helped me work through. Thank you to th

Re: [Tutor] Putting a Bow on It

2019-02-11 Thread Chip Wachob
executable as simple as possible because I know those who will be using it will NOT be Python savvy in the remotest way. Thanks for confirming that I'm not simply going mad... Best, On Mon, Feb 11, 2019 at 11:30 AM Mats Wichmann wrote: > On 2/11/19 6:48 AM, Chip Wachob wrote: > >

Re: [Tutor] Putting a Bow on It

2019-02-18 Thread Chip Wachob
Oscar, Thanks for your full understanding of my situation. And putting it into better words than I did. The code that I've written is entirely Python. There are necessary libraries that go along with that, and, due to my inexperience, I am not 100% certain they are pure Python or not. Some of

Re: [Tutor] Putting a Bow on It

2019-02-18 Thread Chip Wachob
your behind. Thank you, On Mon, Feb 18, 2019 at 4:08 PM Oscar Benjamin wrote: > On Mon, 18 Feb 2019 at 13:41, Chip Wachob wrote: > > > > The code that I've written is entirely Python. There are necessary > libraries that go along with that, and, due to my inexperience

[Tutor] ANSI / VT100 Escape Codes in Windows 7 Environment

2019-02-27 Thread Chip Wachob
Hello again, As always, this list has been very helpful, and thank you. So, I thought I was good to go until I attempted to run my code on a Windows 7 vintage machine this morning. The application is intended to be run in the command window in Windows, from the terminal in Linux... In the code

Re: [Tutor] ANSI / VT100 Escape Codes in Windows 7 Environment

2019-02-28 Thread Chip Wachob
ed 20Mbyte of storage space! And of course a math co-processor... I no longer recall how many Kbytes of onboard memory I had, maybe 1024... :) Thank you so much for sharing your insights. Best, On Wed, Feb 27, 2019 at 9:40 PM boB Stepp wrote: > On Wed, Feb 27, 2019 at 6:50 PM Ch

[Tutor] Exception not working as expected?

2019-02-28 Thread Chip Wachob
Hello, Python 2.7 & Windows and also Linux are the platforms being used. Running the code from the command line / terminal as python except.py. Note that it does work properly in Linux. So I'm guessing I need to test for a different exception along with the KeyboardInterrupt?? So, the code b

Re: [Tutor] Exception not working as expected?

2019-03-01 Thread Chip Wachob
explains why there's no exception listed. On Thu, Feb 28, 2019 at 8:34 PM Alan Gauld via Tutor wrote: > On 28/02/2019 21:03, Chip Wachob wrote: > > > it does work properly in Linux. So I'm guessing I need to test for a > > different exception along with the Keyboa

Re: [Tutor] Exception not working as expected?

2019-03-01 Thread Chip Wachob
t 9:31 PM eryk sun wrote: > On 2/28/19, Chip Wachob wrote: > > > > Python 2.7 & Windows and also Linux are the platforms being used. > Running > > the code from the command line / terminal as python except.py. Note > that > > it does work properly in Linux.

[Tutor] Reading .csv data vs. reading an array

2019-07-11 Thread Chip Wachob
Hello, Quick background on what I'm trying to achieve. I have a data set from a digital storage oscilloscope. It includes sampled data points for several electrical events that I'd like to break down and decode. The scope generates a single file with all of the events concatenated. The data se

Re: [Tutor] Reading .csv data vs. reading an array

2019-07-15 Thread Chip Wachob
go through yet another iteration of scanning TimeVal and VoltVal and converting them using float() by saving them to another array? Thanks for your patience. Chip On Sat, Jul 13, 2019 at 9:36 AM Mats Wichmann wrote: > On 7/11/19 8:15 AM, Chip Wachob wrote: > > kinda restat

Re: [Tutor] Reading .csv data vs. reading an array

2019-07-15 Thread Chip Wachob
of row entries? I started following the link to iterables but quickly got lost in the terminology. Best, On Mon, Jul 15, 2019 at 3:03 PM Mats Wichmann wrote: > On 7/15/19 12:35 PM, Chip Wachob wrote: > > Oscar and Mats, > > > > Thank you for your comments and taking time to