Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: No Internet connection when running a Python script
Post: RE: No Internet connection when running a Python s...
(Mar-10-2024, 08:49 PM)DeaD_EyE Wrote: I tested his code and ran into this issue. lxml was not installed.It was not installed on YOUR machine. There is no info about OP setup - may or may not be ins... |
|
buran |
General Coding Help |
8 |
402 |
Mar-10-2024, 10:11 PM |
|
|
Thread: No Internet connection when running a Python script
Post: RE: No Internet connection when running a Python s...
(Mar-10-2024, 05:53 PM)DeaD_EyE Wrote: In this case lxml wasn't installed,well, I don't know how you know it is not installed on OP machine |
|
buran |
General Coding Help |
8 |
402 |
Mar-10-2024, 07:28 PM |
|
|
Thread: No Internet connection when running a Python script
Post: RE: No Internet connection when running a Python s...
The indentation is a mess. Fix that in your post. Also don't use bare except. Remove the try/except to get meaningful error message na debug properly |
|
buran |
General Coding Help |
8 |
402 |
Mar-10-2024, 09:42 AM |
|
|
Thread: Is a good practice naming user defined python functions with prefix udf_?
Post: RE: Is a good practice naming user defined python ...
I don't see any added benefit, just extra typing. all functions in the module are "user defined" |
|
buran |
News and Discussions |
2 |
235 |
Mar-09-2024, 01:40 PM |
|
|
Thread: using ctypes to use a dll in a python module
Post: RE: using ctypes to use a dll in a python module
What do you get if you do print(dir(myLib)) |
|
buran |
General Coding Help |
3 |
276 |
Mar-05-2024, 03:06 PM |
|
|
Thread: ValueError: could not convert string to float: '' fron Entry Widget
Post: RE: ValueError: could not convert string to float:...
Show minimal reproducible example of your code |
|
buran |
GUI |
5 |
342 |
Mar-04-2024, 06:49 PM |
|
|
Thread: print(0.1+0.2==0.3)
Post: RE: print(0.1+0.2==0.3)
Some useful links
https://docs.python.org/3/tutorial/floatingpoint.html
https://docs.python.org/3/faq/design.html#id5
https://stackoverflow.com/q/588004/4046632 |
|
buran |
General Coding Help |
3 |
270 |
Mar-04-2024, 08:50 AM |
|
|
Thread: Json API
Post: RE: Json API
Have a look at the docs 5.1.5.3. Changing Query Results with Rowfactories. There is an example how to return dict from query. |
|
buran |
General Coding Help |
4 |
340 |
Mar-03-2024, 05:18 AM |
|
|
Thread: Fred Economic Data API
Post: RE: Fred Economic Data API
Are you behind a proxy or something? Also, please, don't post images of code/data/errors. Post as text using BBCode |
|
buran |
Web Scraping & Web Development |
2 |
223 |
Feb-26-2024, 06:29 PM |
|
|
Thread: Explanation of code
Post: RE: Explanation of code
(Feb-26-2024, 02:41 PM)ejKDE Wrote: even though function is called without arguments?You never call the function format_selector yourself, it's called internally from YoutubeDL.download and it expec... |
|
buran |
General Coding Help |
4 |
275 |
Feb-26-2024, 02:49 PM |
|
|
Thread: Scratch pad for writing forum threads / posts with markdown/markup
Post: RE: Scratch pad for writing forum threads / posts ...
why not save draft posts, at least here on forum |
|
buran |
Bar |
2 |
247 |
Feb-25-2024, 08:46 PM |
|
|
Thread: Operation result class
Post: RE: Operation result class
(Feb-25-2024, 10:12 AM)SirDonkey Wrote: some kind of a second hidden control flowwhat do you mean by that? |
|
buran |
General Coding Help |
6 |
393 |
Feb-25-2024, 10:40 AM |
|
|
Thread: Operation result class
Post: RE: Operation result class
As other already said - in python you can raise Exceptions and warnings
I am not sure how info is different from success so not sure what to suggest about it.
also if you need to return multiple value... |
|
buran |
General Coding Help |
6 |
393 |
Feb-24-2024, 07:52 PM |
|
|
Thread: Decorators @ annotation
Post: RE: Decorators @ annotation
(Feb-23-2024, 04:25 PM)drcl Wrote: How is that good if I want to use my function in other decorators?You use the decorator on your function, not your function in decorators.
Actually the decorators ... |
|
buran |
General Coding Help |
3 |
307 |
Feb-24-2024, 06:07 AM |
|
|
Thread: file transfer
Post: RE: file transfer
(Feb-18-2024, 07:10 AM)DPaul Wrote: Yes, you are right. I did think of that, but:
The place where I create these "files", is not the same (physically)
as where the server is. Hence.I don't see why ... |
|
buran |
Bar |
10 |
629 |
Feb-18-2024, 07:53 AM |
|
|
Thread: file transfer
Post: RE: file transfer
I don't how you create the files and how long it takes, but right now it looks like your workflow is to create all (or batch of) files and then move them at once and you clock that time. Is it plausib... |
|
buran |
Bar |
10 |
629 |
Feb-18-2024, 06:42 AM |
|
|
Thread: Python3 string slicing
Post: RE: Python3 string slicing
(Feb-16-2024, 08:06 AM)Luchano55 Wrote: counting begins at 0 and ends at -1That is not correct statement. The correct is that you can use both positive and negative indexes.
spam = list(range(10))
... |
|
buran |
General Coding Help |
4 |
517 |
Feb-16-2024, 10:07 AM |
|
|
Thread: File loop curiously skipping files - FIXED
Post: RE: File loop curiously skipping files - FIXED
You should use context manager to open the file (with statement). it will close the file for you at the end.
Although not related to your problem, I'm surprised, nobody mentioned you should not use b... |
|
buran |
General Coding Help |
10 |
661 |
Feb-10-2024, 07:08 AM |
|
|
Thread: conversion of newlines in a string
Post: RE: conversion of newlines in a string
>>> foo = 'spam\reggs\nspam\r\neggs'
>>> '\n'.join(foo.splitlines())
'spam\neggs\nspam\neggs'docs for str.splitlines() |
|
buran |
News and Discussions |
3 |
466 |
Jan-14-2024, 02:04 PM |
|
|
Thread: [solved] list content check
Post: RE: list content check
(Jan-03-2024, 02:10 PM)paul18fr Wrote: is there a simplier way to test a list content?b **smile**
(solution#2 does the job in a single line)It's unclear what exactly you try to check
>>> s... |
|
buran |
General Coding Help |
6 |
589 |
Jan-03-2024, 02:46 PM |