Serious error in int() function?

2016-04-13 Thread martin . spichty
Hi, there may be a serious error in python's int() function: print int(float(2.8/0.1)) yields 27 instead of 28!! I am using Python Python 2.7.6, GCC 4.8.2 on Linux Ubuntu. Is that known? Best, Martin -- https://mail.python.org/mailman/listinfo/python-list

Re: help install numpy and scipy in window 7 and 3.5.0 shell

2016-04-15 Thread Martin Schöön
Den 2016-04-15 skrev wrh8...@gmail.com : > On Windows (at work) I use Python(x,y) http://python-xy.github.io/ It has yet to fail me. /Martin -- https://mail.python.org/mailman/listinfo/python-list

Re: Guido sees the light: PEP 8 updated

2016-04-16 Thread Bob Martin
in 758117 20160416 053809 Steven D'Aprano wrote: >Until now, PEP 8 has recommended that multi-line expressions should break >*after* infix operators: > > >result = (this_value * >some_value + >another_value - >excess_value or >default_value >) > > >After a mercifully short discussion on the Python

Re: Immediate Requirement: use the Python Job Board for recruitment (was:

2016-04-26 Thread Bob Martin
in 758723 20160427 000706 Ben Finney wrote: >sourav524.itsci...@gmail.com writes: > >> Hello Associates, >> Please go through the below job description and let me know your >> interest. > >Hello recruiters, > >Please don't use Python discussion forums for recruiting. Instead, use >the Python Job B

Re: for / while else doesn't make sense

2016-05-19 Thread Bob Martin
in 759855 20160519 185500 Jon Ribbens wrote: >On 2016-05-19, Steven D'Aprano wrote: >> On Fri, 20 May 2016 02:31 am, Herkermer Sherwood wrote: >>> Most keywords in Python make linguistic sense, but using "else" in for and >>> while structures is kludgy and misleading. I am under the assumption th

RE: Python on Windows with linux environment

2016-06-02 Thread Deborah Martin
Try Cygwin at http://www.cygwin.com Regards, Deborah -Original Message- From: Python-list [mailto:python-list-bounces+deborah.martin=kognitio@python.org] On Behalf Of Muhammad Ali Sent: 02 June 2016 12:23 To: python-list@python.org Subject: Python on Windows with linux environment

Re: Recommendation for Object-Oriented systems to study

2016-06-02 Thread Bob Martin
in 760378 20160602 131534 Alan Evangelista wrote: >On 06/02/2016 02:44 AM, Lawrence D�Oliveiro wrote: >> On Monday, May 30, 2016 at 7:17:47 AM UTC+12, Alan Evangelista wrote: >>> - Java forces everything to be implemented in OO model (classes) >> After you have spend a few months battering your

Re: for / while else doesn't make sense

2016-06-09 Thread Grady Martin
On 2016年05月19日 11時02分, Ian Kelly wrote: "else" makes sense from a certain point of view, but I think that logic may not be communicated well. At the start of each loop iteration, the loop construct makes a test for whether the loop should continue or not. If that test ever fails (i.e. if the cond

Re: the best online course

2016-07-10 Thread Bob Martin
in 762247 20160709 223746 Malik Rumi wrote: >I want one of those "knuckle down and learn" classes. But even more than th= >at, I want a class with a real teacher who is available to answer questions= >and explain things. I've done a lot of books and online video, but there's= >usually no help. If

Re: the best online course

2016-07-10 Thread Bob Martin
in 762282 20160711 063300 Steven D'Aprano wrote: >On Monday 11 July 2016 13:07, Rustom Mody wrote: > >> Python is good for black-box – us the ‘batteries included’ without >> worrying >> too much how they are made >> Scheme, assembly language, Turing machines etc are at the other end of the

How do I make a video animation with transparent background?

2016-08-09 Thread Martin Schöön
to do is to present numerical data in the video or as a separate video -- think LCD display reading out numbers up-dated every second. Once again preferably on a transparent background. Here I have covered no ground :-( TIA, /Martin -- https://mail.python.org/mailman/listinfo/python-list

Reading 'scientific' csv using Pandas?

2018-11-18 Thread Martin Schöön
e found it already but I don't understand or I ask the wrong question to the search engines. My experience of Pandas is limited and I would appreciate some guidance. /Martin -- https://mail.python.org/mailman/listinfo/python-list

Re: Reading 'scientific' csv using Pandas?

2018-11-18 Thread Martin Schöön
Den 2018-11-18 skrev Shakti Kumar : > On Sun, 18 Nov 2018 at 18:18, Martin Schöön wrote: >> >> Now I hit a bump in the road when some of the data is not in plain >> decimal notation (xxx,xx) but in 'scientific' (xx,xxxe-xx) notation. >> > > Martin, I b

Re: Reading 'scientific' csv using Pandas?

2018-11-19 Thread Martin Schöön
Den 2018-11-18 skrev Stefan Ram : > Martin =?UTF-8?Q?Sch=C3=B6=C3=B6n?= writes: >>to read from such files. This works so so. 'Common floats' (3,1415 etc) >>works just fine but 'scientific' stuff (1,6023e23) does not work. > > main.py > > imp

Re: Reading 'scientific' csv using Pandas?

2018-11-19 Thread Martin Schöön
Too many files to go through them with an editor :-( /Martin -- https://mail.python.org/mailman/listinfo/python-list

Re: Reading 'scientific' csv using Pandas?

2018-11-19 Thread Martin Schöön
Den 2018-11-19 skrev Peter Otten <__pete...@web.de>: > Martin Schöön wrote: > >> My pandas is up to date. >> > > The engine="python" produces an exception over here: > > """ > ValueError: The 'decimal' option is not su

Re: Reading 'scientific' csv using Pandas?

2018-11-19 Thread Martin Schöön
Den 2018-11-19 skrev Martin Schöön : > Den 2018-11-19 skrev Peter Otten <__pete...@web.de>: >> >> The engine="python" produces an exception over here: >> >> """ >> ValueError: The 'decimal' option is not supported wi

Re: Reading 'scientific' csv using Pandas?

2018-11-20 Thread Martin Schöön
Den 2018-11-19 skrev Martin Schöön : > I spoke too early. Upon closer inspection I get the first column with > decimal '.' and the rest with decimal ','. I have tried the converter > thing to no avail :-( > Problem solved! This morning I woke up with the idea of

problem about the installation

2019-06-17 Thread David Martin
Hello there! My computer windows is 8 and the operating system is 32-bit operating system, based upon x64 processor but I got a problem during installation, could you please assist me about this? I appreciate your efforts in advance. Thanks Yours sincerely YarDel Daudy

How do I purge pip intsall --user packages?

2019-09-17 Thread Martin Schöön
to uninstall each and every package would be tedious... /Martin -- https://mail.python.org/mailman/listinfo/python-list

Python shows error on line 15 that i cant fix

2019-09-21 Thread Dave Martin
# starAbsMags=df['radial_velocity'] #GaiaPandasEscapeVelocityCode import pandas as pd import numpy as np from astropy.io import fits import astropy import matplotlib.pyplot as plt #get the combined data and load the fits files fits_filename="Gaia_DR2/gaiadr2_100pc.fits" df=pd.DataFrame() wit

python is bugging

2019-09-21 Thread Dave Martin
what does expected an indented block -- https://mail.python.org/mailman/listinfo/python-list

Re: python is bugging

2019-09-21 Thread Dave Martin
On Saturday, September 21, 2019 at 11:55:29 AM UTC-4, Dave Martin wrote: > what does expected an indented block *what does an indented block mean? -- https://mail.python.org/mailman/listinfo/python-list

Re: python is bugging

2019-09-21 Thread Dave Martin
On Saturday, September 21, 2019 at 12:44:27 PM UTC-4, Brian Oney wrote: > On Sat, 2019-09-21 at 08:57 -0700, Dave Martin wrote: > > On Saturday, September 21, 2019 at 11:55:29 AM UTC-4, Dave Martin > > wrote: > > > what does expected an indented block > > > &g

Re: Python shows error on line 15 that i cant fix

2019-09-21 Thread Dave Martin
On Saturday, September 21, 2019 at 1:33:12 PM UTC-4, Terry Reedy wrote: > On 9/21/2019 11:53 AM, Dave Martin wrote: > > > > # starAbsMags=df['radial_velocity'] > > > > #GaiaPandasEscapeVelocityCode > > > > import pandas as pd > > import

Re: Python shows error on line 15 that i cant fix

2019-09-21 Thread Dave Martin
On Saturday, September 21, 2019 at 2:46:15 PM UTC-4, boB Stepp wrote: > On Sat, Sep 21, 2019 at 1:01 PM Dave Martin wrote: > > > > On Saturday, September 21, 2019 at 1:33:12 PM UTC-4, Terry Reedy wrote: > > > On 9/21/2019 11:53 AM, Dave Martin wrote: > [...] > &g

Jupyter Notebook -> PDF with A4 pages?

2019-10-13 Thread Martin Schöön
net but so far to no avail. /Martin -- https://mail.python.org/mailman/listinfo/python-list

Re: Jupyter Notebook -> PDF with A4 pages?

2019-10-14 Thread Martin Schöön
Den 2019-10-13 skrev Piet van Oostrum : > Martin Schöön writes: > >> Is there a way to do "Download as PDF" and get A4 pages instead >> of Letter? Yes, I know I can do "Download as LaTeX" and edit the > < snip > > Make a directory ~/.jupyter

Re: Jupyter Notebook -> PDF with A4 pages?

2019-10-16 Thread Martin Schöön
r pip seams like cheating... For a moment I thought that maybe pdflatex was missing at work but not so. Disclaimer: I only had a few minutes to spend on this today. /Martin -- https://mail.python.org/mailman/listinfo/python-list

Re: Jupyter Notebook -> PDF with A4 pages?

2019-10-31 Thread Martin Schöön
Den 2019-10-16 skrev Piet van Oostrum : > Martin Schöön writes: > >> Den 2019-10-15 skrev Piet van Oostrum : >>> >> pip is version 8.1.1 which is what Ubuntu 16.04 comes >> with. I have learnt -- the hard way -- that pip should be >> used with the --user

Re: Jupyter Notebook -> PDF with A4 pages?

2019-11-22 Thread Martin Schöön
Den 2019-11-01 skrev Andrea D'Amore : > On Thu, 31 Oct 2019 at 22:08, Martin Schöön wrote: >> Den 2019-10-16 skrev Piet van Oostrum : >>> Why should that not work? >> pip install --user pip broke pip. I have not been able to repair pip > > I guess that's

type annotations for xpath list

2020-04-08 Thread Martin Alaçam
Hello, I have the following descriptor: self._pi = None @property def pi(self) -> list: self._pi = self._root.xpath('processing-instruction()') return self._pi Mypy says: "Incompatible return value type (got "None", expected "List[Any]")" The xpath expression always r

Re: type annotations for xpath list

2020-04-08 Thread Martin Alaçam
10:02 AM, Martin Alaçam wrote: > > Hello, > > > > I have the following descriptor: > > > > self._pi = None > > @property > > def pi(self) -> list: > > self._pi = self._root.xpath('processing-instruction()') >

dayofyear is not great when going into a new year

2021-01-05 Thread Martin Schöön
and manipulating data coming from a csv file. Scipy, numpy and matplotlib are used for the curve fitting and plotting. TIA, /Martin -- https://mail.python.org/mailman/listinfo/python-list

Re: dayofyear is not great when going into a new year

2021-01-08 Thread Martin Schöön
Den 2021-01-05 skrev Stefan Ram : > Martin =?UTF-8?Q?Sch=C3=B6=C3=B6n?= writes: >>I have had some Python fun with COVID-19 data. I have done >>some curve fitting and to make that easier I have transformed >>date to day of year. Come end of 2020 and beginning of 2021 >>

Re: dayofyear is not great when going into a new year

2021-01-10 Thread Martin Schöön
Den 2021-01-09 skrev Michael F. Stemper : > > A week is like a piece of string. It has two ends. > The control line of the main sheet traveler on my boat is spliced into an endless loop. http://hem.bredband.net/b262106/pages/controls/index.html I am glad work weeks are not like that :-)

Re: Open PDF

2005-09-23 Thread Martin Miller
f the implementation in the Python os module or one with the underlying OS (Windoze) -- I suspect the latter. Regards, -Martin Dennis Lee Bieber wrote: > On Thu, 22 Sep 2005 15:16:09 +0100, Dan <[EMAIL PROTECTED]> declaimed > the following in comp.lang.python: > > > > I would l

Re: Using '__mul__' within a class

2005-09-24 Thread Martin Miller
elf * self self.a = result.a self.b = result.b self.c = result.c You would also have to do something similar in an __imul__() method if you decided to implement one. Hope this helps, -Martin Gerard Flanagan wrote: > Hello > > I'm pretty new to Python and was w

Re: replacments for stdio?

2005-09-25 Thread Martin Miller
could probably be adapted to handle sys.stdout instead of, or in addition to, output to sys.stderr. It also sounds like it can be made platform independent. Best, -Martin P.S. Please post your results back to the newsgroup -- thanks! [EMAIL PROTECTED] wrote: > hi, >i was wondering

Re: about install wxPython in Redhat Linux AS 4

2005-09-28 Thread Martin Franklin
will most likely need to build them from source (which means installing the -devel packages for python & GTK) Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: replacments for stdio?

2005-10-05 Thread Martin Miller
solution. [Nice work, Bryan!] Best, -Martin [EMAIL PROTECTED] wrote: > Thanks martin, > I'll give it a shot as soon as i get back from work! -- http://mail.python.org/mailman/listinfo/python-list

Re: Copy files to Linux server through ssh tunnel

2005-10-06 Thread Martin Franklin
[EMAIL PROTECTED] wrote: > Hi ! > > I have some backup files on a server farm. > I want to store these local backup files on a backup file server for > "safety's snake". > > These files are compressed zip files with 12 character length password. > But my system admin asked me, how can I improve t

Re: replacments for stdio?

2005-10-06 Thread Martin Miller
is unencumbered unless the author indicates otherwise -- or at most covered by the same open source license as Python. -Martin [EMAIL PROTECTED] wrote: > yes, > I've tried it aswell - nice work indeed! > > now, maybe also get stdin to work from this TK window... ;-) --

Re: finding a number...

2005-10-21 Thread Martin Blume
some filesystems (e.g. ext2, FAT [???]). Maybe this helps, otherwise you'd have to reformulate the question. HTH. YMMV. Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: a Haskell a Day

2005-10-26 Thread Martin Ambuhl
Xah Lee wrote: > This is my learning notes on Haskell. I call it a-Haskell-a-day. No one in any of comp.lang.perl.misc, comp.lang.python, comp.lang.c, comp.lang.java.programmer, comp.unix.programmer gives a damn about your adventures in Haskell. If you must mastubate, please do so i

urllib2 problem

2005-10-26 Thread Jeremy Martin
here? I apologize if this is kind of a rookie question but Ive been searching for about a week with no luck. Thanks! Jeremy Martin NWS WFO GLD -- http://mail.python.org/mailman/listinfo/python-list

Signals and keyboard interupts

2005-10-27 Thread Martin Miller
/msg/5b27edd0df08170a?hl=en&;, but haven't been able to figure out why the [much more involved] example in his post does not seem to exhibit this problem (i.e. it has no try/except block). Thanks in advance for any help. -Martin -- http://mail.python.org/mailman/listinfo/python-list

control webbrowser remotely?

2005-11-04 Thread Martin Bless
x27;s possible to control Excel remotely on Windows. Anybody knows something? Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Invoking Python from Python

2005-11-08 Thread Martin Miller
27;ve found it to be a very powerful and useful technique while remaining relatively easy to maintain (the generated code doesn't contain any conditionals or loops, however). Another nice by-product is that the data stored this way is portable to different platforms. -Martin -- http://mail.python.org/mailman/listinfo/python-list

seeking ncpfs library bindings for Python

2005-11-09 Thread Martin Maney
After hacking up a first cut that works through the existing ncpfs CLI tools, I was looking to move to a more integrated solution (if only to avoid so many spawns of external tasks just to, eg., update a queue's pending print job list). I couldn't find any hint of such a thing - the long-gone ndsl

Re: about widget construction kit

2005-11-11 Thread Martin Miller
Shi Mu wrote: > On 11/11/05, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > > 1. pass in the full path to the executable: > > > >cd tkinter3000-1.0-20031212 > >c:\python23\python setup.py install > > ... > > > still confused by th first way you mentioned. If I cd > tkinter3000-1.0-20031212, i w

Inheritance in nested classes

2005-11-15 Thread Martin Skou
this interface? Thanks. /Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Default method arguments

2005-11-15 Thread Martin Miller
_(self, n): self.data = n def f(self, x = self.data): print x self.f = new.instancemethod(f, self, A) This change underscores the fact that each instance of class A gets a different independent f() method. Despite this nit, I believe I understand the points Alex makes about the subject (and would agree). -Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Default method arguments

2005-11-17 Thread Martin Miller
t;, a2(0) a1(1) a2(1) print "after a1(0):", a1(0) print "after a2(0):", a2(0) >>>> outputs before a1(0): 0 before a2(0): 0 after a1(0): 2 after a2(0): 2 Notice that it even though each was only incremented by 1 once, they interacted, and show the effects of two cal

Re: Understanding Python Documentation

2005-11-24 Thread Martin Franklin
lag (not sure what it is) but with the flag (-g I seem to remember) will do the same as a the windows thing) the added benifit of pydoc is that you can 'run' it on your own code and see the resulting API description too! Cheers Martin > available, then if you want more detail you drill down on that particular > method. Oh well. I'll get used to it :) > > Thanks! > Josh -- http://mail.python.org/mailman/listinfo/python-list

Re: How to make tkFileDialog GUI larger?

2005-11-28 Thread Martin Franklin
ack but I'm sorry I don't know what it would be Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: importing a method

2005-11-28 Thread Martin Miller
ost, I had no intention of atributing the > user's method to the class, but to the instance. I'd like to point out that the instancemethod() function returns a method object, bound to its *instance* argument if it isn't None -- which sounds like exactly what you want/need. -Marti

Re: importing a method

2005-11-28 Thread Martin Miller
I'd like to point out to the OP that using a function's __get__ method this way only works with new-style classes and their instances...not with the example in the shown in original post. -Martin Alex Martelli wrote: > Flavio <[EMAIL PROTECTED]> wrote: > > > This &qu

Re: Help!!! On Tkinter Menu problem!!!

2005-11-30 Thread Martin Franklin
App() > > > Maybe I should bind something to event. Everytime I close the > window, the name of the window should be removed from the windowList > and refresh the all the menuitems again. But I don't know how and > where to add the "destroy" event. Can anyone give me a hand > > Thanks a lot!! > The Menu Tk Widget has a delete or deletecommand method(s) the first accepts an index the second a Menu label, both will remove the menu entry for more on this... http://effbot.org/tkinterbook/menu.htm Regards Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: (newbie) N-uples from list of lists

2005-11-30 Thread Martin Miller
the likely the "best" (as is usually the case ;-). Best, -Martin [EMAIL PROTECTED] wrote: > great thanks to all. > > actually i have not seen it was a cross product... :) but then there > are already few others ideas from the web, i paste what i have found > below... >

Re: importing a method

2005-11-30 Thread Martin Miller
hon programs as types.MethodType. > ... [snip] Which, as you can see, claims that types.MethodType is actually an instance of a PyTypeObject (not the class instancemethod that help(types.MethodType) indicated). Best, -Martin Steven D'Aprano wrote: > On Mon, 28 Nov 2005 08:16:12 -0

Re: importing a method

2005-11-30 Thread Martin Miller
method/function: >>> o.z() <__main__.old instance at 0x009D5F30> So I stand corrected -- thank you. Best, -Martin == Alex Martelli wrote: > Martin Miller <[EMAIL PROTECTED]> wrote: > > > I'd like to point out to the OP that using a function&#x

Re: Is Python string immutable?

2005-12-02 Thread Martin Franklin
Chris Mellon wrote: > On 11/30/05, could ildg <[EMAIL PROTECTED]> wrote: > >>In java and C# String is immutable, str=str+"some more" will return a new >>string and leave some gargabe. >>so in java and C# if there are some frequent string operation, >>StringBuilder/StringBuffer is recommanded. >> >

Re: (newbie) N-uples from list of lists

2005-12-02 Thread Martin Miller
hich will yield each of the combinations, one at time. All the others create and return all the combinations at once (as I suspect the one liner using reduce you mention does, too). As you point out, "best" is always in the eyes of the beholder. "Best" regards, ;-) -M

Re: Force Focus in Tkinter

2005-12-06 Thread Martin Franklin
ew > Andrew, Glad to hear you got it working, could you post some example code that shows these other problems? Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: How to find the type ...

2005-12-09 Thread Martin Christensen
be to simply assume that the argument can be converted to an integer and catch any errors that occur: def f(x): try: x = int(x) except ValueError: # It's a non-number string. do stuff except TypeError: # It's neither a number nor a string.

Writing huge Sets() to disk

2005-01-10 Thread Martin MOKREJŠ
Hi, I have sets.Set() objects having up to 20E20 items, each is composed of up to 20 characters. Keeping them in memory on !GB machine put's me quickly into swap. I don't want to use dictionary approach, as I don't see a sense to store None as a value. The items in a set are unique. How can I wri

Re: Writing huge Sets() to disk

2005-01-10 Thread Martin MOKREJŠ
Batista, Facundo wrote: [Martin MOKREJ?] #- I have sets.Set() objects having up to 20E20 items, #- each is composed of up to 20 characters. Keeping Are you really sure?? Either I'll have to construct them all over again say 20-30 times, or I'll find a way to keep them on disk. #-

Re: Writing huge Sets() to disk

2005-01-10 Thread Martin MOKREJŠ
Batista, Facundo wrote: [Martin MOKREJŠ] #- > At least you'll need a disk of 34694 EXABYTES!!! #- #- Hmm, you are right. So 20E15 then? I definitely need to be Right. Now you only need 355 PETABytes. Nowadays disk is cheap, but... #- in range 1-14. ;-) Why? I need to test for occuren

Re: Writing huge Sets() to disk

2005-01-10 Thread Martin MOKREJŠ
Robert Brewer wrote: Martin MOKREJŠ wrote: I have sets.Set() objects having up to 20E20 items, each is composed of up to 20 characters. Keeping them in memory on !GB machine put's me quickly into swap. I don't want to use dictionary approach, as I don't see a sense to store None

Re: Writing huge Sets() to disk

2005-01-10 Thread Martin MOKREJÅ
Paul McGuire wrote: "Martin MOKREJÂ" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Hi, I have sets.Set() objects having up to 20E20 items, each is composed of up to 20 characters. Keeping them in memory on !GB machine put's me quickly into swap. I don

Re: Writing huge Sets() to disk

2005-01-10 Thread Martin MOKREJŠ
Robert Brewer wrote: Martin MOKREJŠ wrote: Robert Brewer wrote: Martin MOKREJŠ wrote: I have sets.Set() objects having up to 20E20 items, each is composed of up to 20 characters. Keeping them in memory on !GB machine put's me quickly into swap. I don't want to use dictionary approach,

Re: Writing huge Sets() to disk

2005-01-10 Thread Martin MOKREJŠ
Adam DePrince wrote: On Mon, 2005-01-10 at 11:11, Martin MOKREJ¦ wrote: Hi, I have sets.Set() objects having up to 20E20 items, each is composed of up to 20 characters. Keeping them in memory on !GB machine put's me quickly into swap. I don't want to use dictionary approach, as I d

Re: Writing huge Sets() to disk

2005-01-10 Thread Martin MOKREJÅ
Tim Peters wrote: [Martin MOKREJÅ] just imagine, you want to compare how many words are in English, German, Czech, Polish disctionary. You collect words from every language and record them in dict or Set, as you wish. Call the set of all English words E; G, C, and P similarly. Once you have

Re: Writing huge Sets() to disk

2005-01-10 Thread Martin MOKREJÅ
Istvan Albert wrote: Martin MOKREJÅ wrote: But nevertheless, imagine 1E6 words of size 15. That's maybe 1.5GB of raw data. Will sets be appropriate you think? You started out with 20E20 then cut back to 1E15 keys now it is down to one million but you claim that these will take 1.5 GB. I ga

Re: Writing huge Sets() to disk

2005-01-10 Thread Martin MOKREJÅ
Tim Peters wrote: [Martin MOKREJÅ] ... I gave up the theoretical approach. Practically, I might need up to store maybe those 1E15 keys. We should work on our multiplication skills here . You don't have enough disk space to store 1E15 keys. If your keys were just one byte each, you would ne

Re: Writing huge Sets() to disk

2005-01-10 Thread Martin MOKREJÅ
t the proposed code really does. Scott David Daniels wrote: Tim Peters wrote: [Martin MOKREJÅ] just imagine, you want to compare how many words are in English, German, Czech, Polish disctionary. You collect words from every language and record them in dict or Set, as you wish. Call the set of all En

Re: Writing huge Sets() to disk

2005-01-10 Thread Martin MOKREJŠ
ency compared to tries, at the expense of only slightly slower build and search time. This is especially essential as the OP mentioned he could have huge sets of data. Hi Simo and John, would you please point me to some docs so I learn what are you talking about? ;) Many thanks! Martin -- http:/

Re: Writing huge Sets() to disk

2005-01-10 Thread Martin MOKREJŠ
Paul Rubin wrote: Paul Rubin writes: handle with builtin Python operations without putting some thought into algorithms and data structures. From "ribosome" I'm guessing you're doing computational biology. If you're going to be writing Well, trying sort of ... Not much

Re: Writing huve ge Sets() to disk

2005-01-10 Thread Martin MOKREJÅ
Tim Peters wrote: [Tim Peters] As I mentioned before, if you store keys in sorted text files, you can do intersection and difference very efficiently just by using the Unix `comm` utiltity. [Martin MOKREJÅ] Now I got your point. I understand the comm(1) is written in C, but it still has to scan

Pyrex-0.9.3: definition mismatch with distutils of Python24

2005-01-13 Thread Martin Bless
, sources, extension): If I just add the "extension" arg to the Pyrex definitions everything seems to work. But I have to admit that I don't really know what I'm doing here and I feel sorry I can't contribute more than just reporting the error. mb - Martin Bless -- http://mail.python.org/mailman/listinfo/python-list

Re: Writing huge Sets() to disk

2005-01-14 Thread Martin MOKREJÅ
Tim Peters wrote: [Martin MOKREJÅ] ... I gave up the theoretical approach. Practically, I might need up to store maybe those 1E15 keys. We should work on our multiplication skills here . You don't have enough disk space to store 1E15 keys. If your keys were just one byte each, you would ne

Re: Writing huge Sets() to disk

2005-01-14 Thread Martin MOKREJÅ
Tim Peters wrote: [Martin MOKREJÅ] This comm(1) approach doesn't work for me. It somehow fails to detect common entries when the offset is too big. [...] I'll repeat: As I mentioned before, if you store keys in sorted text files ... Those files aren't in sorted order, so of cour

Re: Writing huge Sets() to disk

2005-01-17 Thread Martin MOKREJŠ
s strings of fixed size, if mmap() would be available. The number of keys doesn't grow much in time, mostly there are only updates. Thaks for any ideas. martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Writing huge Sets() to disk

2005-01-17 Thread Martin MOKREJŠ
Duncan Booth wrote: Martin MOKREJ© wrote: Hi, could someone tell me what all does and what all doesn't copy references in python. I have found my script after reaching some state and taking say 600MB, pushes it's internal dictionaries to hard disk. The for loop consumes another

Re: Writing huge Sets() to disk

2005-01-17 Thread Martin MOKREJŠ
Steve Holden wrote: Martin MOKREJŠ wrote: Hi, could someone tell me what all does and what all doesn't copy references in python. I have found my script after reaching some state and taking say 600MB, pushes it's internal dictionaries to hard disk. The for loop consumes another 300MB (a

Re: [perl-python] 20050117, filter, map

2005-01-17 Thread Martin Kissner
Steven Bethard wrote : > Xah Lee wrote: >> © Note: this post is from the Perl-Python >> © a-day mailing list at >> © http://groups.yahoo.com/group/perl-python/ > > Is there any chance you could post these all as part of the same thread? >That would be really nice for those of us who aren't int

Overloading ctor doesn't work?

2005-01-20 Thread Martin Häcker
ctor of datetime so that year, month and day are static and everything should work as far as I need it. That is, it could work - though I seem to be unable to overide the ctor. :( Why is that? cu Martin -- Reach me at spamfaenger (at) gmx (dot) net -- http://mail.python.org/mailman/listinfo/python-list

Re: Overloading ctor doesn't work?

2005-01-20 Thread Martin Häcker
Ah, right. The light turns on... datetime is immutable so overriding the constructor doesn't change the constructed object. You have to override __new__ instead. http://www.python.org/2.2.1/descrintro.html#__new__ Ahhh! Thanks a bunch, now this makes things much clearer. Thanks again! cu M

Re: tkinter socket client ?

2005-01-25 Thread Martin Franklin
of the ScrolledText widget to do just this I gave it a write method - so I could re-direct stdout to it - and also called yview_pickplace in that method. HTH Martin. -- http://mail.python.org/mailman/listinfo/python-list

Re: debugging os.spawn*() calls

2005-01-28 Thread Martin Franklin
not a 'real' answer - I use pexpect to automate my ssh scripts these days as I had a few problems using ssh with the os.* family perhaps you may find pexpect a wee bit easier... Martin. -- http://mail.python.org/mailman/listinfo/python-list

Re: what's OOP's jargons and complexities?

2005-01-28 Thread Martin Ambuhl
Dan Perl wrote: Actually, it can be as simple as: public class test { There is no "public" or "class" in C. Please don't post such trash to comp.lang.c. In fact, C++ is not topical in any of the five newsgroups you posted to. I don't know where you're posting from, so I apologize to the perl,

Re: what's OOP's jargons and complexities?

2005-01-28 Thread Martin Ambuhl
Xah Lee wrote his usual masturbatory crap: Lisp is not topical in 3 of the 5 newsgroups you spewed on. Java is not topical in 5 of the 5 newsgroups you spewed on. Get your head out your butt and post to Java newsgroups if you want and they'll have you. Are you inflicting this crap on the rest of

Re: what's OOP's jargons and complexities?

2005-01-28 Thread Martin Ambuhl
Gabriel Dos Reis wrote: Martin Ambuhl <[EMAIL PROTECTED]> writes: | Dan Perl wrote: | | > Actually, it can be as simple as: | > public class test { | | There is no "public" or "class" in C. Please don't post such trash to | comp.lang.c. In fact, C++ is no

Re: PythonWin (build 203) for Python 2.3 causes Windows 2000 to grind to a halt?

2005-01-30 Thread Martin Bless
ironment) league. And it's very Python aware and knowledgable ... mb - Martin Bless Here's my script to delete the erroneous debugger entries: Script "delete-debugger-entries,pywin,python24.py" #!/usr/bin/env python # -*- coding: iso-8859-1 -*- """Delete pr

Re: "pickle" vs. f.write()

2005-02-01 Thread Martin Miller
quot;, repr(me) Which produces the following output: me = person('', 0, [], '') In addition, the following constructs are possible: > family = [ > person("Martin", 50, ["Matt"], "eldest son"), > person("Matt", 43, [&qu

continuous plotting with Tkinter

2005-02-02 Thread Martin Blume
inue to read in data from stdin. Or can I? If so, how? Regards Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: convert ftp.retrbinary to file object? - Python language lacks expression?

2005-02-03 Thread Martin Franklin
locksize=amount, rest=self.offset) except TransferAbort: return self.data f = FTPFile("HOSTNAME", "FILENAME") print f.read(24) print f.read(24) I open the ftp connection inside the read method as it caused an error (on the second call to read) when I ope

Re: convert ftp.retrbinary to file object? - Python language lacks expression?

2005-02-03 Thread Martin Franklin
Martin Franklin wrote: Robert wrote: I just tried to convert a (hugh size) ftp.retrbinary run into a pseudo-file object with .read(bytes) method in order to not consume 500MB on a copy operation. [snip] H this is nearly there I think...: whoops... spoke too soon.. import ftplib class

Re: convert ftp.retrbinary to file object? - Python language lacks expression?

2005-02-03 Thread Martin Franklin
Martin Franklin wrote: Martin Franklin wrote: Robert wrote: I just tried to convert a (hugh size) ftp.retrbinary run into a pseudo-file object with .read(bytes) method in order to not consume 500MB on a copy operation. [snip] H this is nearly there I think...: whoops... spoke too soon

<    1   2   3   4   5   6   7   8   9   10   >