@TestFlightX · Post #35138 · 07.04.2026 г., 17:12
#Steam Mobile https://testflight.apple.com/join/8BOPXsGz
Hashtags
TGINSIGHT SIMILAR POSTS
Изворен канал @pythonotes · Post #22 · 19 јан.
Заметка начинающим, которые часто сталкиваются с подобной непоняткой. Ситуация следующая, есть список файлов: names = [ 'image.bmp', 'second.txt.bkp', 'data.db', '.config.cfg', 'file.ext.bkp' ] И мы хотим убрать у них окончание ".bkp". Не знаю зачем, пример довольно надуманный) Но суть он показывает, а это главное. Те, кто еще не очень знаком с библиотекой os.path или pathlib, вероятно решат обработать имена как строки. И тут вполне подойдет метод строки strip(). Что делает этот метод? Он отрезает указанные символы по обеим сторонам строки. Если ничего не указать, то убирает невидимые символы (пробелы, табуляции и переносы строк). В нашем случае будет выглядеть вот так: >>> name.strip('.bkp') То есть просим удалить строку '.bkp' по краям имени файла, если таковая есть. Можно применить аналогичный метод rstrip(), чтобы отрезать только справа, но для этого примера используем обычный. >>> for name in names: >>> print(name.strip('.bkp')) image.bm second.txt data.d config.cfg file.ext Хм, что-то не то с нашими именами! Что случилось??? Видим нежелательное переименование в именах, где и близко не было указанной строки '.bkp' А дело всё в том, что данный метод ищет не указанную строку, а указанные символы, и не важно в каком порядке. Для метода strip() строка '.bkp' это не паттерн для поискаа список символов. Потому он отрезал симовол 'p' от '.bmp' и удалил точку из файла '.config.cfg'. Как тогда правильно заменить именно паттерн? Для начинающего можно посоветовать метод строки replace(), который как раз использует для замены указанную строку целиком. В нашем примере заменим её на пустую строку. >>> for name in names: >>> print(name.replace('.bkp', '')) image.bmp second.txt data.db .config.cfg file.ext Уже лучше, но помните, это лишь пример про strip(). Для работы с именами файлов есть способы и более "правильные", дающие однозначно верный результат. Я взял файлы только в качестве примера. Даже replase() тут может сделать не то что ожидаем. Просто впредь будьте внимательны с этим strip(). #basic
Hashtags
Пребарај: #steam
@TestFlightX · Post #35138 · 07.04.2026 г., 17:12
#Steam Mobile https://testflight.apple.com/join/8BOPXsGz
Hashtags
@ParadoxW98 · Post #24067 · 12.02.2025 г., 22:47
Steam发布公告:禁止在游戏中植入干扰玩家体验的广告 开发者不应该使用付费广告作为游戏内的业务模式,例如要求玩家观看广告或以其他方式参与广告才能玩游戏,或是用广告来限制游戏内容。 🗒 标签: #Steam
Hashtags
@linuxgram · Post #18771 · 13.05.2026 г., 09:59
📰 Unreal Engine 5.8 adds experimental Steam Frame support, Qualcomm give the Steam Frame a dedicated page Valve's new VR kit the Steam Frame appears to be inching closer to a release announcement - here's two more fun bits of news on it for you.Read the full article on GamingOnLinux. 🔗 Source: https://www.gamingonlinux.com/2026/05/unreal-engine-5-8-adds-experimental-steam-frame-support-qualcomm-give-the-steam-frame-a-dedicated-page/ #steam
Hashtags
@linuxgram · Post #18567 · 25.04.2026 г., 16:12
📰 Your Gen 5 SSD is probably throttling right now, and you have no idea You paid a premium for 14,000 MB/s speeds, but during a large Steam download or 4K video export, it feels like your PC is struggling to keep up and overall just comes across quite mushy. Unlike a CPU, which might trigger a loud fan spike, an SSD suffers in silence, making it hard for you to identify when it is actually occurring. 🔗 Source: https://www.xda-developers.com/your-pcie-50-ssd-might-be-throttling-without-you-knowing/ #steam
Hashtags
@linuxgram · Post #18465 · 16.04.2026 г., 22:16
📰 Proton 11.0 Beta Released With More Games Playable On Steam Play Valve and CodeWeavers have just released Proton 11.0 Beta as their first beta milestone for this software that powers Steam Play now rebased against upstream Wine 11.0... 🔗 Source: https://www.phoronix.com/news/Proton-11.0-Beta #steam
Hashtags
@linuxgram · Post #18297 · 03.04.2026 г., 13:59
📰 Valve recently confirmed Steam game pricing updates across different regions At the end of March, Valve issued an announcement to game developers on Steam about changes to how games get priced across different regions.Read the full article on GamingOnLinux. 🔗 Source: https://www.gamingonlinux.com/2026/04/valve-recently-confirmed-steam-game-pricing-updates-across-different-regions/ #steam
Hashtags
@linuxgram · Post #18285 · 02.04.2026 г., 15:05
📰 SteamOS 3.8 just dramatically improved a lot of handhelds except the Steam Deck itself The Steam Deck just saw one of its biggest updates enter the preview phase, and if you're on the Preview update channel, then chances are you've already updated it. After such a major update, you might realize that not much has changed, though. SteamOS 3.8 is, by all accounts, one of Valve's most important updates yet. It expands compatibility, improves performance, and lays the groundwork for something much bigger than a handheld. 🔗 Source: https://www.xda-developers.com/steamos-38-dramatically-improves-many-gaming-handhelds-except-steam-deck/ #steam
Hashtags
@linuxgram · Post #18119 · 20.03.2026 г., 07:36
📰SteamOS 3.8.0 is finally making the Steam Machine a reality The first glimpse of the Steam Machine's release date is on the horizon. 🔗 Source: https://www.xda-developers.com/steamos-380-is-finally-making-the-steam-machine-a-reality/ #steam
Hashtags
@linuxgram · Post #18057 · 13.03.2026 г., 23:43
📰 New Steam Release Fixes Proton Games Wrongly Flagged as Unplayable Also includes opt-in frame rate telemetry, hardware-tagged reviews, and several quality-of-life improvements. 🔗 Source: https://feed.itsfoss.com/link/24361/17298791/steam-client-march-2026-release #steam
Hashtags
@linuxgram · Post #17987 · 05.03.2026 г., 22:17
📰 Theme park building game Parkitect gets its first ever Steam Free Weekend Parkitect is an absolute gem and if you've not played this theme park builder before - well, now is your best chance because it's free for a while.Read the full article on GamingOnLinux. 🔗 Source: https://www.gamingonlinux.com/2026/03/theme-park-building-game-parkitect-gets-its-first-ever-steam-free-weekend/ #steam
Hashtags
@linuxgram · Post #17846 · 20.02.2026 г., 12:19
📰 Steam Deck now out of stock in Europe in addition to USA, Canada and Asia Unfortunately the stock availability of the Steam Deck has only worsened recently, with Europe now appearing to be completely out of stock.Read the full article on GamingOnLinux. 🔗 Source: https://www.gamingonlinux.com/2026/02/steam-deck-now-out-of-stock-in-europe-in-addition-to-usa-canada-and-asia/ #steam
Hashtags
@linuxgram · Post #17810 · 17.02.2026 г., 16:02
📰Valve confirm Steam Deck stock issues due to "memory and storage shortages" We reported recently how the Steam Deck was completely out of stock in the USA, Canada and Asia and now Valve have put up a short statement on it.Read the full article on GamingOnLinux. 🔗 Source: https://www.gamingonlinux.com/2026/02/valve-confirm-steam-deck-stock-issues-due-to-memory-and-storage-shortages/ #steam
Hashtags