Python stopped installing packages

2019-01-29 Thread Hamish Allen
Hi, Recently I’ve been trying to code a Discord bot in Python 3.6.2, then I realised that some features of discord.py were only available in Python 3.7+ (as seen here on the right near the top https://docs.python.org/3/library/asyncio.html), so I downloaded 3.7.2. After correctly changing the

portable python

2017-04-28 Thread allen wade
is there a way to install python on a thumb drive that does not require an administrator's password? I have to use public computers and store all my applications to the thumb drive, using the Portable Apps Platform to manage the applications. -- https://mail.python.org/mailman/listinfo/python-lis

Procedure for downloading and Installing Python 2.7 Modules

2015-07-20 Thread W. D. Allen
Would like to locate and install numpy, scipy and matplotlib with Wing 101 for Python 2.7 Just beginning to use Python 2.7 for engineering work. Any guidance would be appreciated. Thanks, WDA balle...@gmail.com end -- https://mail.python.org/mailman/listinfo/python-list

Re: random.sample with large weighted sample-sets?

2014-02-16 Thread Charles Allen
How efficient does this thing need to be? You can always just turn it into a two-dimensional sampling problem by thinking of the data as a function f(x=item), generating a random x=xr in [0,x], then generating a random y in [0,max(f(x))]. The xr is accepted if 0 < y <= max(f(xr)), or rejected (an

Re: Abandoning Python

2011-05-21 Thread Bill Allen
You have ideas, a text editor, and a computer - best get to coding. What's stopping you? You largely want Python, with modifications. Join the development team and help implement those changes, or fork your own flavor and do what you wish. Right? You imagine it's an easy task, so get after

Re: PyPad 2.7.1 (Update 2)

2011-05-14 Thread Bill Allen
Anyway, I love this little Python app. Been wanting something like this for a long time. I installed this on my iPhone running iOS 4.3.3 (8J2). Congrats on a great app! Bill Allen <http://www.python.org> <http://www.catb.org/%7Eesr/faqs/hacker-howto.html><http://taarc.rebe

Python SIG for Healthcare IT

2011-03-11 Thread Brad Allen
For those seeking to work with Python-based tools in the healthcare IT industry, this SIG ("special interest group") can provide a forum to discuss challenges and hopefully foster knowledge sharing and tools development. Relevant topics include tools for working with healthcare standard data format

Re: I'm happy with Python 2.5

2011-02-27 Thread Bill Allen
On Sun, Feb 27, 2011 at 07:34, n00m wrote: > Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit > (Intel)] on win32 > > and Idon't move neither up nor down from it (the best & the fastest > version) > -- Trolls should also be h

Re: Which is the best book to learn python

2011-02-14 Thread Bill Allen
Alan Gauld has written a very good online book called Learning to Program. I would definitely recommend it. http://www.alan-g.me.uk/l2p/index.htm -Bill On Mon, Jan 24, 2011 at 11:09, santosh hs wrote: > Hi All, > i am beginner to python please tell me which is the best available > referenc

Re: Python on wikipedia

2010-12-12 Thread Bill Allen
Yeah, I noticed that a while back too. Kinda cool. --Bill On Sun, Dec 12, 2010 at 3:21 PM, DevPlayer wrote: > Snapshot in time, hey look at that; someone used Python as THE example > of what a programming language is on Wikipedia. > http://en.wikipedia.org/wiki/Programming_language > -- > htt

Re: Python's equivalent to Main calling program and subprograms

2010-12-01 Thread Bill Allen
Thanks for the explanation of "main". Some tutorials mention it, some don't. I have written some not trial Python programs and have never had a real need to use that convention, but at least I understand it now. --Bill On Wed, Dec 1, 2010 at 1:13 PM, Tim Harig wrote: > > On Wed, Dec 1, 2010

Re: convert time to UTC seconds since epoch

2010-07-21 Thread Steve Allen
On Jul 20, 6:57 pm, Chris Rebert wrote: [regarding trust of POSIX vis a vis leap seconds] > I'm not saying they necessarily should, but they're standardized and > the `time` module is based on POSIX/Unix-ish assumptions; not > following POSIX would be inconsistent and problematic. > Breaking stand

Re: Access class from staticmethod

2010-04-30 Thread Thomas Allen
Ah ha, @classmethod. On Apr 30, 3:47 pm, Thomas Allen wrote: > Is that possible? > > class A(object): >   @staticmethod >   def set_b(x): >     # A.b = x, without knowing A is "A" >     pass > > Thomas -- http://mail.python.org/mailman/listinfo/python-list

Access class from staticmethod

2010-04-30 Thread Thomas Allen
Is that possible? class A(object): @staticmethod def set_b(x): # A.b = x, without knowing A is "A" pass Thomas -- http://mail.python.org/mailman/listinfo/python-list

[Python-list] The distutils.sysconfig.set_python_config() function

2010-04-09 Thread Ray Allen
find it in distutils/sysconfig.py. Thanks. -- Ray Allen Best wishes! -- http://mail.python.org/mailman/listinfo/python-list

Re: Good Intermediate Tutorials

2010-04-01 Thread Ray Allen
programs. If you want to know more you can read the cpython source itself. Its not too difficult. -- Ray Allen Best wishes! -- http://mail.python.org/mailman/listinfo/python-list

Re: Have you embraced Python 3.x yet?

2010-03-28 Thread Ray Allen
In our company, we still use python-2.5.4, and will be updated to python-2.5.5. I hope we can go to 2.6.x or 3.x, but I'm not sure when. -- http://mail.python.org/mailman/listinfo/python-list

Re: method to intercept string formatting % operations

2010-02-05 Thread Brad Allen
On Fri, Feb 5, 2010 at 9:49 AM, Jean-Michel Pichavant wrote: > Anyway why would you want to use the tuple form ? it's beaten in every > aspect by the dictionary form. I'm subclassing a namedtuple, and adding some additional functionality such as __getitem__, __setitem__, so that the namedtuple a

SimpleXMLRPCServer daemon

2010-01-29 Thread Thomas Allen
e if it were deleted reliably. Thomas Allen -- http://mail.python.org/mailman/listinfo/python-list

Re: [Twisted-Python] ANN: Twisted 9.0.0

2009-12-02 Thread Tim Allen
exar...@twistedmatrix.com wrote: > A message with some ticket links from a thread on the twisted-python > mailing list: http://bit.ly/8csFSa Some of those tickets seem out of date; a better plan would be to query for tickets with the "py3k" keyword: http://twistedmatrix.com/trac/search?q=py3

unicode-to-ascii: replace with space, not "?"

2009-10-14 Thread Allen Fowler
Hello, I've been using "data.encode('ascii','replace')" to force an ASCII string out of Unicode data, with "?" in the place of non-ASCII letters. However, now I want to use a blank space (or maybe a dash) instead of a question mark. How do I do this? Thank you, :) -- http://mail.py

Re: multiproccess: What is the Dameon flag?

2009-09-15 Thread Allen Fowler
> > > > What is the Daemon flag and when/why would I want to use it? > > > From the documentation: "When a process exits, it attempts to terminate > all of its daemonic child processes.". > > Sometimes you want the main process to wait for its worker processes to > terminate before terminating

multiproccess: What is the Dameon flag?

2009-09-15 Thread Allen Fowler
Hello, What is the Daemon flag and when/why would I want to use it? Thank you, AF -- http://mail.python.org/mailman/listinfo/python-list

Scheduling algorithm: Suggestions?

2009-09-07 Thread Allen Fowler
Hello, I have a batch of "rpc style" calls that I must make to an external server via HTTP in a multi threaded fashion. (Return vales must be saved.) Problem is, I need to throttle the rate at which I do this. Each HTTP call takes between 0.2 and several seconds to complete. I need to contr

multiprocessing: Correct usage of pool & queue?

2009-09-04 Thread Allen Fowler
Hello, I have a list of tasks/items that I want handed off to threads/processes to complete. (I would like to stick with process if I could, since there is some CPU work here. ) Each task involves some calculations and a call to a remote server over urllib2/HTTP. The time to complete each ta

Re: what is it, that I don't understand about python and lazy evaluation?

2009-08-13 Thread Brian Allen Vanderburg II
Erik Bernoth wrote: Hi List, look at the following code: def evens(): # iterator returning even numbers i = 0 while True: yield i i += 2 # now get all the even numbers up to 15 L = [n for n in evens() if n < 15] Isn't it strange, that this code runs (in a lazy lang

How to do relpath implementation on 2.5

2009-08-08 Thread Brian Allen Vanderburg II
I've coded my own 'relpath' implementation for 2.5 (shown below) and I want to make sure it follows as closely as it should to 2.6 and later. I've got a question regarding that. When attempting to convert to a relative path and it is not possible for some reason (different drive or UNC share)

Re: XML(JSON?)-over-HTTP: How to define API?

2009-07-02 Thread Allen Fowler
> I have an (in-development) python system that needs to shuttle events / > requests > around over the network to other parts of itself. It will also need to > cooperate with a .net application running on yet a different machine. > > So, naturally I figured some sort of HTTP event / RPC t

XML(JSON?)-over-HTTP: How to define API?

2009-07-02 Thread Allen Fowler
I have an (in-development) python system that needs to shuttle events / requests around over the network to other parts of itself. It will also need to cooperate with a .net application running on yet a different machine. So, naturally I figured some sort of HTTP event / RPC type of would be

Re: Python simple web development

2009-06-26 Thread Thomas Allen
On Jun 25, 3:29 am, Private Private wrote: > Hi, > > I am looking for a python library which will allow me to do a simple > web development. I need to use > some forms (but nice looking :-) ), creating images based on input > from those forms, etc. I have read a bit about Django and TurboGears > b

Re: Project source code layout?

2009-06-04 Thread Allen Fowler
ns: 1) Do you use virtualpython? 2) How do you load the modules in your lib directory? 3) How do you reference your configuration directives from within your modules and CGI/daemon scripts? Thank you, Allen -- http://mail.python.org/mailman/listinfo/python-list

Re: Project source code layout?

2009-06-03 Thread Allen Fowler
> > I'm new to Python, and am looking for some suggestions as to the source > > code layout for a new project. > > Is this the development layout or the deployment layout? The two need not > bear any resemblance. > Looking for suggestions on both. I was hoping to keep the dev layout as clo

Project source code layout?

2009-06-03 Thread Allen Fowler
ovide the various config settings to both the web app and scripts. Any suggestions? ideas? fwiw, I am planing on keeping the whole thing in a Mercurial repository. Thank you, Allen :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Copying objects and multiple inheritance

2009-06-03 Thread Brian Allen Vanderburg II
Gabriel Genellina wrote: En Tue, 02 Jun 2009 19:02:47 -0300, Brian Allen Vanderburg II escribió: What is the best way to copy an object that has multiple inheritance with the copy module. Particularly, some of the instances in the hierarchy ("...some of the classes in...",

Copying objects and multiple inheritance

2009-06-02 Thread Brian Allen Vanderburg II
What is the best way to copy an object that has multiple inheritance with the copy module. Particularly, some of the instances in the hierarchy use the __copy__ method to create a copy (because even for shallow copies they need some information updated a little differently), so how can I mak

Re: Beazley on Generators

2009-04-01 Thread Craig Allen
this is great, thanks... we have used generators to create something akin to a cooperative tasking environment... not to implement multitasking, but to be able to control low level data processing scripts. These scripts, written as generators, yield control to a control loop which then can pause,

Re: packaging

2009-03-18 Thread Craig Allen
> andrew thanks andrew, good advice, I should probably use that throughout our code. btw, hope the world is treating you well, long time no see... -craig -- http://mail.python.org/mailman/listinfo/python-list

packaging

2009-03-17 Thread Craig Allen
we have software we are putting into package form. So far, all the code was in local py files and we imported between the modules as you'd think. Now with the package ("ourpackage") we are addressing how import affects the importing module. if "ourpackage" __init__.py itself does regular imports

Re: Why is lambda allowed as a key in a dict?

2009-03-11 Thread Craig Allen
On Mar 10, 1:39 pm, Paul Rubin <http://phr...@nospam.invalid> wrote: > Craig Allen writes: > > it raises an interesting question about why doesn't it.  I can think > > of practical answers to that, obviously, but in principle, if a > > function compiles to

Re: Ban Xah Lee

2009-03-11 Thread Craig Allen
> There you go: a 30-second psychological diagnosis by an > electrical engineer based entirely on Usenet postings.  It > doesn't get much more worthless than that... > > -- > Grant rolf but interesting post nonetheless. I have been really somewhat fascinated by AS since I heard of it about a dec

Re: Is python worth learning as a second language?

2009-03-10 Thread Craig Allen
On Mar 9, 12:43 am, ZikO wrote: > Hi > > I hope I won't sound trivial with asking my question. > > I am a C++ programmer and I am thinking of learning something else > because I know second language might be very helpful somehow. I have > heard a few positive things about Python but I have never w

Re: Why is lambda allowed as a key in a dict?

2009-03-10 Thread Craig Allen
> I think the point is that function objects compare by object identity, > so the two lambdas you use above are not equal even though they have the > same code. it raises an interesting question about why doesn't it. I can think of practical answers to that, obviously, but in principle, if a fun

Re: Opening for Python Programmer at Newport Beach

2009-03-03 Thread Craig Allen
On Mar 3, 10:17 am, Cool Dude wrote: > Hello , > This is Aniket from Techclique, a New Jersey based software > development and IT consulting firm providing top quality technical and > software professionals on a permanent and contractual basis to > Government and commercial customer including fort

Re: Threading and tkinter

2009-02-20 Thread Craig Allen
> The statement > >     x=x+1 > > (which, by the way, should stylistically be written > >     x = x + 1 > yes I was wondering what "x=x+1" meant until you translated it... oh, "x = x + 1" of course! I thought to myself. Oh wait no I'm sarcastic. -- http://mail.python.org/mailman/listinfo/python-

python-list@python.org

2009-02-20 Thread Allen
ert statements and in SQLPLUS set define off to run those statements, but it would be nice to insert "&" directly in PYTHON. Allen -- http://mail.python.org/mailman/listinfo/python-list

Re: FTP libs for Python?

2009-02-20 Thread Thomas Allen
On Feb 20, 9:45 am, coldpizza wrote: > Why don't you just use Curl? It does a dozen of protocols including > SFTP. And if the command line version is not enough for you then there > are Python bindings for Curl. I'm actually hoping to eventually package these tools using py2exe for some co-worker

FTP libs for Python?

2009-02-20 Thread Thomas Allen
I'm interested in writing a script to ease deployment of minor changes on some websites here, and it would involve some SFTP transfers. Do you know of good alternatives to ftplib, which is relatively low- level? Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: "Maximum recursion depth exceeded"...why?

2009-02-19 Thread Thomas Allen
On Feb 18, 10:15 pm, rdmur...@bitdance.com wrote: > Thomas Allen wrote: > > On Feb 18, 4:51 am, alex23 wrote: > > > On Feb 18, 7:34 pm, rdmur...@bitdance.com wrote: > > > > > Yeah, but wget -r -k will do that bit of it, too. > > > > Wow, nice,

Re: "Maximum recursion depth exceeded"...why?

2009-02-18 Thread Thomas Allen
On Feb 18, 4:51 am, alex23 wrote: > On Feb 18, 7:34 pm, rdmur...@bitdance.com wrote: > > > Yeah, but wget -r -k will do that bit of it, too. > > Wow, nice, I don't know why I never noticed that. Cheers! Hm...doesn't do that over here. I thought it may have been because of absolute links (not to s

Re: "Maximum recursion depth exceeded"...why?

2009-02-17 Thread Thomas Allen
On Feb 17, 9:08 pm, Christian Heimes wrote: > Thomas Allen wrote: > > If you'd read the messages in this thread you'd understand why I'm not > > using os.walk(): I'm not using it because I need my code to be aware > > of the current recursion dept

Re: "Maximum recursion depth exceeded"...why?

2009-02-17 Thread Thomas Allen
On Feb 17, 7:05 pm, Christian Heimes wrote: > Thomas Allen wrote: > > I'm referring to the same code, but with a print: > > > for file in os.listdir(dir): > >     if os.path.isdir(file): > >         print "D", file > > > in place of th

Re: "Maximum recursion depth exceeded"...why?

2009-02-17 Thread Thomas Allen
On Feb 17, 6:05 pm, Peter Otten <__pete...@web.de> wrote: > Thomas Allen wrote: > > On Feb 17, 5:31 pm, Peter Otten <__pete...@web.de> wrote: > >> Thomas Allen wrote: > >> > I must not be understanding something. This is a simple recursive > >>

Re: "Maximum recursion depth exceeded"...why?

2009-02-17 Thread Thomas Allen
On Feb 17, 5:31 pm, Peter Otten <__pete...@web.de> wrote: > Thomas Allen wrote: > > I must not be understanding something. This is a simple recursive > > function that prints all HTML files in argv[1] as its scans the > > directory's contents. Why do I get a

Re: "Maximum recursion depth exceeded"...why?

2009-02-17 Thread Thomas Allen
On Feb 17, 4:46 pm, Thomas Allen wrote: > I must not be understanding something. This is a simple recursive > function that prints all HTML files in argv[1] as its scans the > directory's contents. Why do I get a RuntimeError for recursion depth > exceeded? > > #!/usr/bin/e

"Maximum recursion depth exceeded"...why?

2009-02-17 Thread Thomas Allen
I must not be understanding something. This is a simple recursive function that prints all HTML files in argv[1] as its scans the directory's contents. Why do I get a RuntimeError for recursion depth exceeded? #!/usr/bin/env python import os, sys def main(): absToRel(sys.argv[1], sys.argv[2]

Re: Converting numbers to words

2009-02-05 Thread Brian Allen Vanderburg II
todp...@hotmail.com wrote: > > I've been trying to figure this out for over 2 hours and I'm really frustrated right now. > > I first made Python to ask user to input height in meters. If user puts certain value in meter, then it converts it to feet and inches as follows: > > > Enter the hei

Re: Flattening lists

2009-02-05 Thread Brian Allen Vanderburg II
mrk...@gmail.com wrote: Baolong zhen wrote: less list creation. At the cost of doing this at each 'flatten' call: if res is None: res = [] The number of situations of executing above code is the same as the number of list creations (once for each 'flatten' call, obviously). Is list cre

Re: Flattening lists

2009-02-05 Thread Brian Allen Vanderburg II
mrk...@gmail.com wrote: Hello everybody, Any better solution than this? def flatten(x): res = [] for el in x: if isinstance(el,list): res.extend(flatten(el)) else: res.append(el) return res a = [1, 2, 3, [4, 5, 6], [[7, 8], [9, 10]]] print fl

Re: Understanding descriptors

2009-02-05 Thread Brian Allen Vanderburg II
bruno.42.desthuilli...@websiteburo.invalid wrote: So the lookup chain is: 1/ lookup the class and bases for a binding descriptor 2/ then lookup the instance's __dict__ 3/ then lookup the class and bases for a non-binding descriptor or plain attribute 4/ then class __getattr__ Also and FWIW,

Re: Does the Python community really follow the philospy of "Community Matters?"

2009-02-02 Thread Craig Allen
I think what you have found is a remarkable characteristic of this language. Somehow, perhaps something to do with guido or python itself, python has a very strong non-dogmatic streak. It's a relief really. If I were to pose a "is python or its community really xyz?" I would wonder about the "on

Re: Why such different HTTP response results between 2.5 and 3.0

2009-02-01 Thread Brian Allen Vanderburg II
an0...@gmail.com wrote: Below are two semantically same snippets for querying the same partial HTTP response, for Python2.5 and Python 3.0 respectively. However, the 3.0 version returns a not-so-right result(msg) which is a bytes of length 239775, while the 2.5 version returns a good msg which is

Re: libsudo ?

2009-01-29 Thread Brian Allen Vanderburg II
linuxguy...@gmail.com wrote: Does anyone know where I would find libsudo ? http://sourceforge.net/projects/libsudo If you had the choice of using pexpect or libsudo, which would you use ? libsudo does all the work for you of executing sudo, checking for the expected responses and all. I

Re: new.instancemethod questions

2009-01-29 Thread Brian Allen Vanderburg II
schi...@gmail.com wrote: On Jan 29, 7:38 pm, Mel wrote: schickb wrote: I'd like to add bound functions to instances, and found the instancemethod function in the new module. A few questions: 1. Why is instancemethod even needed? Its counter-intuitive (to me at least) that assig

Understanding descriptors

2009-01-29 Thread Brian Allen Vanderburg II
I'm trying to better understand descriptors and I've got a few questions still after reading some sites. Here is what I 'think', but please let me know if any of this is wrong as I'm sure it probably is. First when accessing an attribute on a class or instance it must be found. For an insta

Re: USB in python

2009-01-26 Thread Brian Allen Vanderburg II
astan.c...@al.com.au wrote: Tim Roberts wrote: Sorry, but you have NOT created a USB device, and I sincerely hope you do not try to plug it in to a real USB port. Sorry, by USB device, I meant a device that is powered/activated by a bunch of wires that I want to control using a computer and

Re: understanding nested lists?

2009-01-24 Thread Brian Allen Vanderburg II
vinc...@vincentdavis.net wrote: I have a short peace of code that is not doing what I expect. when I assign a value to a list in a list alist[2][4]=z this seems replace all the 4 elements in all the sub lists. I assume it is supposed to but this is not what I expect. How would I assign a value

Re: How do I get my python program to get the root password ?

2009-01-23 Thread Brian Allen Vanderburg II
gra...@visi.com wrote: On 2009-01-24, Linuxguy123 wrote: I want to make a python program that I can run as a normal user that changes the permission on some device files. It will need to ask me for the root password and then run chown as root in order to do this. How do I accomplish thi

Re: Dynamic methods and lambda functions

2009-01-23 Thread Brian Allen Vanderburg II
unine...@gmail.com wrote: class Person: def __init__(self): for prop in props: setattr(self, "__" + prop[0], prop[1]) setattr(Person, "Get" + prop[0], lambda self: getattr (self, "__" + prop[0])) I've had a similar problem here and here is best how I can ex

Re: USB in python

2009-01-22 Thread Brian Allen Vanderburg II
astan.c...@al.com.au wrote: Hi, Thanks for all the responses but I forgot to mention that I have very little hardware understanding (at least in english) and the device itself it very simple and only needs about 5V power to be active. The problem here is that I want to control when the device

Re: Idea to support public/private.

2009-01-22 Thread Brian Allen Vanderburg II
There was a small error in setprivate/getprivate: import sys import inspect def get_private_codes(class_): codes = [] for i in class_.__dict__: value = class_.__dict__[i] if inspect.isfunction(value): codes.append(value.func_code) return codes def get_protect

Idea to support public/private.

2009-01-22 Thread Brian Allen Vanderburg II
Okay so I don't really care about public/private but I was watching the lists (Does python follow its idea of readability or something like that) and I thought of a 'possible' way to add this support to the language. I have implemented a class which allows creating both a private as well as a

Re: pep 8 constants

2009-01-22 Thread Brian Allen Vanderburg II
bock...@virgilio.it wrote: Constants would be a nice addition in python, sure enough. But I'm not sure that this can be done without a run-time check every time the constant is used, and python is already slow enough. Maybe a check that is disabled when running with optimizing flags ? But I'm su

Re: USB in python

2009-01-22 Thread Brian Allen Vanderburg II
astan.c...@al.com.au wrote: Hi, Im trying to write a program for my USB device and I'm thinking of using python to do this. The USB device is of my own making and it is activated when one of the two data pins of the USB is given about 5V (or similar to whatever the power pin is getting). Now I

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-14 Thread Brian Allen Vanderburg II
rt8...@gmail.com wrote: Here is a piece of C code this same guy showed me saying Pythonic indention would make this hard to read -- Well lets see then! I swear, before god, this is the exact code he showed me. If you don't believe me i will post a link to the thread. // Warning ugly C code ahe

Python threading

2009-01-13 Thread Brian Allen Vanderburg II
I'm doing some multi-threaded programming and before diving into the C/C++ code I though I'd do some in Python first. I decided to read through the threading module and I understand some of it, but I don't understand this, though I'm sure it is easy: The condition object has a method _is_owne

Re: I always wonder ...

2008-12-24 Thread Craig Allen
this is one of the most subtle trolls I've ever read. you sir, are a master! On Dec 22, 7:53 am, s...@pobox.com wrote: > ... shouldn't people who spend all their time trolling be doing something > else: studying, working, writing patches which solve the problems they > perceive to exist in the t

Re: If programming languages were religions...

2008-12-19 Thread Brian Allen Vanderburg II
martin.lal...@gmail.com wrote: very interesting http://www.aegisub.net/2008/12/if-programming-languages-were-religions.html "Python would be Humanism: It's simple, unrestrictive, and all you need to follow it is common sense. Many of the followers claim to feel relieved from all the burden impos

Re: Relative imports in Python 3.0

2008-12-17 Thread Brian Allen Vanderburg II
nicholas.c...@gmail.com wrote: Imagine a module that looks like ModuleDir __init__.py a.py b.py In python 2.x I used to have tests at the end of each of my modules, so that module b.py might look something like import a .. .. if __name__ == '__main__': run

Re: Python is slow

2008-12-16 Thread Craig Allen
On Dec 14, 6:38 pm, cm_gui wrote: > hahaha, do you know how much money they are spending on hardware to > make > youtube.com fast??? > > > By the way... I know of a very slow Python site called YouTube.com. In > > fact, it is so slow that nobody ever uses it. less than they'd spend to implement i

Re: How to modify a program while it's running?

2008-12-16 Thread Craig Allen
On Dec 16, 10:25 am, Joe Strout wrote: > Here's my situation: I'm making an AIM bot, but the AIM server will > get annoyed if you log in too frequently (and then lock you out for a > while). So my usual build-a-little, test-a-little methodology doesn't > work too well. > > So I'd like to restruct

Re: Limit traceback from most recent call

2008-12-15 Thread Brian Allen Vanderburg II
yinon...@gmail.com wrote: On Dec 14, 8:07 pm, Brian Allen Vanderburg II wrote: Hi, The interface of extract_tb is: traceback.extract_tb(tb, limit=None) try to play with the 'limit' argument Good luck, Yinon -- http://mail.python.org/mailman/listinfo/python-list I hav

Limit traceback from most recent call

2008-12-14 Thread Brian Allen Vanderburg II
I've looked at traceback module but I can't find how to limit traceback from the most recent call if it is possible. I see that extract_tb has a limit parameter, but it limits from the start and not the end. Currently I've made my own traceback code to do this but wonder if python already has

Re: Bidirectional Networking

2008-12-13 Thread Brian Allen Vanderburg II
man...@gmail.com wrote: On Dec 13, 11:13 pm, Bryan Olson wrote: Software firewalls will often simply refuse incoming connections. The basic protection of the garden-variety home router comes from "network address translation" (NAT), in which case TCP connections initiated from the inside wil

Re: How to initialize a class variable once

2008-12-09 Thread Brian Allen Vanderburg II
[EMAIL PROTECTED] wrote: Unless you are calling reload() on the module, it will only ever get _loaded_ once. Each additional import will just yield the existing module. Perhaps if you post an example of the behavior that leads you to believe that the class variables are getting reinitialized I c

Re: Python idea/proposal to assist in single-archive python applications

2008-12-07 Thread Brian Allen Vanderburg II
[EMAIL PROTECTED] wrote: Why not use pkgutil.get_data()? Provided you remember to put your zip file on PYTHONPATH you can already run modules directly out of a zipfile (Python 2.5 and later).If your zipfile contains __main__.py then with Python 2.6 or later you can run it directly: just spec

Python idea/proposal to assist in single-archive python applications

2008-12-07 Thread Brian Allen Vanderburg II
Python Community The following is just an idea that I considered that may be helpful in creating an application in a single archive easier and with less code. Such an application would be similar to jar files for Java. First, the application and all data files should be able to run either e

How to distribute C/C++ python extension module on Linux?

2008-12-05 Thread Allen
I have build an extension module PyRPC.so (why not be libPyRPC.so?). The PyRPC.so uses API in libRPCPacker.so. How to distribute the PyRPC.so? I just put PyRPC.so and libRPCPacker.so in the same folder. And under this folder, run python. It tells PyRPC module cannot find a method in libRPCPacker.s

Re: Confused about class relationships

2008-12-02 Thread Craig Allen
what you have is a totally acceptable factory system. Not sure why you are using a generator, but that's another matter. I agree with the previous replies regarding inheritance... this is not a case for inheritance. You could, however, have Bar be a borg with the Bar factory built in as a class

Re: HELP!...Google SketchUp needs a Python API

2008-12-02 Thread Craig Allen
> Just remember thought that if you threat Python like a > hammer, suddenly everything will look like a bail. > don't you mean if you use Python like a pitchfork? -- http://mail.python.org/mailman/listinfo/python-list

Re: Emacs vs. Eclipse vs. Vim

2008-12-01 Thread Craig Allen
I would never tell someone what editor to use in the same way I wouldn't tell someone what religion to believe in. Which is to say, I would tell my kids or other trusting soul... I used emacs for years, I was eventually convinced to start using nedit, which is quite nice. For an IDE, which I need

Re: Finding the instance reference of an object

2008-11-19 Thread Craig Allen
I've just come to the conclusion it's not possible to call functions in python, to do so is undefined and indeterminate, like dividing by zero. Henceforth no calling functions for me as clearly it's the devil's playground. -- http://mail.python.org/mailman/listinfo/python-list

Re: Official definition of call-by-value (Re: Finding the instance reference...)

2008-11-17 Thread Craig Allen
> >> * Do all objects have values? (Ignore the Python > >> docs if necessary.) > > > If one allows null values, I am current thinking yes. > > I don't see a difference between a "null value" > and not having a value. > I think the difference is concrete... an uninitialized variable in C has no va

Re: duck-type-checking?

2008-11-13 Thread Craig Allen
> since both are equally informative when it comes to tracing the faulty > assignment. > steve, they are not equally informative, the assertion is designed to fire earlier in the process, and therefore before much mischief and corruption can be done compared to later, when you happen to hit the m

Re: duck-type-checking?

2008-11-13 Thread Craig Allen
> This is better achived, not by littering the functional code unit with > numerous assertions that obscure the normal function of the code, but > rather by employing comprehensive unit tests *separate from* the code > unit. that doesn't seem to work too well when shipping a library for someone el

Re: Finding the instance reference of an object

2008-11-12 Thread Craig Allen
> arguably even older than that to Lisp. > Firstly, thanks to those that have responded to my part in this debate, I have found it very informative and interesting as I have the entire thread. However, with regard to comments that I led myself astray, I want to reiterate the one thing I find det

Re: Finding the instance reference of an object

2008-11-04 Thread Craig Allen
On Nov 4, 11:06 am, Joe Strout <[EMAIL PROTECTED]> wrote: > On Nov 4, 2008, at 7:42 AM, Craig Allen wrote: > > > coming from C/C++ Python seemed to me call by reference, for the > > pragmatic reason you said, modificaitons to function arguments do > > affect th

Re: Finding the instance reference of an object

2008-11-04 Thread Craig Allen
> > If the assert statement fails (and it does), then no copy was made and > Python is not call-by-value. > > So Python is not call-by-value, and it's not call-by-reference, so ... > either Python doesn't exist, or it uses a different calling convention. > coming from C/C++ Python seemed to me cal

Re: PYTHON WORKING WITH PERL ??

2008-11-03 Thread Craig Allen
> article:http://www.linuxjournal.com/article/3882 even if it is by Eric Raymond -- http://mail.python.org/mailman/listinfo/python-list

Re: PYTHON WORKING WITH PERL ??

2008-11-03 Thread Craig Allen
> article:http://www.linuxjournal.com/article/3882 interesting read, thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Structures

2008-11-03 Thread Craig Allen
> > Care to say more about what they are, not what they're like? > I'm not the OP and I may be biased by C++, I can imagine the complaints when I say, classes are just structures with function members for working on the structure. -- http://mail.python.org/mailman/listinfo/python-list

  1   2   >