Go to advanced search

by ryanjg80
Fri Jul 03, 2020 6:40 am
Forum: Python
Topic: Newbie's code works in IDLE but not python
Replies: 20
Views: 720

Re: Newbie's code works in IDLE but not python

Oh no. I will continue to use Python3 to run the system. I meant to solve the mystery surrounding this, I’ll add those functions to the string input by the scanner and run in on my system at home. I don’t want to leave anyone hanging if they’re curious.
by ryanjg80
Thu Jul 02, 2020 4:53 am
Forum: Python
Topic: Newbie's code works in IDLE but not python
Replies: 20
Views: 720

Re: Newbie's code works in IDLE but not python

Got it! I’ll just leave well enough alone. Thank you all so much for your help! When I get some more time to toy around with it, I’ll add the string testing functions posted earlier and run it in Python (not 3) just to help clear up the mystery. I’m actually a bartender. Wrote this code to validate ...
by ryanjg80
Wed Jul 01, 2020 8:35 pm
Forum: Python
Topic: Newbie's code works in IDLE but not python
Replies: 20
Views: 720

Re: Newbie's code works in IDLE but not python

I ran the code using python3. It worked! I had no idea there were different versions. I am indeed using a barcode scanner for the input. I apologize for not supplying enough information. So, first problem solved. Now what about the GPIO stuff? I’m currently cheating by suppressing the warnings, but ...
by ryanjg80
Tue Jun 30, 2020 4:16 pm
Forum: Python
Topic: Newbie's code works in IDLE but not python
Replies: 20
Views: 720

Re: Newbie's code works in IDLE but not python

I did say in the in the code comment that I’m getting the original string back, not the manipulated one I’m looking for. The scanner inputs “VHA1000123”. I want to get back only the last 4 characters of that, but it’s still returning the entire original string. I’m not getting any error messages (no...
by ryanjg80
Tue Jun 30, 2020 5:26 am
Forum: Python
Topic: Newbie's code works in IDLE but not python
Replies: 20
Views: 720

Re: Newbie's code works in IDLE but not python

I don’t know about old problems. How do I fix it?
Every card scanned in the testing phase returned a string with the type() test. If it didn’t return a string (because it was completely numerical) it’s supposed to fail the validation anyway, hence the valid_card boolean test. I’m at a loss.
by ryanjg80
Tue Jun 30, 2020 4:13 am
Forum: Python
Topic: Newbie's code works in IDLE but not python
Replies: 20
Views: 720

Re: Newbie's code works in IDLE but not python

First suggestion didn't work. The type should automatically be string. The only reason I added a type conversion is because the code did not work as expected, but for debugging purposes, I tried type(mem_num) and it returned string.
by ryanjg80
Mon Jun 29, 2020 11:09 pm
Forum: Python
Topic: Newbie's code works in IDLE but not python
Replies: 20
Views: 720

Newbie's code works in IDLE but not python

I've tried a bunch of different things but I'm having a few problems. 2 issues... 1 - The following code runs just fine in IDLE and Pycharm on my PC (except the GPIO parts, of course) but when run in python, the string manipulation parts don't function as intended. (See comments in code) 2 - I tried...

Go to advanced search