Jorge Alberto Diaz Orozco wrote at 2013-5-25 14:00 -0400:
>I have been doing the same thing and I tried to use java for testing the
>credentials and they are correct. It works perfectly with java.
>I really don´t know what we´re doing wrong.
Neither do I.
But the error message definitely origina
Rotwang writes:
> Hi all, I'm using Python 2.7.2 on Windows 7 and a module I've written
> is acting strangely. I can reproduce the behaviour in question with
> the following:
>
> --- begin bugtest.py ---
>
> import threading, Tkinter, os, pickle
>
> class savethread(threading.Thread):
> def _
Kushal Das writes:
> There is a comment on posixpath.join saying "Ignore the previous parts
> if a part is absolute."
It means: "join(something, abspath) == abspath" whenever "abspath"
is an absolute path.
> Is this defined in the POSIX spec ? If yes, then can someone please
> point me to a li
gmspro writes:
> I'm trying to understand the source code of python and how it works
> internally.
> But i can't understand the python C apis.
Usually, you try to understand the Python C api in order to write
extensions for Pyth
howmuchisto...@gmail.com writes:
> I'm a Korean and when I use modules like sys, os, &c,
> sometimes the interpreter show me broken strings like
> '\x13\xb3\x12\xc8'.
> It mustbe the Korean "alphabet" but I can't decode it to the rightway.
> I tried to decode it using codecs like cp949,mbcs,utf-8
Gilles writes:
> The site is just...
> - a few web pages that include text (in four languages) and pictures
> displayed in a Flash slide show
> - a calendar to show availability
> - a form to send e-mail with anti-SPAM support
> - (ASAP) online payment
>
> Out of curiosity, are there CMS/framewor
andrea crotti writes:
> I'm writing a program which has to interact with many external
> resources, at least:
> - mysql database
> - perforce
> - shared mounts
> - files on disk
>
> And the logic is quite complex, because there are many possible paths to
> follow depending on some other parameter
Frank Millman writes:
> I have a situation where I thought using weakrefs would save me a bit
> of effort.
Instead of the low level "weakref", you might use a "WeakKeyDictionary".
--
http://mail.python.org/mailman/listinfo/python-list
Frank Millman writes:
> On 05/07/2012 10:46, Dieter Maurer wrote:
>> Instead of the low level "weakref", you might use a "WeakKeyDictionary".
>>
>
> Thanks, Dieter. I could do that.
>
> In fact, a WeakSet suits my purposes better. I tested it with my
andrea crotti wrote at 2012-7-12 14:20 +0100:
>One thing that I don't quite understand is why some calls even if I
>catch the exception still makes the whole program quit.
>For example this
>
>try:
>copytree('sjkdf', 'dsflkj')
>Popen(['notfouhd'], shell=True)
>except Excepti
Steven D'Aprano writes:
>> How do others handle simple beeps?
>>
>> I just want to use them as alert, when certain events occur within a
>> very long running non GUI application.
>
> Why? Do you hate your users?
I, too, would find it useful -- for me (although I do not hate myself).
Surely, you
moo...@yahoo.co.uk writes:
> ...
> Does pickle have any advantages over json/yaml?
It can store and retrieve almost any Python object with almost no effort.
Up to you whether you see it as an advantage to be able to store
objects rather than (almost) pure data with a rather limited type set.
Of
Bruce Sherwood writes:
> I'm trying to do something rather tricky, in which a program imports a
> module that starts a thread that exec's a (possibly altered) copy of
> the source in the original program, and the module doesn't return.
> This has to do with an attempt to run VPython in the Mac Co
Eric Frederich writes:
> ...
> This seems to work okay but just now I got this while hitting ctrl-c
> It seems to have caught the signal at or in the middle of a call to
> sys.stdout.flush()
> --- Caught SIGTERM; Attempting to quit gracefully ---
> Traceback (most recent call last):
> File "/hom
Bruce Sherwood writes:
> ...
> from visual import box, rate
> b = box()
> while True:
> rate(100) # no more than 100 iterations per second
> b.pos.x += .01
>
> This works because a GUI environment is invoked by the visual module
> in a secondary thread (written mainly in C++, connected to
Bruce Sherwood writes:
> Thanks much for this suggestion. I'm not sure I've correctly
> understood the operation "start_new_thread(lambda: __import__( module>), ())". By "your module" do you mean the user program which
> imported the module that will execute start_new_thread?
By "your_module", I
Bruce Sherwood writes:
> ...
> The failure of this test case suggests that one cannot do imports
> inside secondary threads started in imported modules, something I keep
> tripping over. But I hope you'll be able to tell me that I'm doing
> something wrong!
As you know multiple threads can be dan
Dave Angel writes:
> Has anybody else noticed the sudden double-posting of nearly all
> messages in the python mailing list?
I am reading this list via "gmane" and do not see any double postings.
--
http://mail.python.org/mailman/listinfo/python-list
Bruce Sherwood writes:
> ...
> There's nothing wrong with the current VPython architecture, which
> does use good style, but there are two absolute, conflicting
> requirements that I have to meet.
>
> (1) The simple program API I've shown must be preserved, because there
> exist a large number of
"ivdn...@gmail.com" writes:
> I have a daemon process that runs for a considerable amount of time (weeks on
> end) without any problems. At some point I start getting the exception:
>
> Exception info: Traceback (most recent call last):
> File "scheduler.py", line 376, in applyrule
> resul
"Eric S. Johansson" writes:
> When you are sitting on or in a name, you look to the left or look to
> the right what would you see that would tell you that you have gone
> past the end of that name. For example
>
> a = b + c
>
> if you are sitting on a, the boundaries are beginning of line and =,
Chris Gonnerman writes:
> I've been making some minor updates to the PollyReports module I
> announced a while back, and I've noticed that when I upload it to
> PyPI, my changelog (CHANGES.txt) doesn't appear to be integrated into
> the site at all. Do I have to put the changes into the README,
Chris Gonnerman writes:
> On 07/30/2012 04:20 AM, Dieter Maurer wrote:
> ...
>> I find it very stupid to see several window scrolls of changes for
>> a package but to learn how to install the package, I have to download its
>> source...
> Not sure I get this. The
Serhiy Storchaka writes:
> On 05.08.12 09:30, Steven D'Aprano wrote:
>> If you are working in a tight loop, you can do this:
>>
>> if VERBOSE_FLAG:
>> for item in loop:
>> print(DEBUG_INFORMATION)
>> do_actual_work(item)
>> else:
>> for item in loop:
>> do_act
Tom Russell writes:
> I am parsing out a web page at
> http://online.wsj.com/mdc/public/page/2_3021-tradingdiary2.html?mod=mdc_pastcalendar
> using BeautifulSoup.
>
> My problem is that I can parse into the table where the data I want
> resides but I cannot seem to figure out how to go about grab
loial writes:
> I am writing an application to send data to a printer port(9100) and then
> recieve PJL responses back on that port. Because of the way PJL works I have
> to do both in the same process(script).
>
> At the moment I do not start to read responses until the data has been sent
> t
Gilles writes:
> ...
> Support replied this in an old thread: "Just a CGI option. We don't
> have enough users to justify adding mod_python support."
> http://forums.asmallorange.com/topic/4672-python-support/page__hl__python
> http://forums.asmallorange.com/topic/4918-python-fcgi-verses-mod-pyth
Dmitry Arsentiev writes:
> Has anybody already meet the problem like this? -
> AttributeError: 'module' object has no attribute 'HTML_PARSE_RECOVER'
>
> When I run scrapy, I get
>
> File "/usr/local/lib/python2.7/site-packages/scrapy/selector/factories.py",
> line 14, in
> libxml2.HTML_PAR
Gustavo Baratto writes:
> SSL.Socket.getpeercert() doesn't return essential information present in the
> client certificate (issuer, serial number, not before, etc), and it looks it
> is by design:
>
>
>
> http://docs.python.org/library/ssl.html#ssl.SSLSocket.getpeercert
>
> http://hg.python.org/
rikardhul...@gmail.com writes:
> I use logging.FileHandler (on windows) and I would like to be able to delete
> the file while the process is running and have it create the file again on
> next log event.
>
> On windows (not tried linux) this is not possible because the file is locked
> by the
writes:
> Are the property Function really useful?
Someone invested time to implement/document/test it.
Thus, there are people who have use cases for it...
> Where can i use the property function?
You can use it when you have parameterless methods
which you want to access as if they were simpl
loial writes:
> I have threaded python script that uses sockets to monitor network ports.
>
> I want to ensure that the socket is closed cleanly in all circumstances. This
> includes if the script is killed or interupted in some other way.
The operating system should close all sockets automatic
Mathieu Courtois writes:
> Here is my example :
>
>
> import cPickle
>
> ParentClass = object # works
> ParentClass = Exception # does not
>
> class MyError(ParentClass):
> def __init__(self, arg):
> self.arg = arg
>
> def __getstate__(self):
> print '#DBG pass in get
Gilles writes:
> To write a long-running web application, I'd like to some feedback
> about which option to choose.
>
> Apparently, the choice boilds down to this:
> - FastCGI
> - SCGI
> - WSGI
>
> It seems like FCGI and SCGI are language-neutral, while WSGI is
> Python-specific.
>
> Besides that
Shawn McElroy writes:
> ...
> So I need to find a way I can implement this in the best way...
It is in general very difficult to say reliable things about the "best" way.
Because, that depends very much on details.
My former employer has created a combo destop/online application
based on "Zope"
> On Sep 14, 3:54 am, Jean-Michel Pichavant
> wrote:
>> I don't like decorators, I think they're not worth the mental effort.
Fine.
I like them because they can vastly improve reusability and drastically
reduce redundancies (which I hate). Improved reusability and
reduced redundancies can make a
Shawn McElroy writes:
> ...
> Although you are correct in the aspect of having 'real' OS level integration.
> Being able to communicate with other apps as well as contextual menus.
> Although, could I not still implement those features from python, into the
> host system from python? There are
Dwight Hutto wrote at 2012-9-14 23:42 -0400:
> ...
>Reduce redundancy, is argumentative.
>
>To me, a decorator, is no more than a logging function. Correct me if
>I'm wrong.
Well, it depends on how you are using decorators and how complex
your decorators are. If what you are using as decorating fu
Jean-Michel Pichavant writes:
> - Original Message -
>> Jean-Michel Pichavant wrote:
> [snip]
>> One minor note, the style of decorator you are using loses the
>> docstring
>> (at least) of the original function. I would add the
>> @functools.wraps(func)
>> decorator inside your decorator
Benjamin Jessup writes:
> ...
> What do people recommend for a file format for a python desktop
> application? Data is complex with 100s/1000s of class instances, which
> reference each other.
>
> ...
> Use cPickle with a module/class whitelist? (Can't easily port, not
> entirely safe, compact en
alex23 writes:
> On 10 Oct, 17:03, real-not-anti-spam-addr...@apple-juice.co.uk (D.M.
> Procida) wrote:
>> It certainly makes it quick to build a class with the attributes I need,
>> but it does make tracing logic sometimes a pain in the neck.
>>
>> I don't know what the alternative is though.
>
Neal Becker writes:
> I wonder if there is a recommended approach to handle this issue.
>
> Suppose objects of a class C are serialized using python standard pickling.
> Later, suppose class C is changed, perhaps by adding a data member and a new
> constructor argument.
>
> It would see the pi
Christophe Vandeplas writes:
> ...
> From the documentation I understand that deques are thread-safe:
>> Deques are a generalization of stacks and queues (the name is pronounced
>> “deck”
>> and is short for “double-ended queue”). Deques support thread-safe, memory
>> efficient appends and pops
janni...@gmail.com writes:
> I am new to Python and have a problem with the behaviour of the xml parser.
> Assume we have this xml document:
>
>
>
>
> Title of the first book.
>
>
>
> Title of the second book.
>
>
>
>
> If I now chec
ehsmenggro...@gmail.com writes:
> I haven't quite figured out how to apply a paid ssl cert, say RapidSSL free
> SSL test from Python's recent sponsor sslmatrix.com and what to do with that
> to make Python happy.
>
> This good fellow suggests using the PEM format. I tried and failed.
> http://www
a...@pythoncraft.com (Aahz) writes:
> ...
def readlines(f):
lines = []
while "f is not empty":
line = f.readline()
if not line: break
if len(line) > 2 and line[-2:] == '|\n':
lines.append(lin
Tobiah writes:
> I just found out that the attachment works fine
> when I read the mail from the gmail website. Thunderbird
> complains that the attachment is empty.
The MIME standard (a set of RFCs) specifies how valid messages
with attachments should look like.
Fetch the mail (unprocessed if
Eric Frederich writes:
> I created some bindings to a 3rd party library.
> I have found that when I run Python and import smtplib it works fine.
> If I first log into the 3rd party application using my bindings however I
> get a bunch of errors.
>
> What do you think this 3rd party login could be
Eric Frederich writes:
> ...
> So I'm guessing the problem is that after I log in, the process has a
> conflicting libssl.so file loaded.
> Then when I try to import smtplib it tries getting things from there and
> that is where the errors are coming from.
>
> The question now is how do I fix
Aung Thet Naing writes:
> I'm having Stack_overflow exception in _ctypes_callproc (callproc.c). The
> error actually come from the:
>
> cleanup:
> for (i = 0; i < argcount; ++i)
> Py_XDECREF(args[i].keep);
>
> when args[i].keep->ob_refCnt == 1
Really a stack overflow or a general s
Kev Dwyer writes:
> I have to build a simple web service which will:
>
> - receive queries from our other servers
> - forward the requests to a third party SOAP service
> - process the response from the third party
> - send the result back to the original requester
>
> From the point of view
lars van gemerden writes:
> ... "deepcopy" dropping some items ...
> Any ideas are still more then welcome,
"deepcopy" is implemented in Python (rather than "C").
Thus, if necessary, you can debug what it is doing
and thereby determine where the items have been dropped.
--
http://mail.python.or
py_genetic writes:
> Example of the issue for arguments sake:
>
> Platform Ubuntu server 12.04LTS, python 2.7
>
> Say file1.txt has "hello world" in it.
^
Here, you speak of "file1.txt" (note the extension ".txt")
> subprocess.Popen("cat < file1 > file2", shell = True)
> subprocess
Irmen de Jong writes:
> Using Pypy 1.9.0. Importing readline. Using a background thread to get
> input() from
> stdin. It then crashes with:
>
> File "/usr/local/Cellar/pypy/1.9/lib_pypy/pyrepl/unix_console.py", line
> 400, in restore
> signal.signal(signal.SIGWINCH, self.old_sigwinch)
>
Harold writes:
> I recently upgraded my system from ubuntu 11.4 to 12.4 and since run into an
> issue when trying to import several packages in python2.7, e.g.
>
> harold@ubuntu:~$ python -c 'import gtk'
> Traceback (most recent call last):
> File "", line 1, in
> File "/usr/lib/python2.7/d
Adelbert Chang writes:
> In the Scala language there is the Simple Build Tool that lets me specify on
> a project-by-project basis which libraries I want to use (provided they are
> in a central repository somewhere) and it will download them for me. Better
> yet, when a new version comes out
Joep van Delft writes:
> ...
> What puzzles me, is the amount of errors for open and stat64.
The high number of errors comes from Python's import logic:
when Python should import a module/package (not yet imported),
it looks into each member on "sys.path" for about 6 different potential
filename
Salman Malik writes:
> I am sort of a newbie to Python ( have just started to use pdb).
> My problem is that I am debugging an application that uses greenlets and when
> I encounter something in code that spawns the coroutines or wait for an event,
> I lose control over the application (I mean th
andrea crotti writes:
> Hello Python friends, I have to validate some xml files against some xsd
> schema files, but I can't use any cool library as libxml unfortunately.
Why?
It seems not very rational to implement a complex task (such as
XML-Schema validation) when there are ready solutions ar
andrea crotti writes:
> ...
> The reason is that it has to work on many platforms and without any c module
> installed, the reason of that
Searching for a pure Python solution, you might have a look at "PyXB".
It has not been designed to validate XML instances against XML-Schema
(but to map betw
"Edward C. Jones" writes:
> I am trying to create a collection of hashable objects, where each
> object contains references to
> other objects in the collection. The references may be circular.
>
> To simplify, one can define
> x= list()
> x.append(x)
> which satisfies x == [x].
> Can I
"Isaac@AU" writes:
> I just started learning python. I have komodo2.5 in my computer. And I
> installed python2.7. I tried to write python scripts in komodo. But every
> time I run the code, there's always the error:
>
> Traceback (most recent call last):
> File "C:\Program Files\ActiveState
Valentin Mercier writes:
> I'm trying to search some mails with SUBJECT criteria, but the problem is the
> encoding, I'm trying to search french terms (impalib and python V2.7)
>
> I've tried few things, but I think the encoding is the problem, in my mail
> header I have something like this:
>
>
Pablo Martinez Ulloa wrote at 2022-5-18 15:08 +0100:
>I have been using your C++ Python API, in order to establish a bridge from
>C++ to Python.
Do you know `cython`?
It can help very much in the implementation of bridges between
Python and C/C++.
--
https://mail.python.org/mailman/listinfo/pytho
jsch...@sbcglobal.net wrote at 2022-6-20 13:49 -0500:
>I coded an application with a 64-bit executable using cython with the embed
>option and gcc and I received a traceback showing the path to my python
>installation. Is that normal or does that mean the application is going
>outside of my execut
Chethan Kumar S wrote at 2022-6-21 02:04 -0700:
> ...
>I have a main process which makes use of different other modules. And these
>modules also use other modules. I need to log all the logs into single log
>file. Due to use of TimedRotatingFileHandler, my log behaves differently after
>midnight
נתי שטרן wrote at 2022-6-23 15:31 +0300:
>how to solve this (argparse)
>
>
>traceback:
>Traceback (most recent call last):
> File "u:\oracle\RTR.py", line 10, in
>class sre_constants():
> File "u:\oracle\RTR.py", line 77, in sre_constants
>MAXREPEAT = _NamedIntConstant(32,name=str(32))
>
נתי שטרן wrote at 2022-6-24 08:28 +0300:
>I copied code from argparse library and modified it
>
>בתאריך יום חמישי, 23 ביוני 2022, מאת Dieter Maurer :
>
>> נתי שטרן wrote at 2022-6-23 15:31 +0300:
>> >how to solve this (argparse)
>> >
>> >
>&g
Ben Hirsig wrote at 2022-7-28 19:54 +1000:
>Hi, I noticed this when using the requests library in the response.elapsed
>object (type timedelta). Tested using the standard datetime library alone
>with the example displayed on
>https://docs.python.org/3/library/datetime.html#examples-of-usage-timedel
Please stay on the list (such that others can help, too)
Ben Hirsig wrote at 2022-7-29 06:53 +1000:
>Thanks for the replies, I'm just trying to understand why this would be
>useful?
>
>E.g. why does max need a min/max/resolution, and why would these attributes
>themselves need a min/max/resolution
Albert-Jan Roskam wrote at 2022-7-31 11:39 +0200:
> I have a function init_logging.log_uncaught_errors() that I use for
> sys.excepthook. Now I also want to call another function (ffi.dlclose())
> upon abnormal termination. Is it possible to register multiple
> excepthooks, like with atexit
ojomooluwatolami...@gmail.com wrote at 2022-8-5 08:34 +0100:
>Hello, I’m new to learning python and I stumbled upon a question nested loops.
For future, more complex, questions of this kind,
you might have a look at the module `pdb` in Python's runtime library.
It implements a debugger which allow
Schachner, Joseph (US) wrote at 2022-8-9 17:04 +:
>Why would this application *require* parallel programming? This could be
>done in one, single thread program. Call time to get time and save it as
>start_time. Keep a count of the number of 6 hour intervals, initialize it to
>0.
You c
Dennis Lee Bieber wrote at 2022-8-10 14:19 -0400:
>On Wed, 10 Aug 2022 19:33:04 +0200, "Dieter Maurer"
> ...
>>You could also use the `sched` module from Python's library.
>
>Time to really read the library reference manual again...
>
>
Dan Stromberg wrote at 2022-8-16 14:03 -0700:
> ...
>I'm attempting to package up a python package that uses Cython.
> ...
> Installing build dependencies ... error
> error: subprocess-exited-with-error
>
> ×? pip subprocess to install build dependencies did not run successfully.
> ?? exit code
Ian Pilcher wrote at 2022-11-11 10:21 -0600:
>Is it possible to access the name of a superclass static method, when
>defining a subclass attribute, without specifically naming the super-
>class?
>
>Contrived example:
>
> class SuperClass(object):
> @staticmethod
> def foo():
>
Ian Pilcher wrote at 2022-11-11 15:29 -0600:
> ...
>In searching, I've found a few articles that discuss the fact that
>classmethod objects aren't callable, but the situation actually seems to
>be more complicated.
>
> >>> type(DuidLLT._parse_l2addr)
>
> >>> callable(DuidLLT._parse_l2addr)
>True
>
Jach Feng wrote at 2022-11-15 22:52 -0800:
>My working directory d:\Works\Python\ has a package 'fitz' looks like this:
>
>fitz\
>__init__.py
>fitz.py
>utils.py
>_fitz.pyd
>
>There is a statement in fitz.py:
>return importlib.import_module('fitz._fitz')
>
>It
Gisle Vanem wrote at 2022-11-30 10:51 +0100:
>I have an issue with 'pip v. 22.3.1'. On any
>'pip install' command I get warning like this:
> c:\> pip3 install asciinema
> WARNING: Ignoring invalid distribution -arkupsafe
> (f:\gv\python310\lib\site-packages)
> WARNING: Ignoring invalid distr
Marce Coll wrote at 2022-12-20 22:09 +0100:
>Hi python people, hope this is the correct place to ask this!
>
>For a transactional async decorator I'm building I am using contextvars in
>order to know when a transaction is open in my current context.
>
>My understanding is that if given the followi
Antoon Pardon wrote at 2022-12-27 14:25 +0100:
> ...
>> But a simple "sys.modules['threading'] = QYZlib.threaders" will work.
>> Of course, how *well* this works depends also on how well that module
>> manages to masquerade as the threading module, but I'm sure you've
>> figured that part out :)
>
aapost wrote at 2023-1-3 22:57 -0500:
> ...
>Consider the following:
>
>from lxml import objectify, etree
>schema = etree.XMLSchema(file="path_to_my_xsd_schema_file")
>parser = objectify.makeparser(schema=schema, encoding="UTF-8")
>xml_obj = objectify.parse("path_to_my_xml_file", parser=parser)
>xm
Keith Thompson wrote at 2023-1-6 17:02 -0800:
>September Skeen writes:
>> I was wondering if I could be in your group
>
>This is an unmoderated Usenet newsgroup.
In fact, there are several access channels, Usenet newsgroup is
one of them.
Another channel is the python-list mailing list.
You can
Chris Green wrote at 2023-1-10 08:45 +:
> ...
>Yes, this is important I think. Plus, if possible, if it's decided to
>move to a forum format make that accessible by E-Mail.
I much prefer a mailing list over an http based service.
With mailing lists, all interesting messages arrive in my email
Cameron Simpson wrote at 2023-1-11 08:37 +1100:
> ...
>There's a Discourse forum over at discuss.python.org. I use it in
>"mailing list mode" and do almost all my interactions via email, exactly
>as I do for python-list. Posts come to me and land in the same local
>mail folder I use for python-list
aapost wrote at 2023-1-10 22:15 -0500:
>On 1/4/23 12:13, aapost wrote:
>> On 1/4/23 09:42, Dieter Maurer wrote:
>> ...
>>> You might have a look at `PyXB`, too.
>>> It tries hard to enforce schema restrictions in Python code.
>> ...
>Unfortunately picking
John McCardle wrote at 2023-1-25 22:31 -0500:
> ...
>1) To get the compiled Python to run independently, I have to hack
>LD_LIBRARY_PATH to get it to execute. `LD_LIBRARY_PATH=./Python-3.11.1
>./Python-3.11.1/python` .
The need to set `LD_LIBRARY_PATH` usually can be avoided via
a link time option
Frank Millman wrote at 2023-1-26 12:12 +0200:
>I have written a simple HTTP server using asyncio. It works, but I don't
>always understand how it works, so I was pleased that Python 3.11
>introduced some new high-level concepts that hide the gory details. I
>want to refactor my code to use these co
Azizbek Khamdamov wrote at 2023-2-19 19:03 +0500:
> ...
>Example 2 (weird behaviour)
>
>file = open("D:\Programming\Python\working_with_files\cities.txt",
>'r+') ## contains list cities
># the following code DOES NOT add new record TO THE BEGINNING of the
>file IF FOLLOWED BY readline() and readlin
Thomas Passin wrote at 2023-2-22 21:04 -0500:
>On 2/22/2023 7:58 PM, avi.e.gr...@gmail.com wrote:
> ...
>> So can anyone point to places in Python where a semicolon is part of a best
>> or even good way to do anything?
>
>Mostly I use it to run small commands on the command line with python
>-c. e
Chris Angelico wrote at 2023-3-1 12:58 +1100:
> ...
> The
>atomicity would be more useful in that context as it would give
>lock-free ID generation, which doesn't work in Python.
I have seen `itertools.count` for that.
This works because its `__next__` is implemented in "C" and
therefore will not
aapost wrote at 2023-3-5 09:35 -0500:
> ...
>If a file is still open, even if all the operations on the file have
>ceased for a time, the tail of the written operation data does not get
>flushed to the file until close is issued and the file closes cleanly.
This is normal: the buffer is flushed if
Pranav Bhardwaj wrote at 2023-4-3 22:13 +0530:
>Why can't I able to use python libraries such as numpy, nudenet, playsound,
>pandas, etc in my python 3.11.2. It always through the error "import
>'numpy' or any other libraries could not be resolved".
The "libraries" you speak of are extensions (i.e
Guenther Sohler wrote at 2023-4-13 09:40 +0200:
> ...
>I have been working on adding embedded python into OpenSCAD (
>www.openscad.org)
>for some time already. For that i coded/added an additional Python Type
>Object
>which means to hold openscad geometric data.
>
>It works quite well but unfortuna
Roy Hann wrote at 2023-4-30 15:40 -:
>Is there anyone using loguru (loguru 0.5.3 in my case) successfully in a
>library?
> ...
> import mylib
> logger.enable('mylib')
>
>expecting that it would report any log messages above level DEBUG, just
>as it does when I don't disable logging.
Have you
Chris Green wrote at 2023-5-6 15:58 +0100:
>Chris Green wrote:
>> I'm having a real hard time trying to do anything to a string (?)
>> returned by mailbox.MaildirMessage.get().
>>
>What a twit I am :-)
>
>Strings are immutable, I have to do:-
>
>newstring = oldstring.replace("_", " ")
The sol
Horst Koiner wrote at 2023-5-9 11:13 -0700:
> ...
>For production i run the program with stdout=subprocess.PIPE and i can fetch
>than the output later. For just testing if the program works, i run with
>stdout=subprocess.STDOUT and I see all program output on the console, but my
>program afterwa
Chris Angelico wrote at 2023-5-26 18:29 +1000:
> ...
>However, if you want to change the wording, I'd be more inclined to
>synchronize it with float():
>
float("a")
>Traceback (most recent call last):
> File "", line 1, in
>ValueError: could not convert string to float: 'a'
+1
--
https://m
ismail nagi wrote at 2021-2-3 08:48 -0800:
>I would like to know how an sms api is created.
I assume that "sms api" means that your Python application should
be able to send SMS messages.
In this case, you need a service which interfaces between your
device (mobile phone, computer, tablet, ...) an
ismail nagi wrote at 2021-2-3 21:06 +0300:
>Yes, its about sending messages. For example, something like
>twilio...it's an SMS API, can something like twilio be created using python
>and how (just a basic idea)? Thank You.
"twilio" provides a web service interface to send messages.
You can use Pyt
1 - 100 of 346 matches
Mail list logo