
Front fork oil
Can I use motorcycle fork oil in my RockShox Revelation forks?
Technical spec states that it should be 5wt, will this stuff from eBay be correct?

Can I use motorcycle fork oil in my RockShox Revelation forks?
Technical spec states that it should be 5wt, will this stuff from eBay be correct?
Not sure if I am allowed to discuss other forums on here but I'm sure someone will tell me if not.
It is just me of has anybody else encountered problems with the 'moderators' on Stack Overflow Python forums recently? To say I've found them to be a self-righteous bunch of destructive power-crazy control-freaks would be a bit of an understatement. Anyone else had problems on there?
Is there some way to switch off print() output when Python is not running in interactive mode?
When I am testing it is good to see these messages on screen but when the process is running without an interactive terminal to output to it feels like it would be good to find a way to stop that output. However I don't know whether the overhead of these messages going nowhere matters or not.
Working on creating a small templating type engine to allow mixing of HTML and Python code and considering what to use as the delimiters between each. Beginning suggestion is:
HTML: <- begin HTML block
<% Python expression %>
Python: <- begin Python code block
<# HTML text #> <- output HTML with newline
<#= HTML text #> <- output HTML inline (no newline)
? "HTML text" <- output HTML whole line
?? "HTML text" <- output HTML whole line (on same line)
Are there more suitable 'Pythonic' delimiters which I should be using?
There seems to be a problem with changing a local variable within exec():
test = "test1"exec("test = 'test2'", {}, {"test": test})print(test) # <- erroneously returns test1
returns 'test1' - the change to 'test' during exec() has not persisted
However if passed inside a dict variable:
localDict = {"test": "test1"}exec("test = 'test2'", {}, localDict)test = localDict["test"]print(test) # <- correctly returns test2
It seems to work for some reason and returns 'test2'!
Is this a bug in exec() in Python 3.14?
I notice that the source code from an importlib module can be read using inspect module. However is there an alternative way of accessing this code so that it can be modified? Presumably inspect.getsource must have some method of finding this.
import inspect
import importlib
spec = importlib.util.spec_from_file_location(module_name, source_path)
module = importlib.util.module_from_spec(spec)
print(inspect.getsource(module))
Is there some way I can compile a .py script into a .pyc but only if it is missing or out-of-date with the.py file?
I am trying to compile the file if necessary and then run it from within Python, can exec() run a .pyc file?
import py_compile
py_compile.compile('Child.py')
exec(open('Child.py').read())
This works but recompiles the file on every run.
It it possible to configure Python to create a .pyc bytecode file for all simple *.py files which are run? It seems that by default it only creates a .pyc for any classes which is imported not for a program file itself.
Well, had a good listening session today and here are my thoughts:
Somewhere recently I saw an example of what was probably a WSGI server which had code to run the *.py file which had been requested, however can't seem to find that again. Lots of examples of simple WSGI servers but not the example I was looking for, anyone know where I might find that example?
Coming from the Foxpro world we used Textmerge to output multiline text such as HTML, is there a similar method available in Python?
In Fox an example might be:
Use CustomerSet Textmerge On\<html>\<head>\<title>HTML from FoxPro</title>\</head>\<body>\<h1>Customer List</h1>\<hr />Scan
\Company name is <<Upper(Company)>>
\<br />Endscan\</body>\</html>Set Textmerge OffUse In Customer
Can anyone tell me how to use Python to return a simple HTML page using something akin to the ASP Request/Response objects please?
There are lots of examples using various frameworks but can't find anything showing how to just do something very basic.