Python3 Web Framework
Hey all... I just started with Python, and I chose Python3 because it seemed a subtle choice as compared to doing Pthon 2.x now and then porting to Python3.x later... I plan to start with Web Development soon... I wanted to know what all web frameworks are available for Python3... I heard the Django is still not compatible with 3.x... Any idea guys? -- http://mail.python.org/mailman/listinfo/python-list
After C++, what with Python?
Hey all, I am a college student, and at college, we did most of the work in C/C++. I kind of stopped using C when I learned C++ (simply because C++ seemed a natural/elegant choice to me, and had backward compatibility with C). I've had a lot of experience with C++. Recently, I was on the path to learn a new programming language, and after suggestion of some of my friends and consulting the web, I chose to proceed with Python. I've finished with core Python and now I'm going through the various inbuilt packages that Python provides. I have an inquisitive mind, and while programming, I always want/tend to make something that is out of the box. It would be great if you people could guide me as to what to proceed with and how. -- http://mail.python.org/mailman/listinfo/python-list
Re: After C++, what with Python?
@nagle Means you are suggesting me not to proceed with Python because I've had experience with C++? -- http://mail.python.org/mailman/listinfo/python-list
Re: parsing packets
Are you sending binary data if so you can use the struct module to pack, unpack and interpret binary data http://docs.python.org/library/struct.html , You will have to design the header scheme yourself you can either embed length in the packets or try to use a carefully selected delimiter character . Thanks Aman On Sun, Jul 10, 2011 at 5:31 PM, wrote: > Send Python-list mailing list submissions to >python-list@python.org > > To subscribe or unsubscribe via the World Wide Web, visit >http://mail.python.org/mailman/listinfo/python-list > or, via email, send a message with subject or body 'help' to >python-list-requ...@python.org > > You can reach the person managing the list at >python-list-ow...@python.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Python-list digest..." > > Today's Topics: > > 1. Re: parsing packets (Michael Hrivnak) > 2. Re: Wgy isn't there a good RAD Gui tool fo python (CM) > 3. Re: Function docstring as a local variable (Ben Finney) > 4. Re: Function docstring as a local variable (Tim Johnson) > 5. Re: Function docstring as a local variable (Chris Rebert) > 6. Re: Function docstring as a local variable (Chris Rebert) > 7. Re: Function docstring as a local variable (Tim Johnson) > 8. Re: Function docstring as a local variable (Corey Richardson) > 9. Re: Virtual functions are virtually invisible! (Michael Hrivnak) > > > -- Forwarded message -- > From: Michael Hrivnak > To: ty...@tysdomain.com > Date: Sun, 10 Jul 2011 19:33:38 -0400 > Subject: Re: parsing packets > In order to find the end of the packet, include a field that is the > packet length. This is what IP packets do to find the end of their > header. > > http://en.wikipedia.org/wiki/IPv4#Header > > And the TCP header (see "data offset") does the same: > > > http://en.wikipedia.org/wiki/Transmission_Control_Protocol#TCP_segment_structure > > Of course in both cases they are specifying the header length, not > including a data payload. However, it sounds like you might not have > a payload, so your entire packet might consist of header-like data. > > Michael > > > On Sun, Jul 10, 2011 at 4:59 PM, Littlefield, Tyler > wrote: > > Hello all: > > I'm working on a server that will need to parse packets sent from a > client, > > and construct it's own packets. > > The setup is something like this: the first two bytes is the type of the > > packet. > > So, lets say we have a packet set to connect. There are two types of > connect > > packet: a auth packet and a connect packet. > > The connect packet then has two bytes with the type, another byte that > notes > > that it is a connect packet, and 4 bytes that contains the version of the > > client. > > The auth packet has the two bytes that tells what packet it is, one byte > > denoting that it is an auth packet, then the username, a NULL character, > and > > a password and a NULL character. > > > > With all of this said, I'm kind of curious how I would 1) parse out > > something like this (I am using twisted, so it'll just be passed to my > > Receive function), and how I get the length of the packet with multiple > NULL > > values. I'm also looking to build a packet and send it back out, is there > > something that will allow me to designate two bytes, set individual bits, > > then put it altogether in a packet to be sent out? > > > > -- > > > > Take care, > > Ty > > my website: > > http://tds-solutions.net > > my blog: > > http://tds-solutions.net/blog > > skype: st8amnd127 > > My programs don't have bugs; they're randomly added features! > > > > -- > > http://mail.python.org/mailman/listinfo/python-list > > > > > > -- Forwarded message -- > From: CM > To: python-list@python.org > Date: Sun, 10 Jul 2011 16:49:51 -0700 (PDT) > Subject: Re: Wgy isn't there a good RAD Gui tool fo python > On Jul 10, 6:50 pm, Ivan Kljaic wrote: > > Ok Guys. I know that most of us have been expiriencing the need for a > > nice Gui builder tool for RAD and most of us have been googling for it > > a lot of times. But seriously. Why is the not even one single RAD tool > > for Python. I mean what happened to boa constructor that it stopped > > developing. I simply do not see any reasons why there isn't anything. > > Please help me understand it. Any insights? > > Just because Boa Constructor stopped (or lengthily paused?) > deve
Re: Python-list Digest, Vol 91, Issue 89
Sent from my iPhone On Apr 12, 2011, at 8:05 PM, python-list-requ...@python.org wrote: > Send Python-list mailing list submissions to >python-list@python.org > > To subscribe or unsubscribe via the World Wide Web, visit >http://mail.python.org/mailman/listinfo/python-list > or, via email, send a message with subject or body 'help' to >python-list-requ...@python.org > > You can reach the person managing the list at >python-list-ow...@python.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Python-list digest..." > Today's Topics: > > 1. Re: Feature suggestion -- return if true (Ethan Furman) > 2. Re: [OT] Free software versus software idea patents > (Steven D'Aprano) > 3. Re: [OT] Free software versus software idea patents > (Steven D'Aprano) > 4. Re: Feature suggestion -- return if true (Steven D'Aprano) > 5. Re: [OT] Free software versus software idea patents > (geremy condra) > 6. Re: Can not uninstall activepython. Missing msi ? > (Sridhar Ratnakumar) > 7. [Bug / Feature Request] IDLE Shell (rantingrick) > 8. Re: [Bug / Feature Request] IDLE Shell (James Mills) > 9. Re: Feature suggestion -- return if true (Ethan Furman) > 10. Re: Feature suggestion -- return if true (Chris Angelico) > Westley Mart�nez wrote: >> On Tue, 2011-04-12 at 16:06 -0700, Ethan Furman wrote: >>> --> def func(): >>> --> var1 = something() >>> --> var2 = something_else('this') >>> --> return? var1.hobgle(var2) >>> --> var3 = last_resort(var1) >>> --> return var3.wiglat(var2) >> The question mark makes the programmer look like he wasn't sure of what >> he was doing at the time. "Hmm, should I return this object or not?" > > Yeah, I'm definitely -1 on the ?, as well as -1 on the idea. All other major > flow control uses indentation, and this does not. > > ~Ethan~ > > On Tue, 12 Apr 2011 13:37:08 -0600, Ian Kelly wrote: > >> There is at least one method of measuring it without resorting to sales >> figures: logging user-agent data from web browsers. Is it perfectly >> accurate? Of course not. But there are a number of different >> organizations that do this, sampling hundreds of thousands of different >> websites, and they consistently report that the various versions of >> Windows have a total usage share ranging from 80% to 90%. That at least >> gives us an upper and lower bound with a great deal of confidence. In >> the same data, Apple systems range from about 7% to 15%, and Linux >> musters a meager 1% to 3%. > > Yes, but it's the most important 1%. > > *wink* > > > Seriously, I would expect that Linux is seriously under-reported in > surveys based on user-agent, for various reasons, starting with the > number of people who have their user-agent set to claim to be IE on > Windows even when they're running (say) Konqueror on Linux. Nevertheless, > I'd be gratified if Linux marketshare of the desktop was as high as 5%. > That would be awesome. > > Another interesting source of data might be on-line games that offer > clients for multiple platforms. E.g. EVE Online (to pick an old, well > established one that just so happens to use Python as its scripting > engine). > > > > > -- > Steven > > On Tue, 12 Apr 2011 13:43:00 -0400, Terry Reedy wrote: > >> Anyone here who does not understand how absurd software patents can get >> should contemplate the following (based on a real patent from about 20 >> years ago, when CDroms were new. >> >> A Methods for Ensuring that the Correct CDROM is in the CDROM drive. >> >> While the correct cdrom is not in the drive: >> Display a message asking the user to insert the correct CD. >> >> Buried in a page of verbiage, that was it, completely obvious and >> unoriginal. > > There's no doubt that, for some reason, the US Patent Office has an > institutional blind-spot in certain areas. As the joke goes, you can take > any existing patent, scrawl "on the Internet" over it in red crayon, and > they will grant you a patent on it. > > But I'm also sure that if you look hard enough, there will be hardware > patents that are as inane. For the longest time, you could patent > perpetual motion machines. Now you can patent perpetual motion machines > so long as you don't use the words "perpetual motion" or "free energy". > > The real question should not be "how bad are the worst patents?", or "how > good are the best patents?", but "overall, does the patent system make > things better or worse in general, and how can we reduce the harm done in > favour of more good?". > > (I'll also point out that there's remarkably little evidence that > *hardware* patents promote and support innovation and invention, even > though it is conventional wisdom that it does. People on *both* sides of > the debate are amazingly resistant to the idea of evidence-based policy.) > > > >>> That is what made the last Supreme Court decision (from this argument >>> in part) so important... because for th
Peculiar Behaviour of __builtins__
I was trying to call the builtin function min by using getattr(__builtins__,'min') This works at the interpretter prompt However when I called it inside a module that was imported by another module it fails and gives an attribute error print getattr(__builtins__,'min')(range(20)) AttributeError: 'dict' object has no attribute 'min' Also in the interpreter >>>type(__builtins__) but in my module print type(__builtins__) Can anyone help me understand whats going on here? Thanks -- Aman Nijhawan -- http://mail.python.org/mailman/listinfo/python-list
Regular Expression for the special character "|" pipe
I would like to create a regular expression in which i can match the "|" special character too. e.g. start=|ID=ter54rt543d|SID=ter54rt543d|end=| I want to only |ID=ter54rt543d| from the above string but i am unable to write the pattern match containing "|" pipe too. By default python treat "|" as an OR operator. But in my case I want to use to as a part of search string. -- https://mail.python.org/mailman/listinfo/python-list
Re: Regular Expression for the special character "|" pipe
On Tuesday, 27 May 2014 16:39:19 UTC+5:30, Vlastimil Brom wrote: > 2014-05-27 12:59 GMT+02:00 Aman Kashyap : > > > I would like to create a regular expression in which i can match the "|" > > special character too. > > > > > > e.g. > > > > > > start=|ID=ter54rt543d|SID=ter54rt543d|end=| > > > > > > I want to only |ID=ter54rt543d| from the above string but i am unable to > > write the pattern match containing "|" pipe too. > > > > > > By default python treat "|" as an OR operator. > > > > > > But in my case I want to use to as a part of search string. > > > -- > > > > Hi, > > you can just escpape the pipe with backlash like any other metacharacter: > > > > r"start=\|ID=ter54rt543d" > > > > be sure to use the raw string notation r"...", or you can double all > > backslashes in the string. > > > > hth, > >vbr Thanks vbr for the quick response. I have string = |SOH=|ID=re65dgt5dd|DS=fjkjf|SDID=fhkhkf|ID=fkjfkf|EOM=| and want to replace 2 sub-strings |ID=re65dgt5dd| with |ID=MAN| |ID=fkjfkf| with |MAN| I am using regular expression ID=[a-z]*[0-9]*[a-z]*[0-9]*[a-z]*|$ the output is |SOH=|ID=MAN|DS=fjkjf|SDID=MAN|ID=MAN|EOM=|ID=MAN expected value is = |SOH=|ID=MAN|DS=fjkjf|SDID=fhkhkf|ID=MAN|EOM=| could you please help me in this regard? -- https://mail.python.org/mailman/listinfo/python-list
Re: Regular Expression for the special character "|" pipe
On Tuesday, 27 May 2014 16:59:38 UTC+5:30, Daniel wrote: > What about skipping the re and try this: > > > > 'start=|ID=ter54rt543d|SID=ter54rt543d|end=|'.split('|')[1][3:] > > > > On 27.05.2014 14:09, Vlastimil Brom wrote: > > > 2014-05-27 12:59 GMT+02:00 Aman Kashyap : > > >> I would like to create a regular expression in which i can match the "|" > >> special character too. > > >> > > >> e.g. > > >> > > >> start=|ID=ter54rt543d|SID=ter54rt543d|end=| > > >> > > >> I want to only |ID=ter54rt543d| from the above string but i am unable to > >> write the pattern match containing "|" pipe too. > > >> > > >> By default python treat "|" as an OR operator. > > >> > > >> But in my case I want to use to as a part of search string. > > >> -- > > > Hi, > > > you can just escpape the pipe with backlash like any other metacharacter: > > > > > > r"start=\|ID=ter54rt543d" > > > > > > be sure to use the raw string notation r"...", or you can double all > > > backslashes in the string. > > > > > > hth, > > > vbr Thanks for the response. I got the answer finally. This is the regular expression to be used:\\|ID=[a-z]*[0-9]*[a-z]*[0-9]*[a-z]*\\| -- https://mail.python.org/mailman/listinfo/python-list
please help me while installing pyttsx3 it shows error
PS C:\Users\amanb\OneDrive\Desktop\jarvis> pip install pyttsx3 Collecting pyttsx3 Using cached pyttsx3-2.87-py3-none-any.whl (39 kB) Collecting comtypes; platform_system == "Windows" Using cached comtypes-1.1.7.zip (180 kB) Installing collected packages: comtypes, pyttsx3 Running setup.py install for comtypes ... error ERROR: Command errored out with exit status 1: command: 'C:\Users\amanb\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\amanb\\AppData\\Local\\Temp\\pip-install-uwazge93\\comtypes\\setup.py'"'"'; __file__='"'"'C:\\Users\\amanb\\AppData\\Local\\Temp\\pip-install-uwazge93\\comtypes\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\amanb\AppData\Local\Temp\pip-record-3lktlb2m\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\amanb\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\Include\comtypes' cwd: C:\Users\amanb\AppData\Local\Temp\pip-install-uwazge93\comtypes\ Complete output (276 lines): running install running build running build_py creating build creating build\lib creating build\lib\comtypes copying comtypes\automation.py -> build\lib\comtypes copying comtypes\connectionpoints.py -> build\lib\comtypes copying comtypes\errorinfo.py -> build\lib\comtypes copying comtypes\git.py -> build\lib\comtypes copying comtypes\GUID.py -> build\lib\comtypes copying comtypes\hresult.py -> build\lib\comtypes copying comtypes\logutil.py -> build\lib\comtypes copying comtypes\messageloop.py -> build\lib\comtypes copying comtypes\npsupport.py -> build\lib\comtypes copying comtypes\patcher.py -> build\lib\comtypes copying comtypes\persist.py -> build\lib\comtypes copying comtypes\safearray.py -> build\lib\comtypes copying comtypes\shelllink.py -> build\lib\comtypes copying comtypes\typeinfo.py -> build\lib\comtypes copying comtypes\util.py -> build\lib\comtypes copying comtypes\viewobject.py -> build\lib\comtypes copying comtypes\_comobject.py -> build\lib\comtypes copying comtypes\_meta.py -> build\lib\comtypes copying comtypes\_safearray.py -> build\lib\comtypes copying comtypes\__init__.py -> build\lib\comtypes creating build\lib\comtypes\client copying comtypes\client\dynamic.py -> build\lib\comtypes\client copying comtypes\client\lazybind.py -> build\lib\comtypes\client copying comtypes\client\_code_cache.py -> build\lib\comtypes\client copying comtypes\client\_events.py -> build\lib\comtypes\client copying comtypes\client\_generate.py -> build\lib\comtypes\client copying comtypes\client\__init__.py -> build\lib\comtypes\client creating build\lib\comtypes\server copying comtypes\server\automation.py -> build\lib\comtypes\server copying comtypes\server\connectionpoints.py -> build\lib\comtypes\server copying comtypes\server\inprocserver.py -> build\lib\comtypes\server copying comtypes\server\localserver.py -> build\lib\comtypes\server copying comtypes\server\register.py -> build\lib\comtypes\server copying comtypes\server\w_getopt.py -> build\lib\comtypes\server copying comtypes\server\__init__.py -> build\lib\comtypes\server creating build\lib\comtypes\tools copying comtypes\tools\codegenerator.py -> build\lib\comtypes\tools copying comtypes\tools\tlbparser.py -> build\lib\comtypes\tools copying comtypes\tools\typedesc.py -> build\lib\comtypes\tools copying comtypes\tools\typedesc_base.py -> build\lib\comtypes\tools copying comtypes\tools\__init__.py -> build\lib\comtypes\tools creating build\lib\comtypes\test copying comtypes\test\find_memleak.py -> build\lib\comtypes\test copying comtypes\test\runtests.py -> build\lib\comtypes\test copying comtypes\test\setup.py -> build\lib\comtypes\test copying comtypes\test\TestComServer.py -> build\lib\comtypes\test copying comtypes\test\TestDispServer.py -> build\lib\comtypes\test copying comtypes\test\test_agilent.py -> build\lib\comtypes\test copying comtypes\test\test_avmc.py -> build\lib\comtypes\test copying comtypes\test\test_basic.py -> build\lib\comtypes\test copying comtypes\test\test_BSTR.py -> build\lib\comtypes\test copying comtypes\test\test_casesensitivity.py -> build\lib\comtypes\test copying comtypes\test\test_client.py -> build\lib\comtypes\test copying comtypes\test\test_collections.py -> build\lib\comtypes\test copying comtypes\test\test_comserver.py -> build\lib\comtypes\test copying comtypes\test\test_createwrappers.py -> build\lib\comtypes\test copying comtypes\te