Skip to content

Tag: python

Creat a list of variables with a specific prefix [closed]

Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 12 months ago. Improve this question I have a series of variables called pic1, pic2, pic3 etc. I want to crea…

Unmatch escaped braces

Which regular expression can I use to find all }, all while excluding escaped }? I.e. how do I get as only match: Answer The following pattern should achieve your goal: The pattern you’re looking for is (?<!…): Matches if the current position in the string is not preceded by a match for ……

Python cannot import from parent directory despite having made package

I am fairly new to Python, and despite searching all over and following many guides on this site, I am still stuck with a strange issue. Folder structure is as follows I am trying to simply import something from app.py into test_this.py I have tried a few different things so far, from app import func – …

rrd_fetch does not contain values from last update. why?

I am storing information from temperature sensors in a rrd. I want to retrieve the values from a given timespan in php. For data from the last 2 hours, I use this: This is working. However, the last value that I can get via rrd_lastupdate($file); is not found in the data from rrd_fetch. How can I adapt my cod…