Python Forum
A question about python in Raspberry
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A question about python in Raspberry
#1
Good day community! this is my first post and i need to say something before start: I'm not a native English speaker, so, let me say sorry at this moment for my grammar mistakes.

Well the thing is:
I'm working on a python script that reads code bars in Colombian's ID, I'm using a simple input function, a code bar scanner and a i'm working on a Raspberry Pi 3 b+.
So, my problem is:
When I run the script using python2 the input function returns my codebar information with a tab separation between numerID and name, that's really useful for the goal that I tried to achieve, but when I run it with python3 the tab separation doesn't appear and I need to work with python3 for libs issues...
Why is this happening? theres some way to fix it?

Hope you have a wonderful life and thanks for reading :3
Reply
#2
can you show your code?
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#3
it's just:
x = input('Ingrese el numero de cedula')

I'd love to show my command prompt output but it shows my personal information and I don't thing that it could be a good idea
Reply
#4
I don't know what comes from your barcode scaner, but read this:
https://python-forum.io/Thread-Python3-2...-raw-input
to understand the difference between input() in python2 and python3
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Video recording with Raspberry Pi - What´s wrong with my python code? Montezuma1502 3 1,179 Feb-24-2023, 06:14 PM
Last Post: deanhystad
  Coding for Python and Raspberry pi beast 3 39,239 Sep-21-2021, 09:56 PM
Last Post: beast
  python 3 raspberry pi 4 dual control motor programming problem yome 0 1,938 Mar-21-2021, 05:17 PM
Last Post: yome
  Embedded python fails to compile on Raspberry Pi tryfon 2 3,398 Dec-22-2020, 02:06 PM
Last Post: tryfon
  Uploading files to NAS from Raspberry PI using python zazas321 0 2,424 Sep-07-2020, 09:02 AM
Last Post: zazas321
  Port my python program to Raspberry pi seamlessly Hassibayub 1 1,896 Jun-29-2020, 12:58 PM
Last Post: snippsat
  Raspberry Pi Python Rest Post madaxe 0 1,329 Nov-01-2019, 07:30 PM
Last Post: madaxe
  Raspberry - Python 3.7 - Installation trouble madjo1983 2 3,029 Jul-07-2019, 02:06 AM
Last Post: DeaD_EyE
  Install Python on Raspberry Pi 3 B+ loren41 4 4,367 May-03-2019, 03:13 PM
Last Post: loren41
  Gamepad vibration in raspberry pi with Python don't work sleepwalk 0 2,732 Mar-07-2019, 10:24 PM
Last Post: sleepwalk

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020