Python Forum
Cant pass corect variables to python script in bash script
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cant pass corect variables to python script in bash script
#1
Hi im not familiar with python, I have som strange problem.

I have a bash script for example test.sh:

#!/usr/bin/bash

/usr/bin/python3.4 /home/my/test.py "$1"



If I call script test.py directly from command line as /usr/bin/python3.4 /home/my/test.py "ťčšťčš" it works


If a call script test.sh from commandline: test.sh "ťčšťčš" it not works

if im using only English chars it works in argument.. problem is only with non-English chars.



How to debug this ? Please help..
Im think everythink is Unicode... so bash is Unicode friendly python 3 is too .. I have no idea where is the problem ... sorry for my English..

sorry my mistake... ist a bit complicated...


Runing bash script works...


I wish use that bash script in sieve filter... so sieve passing utf8 encoded variables to bash and bash passint it to python... with only english chars it is ok.. but passing non english is buggy it

please delete this thread
Reply


Messages In This Thread
Cant pass corect variables to python script in bash script - by neradp - Nov-04-2016, 11:10 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Problems passing arguments containing spaces to bash script and then on to python kaustin 6 347 Apr-03-2024, 08:26 PM
Last Post: deanhystad
  Using a script to open multiple shells? SuchUmami 9 456 Apr-01-2024, 10:04 AM
Last Post: Gribouillis
  How to include one script into another? MorningWave 8 433 Mar-21-2024, 10:34 PM
Last Post: MorningWave
  ChromeDriver breaking Python script genericusername12414 1 299 Mar-14-2024, 09:39 AM
Last Post: snippsat
  using PowerShell from Python script for mounting shares tester_V 8 511 Mar-12-2024, 06:26 PM
Last Post: tester_V
  No Internet connection when running a Python script basil_555 8 578 Mar-11-2024, 11:02 AM
Last Post: snippsat
Question Running Python script through Task Scheduler? Winfried 8 467 Mar-10-2024, 07:24 PM
Last Post: Winfried
  Combine console script + GUI (tkinter) dejot 2 421 Feb-27-2024, 04:38 PM
Last Post: deanhystad
  How to receive two passed cmdline parameters and access them inside a Python script? pstein 2 339 Feb-17-2024, 12:29 PM
Last Post: deanhystad
  OBS Script Troubleshooting Jotatochips 0 293 Feb-10-2024, 06:18 PM
Last Post: Jotatochips

Forum Jump:

User Panel Messages

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