Python Forum
How to use a variable as part of a filename
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to use a variable as part of a filename
#5
That's working well,however when there is more text following the braces, it is ignored.
For example:
command = 'fbink -t regular=/mnt/us/clock/bahnschrift.ttf,top=1410,px=35,format "BATTERY {}%" -me'.format(batpercent)
The % (or any other text) is not displayed.
?
Reply


Messages In This Thread
RE: How to use a variable as part of a filename - by handyguy - Dec-24-2019, 03:56 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Calling functions by making part of their name with variable crouzilles 4 949 Nov-02-2023, 12:25 PM
Last Post: noisefloor
  How to write a part of powershell command as a variable? ilknurg 2 1,201 Jul-26-2022, 11:31 AM
Last Post: ilknurg
  Rename part of filename in multiple files atomxkai 7 7,617 Feb-18-2022, 10:03 PM
Last Post: atomxkai
  Append files and add column with last part of each filename NiKirk 0 2,716 Feb-04-2022, 07:35 AM
Last Post: NiKirk
  How to include input as part of variable name Mark17 4 2,631 Oct-01-2021, 06:45 PM
Last Post: Mark17
  How to use a variable in Python (2.x) to define decimal part? MDRI 4 2,426 May-07-2021, 12:39 AM
Last Post: MDRI
  Print part of a variable rs74 4 2,689 Jul-27-2020, 04:39 PM
Last Post: rs74

Forum Jump:

User Panel Messages

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