我想通过 powershell 脚本运行 python 模块升级。第一行有效。
但我不知道如何将文件正确读入第二个 pip 行。我收到此错误:
Could not find a version that satisfies the requirement Get-Content
pip freeze| Out-File requirements.txt
pip install --upgrade Get-Content requirements.txt
Remove-Item requirements.txt
Run Code Online (Sandbox Code Playgroud)
更新:现在可以使用更改后的第二行。
pip freeze| Out-File requirements.txt
foreach($line in Get-Content requirements.txt)
{
pip install --upgrade $line
}
Remove-Item requirements.txt
Run Code Online (Sandbox Code Playgroud)
更新 2 现在,在 python 3.6 中,我使用这个脚本。
$(
$exclude = 'virtualenv', 'prompt-toolkit'
pip list --outdated --format=freeze | ForEach{ $_.split("=")[0]} | Where-Object { $exclude -notcontains $_ } | ForEach { pip install -U $_ }
) …Run Code Online (Sandbox Code Playgroud) 我正在尝试像这样更改样式和字体大小
sns.set_style("whitegrid")
sns.set(font_scale=1.5)
Run Code Online (Sandbox Code Playgroud)
但似乎两者是相互排斥的。我一次只能使用其中的一行。如何使这两种变化显而易见?
我想在标签周围放一个边框.但边界似乎有一些填充,或边缘,并没有接近标签.
<Style x:Key="ArithmeticBorder" TargetType="Border">
<Setter Property="BorderBrush" Value="Blue" />
<Setter Property="BorderThickness" Value="6" />
<Setter Property="CornerRadius" Value="6" />
<Setter Property="Grid.Row" Value="4"/>
<Setter Property="Grid.Column" Value="0"/>
</Style>
<Border Style="{StaticResource ArithmeticBorder}">
<Label Content="Arithmetic"
HorizontalAlignment="Left"
Foreground="DarkBlue"
Background="Yellow"
FontStyle="Oblique"
FontSize="16"
FontFamily="Comic"
Height="58.012"
Width="100"
Margin="0,23.2,0,0"
VerticalAlignment="Top"
HorizontalContentAlignment="Center"
VerticalContentAlignment="Center"
/>
Run Code Online (Sandbox Code Playgroud) clear()在这种情况下不起作用。我追加后追加。
searchForMovie.clear()无法运作...我也曾尝试传送
CTRL + 'a',然后传送DELETE。同样,我得到的只是附件...
for movie in allMissing:
time.sleep (10)
searchForMovie = WebDriverWait (driver, 10).until \
(EC.presence_of_element_located ((By.CSS_SELECTOR, "#search-text")))
searchForMovie.send_keys (movie)
# click
enter = WebDriverWait (driver, 10).until \
(EC.presence_of_element_located ((By.CSS_SELECTOR, "#search-submit")))
driver.execute_script ("arguments[0].click()", enter)
# clear the search text box
searchForMovie = WebDriverWait (driver, 10).until \
(EC.presence_of_element_located ((By.CSS_SELECTOR, "#search-text")))
searchForMovie.clear()
Run Code Online (Sandbox Code Playgroud) selenium css-selectors python-3.x selenium-webdriver webdriverwait
python-3.x ×2
c# ×1
label ×1
pip ×1
powershell ×1
python ×1
seaborn ×1
selenium ×1
wpf ×1
xaml ×1