Remove unicode characters from returned variable - Tautulli Newsletter Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Suppress the u'prefix indicating unicode' in python stringsRemove zero width space unicode character from Python stringHow to return multiple values from a function?What is the best way to remove accents in a Python unicode string?How do I remove an element from a list by index in Python?How to remove items from a list while iterating?CSS using firebug with tab computed style questionHow to remove a key from a Python dictionary?Spanish characters with Trebuchet font?Cannot display HTML stringWhy is executing Java code in comments with certain Unicode characters allowed?How do I fix “fallback” weight for different fonts?

Putting class ranking in CV, but against dept guidelines

How to write capital alpha?

Why weren't discrete x86 CPUs ever used in game hardware?

A term for a woman complaining about things/begging in a cute/childish way

Is multiple magic items in one inherently imbalanced?

How can I prevent/balance waiting and turtling as a response to cooldown mechanics

Constant factor of an array

Is it possible for SQL statements to execute concurrently within a single session in SQL Server?

Why do early math courses focus on the cross sections of a cone and not on other 3D objects?

Was Kant an Intuitionist about mathematical objects?

Question about this thing for timpani

Resize vertical bars (absolute-value symbols)

Caught masturbating at work

Monty Hall Problem-Probability Paradox

Tips to organize LaTeX presentations for a semester

I got rid of Mac OSX and replaced it with linux but now I can't change it back to OSX or windows

What is the "studentd" process?

What does the writing on Poe's helmet say?

Flight departed from the gate 5 min before scheduled departure time. Refund options

How to change the tick of the color bar legend to black

How does light 'choose' between wave and particle behaviour?

Special flights

What is the role of と after a noun when it doesn't appear to count or list anything?

Central Vacuuming: Is it worth it, and how does it compare to normal vacuuming?



Remove unicode characters from returned variable - Tautulli Newsletter



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)
Data science time! April 2019 and salary with experience
The Ask Question Wizard is Live!Suppress the u'prefix indicating unicode' in python stringsRemove zero width space unicode character from Python stringHow to return multiple values from a function?What is the best way to remove accents in a Python unicode string?How do I remove an element from a list by index in Python?How to remove items from a list while iterating?CSS using firebug with tab computed style questionHow to remove a key from a Python dictionary?Spanish characters with Trebuchet font?Cannot display HTML stringWhy is executing Java code in comments with certain Unicode characters allowed?How do I fix “fallback” weight for different fonts?



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I want to include actors from films in my Tautulli newsletter for my Plex media collection. The newsletter template file is html and the language is mako so a mix of python, html and css.



This code returns the correct values



<p style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-weight: 400;margin: 0;max-width: 325px;color: #ffffff;">

Actors: $movie['actors']

</p>


It appears like



Actors: [u'Amalia Williamson', u'Celina Martin', u'Joelle Farrow']


To be usable I'd need to remove the the unicode characters



 [u'


I have tried a couple of things and this was the most promising lead, however I couldn't get it to work.



Can anyone please amend the code so it will work please? Thank you!










share|improve this question






















  • Possible duplicate of Remove unicode character from python string

    – C. Lightfoot
    Mar 22 at 12:16











  • Please edit the answer to show how exactly you want the output to look like.

    – lenz
    Mar 22 at 12:53











  • This thread is maybe relevant to your problem too.

    – lenz
    Mar 22 at 12:54











  • Thank you for the responses. For the above example I wanted the output to be Actors: Glynn Turman, Hailee Steinfeld, Jason The answer given by snakecharmerb worked perfectly!

    – Dave Matthews
    Mar 23 at 10:33


















0















I want to include actors from films in my Tautulli newsletter for my Plex media collection. The newsletter template file is html and the language is mako so a mix of python, html and css.



This code returns the correct values



<p style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-weight: 400;margin: 0;max-width: 325px;color: #ffffff;">

Actors: $movie['actors']

</p>


It appears like



Actors: [u'Amalia Williamson', u'Celina Martin', u'Joelle Farrow']


To be usable I'd need to remove the the unicode characters



 [u'


I have tried a couple of things and this was the most promising lead, however I couldn't get it to work.



Can anyone please amend the code so it will work please? Thank you!










share|improve this question






















  • Possible duplicate of Remove unicode character from python string

    – C. Lightfoot
    Mar 22 at 12:16











  • Please edit the answer to show how exactly you want the output to look like.

    – lenz
    Mar 22 at 12:53











  • This thread is maybe relevant to your problem too.

    – lenz
    Mar 22 at 12:54











  • Thank you for the responses. For the above example I wanted the output to be Actors: Glynn Turman, Hailee Steinfeld, Jason The answer given by snakecharmerb worked perfectly!

    – Dave Matthews
    Mar 23 at 10:33














0












0








0








I want to include actors from films in my Tautulli newsletter for my Plex media collection. The newsletter template file is html and the language is mako so a mix of python, html and css.



This code returns the correct values



<p style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-weight: 400;margin: 0;max-width: 325px;color: #ffffff;">

Actors: $movie['actors']

</p>


It appears like



Actors: [u'Amalia Williamson', u'Celina Martin', u'Joelle Farrow']


To be usable I'd need to remove the the unicode characters



 [u'


I have tried a couple of things and this was the most promising lead, however I couldn't get it to work.



Can anyone please amend the code so it will work please? Thank you!










share|improve this question














I want to include actors from films in my Tautulli newsletter for my Plex media collection. The newsletter template file is html and the language is mako so a mix of python, html and css.



This code returns the correct values



<p style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-weight: 400;margin: 0;max-width: 325px;color: #ffffff;">

Actors: $movie['actors']

</p>


It appears like



Actors: [u'Amalia Williamson', u'Celina Martin', u'Joelle Farrow']


To be usable I'd need to remove the the unicode characters



 [u'


I have tried a couple of things and this was the most promising lead, however I couldn't get it to work.



Can anyone please amend the code so it will work please? Thank you!







python html unicode ascii mako






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 22 at 12:00









Dave MatthewsDave Matthews

31




31












  • Possible duplicate of Remove unicode character from python string

    – C. Lightfoot
    Mar 22 at 12:16











  • Please edit the answer to show how exactly you want the output to look like.

    – lenz
    Mar 22 at 12:53











  • This thread is maybe relevant to your problem too.

    – lenz
    Mar 22 at 12:54











  • Thank you for the responses. For the above example I wanted the output to be Actors: Glynn Turman, Hailee Steinfeld, Jason The answer given by snakecharmerb worked perfectly!

    – Dave Matthews
    Mar 23 at 10:33


















  • Possible duplicate of Remove unicode character from python string

    – C. Lightfoot
    Mar 22 at 12:16











  • Please edit the answer to show how exactly you want the output to look like.

    – lenz
    Mar 22 at 12:53











  • This thread is maybe relevant to your problem too.

    – lenz
    Mar 22 at 12:54











  • Thank you for the responses. For the above example I wanted the output to be Actors: Glynn Turman, Hailee Steinfeld, Jason The answer given by snakecharmerb worked perfectly!

    – Dave Matthews
    Mar 23 at 10:33

















Possible duplicate of Remove unicode character from python string

– C. Lightfoot
Mar 22 at 12:16





Possible duplicate of Remove unicode character from python string

– C. Lightfoot
Mar 22 at 12:16













Please edit the answer to show how exactly you want the output to look like.

– lenz
Mar 22 at 12:53





Please edit the answer to show how exactly you want the output to look like.

– lenz
Mar 22 at 12:53













This thread is maybe relevant to your problem too.

– lenz
Mar 22 at 12:54





This thread is maybe relevant to your problem too.

– lenz
Mar 22 at 12:54













Thank you for the responses. For the above example I wanted the output to be Actors: Glynn Turman, Hailee Steinfeld, Jason The answer given by snakecharmerb worked perfectly!

– Dave Matthews
Mar 23 at 10:33






Thank you for the responses. For the above example I wanted the output to be Actors: Glynn Turman, Hailee Steinfeld, Jason The answer given by snakecharmerb worked perfectly!

– Dave Matthews
Mar 23 at 10:33













1 Answer
1






active

oldest

votes


















0














movie['actors'] appears to be a list, so rendering it will the repr of the list and its contents. Joining the invidual strings into a lrager string should do what you want.



>>> print u', '.join([u'Amalia Williamson', u'Celina Martin', u'Joelle Farrow'])
Amalia Williamson, Celina Martin, Joelle Farrow


In your template:



Actors: $u', '.join(movie['actors'])





share|improve this answer























  • Brilliant, worked like a charm :) Thank you very much!

    – Dave Matthews
    Mar 23 at 10:29












Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55299178%2fremove-unicode-characters-from-returned-variable-tautulli-newsletter%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














movie['actors'] appears to be a list, so rendering it will the repr of the list and its contents. Joining the invidual strings into a lrager string should do what you want.



>>> print u', '.join([u'Amalia Williamson', u'Celina Martin', u'Joelle Farrow'])
Amalia Williamson, Celina Martin, Joelle Farrow


In your template:



Actors: $u', '.join(movie['actors'])





share|improve this answer























  • Brilliant, worked like a charm :) Thank you very much!

    – Dave Matthews
    Mar 23 at 10:29
















0














movie['actors'] appears to be a list, so rendering it will the repr of the list and its contents. Joining the invidual strings into a lrager string should do what you want.



>>> print u', '.join([u'Amalia Williamson', u'Celina Martin', u'Joelle Farrow'])
Amalia Williamson, Celina Martin, Joelle Farrow


In your template:



Actors: $u', '.join(movie['actors'])





share|improve this answer























  • Brilliant, worked like a charm :) Thank you very much!

    – Dave Matthews
    Mar 23 at 10:29














0












0








0







movie['actors'] appears to be a list, so rendering it will the repr of the list and its contents. Joining the invidual strings into a lrager string should do what you want.



>>> print u', '.join([u'Amalia Williamson', u'Celina Martin', u'Joelle Farrow'])
Amalia Williamson, Celina Martin, Joelle Farrow


In your template:



Actors: $u', '.join(movie['actors'])





share|improve this answer













movie['actors'] appears to be a list, so rendering it will the repr of the list and its contents. Joining the invidual strings into a lrager string should do what you want.



>>> print u', '.join([u'Amalia Williamson', u'Celina Martin', u'Joelle Farrow'])
Amalia Williamson, Celina Martin, Joelle Farrow


In your template:



Actors: $u', '.join(movie['actors'])






share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 22 at 13:15









snakecharmerbsnakecharmerb

12.3k42553




12.3k42553












  • Brilliant, worked like a charm :) Thank you very much!

    – Dave Matthews
    Mar 23 at 10:29


















  • Brilliant, worked like a charm :) Thank you very much!

    – Dave Matthews
    Mar 23 at 10:29

















Brilliant, worked like a charm :) Thank you very much!

– Dave Matthews
Mar 23 at 10:29






Brilliant, worked like a charm :) Thank you very much!

– Dave Matthews
Mar 23 at 10:29




















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55299178%2fremove-unicode-characters-from-returned-variable-tautulli-newsletter%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript