Questions tagged [empy]

EmPy is a python text templating system, based on expansions.

Empy is a python text templating system, using an expansion syntax. By default the @ symbol signals the start of an EmPy statement.

Homepage: http://www.alcyone.com/software/empy/

9 questions
2
votes
4 answers

[] is not identical to []

I was asked to write a function sortByFoo in Javascript that would react correctly to this test : // Does not crash on an empty array console.log(sortByFoo([]) === []); But I've tried something : [] === []; >> false Just so I can be sure, such a…
Mat
  • 952
  • 2
  • 11
  • 28
1
vote
0 answers

Removing duplication between similar functions in C and C++, in an EmPy template

Those @things are EmPy C++ const char * publish__@(spec.base_type.type)(void * untyped_data_writer, const void * untyped_message) { DataWriter * topic_writer = static_cast(untyped_data_writer); const __ros_msg_type &…
madratman
  • 127
  • 2
  • 8
1
vote
1 answer

Check if Wordpress loop has posts

I have a custom loop with posts which are added from the custom meta field checkbox. Only if the checkbox is checked, then the post is being added to the loop. I have a container that holds that loop. What i want to do is to check if that loop got…
Vasili
  • 17
  • 1
  • 5
0
votes
1 answer

ModuleNotFoundError: No module named 'em' despite empy being installed when using colcon build in carla-ros-bridge wsl-2

When running colcon build in the carla-ros-bridge root directory in wsl-2, python throws ModuleNotFoundError: No module named 'em'. Specifically, it produces this output: --- stderr: carla_ros_scenario_runner_types CMake Error at…
Jakob-Go
  • 1
  • 1
0
votes
1 answer

Pip3 can't install "empy" for python 3.8.6 (No matching distribution found for empy)

I was trying to install empy with pip3 install empy command inside a virtual environment created with python 3.8.6 on my ubuntu 18.04 pc but got the following main error: ERROR: Could not find a version that satisfies the requirement empy (from…
0
votes
1 answer

ROS Melodic catkin_make fail

So my catkin_make fails with error AttributeError: 'module' object has no attribute 'Interpreter' As I searched for a solution I found that the problem is that there is a confusion between the em and the empy packages, so I proceeded to remove the…
M090009
  • 1,129
  • 11
  • 20
0
votes
0 answers

PHP Array to string to mysql - empty record

I am on point where I have to usk on forum. So, I have an array that is my return from join table sql query. i am displaying it correctly without the problem. but some of those values I want to put in different table of mysql database. $array =…
uneasy
  • 547
  • 1
  • 7
  • 17
0
votes
1 answer

FQL query returning empty array

FQL query returning empty. I run the following FQL in https://developers.facebook.com/tools/explorer: SELECT uid, name, username, birthday_date, current_location, online_presence FROM user WHERE relationship_status ='Single' AND uid IN (SELECT uid2…
Jean
  • 41
  • 6
0
votes
1 answer

How can I use empy Templates with conditional expansion?

I try to use em.py's conditional to expand different, if a variable has a value: import em d1={"year":2012, "title":"abc"} d2={"year":None, "title":"abc"} p="@(year?year)@title" # the pattern #p="@(year?year - )@title" # this does not work print…
Jörg Beyer
  • 3,631
  • 21
  • 35