2024-09-20 22:54:53 发布
网友
我正在运行一个python网站,并希望在azurecloudservice的WebRole上使用LocalStorage。在
LocalStorage
我无法得到存储的路径,只能使用C中的RoleEnvironment.GetLocalResource(name_of_storage)。在
RoleEnvironment.GetLocalResource(name_of_storage)
那么在Python中RoleEnvironment.GetLocalResource的等效版本是什么呢?在
RoleEnvironment.GetLocalResource
我已经用一个简单的环境变量“proxy”来处理这个问题。在
多亏了这个article。在
static void Main(string[] args) { foreach (var arg in args) { var path = RoleEnvironment.GetLocalResource(arg).RootPath; Console.WriteLine($"LocalRes_{arg}: {path}"); Environment.SetEnvironmentVariable($"LocalRes_{arg}", path, EnvironmentVariableTarget.Machine); }
它加载LocalResource配置,然后将它们复制到系统环境变量中。在
LocalResource
对我有用。在
我已经用一个简单的环境变量“proxy”来处理这个问题。在
多亏了这个article。在
它加载
LocalResource
配置,然后将它们复制到系统环境变量中。在对我有用。在
相关问题 更多 >
编程相关推荐