Re: LXML: can't register namespace

2018-03-07 Thread Andrew Z
the namespace URI will be removed. On Wed, Mar 7, 2018 at 8:55 AM, Andrew Z wrote: > Yes, if i give it any non empty tag - all goes well. > > All im trying to do is to extract a namespace ( i try to keep simple here. > Just first one for now) and register it so i can save

Re: LXML: can't register namespace

2018-03-09 Thread Andrew Z
nel wrote: > > > >> Andrew Z schrieb am 07.03.2018 um 05:03: > >>> Hello, > >>> with 3.6 and latest greatest lxml: > >>> > >>> from lxml import etree > >>> > >>> tree = etree.parse('Sample.xml') >

Flask: request vs Request

2018-03-10 Thread Andrew Z
hello, i'm playing with Michael Grinberg's "Restful API with python and flask" tutorial . And i'm very much confused whats the difference between request and Request. the "request" is introduced @ the point he

Re: Flask: request vs Request

2018-03-10 Thread Andrew Z
that's right there is no Request used. So what for the Request is used for then? Here it is explained that request is for current request... that's kinda of clears the air a bit. but where do i find it's m

Re: Flask: request vs Request

2018-03-11 Thread Andrew Z
Sorry guys. i realized i was "mumbling" . What is the difference between Request and request? - RTFM <http://flask.pocoo.org/docs/0.12/api/#flask.Request>, Andrew Questions: a. when do i use Request? b. why can't I see any properties of the request? For example,

Re: Flask: request vs Request

2018-03-11 Thread Andrew Z
after reading the docs and stackoverflow i got some rudimentary understanding of Request vs request. i still don't understand why i PyCharm won't show properties, but it is tool centric question that hardly belongs to this group. On Sun, Mar 11, 2018 at 10:02 AM, Andrew Z wrote: &g

Re: csv module and NULL data byte

2018-03-11 Thread Andrew McNamara
outside the Python core... 8-) -- Andrew McNamara, Senior Developer, Object Craft http://www.object-craft.com.au/ -- https://mail.python.org/mailman/listinfo/python-list

Re: Flask: request vs Request

2018-03-12 Thread Andrew Z
Thank you Christopher. On Mar 12, 2018 09:10, "Christopher Mullins" wrote: > Could you please give some context when you reply, TIA >> > > Whoops, thanks for the reminder Mark. > > So what for the Request is used for then? > > > In general when you see that something in Python starts with a cap

A better solution

2018-03-16 Thread Andrew Z
Hello, im not entirely happy with my solution and would love to hear your suggestions on how to improve the solution. I simplified the task while keeping the code working. Task: financial accounts are described by XML documents. I want to architecture the code to be easily extendible ( easy to

Keys in dict and keys not in dict

2018-03-18 Thread Andrew Z
hello, i'd like to check if a function parameter (json) has all the keys I expect it to have and if it doesn't - point out the one that is missing. What's the good way of doing that? "good way" - something concise... i'd like to avoid using : if key in json: #pass else print(" Oops, i

Re: Keys in dict and keys not in dict

2018-03-19 Thread Andrew Z
Beautiful. Thank you Chris, Ben, Peter and Inada. On Mar 19, 2018 3:14 AM, "INADA Naoki" wrote: > > expected = {"foo", "bar", "spam"} > > missing = expected - set(json.keys()) > > > > dict.keys() returns set-like object. > So `missing = expected - json.keys()` works fine, and it's more e

Installing Paraview 5.4.1-704g7198de6 (64) and Python 3.7.)b3 (64) on W10

2018-04-08 Thread Andrew Podgorski
I am trying to find out how to install the above programs together so that ParaView will recognize Python? I see so many responses on the web that I am confused. I NEED TO READ only vtk file? Andrew Podgorski [email protected] -- https://mail.python.org/mailman/listinfo/python-list

Re: Python bug in ArcGIS - Urban Network analysis tool

2018-07-30 Thread Andrew MacIntyre
act the author or the download source. If you or your organisation has a current ArcGIS maintenance agreement, you might also be able to access the community forums that ESRI run to ask for more info about this plugin. -- - An

Re: Cloud platform with GPU

2018-11-10 Thread Andrew Z
Denis, ..none of them was very satisfactory. Sharing your requirements will be a good first step for getting good answers. On Sat, Nov 10, 2018, 02:26 denis meng Good day all, > > I am looking for a good cloud platform to do all my python development for > machine learning with GPU availability,

Re: Good editor for python

2018-11-11 Thread Andrew Z
If you do scripts - emacs/vi is the way to go. If you need something more (like creating libraries, classes) go with pycharm. It is a professionally made IDE. Over past 2 years ive been trying to "downgrade" myself to something with less belts and whistles, but come back to it all the time. On

Re: Good editor for python

2018-11-11 Thread Andrew Z
e snippet and "```{r}" ... "```" for an R code snippet. Or I > > just use the Idle editor that comes with Python. > > > > > >Someone suggested that Apache Zeppelin and / or BeakerX might be > > able to do this also, but I've not tried o

Re: how to setup for localhost:8000

2016-04-14 Thread Andrew Farrell
What happens when you type http://localhost:8000 Into the address bar of your browser as this is running? On Thu, Apr 14, 2016 at 12:46 PM, wrote: > Hi, > > I am working on window 7 and Python 3.5 to setup a localhost:8000 but it > did not get through as shown below: > > python -m http.server

Re: Failed install scipy lib

2016-04-19 Thread Andrew Farrell
te --name scipy35 python=3.5 scipy activate scipy35 All the best, Andrew On Tue, Apr 19, 2016 at 1:18 PM, wrote: > On Tuesday, April 19, 2016 at 8:06:06 PM UTC+3, Oscar Benjamin wrote: > > On 19 Apr 2016 17:01, wrote: > > > > > > Hello, > > > i'm tryi

Re: Howw to prevent the duplication of any value in a column within a CSV file (python)

2016-04-27 Thread Andrew Ongko
r you want to check whether a particular name has taken the quiz, just do: if name in the_set: # forbid else: # allow Regards, Andrew -- https://mail.python.org/mailman/listinfo/python-list

Re: Resources/pointers for writing maintable, testable Python

2016-05-18 Thread Andrew Farrell
Hi Jacob, You are probably looking for the book Test-Driven Development with Python <http://chimera.labs.oreilly.com/books/123400754/index.html>. You'll also want to look at py.test <http://pytest.org/latest/> Cheers! Andrew Farrell On Wed, May 18, 2016 at 5:01 PM, J

Re: Hands-On Quantum Computing with Python

2019-01-05 Thread Andrew Z
Good for you. On Sat, Jan 5, 2019, 06:25 Bhagvan Kommadi I am coauthoring a packt book : Hands-On Quantum Computing with Python. > The book will be published around Aug 2019 > > > > The book will introduce quantum computing and a comprehensive overview of > the quantum programming languages curre

Re: Python resources recommendations

2019-03-09 Thread Andrew Z
I would think that your experience with other languages would guide you on the route of learning another tool.. On Sat, Mar 9, 2019, 13:01 Arup Rakshit wrote: > Hello Python, > > This is my first time in this mailing list. I am a Ruby/JS developer by > day. I have decided to learn Python now thi

Re: Why Python has no equivalent of JDBC of Java?

2019-05-19 Thread Andrew Z
Marco, You clearly know more about python/java universe than i do. But im infinitely thankful to cx team for putting out the package. Feature and performance wise , even with non supported oracle timesten, it was fantastic. Id always go after "native" vs jdbc. But i understand that most of apps

Re: Why Python has no equivalent of JDBC of Java?

2019-05-19 Thread Andrew Z
The pg python lib requires https://www.postgresql.org/docs/current/libpq.html pip pulls it as a part of the lib install, whereas in oracle case you install the driver yourself first.(suize matters) //for some reason i thought the driver libs come as part of cx . But it was a year ago and my memory

Re: Why Python has no equivalent of JDBC of Java?

2019-05-20 Thread Andrew Z
What does 249 specification mention about drivers? On Mon, May 20, 2019, 17:39 Marco Sulla via Python-list < [email protected]> wrote: > On Mon, 20 May 2019 at 17:32, Thomas Jollans wrote: > > > Python has a the "Python Database API" (DB API 2.0) > > https://www.python.org/dev/peps/pep-0249

Re: Why Python has no equivalent of JDBC of Java?

2019-05-20 Thread Andrew Z
PM, Andrew Z wrote: > > What does 249 specification mention about drivers? > > Nothing that I can see. > > But it stands to reason that at some point the Python code is going to > have to interface with the SQL database server's API. And when the > database in question is

Pandas- yahoo finance

2019-06-04 Thread Andrew Z
Hello, Do i get it right that yahoo finance is no longer available as a data source for pandas? -- https://mail.python.org/mailman/listinfo/python-list

Re: Books for Python 3.7

2019-07-12 Thread Andrew Z
Richy, What specific part you consider hard? If i may suggest, get a (pet) project as you read it. On Fri, Jul 12, 2019, 13:46 RIchy M wrote: > On Friday, July 12, 2019 at 1:00:01 PM UTC-4, MRAB wrote: > > On 2019-07-12 16:40, Terry Reedy wrote: > > > On 7/12/2019 11:27 AM, Richard Mok wrote:

Re: Books for Python 3.7

2019-07-12 Thread Andrew Z
8nterval and start/stop countdown. I have 0 knowledge in android and kotlin. So for me to get to voice recognition part i need to learn basics of the android and kotlin. On Fri, Jul 12, 2019, 15:35 RIchy M wrote: > On Friday, July 12, 2019 at 2:45:48 PM UTC-4, Andrew Z wrote: > > Richy,

Re: Books for Python 3.7

2019-07-15 Thread Andrew Z
Gys - hats off. Basically what Dennis is saying- you dont need a book "about python ". Tutorials and general search online will get you further and faster than any book. Blah-blah about myself: my bookshelf has 2 technical books, just because i got them to prepare for certifications. For my tradi

Re: Books for Python 3.7

2019-07-16 Thread Andrew Z
> intrigued to hear from you, should you... > > > Last comment (to OP): you should be aware of the Python version > 'covered'. Am not convinced that v3.7 is that important - to a beginner. > Thus, maybe accept v3.5+, and make a practice of reviewing the Python > docs -

Multiple Interpreters?

2019-07-26 Thread Andrew Bell
ne 5, in from collections import deque File "/Users/acbell/miniconda3/envs/pdal/lib/python3.7/collections/__init__.py", line 24, in import heapq as _heapq File "/Users/acbell/miniconda3/envs/pdal/lib/python3.7/heapq.py", line 587, in from _heapq import * Thanks, -- Andrew Bell [email protected] -- https://mail.python.org/mailman/listinfo/python-list

Re: Blasphemy

2019-10-24 Thread Andrew Z
Space. On Thu, Oct 24, 2019, 18:53 Marek Mosiewicz wrote: > What about, if Python would have optional end keyword. In fact most of > blocks have starting : sign. What if you would have also keyword to > optionaly mark end of block. > > That would be big win for IDEs to format code and ensure tha

Re: Recommendations for intro to python+programming lecture to Humanities MA students

2019-11-20 Thread Andrew Z
Goktug, Im not clear what is the objective of the lecture? I understand it is an intro, but what are you trying to achieve? I didnt read all the details, but maybe you can look into creating a docker/virtual box image with everything preinstalled. Good luck. On Wed, Nov 20, 2019, 11:54 Göktuğ K

Re: Recommendations for intro to python+programming lecture to Humanities MA students

2019-11-20 Thread Andrew Z
Look into https://repl.it On Wed, Nov 20, 2019, 15:43 Göktuğ Kayaalp wrote: > > Andrew Z wrote: > > Goktug, > > Im not clear what is the objective of the lecture? I understand it is > an > > intro, but what are you trying to achieve? > > Basically I ne

Re: Behaviour of os.path.join

2020-05-27 Thread Andrew Jaffe
Dear all, \On 26/05/2020 15:56, BlindAnagram wrote: I came across an issue that I am wondering whether I should report as an issue. If I have a directory, say: base='C:\\Documents' and I use os.path.join() as follows: join(base, '..\\..\\', 'build', '') I obtain as expected from the d

Re: [Beginner] Spliting input

2020-06-25 Thread Andrew Bell
ing. > Any ideas how to do this? > > * > numb1,numb2=input("enter 1st and 2nd no ").split() > Avg=(int(numb1) + int(numb2)) / 2 > print(Avg) > -- Andrew Bell [email protected] -- https://mail.python.org/mailman/listinfo/python-list

Re: [Beginner] Spliting input

2020-06-25 Thread Andrew Jaffe
Hi, On 25/06/2020 12:50, Bischoop wrote: I try to split input numbers, for example: 12 so I cant add them, I tried separated split(' ') but it's not working. Any ideas how to do this? * numb1,numb2=input("enter 1st and 2nd no ").split() Avg=(int(numb1) + int(numb2)) / 2 print(Avg) So, this i

Dowloading package dependencies from locked down machine

2020-07-26 Thread Andrew McLean
a browser, finding its dependencies manually, downloading these and so on recursively? My dream solution would be for PyPi to provide a link to a zip file that bundled up a package and its dependencies, but I realise that this is probably a very niche requirement. - Andrew [1] Apparently

Re: Dowloading package dependencies from locked down machine

2020-07-27 Thread Andrew McLean
, would it be possible to create a standalone executable version of pip with py2exe or similar? - Andrew -- https://mail.python.org/mailman/listinfo/python-list

stat_result.st_ino from os.stat isn't constant on a network drive.

2020-08-26 Thread Andrew Nelson
ot; If I do the same thing on a local file instead of on a network mount st_ino is constant and doesn't change. Is this a Python bug, or is it an issue with the way Windows deals with network mounts? Andrew. -- https://mail.python.org/mailman/listinfo/python-list

better handling of "pinned" modules?

2021-01-08 Thread Andrew Jaffe
thin a specific package egg would be directed to a specific version stored within the egg or in some other known location? Is this an issue worth tackling? Or do we just have to rely on package developers to keep up with their dependencies? Yours, Andrew -- https://mail.python.org/mailman/listinfo/python-list

Re: better handling of "pinned" modules?

2021-01-08 Thread Andrew Jaffe
On 08/01/2021 18:21, Chris Angelico wrote: On Sat, Jan 9, 2021 at 5:18 AM Andrew Jaffe wrote: Hi, I don't know if this makes more sense here or on "python-ideas" (or elsewhere?) but I'll try this first: I am starting to encounter more and more instances of packages req

Re: Nufox : Xul + Python

2005-10-02 Thread Andrew Gwozdziewycz
; Regards > > Salvatore > > -- > http://mail.python.org/mailman/listinfo/python-list > --- Andrew Gwozdziewycz [EMAIL PROTECTED] http://ihadagreatview.org http://plasticandroid.org -- http://mail.python.org/mailman/listinfo/python-list

Re: Python based unacceptable language filter

2005-10-03 Thread Andrew Gwozdziewycz
ast that's what i got from the question. There are many PHP implementations on the web, which could be adapted to python fairly easily. Most of which are probably not the most ideal solution and involve alot of stuff like for n in badwords: texttofilter.replace(n, '&#x

Reply-To header

2005-10-03 Thread Andrew Gwozdziewycz
Is it just me, or does [email protected] not send with a Reply- To header? --- Andrew Gwozdziewycz [EMAIL PROTECTED] http://ihadagreatview.org http://plasticandroid.org -- http://mail.python.org/mailman/listinfo/python-list

Re: Reply-To header

2005-10-03 Thread Andrew Gwozdziewycz
mart Mailboxes have made it at least possible to have a small number of actual folders and a large number of smart mailboxes, which is very nice.Anyone know of any good mailing list plugins for mail.app?-Andrew Gwozdziewycz[EMAIL PROTECTED]http://ihadagreatview.orghttp://plasticandroid.org --

Re: semi-newbie module namespace confusion

2005-10-04 Thread Andrew Gwozdziewycz
oducing a huge number of inconsistencies.Plus, it's not broken to begin with. ---Andrew Gwozdziewycz[EMAIL PROTECTED]http://ihadagreatview.orghttp://plasticandroid.org -- http://mail.python.org/mailman/listinfo/python-list

Re: Help with chaos math extensions.

2005-10-06 Thread Andrew Gwozdziewycz
tension, not an economical question about my programming environment.Well, since I don't use Windows XP, I did not know this fact. I wasn't trying to offend you or argue with you, I was just flat out curious why you had to go out and buy Visual Studio.---Andrew Gwozdziewycz[EMAIL PROTECTED]http

Re: divide

2005-10-07 Thread Andrew Gwozdziewycz
between any point within Part I and Point A is > smaller than to Point B and Point C. And the similar rule applies > to Part II and Part III. > Thanks for any idea. > -- > http://mail.python.org/mailman/listinfo/python-list --- Andrew Gwozdziewycz [EMAIL PROTECTE

Geocoding and python

2005-10-08 Thread Andrew Gwozdziewycz
Does anyone know of a python module that can read and search the tiger line data for geolocation? Currently, I can use xmlrpc to query geocoder.us but I'd rather not be querying their server if I don't have to. Thanks --- Andrew Gwozdziewycz [EMAIL PROTECTED] http://ihadagreatvie

win32com, generating the cache programaticaly?

2005-10-11 Thread Andrew Markebo
Hello! I am messing around with communicating between LabVIEW and Python, got it to work by a small 'fix' (grabbing the generated file, and importing it by hand) What I might want to do, is to automatically generate the data done by executing makepy.py and run by it. What I select in makepy.py

Re: HELP: Searching File Manager written in Python

2005-10-12 Thread Andrew Markebo
Checked Total Commander? Has an sort of open API to plugins, and either do a python 'proxy' or maybe just execute a script. Next step might be using win32com or SWIG to set up the interface.. Just some ideas. /Andy -- Everything that was magical was just a way of describing the world in

Re: win32com, generating the cache programaticaly?

2005-10-12 Thread Andrew Markebo
| You can use win32com.client.gencache.EnsureDispatch | to automatically generate the makepy file for an object's library | when the object is created. Use the bForDemand option to | only generate the code for objects as needed. Drats, I get an: raise TypeError, "This COM object can not automa

Re: CSV module and Mac excel format problem

2005-10-13 Thread Andrew McNamara
; did not correct the problem. Open the file in universal-newline mode - for example: sample = open(filename, 'rU') "lineterminator" is only used for output - we use the supplied iterator (and whatever conventions it imposes) for input. -- Andrew McNamara, Sen

Re: [Info] PEP 308 accepted - new conditional expressions

2005-10-16 Thread Andrew Koenig
"Peter Hansen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Dave Hansen wrote: >> So lose the "if." >> >>R = C then A else B I think that part of the argument for the "A if C else B" syntax is that "then" is not currently a reserved word. -- http://mail.python.org/mailman

classmethods, class variables and subclassing

2005-10-20 Thread Andrew Jaffe
nks for reading this far! Andrew Andrew This seems like a bug Is this expected behavior, or a bug (or both -- it is expected but probably not what is wanted!)? -- http://mail.python.org/mailman/listinfo/python-list

Re: classmethods, class variables and subclassing

2005-10-20 Thread Andrew Jaffe
> Andrew Jaffe wrote: > >> Hi, >> >> I have a class with various class-level variables which are used to >> store global state information for all instances of a class. These are >> set by a classmethod as in the following >> >> class sup(ob

Re: classmethods, class variables and subclassing

2005-10-21 Thread Andrew Jaffe
Steve Holden wrote: > Andrew Jaffe wrote: > >>The problem is that I actually do want to call these methods on the >>class itself, before I've made any instances. >> > Except you could use staticmethods with an explicit class argument ... Steve, Yep, that would

Re: classmethods, class variables and subclassing

2005-10-21 Thread Andrew Jaffe
Steve Holden wrote: > Andrew Jaffe wrote: >> Steve Holden wrote: >>> Andrew Jaffe wrote: >>> >>>> The problem is that I actually do want to call these methods on the >>>> class itself, before I've made any instances. >>>> &g

Re: classmethods, class variables and subclassing

2005-10-21 Thread Andrew Jaffe
Steven Bethard wrote: > Andrew Jaffe wrote: > > I'm not sure if I understand your goal here, but you can get different > behavior using super(). > > py> class sup(object): > ... cvar1 = None > ... cvar2 = None > ... @classmet

Re: Tricky Areas in Python

2005-10-23 Thread Andrew Durdin
em I'd solved in the past using one. Andrew -- http://mail.python.org/mailman/listinfo/python-list

Re: tool for syntax coloring in html

2005-10-26 Thread Andrew Thompson
Xah Lee wrote: > Is there a tool that produce codes in html with syntax coloring? Does that mean you intend simply posting links to your 'articles' on computing in future? > Thanks. I am confident a lot of us would be (thankful if you did). -- http://mail.python.org/mailman/listinfo/python

Re: Scanning a file

2005-10-28 Thread Andrew McCarthy
he mmap module). An mmap object is like a cross between a file and a string, but the data is only read into RAM when, and for as long as, necessary. An mmap object doesn't have a count() method, but you can just use find() in a while loop instead. Andrew -- http://mail.python.org/mailman/listinfo/python-list

Re: Parse file into array

2005-11-15 Thread Andrew Nelis
If it helps, there's a builtin module for figuring out mimetypes; http://docs.python.org/lib/module-mimetypes.html >>> import mimetypes >>> mimetypes.guess_type('.gif') ('image/gif', None) Cheers, Andy. -- http://mail.python.org/mailman/listinfo/python-list

Re: install python2.4 on FreeBSD and keep using python2.3

2005-11-17 Thread Andrew MacIntyre
l". A quick review of the port makefiles should confirm this. Any scripts that are 2.3 only will need to be doctored to use /usr/local/bin/python2.3 instead of /usr/local/bin/python. ----- Andrew I MacIntyre

Re: wxPython Licence vs GPL

2005-11-23 Thread Andrew Koenig
"John Perks and Sarah Mount" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > we have some Python code we're planning to GPL. However, bits of it were > (This assumes the wxPython Licence is compatible with the GPL -- if not, > do we just cosmetically change any remaining lines, so n

Re: Which License Should I Use?

2005-11-27 Thread Andrew Koenig
"mojosam" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I will be doing the bulk of the coding on my own time, because I need > to be able to take these tools with me when I change employers. > However, I'm sure that in the course of using these tools, I will need > to spend time

Re: Which license should I use?

2005-11-27 Thread Andrew Koenig
""Björn Lindström"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Mike Meyer <[EMAIL PROTECTED]> writes: > If they have the rights to the code, they can sell it, under the GPL or > any license of their choosing. In addition, if you GPL it, your employer > will be able to sell it,

Re: Which License Should I Use?

2005-11-27 Thread Andrew Koenig
"mojosam" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I would have to talk to a lawyer to be sure, but right now, I think I > can argue that anything I do on my own time belongs to me. I'm > technically a consultant right now (even though I'm spending 40 > hours/week with the o

Re: Which License Should I Use?

2005-11-27 Thread Andrew Koenig
"Robert Kern" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > You're in something of a gray area, but one that has seen a lot of > litigation. Although you are "technically" a consultant, you are > probably considered an employee with regards to the "work made for hire" > doctrine.

Re: Which License Should I Use?

2005-11-29 Thread Andrew Koenig
"Robert Kern" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Andrew Koenig wrote: >> I'm pretty sure that there was a change to the copyright laws a few years >> ago (perhaps as part of the DMCA), that made it clear that you own >> e

Re: Which License Should I Use?

2005-11-29 Thread Andrew Koenig
"Mike Meyer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Definitely not. The most recent change to the copyright laws made > works of music recorded to fullfill a contract "work for hire" by > default. If there's a contract -- i.e., a written agreement, then why does it matter?

Update the sorting mini-howto

2005-11-29 Thread Andrew Dalke
in Python 2.4. Hmmm, and perhaps also some mention of rich comparisons. I don't particularly want to update it myself so I'm tossing it to the winds. Anyone here want to take care of it? I'll provide feedback if you want it. Email me if you're interested.

Re: Update the sorting mini-howto

2005-11-29 Thread Andrew Dalke
I wrote: > Years ago I wrote the Sorting mini-howto, currently at > > http://www.amk.ca/python/howto/sorting/sorting.html Thanks to amk it's now on the Wiki at http://wiki.python.org/moin/HowTo/Sorting so feel free to update it directly.

Re: Parsing a search string

2004-12-31 Thread Andrew Dalke
Now if I only had an NDFA for parsing that syntax... :) Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: emulating an and operator in regular expressions

2005-01-03 Thread Andrew Dalke
his solution will work. Another possibility is to use positive assertions, as in (?=A)(?=.*B)|(?=B)(?=.*A) The best solution is to do a string.find and not worry about implementing this as a regexp. Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: input record sepArator (equivalent of "$|" of perl)

2005-01-03 Thread Andrew Dalke
f beer. Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: ODBC Connection on Windows XP

2005-01-04 Thread Andrew MacIntyre
d your connection attempt (at the TCP level). At a guess, the database is down. ----- Andrew I MacIntyre "These thoughts are mine alone..." E-mail: [EMAIL PROTECTED] (pref) | Snail: PO Box

Re: screen clear question

2005-01-05 Thread Andrew Robert
ainst the resident OS the program is running against and set the clear command based on that. -- Thank you, Andrew Robert E-mail: [EMAIL PROTECTED] Ur: http://shardservant.no-ip.info -- http://mail.python.org/mailman/listinfo/python-list

Re: How to make executable file ?

2005-01-05 Thread Andrew Robert
x_freeze. Details on it can be found at http://starship.python.net/crew/atuining/cx_Freeze/ Binaries are available for Linux and Windows. Alternately, source code is available if you need to compile it for a different platform. -- Thank you, Andrew Robert E-mail: [EMAIL PROTECTED] Ur:

Re: Python evolution: Unease

2005-01-06 Thread Andrew MacIntyre
ultimate, Fred Drake and others are quite happy to take straight text (ReST markup would probably help them a bit) as bugs/patches on sourceforge. ----- Andrew I MacIntyre "These thoughts are mine alo

Re: Other notes

2005-01-06 Thread Andrew Dalke
ine 1 1.__abs__ ^ SyntaxError: invalid syntax >>> One way to avoid that is to use "1 .__abs__". See the space after the "1"? The tokenizer for this case creates which create code equivalent to getattr(1, "__abs__") and is valid syntax >>> 1 .__abs__ >>> Another option is to use parentheses: (1).__abs__ I prefer this latter option because the () is easier to see than a space. But I prefer using getattr even more. Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Other notes

2005-01-06 Thread Andrew Dalke
ot;. In fact, here is the full list of possible choices <1.> <.> <3>same as getattr(1., 3) <1> <.> <.> 3 not legal syntax <1.> <.3> not legal syntax <1> <..> <3>legal with the propose

Re: Python Operating System???

2005-01-08 Thread Andrew Dalke
deo of someone demoing how to use a Lisp Machine at http://lemonodor.com/archives/000103.html Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Pre/Postconditions with decorators

2005-01-09 Thread Andrew Dalke
ting analogies with analogies :) Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: counting items

2005-01-12 Thread Andrew Koenig
"It's me" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > What's the best way to count number of items in a list? > > For instance, > > a=[[1,2,4],4,5,[2,3]] > > I want to know how many items are there in a (answer should be 7 - I don't > want it to be 4) How about this? def t

Re: Adjusting the 1024 byte stdin buffer limit

2005-01-17 Thread Andrew Koenig
"brucoder" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Are there runtime settings that can be used to adjust the default 1024 > byte stdin buffer limit or a buildtime setting in pyconfig.h? I have a > need to pump this up to permit input of a large data block via stdin. What d

Fuzzy matching of postal addresses

2005-01-17 Thread Andrew McLean
DT8 3EL THE PRESBYTERY, SHORTMOOR, BEAMINSTER, DORSET DT8 3EL The Pinnacles, White Sheet Hill, BEAMINSTER, DORSET, DT8 3SF PINNACLES, WHITESHEET HILL, BEAMINSTER, DORSET DT8 3SF The challenge is to fix some of the false negatives above without introducing false positives! Any pointers gratef

Re: Fuzzy matching of postal addresses

2005-01-18 Thread Andrew McLean
ns. Then work with a metric based on the differences between the sequences. The simple case would look at deleting tokens and perhaps concatenating tokens to make a match. -- Andrew McLean -- http://mail.python.org/mailman/listinfo/python-list

Re: a question

2005-01-19 Thread Andrew Koenig
"Steve Holden" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > The error you get is NOT a syntax error: > > >>> cmd = '%s format %s \ > ... over %d lines' % ('my', 'string', 2) > >>> cmd > 'my format string over 2 lines' > >>> > > The interpreter is probably complaining because

Re: [OT] Good C++ book for a Python programmer

2005-01-19 Thread Andrew Koenig
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > The 4th edition of the well-known "C++ Primer", with Moo as a new > co-author, will soon be published. It is a > more comprehensive and much longer book. It is also organized more traditionally than "Accelerated C++." "Accelerated C

Re: Zen of Python

2005-01-22 Thread Andrew Koenig
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > in some early C++ compilers, the scope for "x" was limited to the scope > containing the for loop, not the for loop itself. some commercial > compilers > still default to that behaviour. Indeed--and the standards com

Re: Zen of Python

2005-01-22 Thread Andrew Koenig
"Paul Rubin" wrote in message news:[EMAIL PROTECTED] > It's really irrelevant whether anyone is using a feature or not. If > the feature is documented as being available, it means that removing > it is an incompatible change that can break existing code which > current

Re: Zen of Python

2005-01-22 Thread Andrew Koenig
"Paul Rubin" wrote in message news:[EMAIL PROTECTED] > It's not obvious to me how the compiler can tell. Consider: > >x = 3 >if frob(): > frobbed = True > squares = [x*x for x in range(9)] >if blob(): > z = x > > Should the compiler issue

Fuzzy matching of postal addresses [1/1]

2005-01-23 Thread Andrew McLean
okens into the dynamic programming method, but I think I got there! At least my test cases seem to work! # # First attempt at a fuzzy compare of two addresses using a form of Edit Distance algorithm on tokens # v0.5 # Andrew McLean, 23 January 2005 # # The main routine editDistance takes two lis

Re: Fuzzy matching of postal addresses [1/1]

2005-01-23 Thread Andrew McLean
In article <[EMAIL PROTECTED]>, John Machin <[EMAIL PROTECTED]> writes Andrew McLean wrote: In case anyone is interested, here is the latest. def insCost(tokenList, indx, pos): """The cost of inserting a specific token at a specific normalised position al

scope rules in nested functions

2005-01-29 Thread Andrew Collier
to describe why it occurs? More practically, if there are a large number of functions at the same nesting level as evalfunction1(), is it possible for me to allow evalfunction2() to access all of them without explicitly naming each one as a literal? Thanks, Andrew -- --- Andrew

Re: Coding style article with interesting section on white space

2005-01-30 Thread Andrew McLean
rage performance across different benchmarks of different Fortran compilers on the same platform can be as much a factor of two. Variation of individual benchmarks as much as a factor of three. Some of you might be surprised at how many different Fortran compilers are available! -- Andrew McLean --

ModPython: passing variables between handlers?

2005-02-03 Thread Andrew James
uring the life of the request *from anywhere in my application* and which gets cleaned up for me automatically afterwards. Does something like this exist in mod_python? If the approach above isn't possible, what would your recommendations be for a solution to this issue? Many thanks

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