Re: No more Python support in NetBeans 7.0
Sorry to comment on an old topic, but I wanted to clarify for others like me who might get the wrong idea. It looks like this is no longer true. Netbeans 7 might be supporting python after all. http://wiki.netbeans.org/Python70Roadmap -- http://mail.python.org/mailman/listinfo/python-list
Re: How to Nest Structs?
Try unpacking the nested struct as a fixed width string and then unpacking the string. Then unpack the string On Monday, March 4, 2013 10:22:07 AM UTC-8, Ari King wrote: > Hi, > > > > I'm trying to nest the "info_header", "info_body", and "info_trailer" structs > (see below) into a "data_packet" struct. Does anyone know how I can/should > accomplish this? Thanks. > > > > batch_header_format = struct.Struct('!c2h') > > info_header_format = struct.Struct('!2hl') > > mkt_status_format = struct.Struct('!c') > > info_trailer_format = struct.Struct('!hc') > > > > mkt_session_codes = [b'PO',b'PC',b'CO',b'CC',b'CK',b'CL'] > > mkt_type = [b'N',b'S',b'O',b'A',b'C',b'G'] > > > > batch_header = batch_header_format.pack(b'1',1,1024) > > > > total_size = info_header_format.size + mkt_status_format.size + > info_trailer_format.size > > > > # Combine following into data struct. > > info_header = > info_header_format.pack(int(binascii.hexlify(mkt_session_codes[random.randint(0,5)])), > total_size, 124) > > info_body = mkt_status_format.pack(mkt_type[random.randint(0,5)]) > > info_trailer = info_trailer_format.pack(0, b'\r') > > > > -Ari -- http://mail.python.org/mailman/listinfo/python-list
The most important website in the world for any entrepreneur
Hello, We just launched our new site - www.webmeeters.com a couple of days back. It allows the formation of virtual "companies" made up of workers from around the world, and then allows them to be crowd-funded for any business idea they may have. The site can be used by anyone - someone in the corporate world, musicians, artists, whatever. So... please check it out, and if you like it, we'd appreciate you spreading the word and telling all your friends :) Thanks, The Webmaster, www.webmeeters.com -- http://mail.python.org/mailman/listinfo/python-list
Gecko bindings for Python?
Hello, I'd like to use the Gecko engine in GTK+ or Qt programs written in Python. Could you recommend a module for this? A tutorial to get started? I didn't find anything useful, but I may have been looking in all the wrong places... :) Thanks, -cpghost. -- Cordula's Web. http://www.cordula.ws/ -- http://mail.python.org/mailman/listinfo/python-list
Re: Gecko bindings for Python?
Yes, that's exactly what I needed! Thanks alot! -cpghost. -- Cordula's Web. http://www.cordula.ws/ -- http://mail.python.org/mailman/listinfo/python-list
for line in file weirdness
Hello, here's a strange bug (?) I've came across (using Python 2.2): # loop_1 for line in file: if some_condition(line): break do_something() # loop_2 for line in file: do_something_else() The problem is, that loop_2 doesn't resume where loop_1 left off, but skips many lines (a block's worth or so) before continuing. Why is this? Is reading from a file non-reentrant? It is always possible to slurp the whole file content into a list, and then iterate through the list, but I want to handle HUGE files too. Thanks, -cpghost. -- Cordula's Web. http://www.cordula.ws/ -- http://mail.python.org/mailman/listinfo/python-list
Re: for line in file weirdness
A read-ahead buffer? Yes, that would explain it. Sorry, I missed this piece of information in the documentation. Thanks to all who replied. -- http://mail.python.org/mailman/listinfo/python-list
Re: for line in file weirdness
Thanks :) Reading everything into a variable was not an option, due to some very large files. Creating the iterator only once, as Fredrik suggested, solved the problem nicely. Again many thanks for your great support! -- http://mail.python.org/mailman/listinfo/python-list
MIME-Version in interpart, Python MIMEMultipart
list - using python's MIMEMultipart() object I've noticed that it interjects a 'MIME-Version' in the interpart header, like so... --some_MIME_Boundry Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit some_test Now, RFC1521, section 3 reads: Note that the MIME-Version header field is required at the top level of a message. It is not required for each body part of a multipart entity. It is required for the embedded headers of a body of type "message" if and only if the embedded message is itself claimed to be MIME-conformant. What I'm wondering is if anyone knows if the inclusion of the MIME- Version in the interpart header is invalid. It does not look like it to me, byt I'm looking for your opinions. Regards, berb -- http://mail.python.org/mailman/listinfo/python-list
Re: SIP and PyQt5 Installation
On December 23, 2016 7:02:03 AM GMT+05:30, churros.stud...@gmail.com wrote: >Hello, I've been having troubles being able to integrate the PyQt5 GUI >into my IDEs. I've used various example codes from the web to see if >the library would import properly but the console sends me back an >import error saying, "No module named PyQt5". Could someone provide me >with the steps for not only the installation/configuring of SIP/PyQt >but also the steps needed to integrate it to the eclipse IDE? >-- >https://mail.python.org/mailman/listinfo/python-list -- If you're on windows and python 3.4 would be sufficient, then for python 3.4 you could download windows installer from the pyqt site. Install it after installing python and then you can Import the libraries as regular libraries. George -- https://mail.python.org/mailman/listinfo/python-list
Re: problem writing excel sheet using python
On July 14, 2016 2:59:09 AM GMT+05:30, vineeth menneni wrote: >Hi I am finding it difficult to create a excel sheet using openpyxl or >xlsxwriter. The problem is that i am loading a table data from MYSQL db >which has 600k rows and 15 columns (approximately 100mb data). The >error that the terminal shows is that "MemoryError". I just wanted to >know if it is possible to create a excel sheet with the above said data >in less than one minute using any packages in python. > >Thanks, >Vineeth >-- >https://mail.python.org/mailman/listinfo/python-list Try saving data in csv format an then import it in excel George -- https://mail.python.org/mailman/listinfo/python-list
problem occurring in operating python , after typing only 5-6 programs only is causing problem it has stoped working
Sent from Mail for Windows 10 -- https://mail.python.org/mailman/listinfo/python-list
Re: How to "wow" someone new to Python
On 01/16/2015 08:33 PM, Chris Angelico wrote: > Scenario: You're introducing someone to Python for the first time. > S/he may have some previous programming experience, or may be new to > the whole idea of giving a computer instructions. You have a couple of > minutes to show off how awesome Python is. What do you do? > > I was thinking along the lines of a simple demo in the REPL, showing > off some of Python's coolest features. But then I got stuck on the > specifics. What are Python's best coolnesses? What makes for a good > demo? > > Ideally, this should be something that can be demo'd quickly and > easily, and it should be impressive without going into great details > of "and see, this is how it works on the inside". So, how would you > brag about this language? > > ChrisA hello, I am a newbie to python, I have dwelled in c,qt none in java. php a lot, though I don't make money with any of those. The best thing I find is python is very easy, the best part maybe because of my inexperience with other languages are the List and Dict data types that just solved problems I had in real life made solvable with python very easily. when I had to worry about memory and pointers to memory in those other languages, python just made me focus on the solution I want. also the way I can read python program just like they are written in plain eglish :) a personal problem I tried to solve is that how many characters exist in a sequence statistically (with 2 or more characters in len) in any given file and then their count. For a 100kb file I used practially all programming knowledge in from the other languages but failed miserably as the computation were taking more time with each bigger chunck of file. I would have to do a lot of memery management with python using those style like deleting list and dict before adding another. but when I tried to solve the problem natively with python it just took a blink of an eye for them to solve upto 50kb file. but for larger files although instant it is just memory consuming since I was limit with 2 gb I ddin't poke further. this was my exp and I find programming fun in python like ironman talking to jarvis keep computing!!! GCM -- https://mail.python.org/mailman/listinfo/python-list
Re: xlwt 1.0.0 released!
On 2015-04-16 4:55 AM, Tim Chase wrote: On 2015-04-15 15:21, Gary Herron wrote: On 04/15/2015 02:51 PM, Chris Withers wrote: I'm pleased to announce the release of xlwt 1.0.0. What a curiously incomplete announcement. Could you tell us what xlwt is? I see no hint here. Heh, this and its sibling package, xlrd, are Python packages for writing and reading MS Excel files. Unlike other Python Excel-manipulation libraries I've encountered, they don't rely on having an installed copy of Excel and can thus run on platforms where Excel doesn't. They've been pretty robust based on my poking at them, have been around a good length of time (meaning more bugs have been worked out), and Chris posts release notes here pretty regularly. Regularly enough that I'm pretty sure this isn't the first time he's omitted the "this is what xlrd/xlwt is" line in his announcement. :-) Thanks to Chris for all the dirty work done mucking around with .xls internals to make these modules. -tkc xlrd and xlwt have been of great help to me since the time i started using python. thank u for such a nice library. George --- This email has been checked for viruses by Avast antivirus software. http://www.avast.com -- https://mail.python.org/mailman/listinfo/python-list
re.match and non-alphanumeric characters
Dear all, this is really driving me nuts and any help would be extremely appreciated. I have a string that contains some numeric data. I want to isolate these data using re.match, as follows. bogus = "IFC(35m)" data = re.match(r'(\d+)',bogus) print data.group(1) I would expect to have "35" printed out to screen, but instead I get an error that the regular expression did not match: Traceback (most recent call last): File "C:\Documents and Settings\Mattia\Desktop\Neeltje\read.py", line 20, in print data.group(1) AttributeError: 'NoneType' object has no attribute 'group' Note that the same holds if I look for "35" straight, instead of "\d +". If instead I look for "IFC" it works fine. That is, apparently re.match will match only up to the first non-alphanumeric character and ignore anything after a "(", "_", "[" and god knows what else. I am using Python 2.6 (r26:66721, latest stable version). Am I missing something very big and very important? -- http://mail.python.org/mailman/listinfo/python-list
Re: comp.lang.python killfile rule
Just felt like posting, wouldn't it be pythonic if it was if word in [list]: ignore Save time and easily maintainable Cmg On 23 Jun 2017 02:41, "John Black" wrote: All, in case this is useful to anyone, this rule that tells my newsreader which posts to kill really cleans up the group. I could not find a way to key off of anything in the header except keywords because the From keeps changing and I didn't want to overkill real posts. I may have to add a thing or two to this over time, but right now, this seems to be nailing everything. John Black Subject contains "PEDOFILO" Or Subject contains "MAI" Or Subject contains "SEGRETO" Or Subject contains "SETTA" Or Subject contains "BAMBINI" Or Subject contains "FIGLIO" Or Subject contains "PAOLO" Or Subject contains "NATALE" Or Subject contains "SONO" Or Subject contains "GRAZIA" Or Subject contains "PORNOSTAR" Or Subject contains "PEZZO" Or Subject contains "MERDA" Or Subject contains "CAZZO" Or Subject contains "GALERA" Or Subject contains "SICARIO" Or Subject contains "ESSERE" Or Subject contains "CRIMINALE" Or Subject contains "LECCA" Or Subject contains "COCAINA" Or Subject contains "LESBICA" Or Subject contains "NESSUNO" Or Subject contains "MAFIOSO" Or Subject contains "BERLUSCONI" Or Subject contains "" Or Subject contains "HARDCORE" Or Subject contains "PEDERASTA" Or Subject contains "CULO" Or Subject contains "NOSTRA" Or Subject contains "FOGLIO" Or Subject contains "USARE" Or Subject contains "FAMIGLIA" Or Subject contains "FECE" Or Subject contains "CAPO" Or Subject contains "SUICIDARE" Or Subject contains "OGNI" Or Subject contains "CANE" Or Subject contains "MERCATO" Or Subject contains "VOLTA" Or Subject contains "MAFIOSA" Or Subject contains "ALMENO" Or Subject contains "BASTARDO" Or Subject contains "FIGLIA" Or Subject contains "BASTARD" Or Subject contains "CRIMINAL" Or Subject contains "ANNI" Or Subject contains "PEDINA" -- https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list
How to Choose an Unlimited Web Hosting for free
How to Choose an Unlimited Web Hosting 1) Visit www.axealis.com to get domain and hosting 2) Unlimited Bandwidth ,this mean unlimited data transmission for your client access. 2) Unlimited Space , you can upload file for unlimited . 3) Unlimited Email , many of email account can created . 5) SSL Security , used SSL / HTTPS to protect your web . 6) LINUX , WINDOWS and MAC , can access form many operating system. -- http://mail.python.org/mailman/listinfo/python-list
Re: Generating PDF file in Python
On 10/26/10 at 8:38 AM, gher...@islandtraining.com (Gary Herron) pronounced: Try a package named reportlab. It's very comprehensive, opensource, written in Python and is cross-platform: http://www.reportlab.com/software/opensource/ It appears that the open source version of ReportLab does not offer the ability to merge FDF data into an existing PDF form. Instead ReportLab Plus is required, and commercial license costs at least GBP1100 per year for up to 30,000 pages. Is that correct? I found this option: http://stackoverflow.com/questions/1890570/how-can-i-auto-populate-a-pdf-form-in-django-python Has anyone else tried this route? --steve -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Steve Piercy Web Site Builder Soquel, CA <http://www.StevePiercy.com/> -- http://mail.python.org/mailman/listinfo/python-list