Re: CSV writer question

2011-10-24 Thread Jason Swails
On Mon, Oct 24, 2011 at 3:03 AM, Chris Angelico wrote: > On Mon, Oct 24, 2011 at 4:18 PM, Jason Swails > wrote: > > my_csv = csv.writer(open('temp.1.csv', 'wb')) > > > > Have you confirmed, or can you confirm, whether or not the file gets > close

Re: CSV writer question

2011-10-24 Thread Jason Swails
On Mon, Oct 24, 2011 at 2:08 AM, Chris Rebert wrote: > On Sun, Oct 23, 2011 at 10:18 PM, Jason Swails > wrote: > > > unless, of course, I add an explicit reference to track the open file > object > > and manually close or flush it > > (but I'd like to avoid i

CSV writer question

2011-10-23 Thread Jason Swails
ypes of files? Tips, answers, comments, and/or suggestions are all welcome. Thanks a lot! Jason As an afterthought, I suppose I could always subclass the csv.writer class and add the reference I want to that, which I may do if there's no other convenient solution. -- http://mail.python.org/mailman/listinfo/python-list

Re: I am a newbie for python and try to understand class Inheritance.

2011-10-15 Thread Jason Swails
Circle (and if the same attribute is defined in both places, the definition in Circle overrides that definition). Thus, in this case we can define a Circle with a center and radius (much easier than vertices!), and we can tell Circle how we want the vertices defined to get as close an approximation to a circle as we want. HTH (I'm sure others can explain this better than I can), Jason -- http://mail.python.org/mailman/listinfo/python-list

executing arbitrary statements

2011-09-30 Thread Jason Swails
;donate" their scripts to others that may run them as black boxes). Is it enough to disallow import statements, thereby not giving direct access to the sys and os modules? I know more or less what I want to do, but I'd also appreciate any experienced input/advice/suggestions. Thanks! Jason -- http://mail.python.org/mailman/listinfo/python-list

Re: Optparse buggy?

2011-09-01 Thread Jason Swails
dest='new') > Here you've imported parser as an alias to the OptionParser class. You can only use add_option() on an instance of that class. Try this: from optparse import OptionParser parser = OptionParser() parser.add_option('-n','--new',dest='ne

Re: killing a script

2011-08-29 Thread Jason Swails
caught if it isn't seen by the main Python process, so this still won't do anything if you use an unprotected/unwrapped os.system command. HTH, Jason -- http://mail.python.org/mailman/listinfo/python-list

typing question

2011-08-27 Thread Jason Swails
so, there should be no difference between any of my class definitions). I would prefer that every approach give me the name of the class (rather than the first 2 just return 'instance'). Why is this not the case? Also, is there any way to access the name of the of the class type foo or bar

Re: Help with regular expression in python

2011-08-19 Thread Jason Friedman
> Hi Josh, > thanks for the reply. I am no expert so please bear with me: > I thought that the {32} was supposed to match the previous expression 32 > times? > > So how can i have all matches accessible to me? $ python Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41) [GCC 4.4.3] on linux2 Type "he

RE: List spam

2011-08-18 Thread Jason Staudenmayer
> On Aug 18, 8:39 am, "Jason Staudenmayer" > wrote: > > > > [snip irony] > > > > Adventure Aquarium is America's Most Touchable Aquarium! > > Featuring the ALL NEW Stingray Beach Club > > Where you can touch and hand feed the gentle stin

RE: List spam

2011-08-18 Thread Jason Staudenmayer
> On Aug 18, 2011, at 8:58 AM, Jason Staudenmayer wrote: > > > I really like this list as part of my learning tools but > the amount of spam that I've been getting from it is CRAZY. > Doesn't anything get scanned before it sent to the list? > > This has been

RE: List spam

2011-08-18 Thread Jason Staudenmayer
> On 18/08/2011 13:58, Jason Staudenmayer wrote: > > I really like this list as part of my learning tools but the amount > > of spam that I've been getting from it is CRAZY. Doesn't > anything get > > scanned before it sent to the list? > > I haven't

List spam

2011-08-18 Thread Jason Staudenmayer
I really like this list as part of my learning tools but the amount of spam that I've been getting from it is CRAZY. Doesn't anything get scanned before it sent to the list? Jason ..·><º> -- http://mail.python.org/mailman/listinfo/python-list

Re: Ten rules to becoming a Python community member.

2011-08-16 Thread Jason Swails
As such, I argue they are supposed to be used (to) often. In such circumstances as these, I say keep your language concise and simple, and your words will reach the most people (and the fewest killfiles, perhaps). As the wise man says, "It's not only quiet people that don't say much". (And here RR joins his silent majority). Peace, Jason -- http://mail.python.org/mailman/listinfo/python-list

Commands for changing ownership of a file

2011-08-14 Thread Jason Hsu
I have a script that I execute as root, but I need to change the ownership of the files created in the script to that of my username. In GNU Bash, the command is something like "chown myusername:users". What's the equivalent Python command? I know that there is a command that uses numbers for the

Re: TypeError: 'module' object is not callable

2011-08-11 Thread Jason Swails
or instance, "from mymodule import *") versus keeping everything in a separate namespace so stuff doesn't get overwritten. This is more applicable to scripts/programs you write that import a number of different modules, all of whom may contain objects with the same name. All the

Re: a little parsing challenge ☺

2011-07-20 Thread Jason Earl
the newsgroups: line is not supposed to have spaces in it, that > makes both his post and your post invalid. Hence, filter on invalid > posts. I suspect that the spaces you are seeing are being added by Gnus. I see them too (and I see them in your post as well), but they disappear when

Re: Code hosting services

2011-07-16 Thread Jason Earl
traction. The perception is that bzr is unusably slow. This is too bad, IMHO, as Launchpad is pretty cool. Jason -- http://mail.python.org/mailman/listinfo/python-list

Re: Embedding Python in a shell script

2011-06-17 Thread Jason Friedman
Thank you, everyone, for your suggestions. I'll try them all and decide which I like best. -- http://mail.python.org/mailman/listinfo/python-list

Embedding Python in a shell script

2011-06-16 Thread Jason Friedman
$ cat test.sh #!/bin/bash for i in 1 2 3 4; do python -c " for j in range($i): print j " done $ sh test.sh 0 0 1 0 1 2 0 1 2 3 The code behaves as I expect and want, but the de-denting of the Python call is unattractive, especially unattractive the longer the Python call becomes. I'd prefe

Re: pthreads in C++ with embedded Python

2011-06-08 Thread Jason Tackaberry
ed. :) Cheers, Jason. -- http://mail.python.org/mailman/listinfo/python-list

Re: pthreads in C++ with embedded Python

2011-06-08 Thread Jason Tackaberry
your effort to create a reduced testcase I assume? Cheers, Jason. -- http://mail.python.org/mailman/listinfo/python-list

Re: Beginner needs advice

2011-05-29 Thread Jason Tackaberry
-- both connotatively and denotatively -- and to argue against the claim that Python 2 and 3 are "completely incompatible" it seems to me sufficient to provide a single non-trivial counter-example, which Steven has already done. Cheers, Jason. -- http://mail.python.org/mailman/listinfo/python-list

Re: Development tools and practices for Pythonistas

2011-05-01 Thread Jason Earl
buted VCS is good at supporting that, but in practice I went > back to my lightweight synchronization scripts and file storage > again. With the API, I could have best of both worlds. You should take a look at Bazaar. I found it fairly easy to use bzrlib from my own Python scripts. http:/

Re: Fibonacci series recursion error

2011-04-29 Thread Jason Friedman
> import os > def fib(n): >        if n == 1: >          return(n) >        else: >          return (fib(n-1)+fib(n-2)) > > list=fib(20) > print(list) > > The above function return the > return (fib(n-1)+fib(n-2)) > > > RuntimeError: maximum recursion depth exceeded in comparison > [36355 refs] > >

Re: Egos, heartlessness, and limitations

2011-04-16 Thread Jason Swails
ave that much time for self-entertainment, but that would be pretty awesome (terrible?). --Jason -- http://mail.python.org/mailman/listinfo/python-list

Re: [Mac OSX] TextWrangler "run" command not working properly

2011-04-15 Thread Jason Swails
quaEnvVar.html Maybe if you prepend your Python 2.6 (MacPorts?) location to your PATH, it'll find it. --Jason -- http://mail.python.org/mailman/listinfo/python-list

Re: Feature suggestion -- return if true

2011-04-11 Thread Jason Swails
; This is only true if n < 5. Otherwise, the first returns None and the second returns False. >>> def foo(n): ... x = n < 5 ... if x: return x ... >>> def foo1(n): ... return n < 5 ... >>> foo(4) True >>> foo1(4) True >>> foo(6) >>> foo1(6) False >>> --Jason -- http://mail.python.org/mailman/listinfo/python-list

Re: Python program termination and exception catching

2011-04-10 Thread Jason Swails
On Sun, Apr 10, 2011 at 4:49 PM, Jerry Hill wrote: > On Sun, Apr 10, 2011 at 3:25 PM, Jason Swails > wrote: > > > > Hello everyone, > > > > This may sound like a bit of a strange desire, but I want to change the > way in which a python program quits if an except

Re: Python program termination and exception catching

2011-04-10 Thread Jason Swails
On Sun, Apr 10, 2011 at 12:34 PM, Laszlo Nagy wrote: > 2011.04.10. 21:25 keltezéssel, Jason Swails írta: > > Hello everyone, > > This may sound like a bit of a strange desire, but I want to change the > way in which a python program quits if an exception is not caught. The

Python program termination and exception catching

2011-04-10 Thread Jason Swails
y call that function, but then I fill up my script with trys and excepts which hurts readability (and makes the code uglier) and quashes tracebacks; neither of which I want to do. Any thoughts? Thanks! Jason -- http://mail.python.org/mailman/listinfo/python-list

Re: Some questions on pow and random

2011-03-27 Thread Jason Swails
algorithm, without going into much technical details is, > P0(x1,x2), P1(x1,x2) > > Now I am taking random.random() to generate both x1 and x2 and trying > to multiply them, is it fine? Or should I take anything else? > > I see no reason why you can't multiply them... I&#

Re: Converting an array of string to array of float

2011-03-25 Thread Jason Swails
I'm guessing you have something like list1=['1.0', '2.3', '4.4', '5.5', ...], right? You can do this: for i in range(len(list1)): list1[i] = float(list1[i]) There's almost certainly a 1-liner you can use, but this should work. --Jason On F

Re: dynamic assigments

2011-03-24 Thread Jason Swails
#x27;d rather do something like opts.variable than opts.dictionary['variable'] Just my 2c. Thanks to JM for suggesting setattr, btw. --Jason -- http://mail.python.org/mailman/listinfo/python-list

Re: multiprocessing Pool workers cannot create subprocesses

2011-03-19 Thread Jason Grout
On 3/19/11 4:17 PM, John L. Stephens wrote: On 3/18/2011 7:54 PM, Jason Grout wrote: Right; thanks. Let me rephrase my questions: 1. Why is important that the multiprocessing Pool worker processors have daemon=True (I think this is the same as asking: why is it important that they be

Re: multiprocessing Pool workers cannot create subprocesses

2011-03-18 Thread Jason Grout
On 3/18/11 3:29 PM, Ned Deily wrote: In article<4d838d28.5090...@creativetrax.com>, Jason Grout wrote: The problem appears to be that multiprocessing sets its workers to have the daemon flag set to True, which prevents workers from creating child processes. If I uncomment the line ind

multiprocessing Pool workers cannot create subprocesses

2011-03-18 Thread Jason Grout
It makes me nervous to just change the daemon status of the process like that, especially when I don't know the reason the workers have daemon=True to begin with. What is the reasoning behind that decision? What issues do we need to worry about if we just set the daemon mode flag like

Re: Problems of Symbol Congestion in Computer Languages

2011-03-14 Thread Jason Swails
e can't possibly keep an unchanging system of measurement. Not to disagree with Steven, as these arguments are irrelevant in (almost all) current scientific research; just to pose thoughts. Food for thought, Jason -- http://mail.python.org/mailman/listinfo/python-list

Re: Get Path of current Script

2011-03-14 Thread Jason Swails
nstall directory location as part of the install process, which is done sometimes as well. This is easily accessible from python via os.environ['HOME'] or os.getenv('HOME') All the best, Jason -- Jason M. Swails Quantum Theory Project, University of Florida Ph.D. Candidate

Re: backwards-compatibility

2011-03-01 Thread Jason Swails
n2.6 and 2.7. > > Is there any way of rewriting this so I can still print the error message > in > > python2.5/2.4? > > <http://mail.python.org/mailman/listinfo/python-list> > Many Unix OSes (especially on supercomputers) have painfully out-of-date system python versions, so

backwards-compatibility

2011-02-26 Thread Jason Swails
ny way of rewriting this so I can still print the error message in python2.5/2.4? Thanks! Jason -- Jason M. Swails Quantum Theory Project, University of Florida Ph.D. Candidate 352-392-4032 -- http://mail.python.org/mailman/listinfo/python-list

Re: Python on OSX

2011-02-21 Thread Jason Swails
ommand. It's quite useful for testing compatibility of scripts that use "#!/usr/bin/env python" as the shebang line. I haven't tried Fink, but the MacPorts approach works well for me. Good luck! Jason > > Cheers, > Chris > -- > http://mail.python.org/mail

Sending email via proxy

2011-02-13 Thread Jason Sergeant
Hello, Is chilkat the best option for doing this?(Sending email via proxy) Kind Regards, Jason Sergeant This email has been processed by SmoothZap - www.smoothwall.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Easy function, please help.

2011-02-10 Thread Jason Swails
On Thu, Feb 10, 2011 at 12:01 PM, Terry Reedy wrote: > On 2/10/2011 11:52 AM, Ethan Furman wrote: > > Jason Swails wrote: >> > > > How is "while n != 0:" any worse? >>> >> > 1. It is redundant, just like 'if bool_value is not False:'

Re: Problem with giant font sizes in tkinter

2011-02-10 Thread Jason Swails
On Thu, Feb 10, 2011 at 11:52 AM, rantingrick wrote: > > Oh, and about your problem. READ THE FREAKING MANUAL! > > Google Translation: i have no clue -- Jason M. Swails Quantum Theory Project, University of Florida Ph.D. Graduate Student 352-392-4032 -- http://mail.python.org/mail

Re: Easy function, please help.

2011-02-10 Thread Jason Swails
7;s just calling an object > constructor- no different than any other class in the language. > Ah, makes sense, thanks. Most of what I see/work in is C and Fortran -- not much OOP there :) --Jason -- > http://mail.python.org/mailman/listinfo/python-list > -- Jason M. Swails Quantum Theory Project, University of Florida Ph.D. Graduate Student 352-392-4032 -- http://mail.python.org/mailman/listinfo/python-list

Re: Easy function, please help.

2011-02-09 Thread Jason Swails
On Wed, Feb 9, 2011 at 8:16 PM, Ethan Furman wrote: > Jason Swails wrote: > >> However, as surprising as this may be I'm actually with RR on this one >> (for a little) -- for code readability's sake, you should make your >> conditional more readable (i.e.

Re: Easy function, please help.

2011-02-09 Thread Jason Swails
On Wed, Feb 9, 2011 at 5:34 PM, MRAB wrote: > On 09/02/2011 21:42, Jason Swails wrote: > >> You've gotten several good explanations, mainly saying that 0 -> False >> and not 0 -> True, which is why the while loop exits. You've also >> gotten advice about

Re: Easy function, please help.

2011-02-09 Thread Jason Swails
(True) False (I know this is fixed in py3) I think 0 -> False, 1-> True is perfectly reasonable and is fairly common in many languages (only Fortran in the languages I use doesn't use this construct). Not a serious issue in any case. --Jason > *school-bell* > -- > http://mail.python.org/mailman/listinfo/python-list > -- Jason M. Swails Quantum Theory Project, University of Florida Ph.D. Graduate Student 352-392-4032 -- http://mail.python.org/mailman/listinfo/python-list

Re: IDLE: A cornicopia of mediocrity and obfuscation.

2011-02-02 Thread Jason Swails
ered as to think we > >> actually care? > > > > Citation: http://goo.gl/LlBFj > > Actually, FWIW, not everybody advertises plonks. > They should. It's a fun word to read. Jason > >Mel. > > -- > http://mail.python.org/mailman/listinfo/pyth

Re: IDLE: A cornicopia of mediocrity and obfuscation.

2011-02-02 Thread Jason Swails
te. At least according to the laws of the universe as we understand them today. (we = physicists/scientists) But if you DO upgrade/update/improve/replace IDLE, I like the way the in-terminal interpreter pipes help(module) output through less rather than barfing it on the screen; the only IDLE shortcoming I've encountered in my 30 seconds of tinkering. Perhaps this behavior is just Unix-specific, though, and I'm perfectly content to continue playing in my terminal. Happy trolling, Jason -- Jason M. Swails Quantum Theory Project, University of Florida Ph.D. Graduate Student 352-392-4032 -- http://mail.python.org/mailman/listinfo/python-list

Re: WxPython versus Tkinter.

2011-01-24 Thread Jason Swails
ng I'm talking about? It's ok, you wouldn't understand. Suffice it to say that nearly all projects of the magnitude you seem to be projecting requires joint collaboration and participation of these people things that have long since forgotten your point and stopped li

Re: WxPython versus Tkinter.

2011-01-24 Thread Jason Swails
net is inflammable after all (how else could it still be here after so many flame wars?) Hoping you all have a peaceful night, Jason On Mon, Jan 24, 2011 at 10:54 PM, Stephen Hansen wrote: > On 1/24/11 2:16 PM, rantingrick wrote: > > On Jan 24, 3:58 pm, Infinity77 wrote: > >

RE: Nested structures question

2011-01-12 Thread Jason Staudenmayer
Return False instead of break should work else: print "You guessed it! The number was", the_number print "And it only took you", tries, "tries!\n" return False Jason ..·><º> > -Original Message- > From: &

Re: Can I have both Python 2.7 and Python 3.1 at the same time on the Mac?

2011-01-07 Thread Jason Swails
python32 python_select python26-apple switches seamlessly between them. (I have so many versions to test script compatibility, not because I'm an avid collector). In any case, this seems to be an ideal solution. All the best, Jason On Thu, Jan 6, 2011 at 5:25 PM, Bill Felton wrote: >

Re: opinion: comp lang docs style

2011-01-04 Thread Jason Earl
a -- (Num is defined in the Prelude) > negate :: a -> a > > This declaration may be read “a type a is an instance of the class > Num if there are class methods (+) and negate, of the given types, > defined on it.” > > (Source www.haskell.org) > > Note the w

RE: [SPAM] - Re: Code review request

2010-12-22 Thread Jason Staudenmayer
: Code review request Am 22.12.2010 19:34, schrieb Jason Staudenmayer: Hi All, Hi Jason, the program could be more dense. You have several redundant code in there, too. For example, all the *Employee functions basically just call dbconnect and let it execute the sql there. dbconnect in this

Code review request

2010-12-22 Thread Jason Staudenmayer
I'm not a programmer but would like to possibly expand in to it (right now an IT guy). Am I on the right track so far? The program should be documented enough to explain. """ Created on Tue Dec 21 13:39:41 2010 @author: jason Usage: cmd_drug_testing.py [options]... Will sel

Re: Google AI challenge: planet war. Lisp won.

2010-12-20 Thread Jason Earl
eir own starter package. I am sure that something similar could have been done for OCaml or F#. That's probably too bad. These types of competitions are good publicity for less popular languages (assuming that the bots to well). Jason -- http://mail.python.org/mailman/listinfo/python-list

Re: printing error message from an Exception

2010-12-10 Thread mark jason
On Dec 10, 11:55 am, Steven D'Aprano wrote: >     # By the way, IOError is not the only exception you could see. thanks for the help Steven. Is it OK to catch Exception instead of IOError ? In some operation which can cause many errors ,can I use the following? try: do_something() except Ex

printing error message from an Exception

2010-12-09 Thread mark jason
hi I was trying out some file operations and was trying to open a non existing file as below def do_work(filename): try: f = open(filename,"r"); print 'opened' except IOError, e: print 'failed',e.message finally: f.close() print 'closed' if __na

packaging python code in zip file

2010-12-09 Thread mark jason
hi, I have created a python app in eclipse pydev .The app is structured as below.. mypackage |__ __init__.py |__ driver.py |__ helper.py |__ utils.py The driver.py has the main program.I have added if __name__=="__main__" block in the driver.py and pydev's run configurat

How does GC affect generator context managers?

2010-11-30 Thread Jason
ncludes the finally clause... right? — Jason -- http://mail.python.org/mailman/listinfo/python-list

Re: Define macro when invoking setup.py

2010-11-08 Thread Jason
On Nov 9, 10:56 am, Jason wrote: > But can they be selected or set from the command line, so I can do, > say, "setup.py build -DDEBUG=1"? Just answered my own question: there's an option for "build_ext" (NOT "build") that allows this. Thanks, Jason --

Re: Define macro when invoking setup.py

2010-11-08 Thread Jason
               ('HAVE_STRFTIME', None)], >           undef_macros=['HAVE_FOO', 'HAVE_BAR']) > > Note that define_macros requires a list of tuples each having two members. But can they be selected or set from the command line, so I can do, say, "setup.py build -DDEBUG=1"? — Jason -- http://mail.python.org/mailman/listinfo/python-list

Define macro when invoking setup.py

2010-11-08 Thread Jason
I'd like to be able switch between building my C extension with a certain preprocessor macro defined or not defined. I'm using the rudimentary distutils setup.py example given here: http://docs.python.org/extending/building.html Is there a command line option that distutils.core.setup() will inte

Re: Cross compiling (i386 from amd64) with distutils

2010-11-08 Thread Jason
hine, so I'll stick with the "separate 32-bit installation" approach. Cheers, Jason -- http://mail.python.org/mailman/listinfo/python-list

Re: Cross compiling (i386 from amd64) with distutils

2010-11-07 Thread Jason
On Nov 8, 8:55 am, Jason wrote: > Do you know if virtualenv allows installing a Python environment with > a different architecture than that of the system Python install? I > suspect not, but maybe there's an option I don't know about. Found a better solution, which is to

Re: Cross compiling (i386 from amd64) with distutils

2010-11-07 Thread Jason
the actual distutils package, and somehow use that in my project instead of setup.py? — Jason -- http://mail.python.org/mailman/listinfo/python-list

Cross compiling (i386 from amd64) with distutils

2010-11-07 Thread Jason
on.h:58, from src/noddy.c:1: /usr/include/python2.6/pyport.h:694:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)." error: command 'gcc' failed with exit status 1 So is it possible to get distutils to cross compile so

Re: Man pages and info pages

2010-11-03 Thread Jason Earl
a bit strange. The printed > python docs come to several thousand pages. Do we want them to be 1 > manpage? a hundred? a thousand? I am pretty conversant with the Python documentation. I almost never need to search them. I do miss being able to read (and search) the documentation in

Re: how to add patch

2010-10-13 Thread Jason Swails
n the patch file itself, then this will be automatic. Otherwise, you'll need to specify the file you want to patch. You can see the man page for more details and options. Good luck! Jason > thanks > jim > -- > http://mail.python.org/mailman/listinfo/python-list > -- Jason M

Re: Compiling as 32bit on MacOSX

2010-10-12 Thread Jason Swails
Try setting the compiler itself as "gcc -m32" -- Jason Swails Quantum Theory Project, University of Florida Ph.D. Graduate Student 352-392-4032 On Oct 12, 2010, at 8:29 PM, Gregory Ewing wrote: > I'm getting my Python environment set up on a new > Snow Leopard machine, an

Re: help!!!

2010-10-11 Thread Jason Swails
On Mon, Oct 11, 2010 at 3:05 PM, Robert Kern wrote: > On 10/11/10 11:44 AM, Jason Swails wrote: > >> >> >> On Mon, Oct 11, 2010 at 11:11 AM, Robert Kern > <mailto:robert.k...@gmail.com>> wrote: >> >>On 10/11/10 8:44 AM, Jason Swails wrote: &g

Re: help!!!

2010-10-11 Thread Jason Swails
On Mon, Oct 11, 2010 at 11:11 AM, Robert Kern wrote: > On 10/11/10 8:44 AM, Jason Swails wrote: > >> >> >> On Mon, Oct 11, 2010 at 9:25 AM, Andreas Waldenburger >> >> wrote: >> >>On Mon, 11 Oct 2010 23:51:46 +1300 Lawrence D'Oliveiro >

Re: help!!!

2010-10-11 Thread Jason Swails
On Mon, Oct 11, 2010 at 9:25 AM, Andreas Waldenburger wrote: > On Mon, 11 Oct 2010 23:51:46 +1300 Lawrence D'Oliveiro > wrote: > > > In message , > > Emile van Sebille wrote: > > > > > Oh come now -- isn't being lazy a primary programmer's attribute? > > > > I wonder if that’s why more men are g

Re: open file on mac

2010-10-08 Thread Jason Swails
On Fri, Oct 8, 2010 at 3:39 PM, Jason Swails wrote: > > > On Fri, Oct 8, 2010 at 10:16 AM, tinauser wrote: > >> hi, sorry if it is a stupid qustio,but i cannot figure out where's the >> problem. >> i've a simpleModule: >> class Starter: >&g

Re: open file on mac

2010-10-08 Thread Jason Swails
I import the module and execute > simpleModule.Starter().init(48) > If you had renamed the function __init__ above, all you would have to do is: instance_of_starter = Starter(48) Which makes more sense IMO. Good luck! Jason > > on mac I get an error if i do not give the full pat

Re: mantissa and exponent in base 10

2010-10-07 Thread Jason Swails
; me(12345) > (0.12351, 5.0) > >>> me(1.2345e-9) > (0.12351, -8.0) > >>> me(1.2345e-9, 2) > (0.12, -8.0) > > Best regards, > Chris Smith > -- > http://mail.python.org/mailman/listinfo/python-list > -- Jason M. Swails Quantum Theory Project, University of Florida Ph.D. Graduate Student 352-392-4032 -- http://mail.python.org/mailman/listinfo/python-list

Re: mantissa and exponent in base 10

2010-10-07 Thread Jason Swails
the program, so that didn't add to the time of the math-execution. Good luck! Jason => (1.2345, 7) > > (0.12345, 8) would also be acceptable. > > > The math module has a frexp() function, but it produces a base-2 exponent: > > >>> math.frexp(1.2345e7) &g

Re: help!!!

2010-10-05 Thread Jason Swails
new to python. I just wanna learn it > > -- > http://mail.python.org/mailman/listinfo/python-list > > -- Jason M. Swails Quantum Theory Project, University of Florida Ph.D. Graduate Student 352-392-4032 -- http://mail.python.org/mailman/listinfo/python-list

Subprocess does not return for longer-running process

2010-09-21 Thread Jason Friedman
Hello, The Popen call does not return if the underlying OS call runs longish, as the example below shows. Although, if the underlying OS call is merely "sleep N" it will return even after quite a long time. wikiu...@dvprwiki1:~> python --version Python 2.6.4 wikiu...@dvprwiki1:~> time /opt/confl

Re: Plz comment on this code

2010-09-18 Thread Jason Swails
s=[zero,one,zero,one,zero,one,zero,one,zero,one] > > inputted_digit=sys.argv[1] > column_max=len(inputted_digit) > row_max=3 > > r=0 > while r<3: > line="" > c=0 > while c digit_i=int(inputted_digit[c]) > digit=digits[digit_i] > line+=digi

Re: compile Py2.6 on SL

2010-09-17 Thread Jason Swails
> -- > Michel Claveau > -- > http://mail.python.org/mailman/listinfo/python-list > -- Jason M. Swails Quantum Theory Project, University of Florida Ph.D. Graduate Student 352-392-4032 -- http://mail.python.org/mailman/listinfo/python-list

Re: File read from stdin and printed to temp file are not identicial?

2010-09-16 Thread Jason Swails
ne > %d:\nfile(%d):\"%s\"\narray(%d):\"%s\"" % > (i+1, len(line), line, len(data[i]), data[i]) >i += 1 >sys.exit() > > #- > > I feel that I must be doing something very stupid, but I don't really > know what. > > Any i

Re: Very stupid question about a % symbol

2010-09-16 Thread Jason Swails
ves backwards compatibility to pythons older than 2.6. Before I found out how to cancel the %, the statement looked like ("%"+"%s" % format) % number. Not much of a change, but still a nice thing to know since I play with %s a lot. Thanks! (even though I'm not the original

classes and dictionaries

2010-09-15 Thread Jason Swails
If anyone can tell me why the dictionary from 2 different objects are exactly the same for pointers, but are different for, e.g. parm_data and formats, that would be greatly appreciated. Thanks! Jason -- Jason M. Swails Quantum Theory Project, University of Florida Ph.D. Graduate Student 352-3

Re: Hide DOS console for .pyc file

2010-09-10 Thread Jason Earl
#x27;t really use Windows any more, so I might be off the mark, but I think that you need to look into using pythonw.exe instead of python.exe. Solving your problem might be as easy as changing the name of your file from foo.py to foo.pyw. Jason -- http://mail.python.org/mailman/listinfo/python-list

Re: (Webinar) Connecting the Dots: US SEC, ABS Mandates, Financial Modeling and Python

2010-09-07 Thread Jason Galyon
Will this webcast/webinar perform on Linux? Jason On Tue, 2010-09-07 at 14:08 -0700, Kendra Penrose wrote: > Connecting the Dots: US SEC, ABS Mandates, Financial Modeling and Python > > Date: Wednesday September 22, 2010python-announce-l...@python.org, > Time: 10:00am PST/1:00pm ES

Re: Subclassing by monkey-patching

2010-09-05 Thread Jason
On Sep 6, 8:57 am, Jason wrote: > But it's looking more and more like I should give up > that particular goal. ...but on the other hand I just knocked together a pyinotify threaded watch system in about 50 lines. It's tempting to tell users of other platforms to write their

Re: Subclassing by monkey-patching

2010-09-05 Thread Jason
ndows/Mac, but FreeBSD, Solaris, etc. But it's looking more and more like I should give up that particular goal. Cheers, Jason -- http://mail.python.org/mailman/listinfo/python-list

Re: Subclassing by monkey-patching

2010-09-05 Thread Jason
, same for all GObject properties, same for the usual methods. I'd basically have to re-write the entire class in Python, and then tack on my methods. Otherwise I have to write two sets of methods for anything that touches this wrapped object. Still, if it's the only way, sure. — Jason -- http://mail.python.org/mailman/listinfo/python-list

Subclassing by monkey-patching

2010-09-04 Thread Jason
would even allow me to override the gio.File.monitor_directory() method to take the monitor returned by the original method and decide whether to make it recursive based on a parameter passed to monitor_directory(). Cheers, Jason PS. Asked a similar question on the pygtk list a few days ago: http://www.daa.com.au/pi

Surge 2010 Early Registration ends Tuesday!

2010-08-30 Thread Jason Dixon
t and guarantee your seat to this year's event! -- Jason Dixon OmniTI Computer Consulting, Inc. jdi...@omniti.com 443.325.1357 x.241 -- http://mail.python.org/mailman/listinfo/python-list

Re: Microsoft lessening commitment to IronPython and IronRuby

2010-08-11 Thread Jason Earl
hich is better than what Python can say. If you happen to be believe that Microsoft is likely to attack Free Software via patents then Mono is arguably the safest choice. Especially if you confine yourself to the ECMA-sponsored core and the Free Software libraries that are not re-implementations of Microsoft's technology. Jason -- http://mail.python.org/mailman/listinfo/python-list

Re: Trying to redirect every urel request to test.py script with the visitors page request as url parameter.

2010-07-20 Thread Jason Friedman
2010/7/20 Νίκος : > Hello guys! This is my first post in this group! I do not have an answer to your question, other than to suggest you look at (and/or post) relevant lines from Apache's access.log and error.log. I write mostly to say that, in my experience, folks on this list are very helpful,

rstrip()

2010-07-16 Thread Jason Friedman
$ python Python 2.6.4 (r264:75706, Dec 7 2009, 18:43:55) [GCC 4.4.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> "x.vsd-dir".rstrip("-dir") 'x.vs' I expected 'x.vsd' as a return value. -- http://mail.python.org/mailman/listinfo/python-list

Last day to submit your Surge 2010 CFP!

2010-07-09 Thread Jason Dixon
your business sponsor/exhibit at Surge 2010, please contact us at su...@omniti.com. Thanks! -- Jason Dixon OmniTI Computer Consulting, Inc. jdi...@omniti.com 443.325.1357 x.241 -- http://mail.python.org/mailman/listinfo/python-list

CFP for Surge Scalability Conference 2010

2010-07-02 Thread Jason Dixon
icipating as an exhibitor, please visit the Surge website or contact us at su...@omniti.com. Thanks, -- Jason Dixon OmniTI Computer Consulting, Inc. jdi...@omniti.com 443.325.1357 x.241 -- http://mail.python.org/mailman/listinfo/python-list

CFP for Surge Scalability Conference 2010

2010-06-14 Thread Jason Dixon
n Surge is just what you've been waiting for. For more information, including CFP, sponsorship of the event, or participating as an exhibitor, please contact us at su...@omniti.com. Thanks, -- Jason Dixon OmniTI Computer Consulting, Inc. jdi...@omniti.com 443.325.1357 x.241 -- http://mai

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