Python Forum
<SOLVED>os.system needs a string in quotes
Thread Rating:
  • 2 Vote(s) - 2.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
<SOLVED>os.system needs a string in quotes
#4
bash escapes this characters when you hit tab on auto-complete:

 !"$&'()*,:;<=>?@[\]^`{|} # plus lisht space
Here is what you get with echo:
Output:
$ echo ( bash: syntax error near unexpected token `newline'
And with escaping the '(':
Output:
$ echo \( (

Why you don't use os.path.join() instead of  pwd+"/"+filename
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply


Messages In This Thread
RE: os.system needs a string in quotes - by wavic - Oct-04-2016, 08:45 PM
RE: os.system needs a string in quotes - by Ofnuts - Oct-05-2016, 08:42 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Question [SOLVED] Open file, and insert space in string? Winfried 3 175 35 minutes ago
Last Post: Winfried
Question [SOLVED] [Beautiful Soup] Replace tag.string from another file? Winfried 2 627 May-01-2025, 03:43 PM
Last Post: Winfried
  [SOLVED] Sub string not found in string ? jehoshua 4 1,600 Dec-03-2024, 09:17 PM
Last Post: jehoshua
Question [SOLVED] How to replace characters in a string? Winfried 2 1,211 Sep-04-2024, 01:41 PM
Last Post: Winfried
  Need help on how to include single quotes on data of variable string hani_hms 5 7,846 Jan-10-2023, 11:26 AM
Last Post: codinglearner
  [SOLVED] [BeautifulSoup] Why does it turn inserted string's brackets into &lt;/&gt;? Winfried 0 2,820 Sep-03-2022, 11:21 PM
Last Post: Winfried
  [SOLVED] [BeautifulSoup] Turn select() into comma-separated string? Winfried 0 2,005 Aug-19-2022, 08:07 PM
Last Post: Winfried
  Adding string after every 3rd charater [SOLVED] AlphaInc 2 2,211 Jul-11-2022, 09:22 AM
Last Post: ibreeden
Question [SOLVED] Delete specific characters from string lines EnfantNicolas 4 3,432 Oct-21-2021, 11:28 AM
Last Post: EnfantNicolas
  Replace String in multiple text-files [SOLVED] AlphaInc 5 11,543 Aug-08-2021, 04:59 PM
Last Post: Axel_Erfurt

Forum Jump:

User Panel Messages

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