Re: Can anyone tell me if pygame and Tkinter can work together?

2005-11-15 Thread Nathan Pinno
5 AIM: f3mighty "Nathan Pinno" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Sounds good, I'll give it a try and see what happens, and report back > about > my results. > > > Nathan Pinno, > Owner/operator of The Web Surfer's Store. >

Re: Can anyone tell me if pygame and Tkinter can work together?

2005-11-16 Thread Nathan Pinno
It's a warning that says: Can only use * in top level or something like that. It's kind of annoying, but the program still ran after I made the import * lines top level, and removed the def's. Nathan Pinno. -- For great sites go to: http://www.the-web-surfers-store.com MSN Me

Re: Can anyone tell me if pygame and Tkinter can work together?

2005-11-18 Thread Nathan Pinno
t; <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Nathan Pinno wrote: > >> It's a warning that says: >> >> Can only use * in top level or something like that. >> >> It's kind of annoying > > why? importing tons of unknown stuff i

Is there a way to create a button in either pygame or livewires?

2005-11-18 Thread Nathan Pinno
Hey all, Is there a way to create a button in either pygame or livewires, that is able to be clicked and when clicked sends a command to restart the program? Thanks, Nathan Pinno -- For great sites go to: http://www.the-web-surfers-store.com MSN Messenger: [EMAIL PROTECTED],com Yahoo

I need help figuring out how to fix this code.

2005-06-28 Thread Nathan Pinno
Hi all, I need help figuring out how to fix my code. I'm using Python 2.2.3, and it keeps telling me invalid syntax in the if name == "Nathan" line. Here is the code if you need it. #This program asks for a password, then asks for the user's name after the corre

Re: Python/IDLE - text in different colours

2005-06-28 Thread Nathan Pinno
Bill. The way is the click on view, then click script checker, or something like that. It will color code the text for you. Nathan "Bill Davy" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > To make life easier for my users, I'd like to col

I have a question.

2005-06-30 Thread Nathan Pinno
Hi all, Does Python have a random function? If so, can you show me an example using it? Thanks, Nathan Pinno http://www.npinnowebsite.ca/ -- Posted via UsenetRevolution.com - Revolutionary Usenet ** HIGH

Re: I have a question.

2005-07-01 Thread Nathan Pinno
Thanks all. I needed to ask because I'm writing a couple of programs which require the computer to choose numbers at random thanks. Nathan Pinno "Jeremy Jones" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Nathan Pinno wrote: > >

Another newbie question from Nathan.

2005-07-01 Thread Nathan Pinno
Hi all. How do I make the computer generate 4 random numbers for the guess? I want to know because I'm writing a computer program in Python like the game MasterMind. Thanks. -- Nathan Pinno http://www.npinnowebsi

What's wrong with this code?

2005-07-02 Thread Nathan Pinno
Hi all, What's wrong with the following code? It says there is name error, that random is not defined. How do I fix it? # Plays the guessing game higher or lower. # Originally written by Josh Cogliati, improved first by Quique, then by Nathan Pinno. print "Higher or Lowe

A brief question.

2005-07-02 Thread Nathan Pinno
Hi all,   Brief question for anyone who knows the answer, because I don't. Is there anyway to make Python calculate square roots?   Thanks, Nathan Pinnohttp://www.npinnowebsite.ca/ -- http://mail.python.org/mailman/listinfo/python-list

Re: What's wrong with this code?

2005-07-02 Thread Nathan Pinno
ot;) if guess > number: print "Too high" elif guess < number: print "Too low" print "Just right" HTH, Nathan Pinno "John Machin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Nathan Pinno wr

How to get 4 numbers from the user in one line for easy comparision?

2005-07-02 Thread Nathan Pinno
incorrect.   If anyone has any advice in how to code this, I will gladly appreciate the help.   Sorry if I seem like a newbie, but I am! :) Nathan Pinnohttp://www.npinnowebsite.ca/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Another newbie question from Nathan.

2005-07-09 Thread Nathan Pinno
t make the code easier to read, but harder to code because I have to keep going to the top to read the menu. Not that fun, but necessary for a smooth program, I guess. Nathan Pinno "Steven D'Aprano" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On

Re: Who uses input()? [was Re: question on "input"]

2005-07-17 Thread Nathan Pinno
I use input() all the time. I know many people say it ain't safe, but whose going to use it to crash their own comp? Only an insane person would, or a criminal trying to cover his/her tracks. Sorry if I waded into the debate, but this debate originated from one of my posts. Nathan

Sr. Compiler Engineering Opportunity

2005-07-28 Thread Nathan Sanders
iciency in semiconductor and computing devices. Thanks, ------ Nathan Sanders Principal/Manager Bridgenex LLC 2464 El Camino Real #206 Santa Clara, Ca 95051 Office: 1.800.881.5733 Email: [EMAIL PROTECTED] Corporate: www.bridgenex.com :::STAFFING

(OT) Is there something that people can use instead of full blown Python to run Python programs?

2005-08-18 Thread Nathan Pinno
Hi all,   Is there something besides the full blown version of Python that people can use to run Python programs, or do they have to use the full blown version of it?   Thanks, Nathan ---Early to bed,Early to rise,Makes a man

Re: (OT) Is there something that people can use instead of full blown Python to run Python programs?

2005-08-18 Thread Nathan Pinno
I was thinking something like Java's Runtime Environment, but that might also do.   Thanks, Nathan Pinno ---Early to bed,Early to rise,Makes a man healthy, wealthy, and wise.--Benjamin Fra

Book Recommendations

2004-12-03 Thread Nathan Weston
I'm new to Python and am looking for a book to get me up to speed quickly. I'm an experienced programmer and very proficient with Ruby, so Python is coming easily to me and I don't need a gentle introduction -- I just need a quick way to get familiar with common Python idioms and important librarie

Re: ignoring or replacing white lines in a diff

2016-01-14 Thread Nathan Hilterbrand
.nl Software Engineer Radio Observatory ASTRON | Phone: +31 521 595 100 (797 direct) P.O. Box 2 | GSM: +31 6 24 25 17 28 NL-7990 AA Dwingeloo | FAX: +31 521 595 101 The Netherlands| Web: http://www.astron.nl/~renting/ Without having the files handy to test with, I would suggest that you try replacing "-I '^[[:space:]]*$'" with r"-I '^[[:space:]]*$'" as a starting point. Nathan -- https://mail.python.org/mailman/listinfo/python-list

Re: Powerful perl paradigm I don't find in python

2016-01-15 Thread Nathan Hilterbrand
and $str != $tail) { $str ~= s/^(head-pattern)//; if ($1) { do_something($1); } else { last; } } Otherwise there is too much risk of an infinite loop if the string is (1) empty, or (2) never ends up being equal to "tail" Nathan -- https://mail.python.org/mailman/listinfo/python-list

Re: psss...I want to move from Perl to Python

2016-01-28 Thread Nathan Hilterbrand
ratch. Comparisons will make it much more difficult, in several ways. Best of luck to you, and I hope that you find Python to be too your liking. Nathan -- https://mail.python.org/mailman/listinfo/python-list

Re: psss...I want to move from Perl to Python

2016-01-29 Thread Nathan Hilterbrand
> On 1/28/2016 7:01 PM, Fillmore wrote: > >> >> I learned myself Perl as a scripting language over two decades ago. All >> > > -- > https://mail.python.org/mailman/listinfo/python-list > Yes, python3 is available for cygwin. My cygwin (fairly current) has python 3.4.3 installed Nathan -- https://mail.python.org/mailman/listinfo/python-list

Re: Daemon strategy

2016-02-05 Thread Nathan Hilterbrand
it cannot be avoided. I am not 100% sure exactly what you want to do, but you might take a look at using 'pythonw.exe' instead of 'python.exe' YMMV Nathan -- https://mail.python.org/mailman/listinfo/python-list

Re: Exception handling for socket.error in Python 3.5/RStudio

2016-02-05 Thread Nathan Hilterbrand
tell me if the problem is with Rstudio, Python version or the syntax. > > TIA > -Shaunak > -- > https://mail.python.org/mailman/listinfo/python-list Looks like you are missing a colon after 'as e'... as e: might do the trick Nathan -- https://mail.python.org/mailman/listinfo/python-list

[no subject]

2014-03-18 Thread Nathan Bruce
Hi I was wondering how much your oxycontins are for what mg and quantity. Also do you guys sell dilaudid? Thank you -- https://mail.python.org/mailman/listinfo/python-list

Re: Python dashboard tutorials/frameworks for interactive, D3.js graphs in IPython Notebooks

2015-11-05 Thread srinath . nathan
On Thursday, July 9, 2015 at 8:10:16 PM UTC-4, Matt Sundquist wrote: > Hi all, > > I'm part of Plotly, and we've just finished a few releases I thought I'd pass > along. > > These tools make it easy to craft interactive graphs and dashboards with > D3.js using Python. We're especially drawn to

Re: What is wrong in this example code?

2015-11-13 Thread Nathan Hilterbrand
t("After ticks: {}".format(x)) x = Clock(hours=2, minutes=20, seconds=5) print("\nConstructor with hours=2, minutes=20, seconds=5: {}".format(x)) print("Test of display() method: ",end=' ') x.display() This is my first post he

Re: Problem to read from array

2015-11-21 Thread Nathan Hilterbrand
row index. To get rid of the '\n' (lineend) characters: with open(file1) as fh: ParametersRaw = [line.strip() for line in fh.readlines()] or, more succinctly.. with open(file1) as fh: ParametersRaw = [line.strip() for line in fh] Comprehensions are your friend. Nathan -- https://mail.python.org/mailman/listinfo/python-list

Marco's atexit issue was: Re: ANN: wxPython 3.0.1.1

2014-09-12 Thread Nathan McCorkle
On Friday, September 12, 2014 1:14:41 AM UTC-7, Marco Prosperi wrote: > > > I'm trying to pass my application from wxpython2.9.4 to 3.0.1 but there > seems to be still some of the problems that made me skip wxpy2.9.5: when I > close the main window of my application (windows7-64bit, python 2.7)

vdfgdfg

2011-10-09 Thread vishwa nathan
http://123maza.com/65/white725/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Forking simplejson

2011-10-26 Thread Nathan Rice
Since this happily went off to the wrong recipient the first time... The python json module/simpljson are badly in need of an architecture update. The fact that you can't override the encode method of JSONEncoder and have it work reliably without monkey patching the pure python encoder is a sign

Re: Forking simplejson

2011-10-28 Thread Nathan Rice
o see an alternative in there but I'm hesitant to get involved. Nathan On Thu, Oct 27, 2011 at 11:24 AM, Amirouche Boubekki wrote: > > > 2011/10/27 Chris Rebert >> >> On Wed, Oct 26, 2011 at 2:14 AM, Amirouche Boubekki >> wrote: >> > Héllo, >> >

Re: Forking simplejson

2011-10-28 Thread Nathan Rice
shoots down my patch for contrived reasons. I don't know what the python committers are like but I guess you could say I'm once bitten twice shy. Nathan On Fri, Oct 28, 2011 at 4:52 PM, Terry Reedy wrote: > On 10/28/2011 1:20 PM, Nathan Rice wrote: >> >> Just a random n

Re: Working with databases (ODBC and ORMs) in Python 3.2

2011-11-10 Thread Nathan Rice
rver", I'm sure there's a blog post explaining the specifics in detail. Nathan On Thu, Nov 10, 2011 at 1:56 PM, tkp...@hotmail.com wrote: > We are in the process of trying to decide between Python 2.7 and 3.2 > with a view to making a 5-10 year commitment to the right platform,

Re: unittest. customizing tstloaders / discover()

2011-12-12 Thread Nathan Rice
Nose is absolutely the way to go for your testing needs. You can put "__test__ = False" in modules or classes to stop test collection. On Mon, Dec 12, 2011 at 5:44 AM, Thomas Bach wrote: > Gelonida N writes: > >> Do I loose anything if using nose. or example can all unit tests / doc >> tests st

Odd behavior of object equality/identity in the context of relative vs fully qualified imports

2011-12-15 Thread Nathan Rice
on of the bar package somewhere on my pythonpath; After a thorough search this proved not to be the case. Has anyone else run into this? Is this intended behavior? If so, why? Nathan -- http://mail.python.org/mailman/listinfo/python-list

Re: Odd behavior of object equality/identity in the context of relative vs fully qualified imports

2011-12-15 Thread Nathan Rice
reintroduce the bug. Can I get confirmation that this is not expected behavior? I will go ahead and file a bug report it that is the case. Nathan On Thu, Dec 15, 2011 at 10:08 AM, Dave Angel wrote: > On 12/15/2011 09:34 AM, Nathan Rice wrote: >> >> I just ran into this yest

Making the case for "typed" lists/iterators in python

2011-12-16 Thread Nathan Rice
for code analysis, optimization and simpler interfaces. I believe that "typed" lists that get "demoted" to normal lists with a warning on out of type operations preserve this information while providing complete backwards compatibility and freedom. Nathan -- http://mail.python.org/mailman/listinfo/python-list

Re: Making the case for "typed" lists/iterators in python

2011-12-16 Thread Nathan Rice
unless you explicitly wrap the return value, which entirely defeats the point. On Fri, Dec 16, 2011 at 1:23 PM, Stefan Behnel wrote: > Nathan Rice, 16.12.2011 18:48: > >> I realize this has been discussed in the past, I hope that I am >> presenting a slightly different take on the

Re: Making the case for "typed" lists/iterators in python

2011-12-19 Thread Nathan Rice
me argument you could convert a tuple on > the fly to a list when someone tries to change an element of it. I do agree errors are more normative than warnings. The problem with an error in these circumstances is it will certainly break code somewhere. Perhaps a warning that becomes an error at some point in the future would be the prudent way to go. Thanks! Nathan -- http://mail.python.org/mailman/listinfo/python-list

Elementwise -//- first release -//- Element-wise (vectorized) function, method and operator support for iterables in python.

2011-12-20 Thread Nathan Rice
per support of things like bool() and int(), which refuse to return things that are not of the correct type. Get it: PyPi: http://pypi.python.org/pypi/elementwise/0.111220 GitHub: https://github.com/nathan-rice/Elementwise This was developed as a proof of concept for expanding the role

Re: Elementwise -//- first release -//- Element-wise (vectorized) function, method and operator support for iterables in python.

2011-12-20 Thread Nathan Rice
If you take a moment and examine the version number, you will notice that it is a date code. In my opinion that is far more informative than an arbitrary number. I use the major version number to signify... Wait for it... Major changes :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Elementwise -//- first release -//- Element-wise (vectorized) function, method and operator support for iterables in python.

2011-12-20 Thread Nathan Rice
On Tue, Dec 20, 2011 at 4:00 PM, Steven D'Aprano wrote: > On Tue, 20 Dec 2011 15:45:07 -0500, Nathan Rice wrote: > >> If you take a moment and examine the version number, you will notice >> that it is a date code. > > Not any date code I'm familiar with. 0.111

Re: Elementwise -//- first release -//- Element-wise (vectorized) function, method and operator support for iterables in python.

2011-12-20 Thread Nathan Rice
On Tue, Dec 20, 2011 at 7:03 PM, Ian Kelly wrote: > On Tue, Dec 20, 2011 at 12:45 PM, Nathan Rice > wrote: >> There are still some issues with proper support of things like bool() >> and int(), which refuse to return things that are not of the correct >> type. > >

Re: Elementwise -//- first release -//- Element-wise (vectorized) function, method and operator support for iterables in python.

2011-12-20 Thread Nathan Rice
> efoo2 = ElementwiseProxy(["one", "two", "three", "four"]) > > efoo_res = ((efoo2.capitalize() + " little indian").split(" > ").apply(reversed) * 2).apply("_".join) # note that you could do > reversed(...) instead, I just like to read left to right > efoo_res.parent.parent.parent # same as ((efoo2

Re: Elementwise -//- first release -//- Element-wise (vectorized) function, method and operator support for iterables in python.

2011-12-21 Thread Nathan Rice
On Tue, Dec 20, 2011 at 8:37 PM, Joshua Landau wrote: > On 21 December 2011 00:24, Nathan Rice > wrote: >> efoo_res = ((efoo2.capitalize() + " little indian").split(" >> ").apply(reversed) * 2).apply("_".join) # note that you could do >> re

Re: Elementwise -//- first release -//- Element-wise (vectorized) function, method and operator support for iterables in python.

2011-12-21 Thread Nathan Rice
at I thought was a bug in my code where itertools.count would skip numbers in IPython, but my unit tests all passed. Everything should work fine if you tuple() it first. Nathan -- http://mail.python.org/mailman/listinfo/python-list

Re: Elementwise -//- first release -//- Element-wise (vectorized) function, method and operator support for iterables in python.

2011-12-21 Thread Nathan Rice
On Wed, Dec 21, 2011 at 11:29 AM, Robert Kern wrote: > On 12/21/11 3:15 PM, Nathan Rice wrote: > >>> Incidentally, displaying an ElementwiseProxy instance doesn't go down >>> well with iPython: >>> >>> In [1]: from elementwise import * >>&

Re: Python education survey

2011-12-21 Thread Nathan Rice
+1 for IPython/%edit using the simplest editor that supports syntax highlighting and line numbers. I have found that Exploring/Prototyping in the interpreter has the highest ROI of anything I teach people. Nathan -- http://mail.python.org/mailman/listinfo/python-list

Re: Elementwise -//- first release -//- Element-wise (vectorized) function, method and operator support for iterables in python.

2011-12-21 Thread Nathan Rice
umerical/scientific programming. Nathan -- http://mail.python.org/mailman/listinfo/python-list

Re: Elementwise -//- first release -//- Element-wise (vectorized) function, method and operator support for iterables in python.

2011-12-21 Thread Nathan Rice
>> On Tue, Dec 20, 2011 at 8:37 PM, Joshua Landau >> wrote: >> > On 21 December 2011 00:24, Nathan Rice >> > wrote: >> >> efoo_res = ((efoo2.capitalize() + " little indian").split(" >> >> ").apply(reversed) * 2).apply(&quo

Re: Elementwise -//- first release -//- Element-wise (vectorized) function, method and operator support for iterables in python.

2011-12-21 Thread Nathan Rice
and backwards in the python community with comprehensions and such, but it is in no way natural or easy. Additionally, everything done via an ElementwiseProxy is lazy, so you only pay for what you eat :) Nathan -- http://mail.python.org/mailman/listinfo/python-list

Re: Elementwise -//- first release -//- Element-wise (vectorized) function, method and operator support for iterables in python.

2011-12-21 Thread Nathan Rice
entwiseProxy found >>>> list(remainder) > [] > > Cheers, > Ian Ian, can you clarify the expected output in that case? My initial guess would be that you want to do a modulo on the cartesian product of parameters from the proxies, sort of like: import itertools num

Re: Elementwise -//- first release -//- Element-wise (vectorized) function, method and operator support for iterables in python.

2011-12-21 Thread Nathan Rice
example: >>>> int(P(["1","2","3"])) > Traceback (most recent call last): >   File "", line 1, in > TypeError: __int__ returned non-int (type ElementwiseProxy) It is alpha software :P Easily fixed though. Nathan -- http://mail.python.org/mailman/listinfo/python-list

Re: Elementwise -//- first release -//- Element-wise (vectorized) function, method and operator support for iterables in python.

2011-12-21 Thread Nathan Rice
e a worth a shot though, since passing around iterators like that is pretty rare. Nathan -- http://mail.python.org/mailman/listinfo/python-list

Re: [TIP] Anyone still using Python 2.5?

2011-12-21 Thread Nathan Rice
ed for whatever reason, I'm so sorry. Nathan -- http://mail.python.org/mailman/listinfo/python-list

Re: Python education survey

2011-12-26 Thread Nathan Rice
nts to learn the language. I do think that a "learning" distro that has a lot of core tools pre-installed, and ships with some tutorials, would be a decent idea. Sort of like Enthought for new users :) I don't feel IDLE is worth salvaging though. Nathan -- http://mail.python.org/mailman/listinfo/python-list

Re: Py-dea: Streamline string literals now!

2011-12-28 Thread Nathan Rice
they are so intuitive that replacing them is a non starter; Just write code that doesn't nest parenthesis. Nathan -- http://mail.python.org/mailman/listinfo/python-list

Re: Py-dea: Streamline string literals now!

2011-12-28 Thread Nathan Rice
On Wed, Dec 28, 2011 at 4:42 PM, Chris Angelico wrote: > On Thu, Dec 29, 2011 at 8:24 AM, Nathan Rice > wrote: >> Quotes are obnoxious in the nesting sense because everyone uses quotes >> for string delimiters.  By the same token, quotes are wonderful >> because not on

Re: python philosophical question - strong vs duck typing

2012-01-03 Thread Nathan Rice
hon project have anything to do > with this? Declared typing is mostly annoying. Implicit static typing is less annoying, but still has issues. Cython fills the same niche as PyPy's Rpython. Use it if you have a lot of C code you want to call, as you will get better performance than a wrapper like SWIG. Nathan -- http://mail.python.org/mailman/listinfo/python-list

Re: Python lib for creating Database tables

2012-01-12 Thread Nathan Rice
h it now. I routinely do very challenging things with it, and it has yet to be a roadblock. The learning curve can be somewhat steep but it is absolutely worth it. Nathan -- http://mail.python.org/mailman/listinfo/python-list

Symbolic expressions (or: partials and closures from the inside out)

2012-01-12 Thread Nathan Rice
someclass), somefunc(X[-2].attr, args)) You could approximate that with: Constraints(lambda x: isinstance(x.attr, someclass), lambda x: somefunc(x[-2].attr, args)) As I mentioned in the first paragraph, Constraints is a metaclass, so your validations are checked using __instancecheck__. I'm a

Re: [Python-ideas] Symbolic expressions (or: partials and closures from the inside out)

2012-01-12 Thread Nathan Rice
def__contains__(self, ob): return self._check(ob) > > where _check does the same as your current __instancecheck__ > > Even if you *have* to make Constraints a metaclass, for other reasons, I > believe you could still give it the same __contains__ method. A metaclass > *is* a class, and if its class instances represent collections, inclusion in > the colleciton should be tested in the standard way. It could be any sort of callable. __instancecheck__ is the only reason it is a metaclass. Otherwise, I probably wouldn't bother with classes at all; returning a check inner function with constraints in the closure would be easy. Cheers, Nathan -- http://mail.python.org/mailman/listinfo/python-list

Re: [Python-ideas] Symbolic expressions (or: partials and closures from the inside out)

2012-01-13 Thread Nathan Rice
On Fri, Jan 13, 2012 at 8:45 AM, Devin Jeanpierre wrote: > On Thu, Jan 12, 2012 at 3:45 PM, Nathan Rice > wrote: >> I'm interested in fixing both issues. I believe both issues I've had >> could be solved by having a robust "symbolic object".  These objects &

Elementwise 0.120116 -//- beta release -//- Lazily compute functions, method calls and operations on all elements of an iterable (or graph).

2012-01-16 Thread Nathan Rice
Elementwise provides helpful proxy objects which let you perform a series of computations on every element of an iterable or graph, in a lazy manner. Docs: http://packages.python.org/elementwise/ GitHub: https://github.com/nathan-rice/Elementwise Examples: The standard ElementwiseProxy

Python Graph API

2005-12-12 Thread Nathan Gilbert
Has there been any work done lately on the Python Graph API? Thanks in advance, NG -- "The life of a repoman is always intense." -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Graph API

2005-12-13 Thread Nathan Gilbert
Steven Bethard <[EMAIL PROTECTED]> once said: > Nathan Gilbert wrote: >> Has there been any work done lately on the Python Graph API? > > Well there doesn't really seem to be a standard one. The wiki was last > updated in August. > > http://wiki.python

Parsing XML using SAX

2006-10-23 Thread Nathan Harmston
Hi, Currently I m writing an XML parser that processes an xml file using sax, and I have it working, however I want to make the code of my parser less cluttered and more readable by other people (including myself). However it is quite messy at the moment. The main reason is that Python doesnt have

Valgrind memory-checker reports memory problems in Python

2006-07-04 Thread Nathan Bates
Are the Python developers running Python under Valgrind? If not, FYI, Valgrind is a excellent memory-checker for Linux. Valgrind is reporting a ton of memory problems. Worrisome are "Conditional jump or move depends on uninitialised value(s)" errors. I simply started the Python 2.4.2 interpreter, t

Graph Data Structures

2006-11-25 Thread Nathan Harmston
extension for itis this a good idea and where would I start? Or does Python have some kind of transparent memory access module I can implement. Many Thanks in advance, Nathan PS.Please find my code below: class Graph(object): def __init__(self, g= { } ): self.graph

Importing module of data dicts and constants

2006-11-25 Thread Nathan Harmston
) print t.test() File "test.py", line 24, in __init__ self.type = _seqType[type] NameError: global name '_seqType' is not defined I think I m doing something incredibly wrong/stupid here Can anyone help? Many Thanks Nathan PS. I was wondering if the use of a data mo

Re: Graph Data Structures

2006-11-25 Thread Nathan Harmston
> If u get what I mean??? Many Thanks in advance Nathan -- http://mail.python.org/mailman/listinfo/python-list

Re: Graph Data Structures

2006-11-25 Thread Nathan Harmston
tr. Do you get what I mean. Many Thanks Nathan -- http://mail.python.org/mailman/listinfo/python-list

Re: Graph Data Structures

2006-11-25 Thread Nathan Harmston
Hi, It seems that by just going through the problem writing out a better explanation for the reply I have figured out a solution and the problem isnt as difficult as I thought it would be. What is a wontok? Thanks Nathan PS --> the start of my reply: class Interval(object): _id = &qu

Use of factory pattern in Python?

2006-12-07 Thread Nathan Harmston
way I d do it in Java. Many Thanks Nathan -- http://mail.python.org/mailman/listinfo/python-list

Metaclass uses?

2006-12-15 Thread Nathan Harmston
the quality of my code and let me do better things. Also is there anymore interesting OO stuff that Python has apart from Java. Many Thanks Nathan -- http://mail.python.org/mailman/listinfo/python-list

recursion error using setattr and getattr

2007-06-07 Thread Nathan Harmston
have any ideas how I can implement this sort of thing through my current method, or is there a better way to accomplish this. THanks Nathan -- http://mail.python.org/mailman/listinfo/python-list

Type error when using SQLAlchemy and Python

2007-06-11 Thread Nathan Harmston
HI, I posted this to sqlalchemy but didnt get a response, so I was wondering if anyone on python-list could help me. I m currently trying to build an api for a database and I really like the way that Djangos manager ( Class_name.objects ) is set up. This seems very intuitive for me. After reading

Re: Python Help!!!

2007-06-13 Thread Nathan Harmston
t;): print "%s \n %s" %(id, seq) Its adapted from the fasta parser in PyGr. >From what I understand biopython isnt very active and I think theres a re-factor of it going on at the moment in the form of corebio. Hope this helps; Thanks Nathan -- http://mail.python.org/mailman/listinfo/python-list

Accessing variable from a function within a function

2007-06-24 Thread Nathan Harmston
make these variables accessible to the euclid function. Or is there a better way to design this function? Many Thanks in advance, Nathan -- http://mail.python.org/mailman/listinfo/python-list

Programming Idiomatic Code

2007-07-02 Thread Nathan Harmston
...or whether it was idiomatic and to be honest what idiomatic really means. All comments greatly appreciated and welcomed. Thanks in advance Nathan import urllib2,sys from elementtree.ElementTree import parse base_url = "http://api.etsy.com/feeds/xml_user_details.php?id="; def re

Re: Programming Idiomatic Code

2007-07-03 Thread Nathan Harmston
ed unreadable drivel (you dont know how much I appreciate Python atm). I have one question though: Using a module global for this kind of data is usually a bad idea (except eventually for run-once throw-away scripts, and even then...) Why is this a bad idea? Thanks in advance Nathan PS I am very a

Re: Programming Idiomatic Code

2007-07-03 Thread Nathan Harmston
> > Using a module global for this kind of data is usually a bad idea > > (except eventually for run-once throw-away scripts, and even then...) > > > > Why is this a bad idea? > > Don't you have any idea ? > -- Not really.problem with access, using unneeded memory... I grasping at straws here.

Re: Programming Idiomatic Code

2007-07-03 Thread Nathan Harmston
oh to do some real programming would be amazing. I think its just a poor implementation of Clipper and it makes it appreciate the genius of python, the indentation, the ease of reading, ease of maintainingits so perfect. Now if only I could convince them to move to Pythondr

Creating logged functions using decorators

2007-07-07 Thread Nathan Harmston
yway I can capture the output of the function i.e. 10. Many Thanks in advance, Nathan -- http://mail.python.org/mailman/listinfo/python-list

Converting between objects

2007-07-19 Thread Nathan Harmston
hints as to a better way to do it ? Many Thanks nathan -- http://mail.python.org/mailman/listinfo/python-list

Restricting the alphabet of a string

2007-04-30 Thread Nathan Harmston
extend string to bit string, but is there anyway I can force the alphabet to be restricted to 1's and 0's (or even 1, 0 and -1, as an extension to from trinary strings). class Binary_String(String): pass Many Thanks Nathan -- http://mail.python.org/mailman/listinfo/python-list

Re: Restricting the alphabet of a string

2007-05-01 Thread Nathan Harmston
Thanks, I might just move my trinary string (if I get that far) to be encoded as 0, 1, 2, thanks for your help. On 30 Apr 2007 11:14:10 -0700, John Machin <[EMAIL PROTECTED]> wrote: > On Apr 30, 9:53 pm, "Nathan Harmston" <[EMAIL PROTECTED]> > wrote: > > Hi,

Using the CSV module

2007-05-09 Thread Nathan Harmston
gth. Many Thanks in advance Nathan -- http://mail.python.org/mailman/listinfo/python-list

Re: Using the CSV module

2007-05-09 Thread Nathan Harmston
I ve just finished writing one, I wanted to stay with the batteries included approach as much as possible though. Is there anyway I can request a change to the csv module? Thanks Nathan On 09/05/07, Stefan Sonnenberg-Carstens <[EMAIL PROTECTED]> wrote: > Most of the time I found the C

Re: alternative to eclipse [ python ide AND cvs ]

2007-05-18 Thread Nathan Harmston
#How_to_install_Java_Integrated_Development_Environment_.28Eclipse.29 Hope this helps, Nathan -- http://mail.python.org/mailman/listinfo/python-list

Complexity of methods etc

2007-08-12 Thread Nathan Harmston
my coding in order to reduce time/space usage/ Many Thanks in advance Nathan -- http://mail.python.org/mailman/listinfo/python-list

Problem using Optional pyparsing

2007-08-16 Thread Nathan Harmston
(ifile): alilines = make_alilines_status_parser() for l in ifile: yield alilines.parseString( l ) However my parser always fails on lines of type 3. Does anyone know why the Optional part is not working. Many Thanks in advance Nathan -- http://mail.python.org/mailman/listinfo/python-list

Re: Tokenizer for python?

2007-08-21 Thread Nathan Harmston
Hi, >From your description I think something like PyParsing might be useful to you. http://pyparsing.wikispaces.com/ If not then I guess I m not understanding your question right. Hope this helps Nathan On 21/08/07, Robert Dailey <[EMAIL PROTECTED]> wrote: > Hi, > > I am

Adding attributes stored in a list to a class dynamically.

2007-09-02 Thread Nathan Harmston
id, c.test, c.doh HOwever I m not sure how to do this: how can i assign args, kwargs within the constructor of coconuts and how can I deconstruct the list to form the correct syntax to be able to be used for args, kwargs. HOpe this makes sense, Thanks in advance, Nathan -- http://mail.python.org/mailman/listinfo/python-list

Re: Requirements For A Visualization Software System For 2010

2007-04-05 Thread Nathan Harmston
You could look at sage.its all python! http://sage.scipy.org/sage/ I wish Xah Lee would stop trolling.oh well Cheers Nathan -- http://mail.python.org/mailman/listinfo/python-list

Re: Free Python Ebook

2007-09-16 Thread Nathan Harmston
Theres a few python ebooks listed on the wiki http://wiki.python.org/moin/PythonBooks Hope this helps, Nathan On 16/09/2007, Marco <[EMAIL PROTECTED]> wrote: > Hi George, > > > Please tell me from which website I will get the free Python Ebook. > which o

adding a static class to another class

2007-09-16 Thread Nathan Harmston
t. Does anyone have any ideas how I can accomplish this using decorators? And also preventing more than one Manager instance instantiated at one time. Many Thanks in advance, Nathan -- http://mail.python.org/mailman/listinfo/python-list

Re: adding a static class to another class

2007-09-17 Thread Nathan Harmston
ood way of accomplishing this, so if there anyway of doing this without using a metaclass..or by using a decorator or notany help would be greatly appreciated. Many Thanks in advance Nathan On 17/09/2007, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Nathan Harmston a é

<    1   2   3   >