Python

3222 readers
1 users here now

News and discussions about the programming language Python


founded 6 years ago
MODERATORS
51
52
 
 
53
54
1
submitted 2 years ago* (last edited 2 years ago) by cypherpunks@lemmy.ml to c/python@lemmy.ml
 
 
55
1
Textualize.io (www.textualize.io)
submitted 2 years ago by sgtnasty@lemmy.ml to c/python@lemmy.ml
 
 

Build amazing TUIs (Text User Interfaces) with this innovative Python framework

56
57
 
 

It's faster now, great.

58
59
60
 
 

cross-posted from: https://feddit.de/post/248196

I have lots of multiprocessing processes which have to add to and search in a dict. Deletion of values is not needed.

Atm I am using multiprocessing.Manager() and

dict = manager.dict()

This works pretty well, but I think that the manager is a huge bottleneck here. Any ideas? It has to run on older Python 3 versions, otherwise I would use this cool thing I found: https://github.com/ronny-rentner/UltraDict

61
62
63
64
65
66
67
68
69
70
 
 

Can you recommend any cross platform Python app development frameworks where you write code once and it can be deployed to Linux, Android, Windows, MacOS and iOS.

71
 
 

tweet2toot will replicate all tweets and threads of the Twitter user of your choice.

72
 
 

SimpleHTTPServer is a python module which allows you to instantly create a web server or serve your files in a snap. The main advantage of python’s SimpleHTTPServer is you don’t need to install anything since you have python interpreter installed. You don’t have to worry about python interpreter because almost all Linux distributions, python interpreter come handy by default.

You also can use SimpleHTTPServer as a file sharing method. You just have to enable the module within the location of your shareable files are located.

The article below guides you on how to set up and use it.

See https://www.tecmint.com/python-simplehttpserver-to-create-webserver-or-serve-files-instantly/

#technology #Linux #Python #Webserver

73
74
 
 

The only differences are that tuples are immutable and that lists have extra methods.

Is there ever a strong need for list-type data to be immutable? Evough to justify a whole extra data-type in the language?

Should they release a python 4 with it removed?

The only thing I can think of is as a default function parameter. This function is okay:

def dothings(a=(1,2)):
    print(a)
    a = (a[0], 3)

But this function misbehaves the second time it is called:

def dothings(a=[1,2]):
    print(a)
    a[1] = 3

But IMO the "mutable arguments" thing is another bug to be fixed in a hypothetical python 4. And even in python 3 you just write the function the recommended way, so there is not such a big problem.

def dothings(a=None):
    if a is None:
        a = [1, 2]
    print(a)
    a[1] = 3

The Python devs are clever guys though. There must be some really important reason to maintain both types?

75
view more: ‹ prev next ›