Re: Python Oracle Interace on Solaris

2006-02-17 Thread Kenny
Thanks... Im not sure if you would know how to solve this one, but when
I ran my setup python scripts I got the error: library -lclntsh not
found. In the instantclient folder the library exists... is this a
matter of just copying the libraries to a different spot or just
setting up the correct environment variables?

-- 
http://mail.python.org/mailman/listinfo/python-list


Python/Spyce outputting

2006-02-24 Thread Kenny
I am accessing a database through python and displaying it through the
web using spyce. My goal is to get a table on my webpage that displays
the queries that I am doing but in a table format that looks good
rather than the raw text output. Is there a reference out there that
can help me do that?

-- 
http://mail.python.org/mailman/listinfo/python-list


SunLisp: A new Lisp drinking society in Ft Lauderdale, FL debuting 7PM, Pearl Harbor Day

2010-12-04 Thread kenny
In case you missed it, SunLisp is debuting on Pearl Harbor Day
(December 7th) at 7PM.

It's been added to the Lisp Meetings Calendar as well.

Who: His Kennyness, his CIO Dan (can you say "Lisp jobs"? Sher ya can)
and a notable group of Lispers doing a nice project in FL and anyone
who cares to join them.

When: First Tuesday of the month, 7PM, starting with Pearl Harbor Day,
2010

Where:  http://www.thefrogandtoadpub.com/ That is just a couple of
blocks below West Cypress Creek aka 62nd on the east side of
Powerline.

What: They serve beer, wine, and a substantial menu of great food.

Why: So we can flame each other in person over beer about the right
number of namespaces. Why else?

RSVP for this first meet so we know if we should ask them to tidy up
the back room which is smashing but lacks tellys.

HK

(Someone want to pass this along to the yobbos on #lisp?)
-- 
http://mail.python.org/mailman/listinfo/python-list


Mo Better Lisp Jobs

2010-12-22 Thread kenny
Check it out: 
http://lispjobs.wordpress.com/2010/12/22/lisp-developer-mcna-fort-laurderdale-florida/

We already have six splendid folks but business is booming and at
least one contract bid has to happen faster than we thought (potential
client moved it up) so we are looking to take on a couple more.

Lisp wannabe Rails gurus lurking here, plz note the opportunity
described in the listing.

The rest of the cross-posting is to find great coders with light Lisp.
We can talk.

HK

-- 
http://mail.python.org/mailman/listinfo/python-list


SUNLisp 2: Josh vs. Kenny Flamewars Galore!!

2011-01-03 Thread kenny
All they agree on is Common Lisp! Come join the Yobbos of MCNA at the
Frog & Toad for booze, vino, and great food and knock down drag out
debates galore on everything from Cells to Lisp IDEs:

When: Tomorrow Tuesday, at 7pm
Where: http://www.thefrogandtoadpub.com/

HK

-- 
http://mail.python.org/mailman/listinfo/python-list


SunLisp III: Lisp jobs and beer in Ft Lauderdale

2011-02-08 Thread kenny
Come on down to the Frog & Toad for wild and crazy debates over
parentheses on their own line and bring your resume -- the SunLisp
core is from an up and coming Ft Lauderdale firm that is still looking
for local Lisp (or Scheme or Clojure or...) talent.

The pub: http://www.thefrogandtoadpub.com/

The listing: http://lispjobs.wordpress.com/ (scroll down to 22-
Dec-2010)

-- 
http://mail.python.org/mailman/listinfo/python-list


isnan

2010-10-11 Thread Kenny
Hi All,

I have an array A, and another one B with same dimention and size. Now I
want to change the delete the elements in A where the same position in B is
nan. How can I do.

Similar to the matlab code A(find(isnan(B)) = []

Thank you.

-- 
Best regards,

Kenny
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: What is Expresiveness in a Computer Language?

2005-07-10 Thread Kenny McCormack
In article <[EMAIL PROTECTED]>,
Pete Barrett  <[EMAIL PROTECTED]> wrote:
>On 10 Jul 2005 02:57:04 -0700, "Xah Lee" <[EMAIL PROTECTED]> wrote:
>
>>Similarly, in computer languages, expressiveness is significant with
>>respect to semantics, not syntactical variation.
>>
>It may just be me, but I tend to think of a computer language as a
>tool for directing computers to perform specific actions. Do we talk
>about the expressiveness of a spade?

Most people think of natural language as "a tool for directing people to
perform specific actions" and have as much need for anything beyond that as
you seem to have.

Luckily, some people (writers, artists) are able to do more with natural
language than boss people around.  But make no mistake, that is its primary
purpose.

-- 
http://mail.python.org/mailman/listinfo/python-list


special operator =+

2005-12-15 Thread kenny Nguyen
Hi,

Does anyone know the operator "=+"?
If you do, what special method is related to this operator?
Is it the __iadd__ method, but I think this is related to "+=" operator.

Thanks,
Kenny


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Xah's Edu Corner: accountability & lying thru the teeth

2006-02-14 Thread Kenny Tilton
Ulrich Hobelmann wrote:
> Xah Lee wrote:
> 
>> here's a site: http://www.longbets.org/bets that takes socially
>> important predictions. I might have to enter one or two.
>>
>> i longed for such a accountable predictions for a long time. Usually,
>> some fucking fart will do predictions, but the problem is that it's not
> 
> [...]
> 
> OMG, he's back.
> 
> I predict, Xah will haunt us for years to come.
> 

WTF is wrong with Xah? He posts an occasional article in good faith and 
leaves it at that. ignoring the insults that follow.

In the end we have one good-faith article and a bunch of personal 
attacks from a Usenet chorus of self-appointed finger-shakers creating 
more pollution than he ever did.

If only some of the people castigating Xah for daring to use Usenet 
would post as rarely as he, and show as much restraint.

ken
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Xah's Edu Corner: accountability & lying thru the teeth

2006-02-14 Thread Kenny Tilton
Al Balmer wrote:
> On Tue, 14 Feb 2006 23:59:19 GMT, Kenny Tilton
> <[EMAIL PROTECTED]> wrote:
> 
> 
>>Ulrich Hobelmann wrote:
>>
>>>Xah Lee wrote:
>>>
>>>
>>>>here's a site: http://www.longbets.org/bets that takes socially
>>>>important predictions. I might have to enter one or two.
>>>>
>>>>i longed for such a accountable predictions for a long time. Usually,
>>>>some fucking fart will do predictions, but the problem is that it's not
>>>
>>>[...]
>>>
>>>OMG, he's back.
>>>
>>>I predict, Xah will haunt us for years to come.
>>>
>>
>>WTF is wrong with Xah? He posts an occasional article in good faith and 
>>leaves it at that. ignoring the insults that follow.
> 
> 
> Apparently you've never actually read one of his articles.

Have you read his web page? Like I did? Get back to me after you come up 
to speed on Xah.

> 
>>In the end we have one good-faith article and a bunch of personal 
>>attacks from a Usenet chorus of self-appointed finger-shakers creating 
>>more pollution than he ever did.
>>
>>If only some of the people castigating Xah for daring to use Usenet 
>>would post as rarely as he, and show as much restraint.
>>
> 
> Restraint? Now I know you haven't read it.
> 

 Note that I was not endorsing the content.

The restraint I was talking about was in ignoring you. If you and 
everyone else ignored his articles there would not be this thread. Which 
  is not being dragged out by Xah.

You all dis Xah, yet he is larger than you: you cannot resist heaping 
abuse on him. If you could, his articles would appear and disappear 
without leaving a trace. Instead we get people with half his wit making 
lame attempts at witty put-downs, embarrassing only themselves.

Xah acknowledges his problem, you clowns do not even know you have one.

kenny
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Important Research Project

2007-09-01 Thread Kenny McCormack
In article <[EMAIL PROTECTED]>,
Keith Thompson  <[EMAIL PROTECTED]> wrote:
>"E.D.G." <[EMAIL PROTECTED]> writes:
>> "CBFalconer" <[EMAIL PROTECTED]> wrote in message
>> news:[EMAIL PROTECTED]
>>> "E.D.G." wrote:
>>
>>> Where is Perl described in the C standard?  This seems rather OT.
>>
>> It has been my experience that a person who is an expert with one computer
>> language can usually do reasonably well when working with other languages.
>> I am trying to find some people who can assist with getting a Perl program
>> running.  It would probably be easier for expert programmers in any language
>> to help with this type of work compared with people such as myself who are
>> not experts in any programming language.
>
>CBFalconer's point is that this newsgroup (comp.lang.c, where he and I
>are both reading this) is for discussion of the C programming
>language.  If you want to discuss something other than C, please find
>another forum.  Massive cross-posts like this are rarely appropriate.

IOW (for the OP and for the various readers in all these groups):

The rod up Keith's butt has a rod up its butt.

Note, incidentally, that this thread is yet the latest occurrence of a
phenomenon that I've observed many times in the past, and have
described here in clc on more than a few occasions.  That is, somebody
starts a thread, posted to several different groups, in the hope of
getting help from at least one of them.  The thread is pretty much
on-topic for most of the groups, primarily because the keepers of most
of the groups do not have rods up their butts.

However, and this is the big however, one of the groups listed just
happens to be clc, where rod-filled butts are the norm.  The result is
that all of the responses come from clc (including, of course, this one)
and, as we see, it's all topicality BS, and nobody ever ends up
discussing the original subject.   Really a pity, that.

-- 
http://mail.python.org/mailman/listinfo/python-list


Help with wxPython program :.: return 1?

2009-04-05 Thread Kenny x
Hello, I have a problem with my wxPython 2.8 Application.
The program opens and closes and on KomodoEdit it says "wxstreamredirect.py
returned 1.'
 What's wrong?
http://paste.pocoo.org/show/80/

P.S. I compared my source code to the source code in wxPython in Action,
and it looks the same! Why does my program open, then return 1 and close?

Any help Appreciated! :)

~ Xarver
--
http://mail.python.org/mailman/listinfo/python-list


wxPython 2.8 for Python 2.6 on Linux

2009-04-18 Thread Kenny x
Hello, I use Ubuntu 8.10 and the latest version of Python.

I started programming wxPython on my Windows computer,

but now I have access to my ubuntu box, and want wxPython for 2.6

All the debs in the package manager are for 2.5, not 2.6

How can I Install wxPython for Python 2.6 without building from the source?

Any help appreciated, I need this solved! :)
--
http://mail.python.org/mailman/listinfo/python-list


wxPython 2.8 for Python 2.6

2009-04-19 Thread Kenny x
I hate building from the source.

Especially when wxPython has all these flags and I don't know what they
mean.

Is there any way?

I hate building from the source, and want to use Python 2.6 with wxPython
2.8
--
http://mail.python.org/mailman/listinfo/python-list


Re: Help with my program

2009-10-22 Thread Kenny Shen
Hi tanner,

I suppose the following is possible:

class A:
  def __init__(self):
  self.height = 1
  self.weight = 7
  self.name = "tanner"
  self.grade = "A"
  def getinfo(self):
  info = []
  info.append(self.name)
  info.append(self.weight)
  info.append(self.height)
  info.append(self.grade)
  return info

class B:
  def __init__(self, a):
  self.info = a.getinfo()
  print self.info

a = A()
b = B(a)


Thanks,
Kenny

On Fri, Oct 23, 2009 at 9:59 AM, tanner barnes wrote:

>  Ok so im in need of some help! I have a program with 2 classes and in one
> 4 variables are created (their name, height, weight, and grade). What im
> trying to make happen is to get the variables from the first class and use
> them in the second class.
>
> --
> Windows 7: It helps you do more. Explore Windows 
> 7.<http://www.microsoft.com/Windows/windows-7/default.aspx?ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_evergreen3:102009>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
>


-- 
-
"A mental model is good. I change mine all the time."
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Help with my program

2009-10-22 Thread Kenny Shen
Indeed,

thanks for reminding me of that. The following should suffice:

class A:
  def __init__(self):
  self.height = 1
  self.weight = 7
  self.name = "tanner"
  self.grade = "A"

class B:
  def __init__(self, a):
  self.info = [a.height, a.weight, a.name, a.grade]
  print self.info

a = A()
b = B(a)

On Fri, Oct 23, 2009 at 1:10 PM, Chris Rebert  wrote:

> Python is not Java. Accessor methods are unnecessary and unidiomatic.
> Just access the attributes directly.
> For more on Python not being Java, see:
> http://dirtsimple.org/2004/12/python-is-not-java.html
>
> Cheers,
> Chris
> --
> http://blog.rebertia.com
>
>
> On Thu, Oct 22, 2009 at 10:07 PM, VYAS ASHISH M-NTB837
>  wrote:
> > So What is stopping you to do this? Make some methods getName,
> getHeight...
> > and call classObj.getName() etc from other class.
> >
> > Ashish
> > 
> > From: python-list-bounces+ntb837=motorola@python.org
> > [mailto:python-list-bounces+ntb837 =
> motorola@python.org] On Behalf Of
> > tanner barnes
> > Sent: Friday, October 23, 2009 7:30 AM
> > To: python-h...@python.org; python-list@python.org; tu...@python.org
> > Subject: Help with my program
> >
> > Ok so im in need of some help! I have a program with 2 classes and in one
> 4
> > variables are created (their name, height, weight, and grade). What im
> > trying to make happen is to get the variables from the first class and
> use
> > them in the second class.
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
-
"A mental model is good. I change mine all the time."
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: plac, the easiest command line arguments parser in the world

2010-06-04 Thread Kenny Meyer
On Jun 2, 12:37 am, Michele Simionato 
wrote:
> I would like to announce to the world the first public release of
> plac:
>
>  http://pypi.python.org/pypi/plac
>
> Plac is a wrapper over argparse and works in all versions of
> Python starting from Python 2.3 up to Python 3.1.
>
> With blatant immodesty, plac claims to be the easiest to use command
> line arguments parser module in the Python world. Its goal is to
> reduce the
> learning curve of argparse from hours to minutes. It does so by
> removing the need to build a command line arguments parser by hand:
> actually it is smart enough to infer the parser from function
> annotations.
>
> Here is a simple example (in Python 3) to wet your appetite:
>
> $ cat example.py
> def main(arg: "required argument"):
>     "do something with arg"
>     print('Got %s' % arg)
>
> if __name__ == '__main__':
>     import plac; plac.call(main) # passes sys.argv[1:] to main
>
> $ python example.py -h
> usage: example.py [-h] arg
>
> do something with arg
>
> positional arguments:
>   arg         required argument
>
> optional arguments:
>   -h, --help  show this help message and exit
>
> $ python example.py
> usage: example.py [-h] arg
> example.py: error: too few arguments
>
> $  python example.py arg
> Got arg
>
> $  python example.py arg1 arg2
> usage: example.py [-h] arg
> example.py: error: unrecognized arguments: arg2
>
> You can find in the documentation a lot of other simple and not so
> simple
> examples:
>
>  http://micheles.googlecode.com/hg/plac/doc/plac.html
>
> Enjoy!
>
>              Michele Simionato
>
> P.S. answering an unspoken question: yes, we really needed yet
> another
> command line arguments parser! ;)

I like this approach to command-line argument parsing! Thanks for
sharing your work.
-- 
http://mail.python.org/mailman/listinfo/python-list


Check if a command is valid

2010-07-12 Thread Kenny Meyer
Hello,

I have to figure out if a string is callable on a Linux system. I'm
actually doing this:

def is_valid_command(command):
retcode = 100 # initialize
if command:
retcode = subprocess.call(command, shell=True)
if retcode is 0:
print "Valid command."
else:
print "Looks not so good..."

is_valid_command("ls")

Never mind the code, because this is not the original.
The side effect of subprocess.call() is that it *actually* executes
it, but I just need the return code. What are better ways of doing
this?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Check if a command is valid

2010-07-13 Thread Kenny Meyer
Chris Rebert (c...@rebertia.com) wrote:
> On Mon, Jul 12, 2010 at 6:29 PM, Kenny Meyer  wrote:
> > Hello,
> >
> > I have to figure out if a string is callable on a Linux system. I'm
> 
> "callable" seems vague. Is a command string with invalid arguments but
> a valid executable "callable"? If no, then there's no general way to
> test "callability" without actually running the command.

I'm glad you pointed that out, because you're right.  I subconciously
meant a file that is in the $PATH.

[snip]
> 
> Well, you're not gonna be able to get the command's return code
> without actually running it (unless perhaps you're referring to a
> return code from the shell itself?).
> 
> > What are better ways of doing this?
> 
> One idea:
> 
> from shlex import split as shell_tokenize
> from subprocess import check_output
> 
> def is_valid_command(command):
> try:
> executable = shell_tokenize(command)[0]
> except (ValueError, IndexError):# invalid shell syntax
> return False
> return bool(check_output(['which', executable]))# on the PATH?
>
I have tried this and found some unexpected issues with Python 2.6 which I
though I should point out:

Firstly, the function `check_output` in the `subprocess` module only comes with
Python 2.7, but I have found a similar function called `check_call` [1] which
seems is similar, but not the same.

[1] http://docs.python.org/library/subprocess.html#subprocess.check_call

The code now looks like this:

from shlex import split as shell_tokenize
from subprocess import check_call, CalledProcessError

def is_valid_command(command):
try:
executable = shell_tokenize(command)[0]
check_call(['which', executable]) # Raises CalledProcessError if

  # something went wrong
return True  
except (ValueError, IndexError, CalledProcessError): # Catch exception if 
there

     # was an error calling the process
return False

The idea with `which` is really great one.

Thanks a lot, for your time and your input.

-- 
Onward and upwards,
Kenny Meyer


signature.asc
Description: Digital signature
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Check if a command is valid

2010-07-14 Thread Kenny Meyer
On Jul 13, 4:14 pm, Hans Mulder  wrote:
> Chris Rebert wrote:
> > `where` seems to be a zsh built-in:
> > $ # I'm in UR bash
> > $ nonexistent
> > -bash: nonexistent: command not found
> > $ where bash
> > -bash: where: command not found
>
> > And not everyone has zsh installed, so...
> > I don't see why one shouldn't use the standard `which` *nix command instead.
>
> Because `which` ia a C shell script.  It reads your .cshrc, to see which
> aliases would be defined if you were to use the C shell, but it doesn't
> look at your .bashrc.
>
> You're probably better off using `type`: it knows about built-ins and
> shell functions and that sort of stuff:
>
> $ which type
> /usr/bin/type
> $ type type
> type is a shell builtin
> $
>
> Guess which answer is more relevant to you .
>
> HTH,
>
> -- HansM

Oh thanks, Hans! `type` seems to a good alternative. Surely it can
also get the job (better) done.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: cscope like source code navigation for python code

2010-08-08 Thread Kenny Meyer
Gelonida (gelon...@gmail.com) wrote:
> Hi Thomas,
> 
> On 08/08/2010 01:27 PM, Thomas Jollans wrote:
> > On 08/07/2010 07:53 PM, Gelonida wrote:
> >> Hi,
> >>
> >> I'm using g?vim and its c-scope plugin for browsing C-code.
> >>
> >> What would be a good way of navigating larger python projects with vim?
> >>
> >>
> >> thanks for any suggestions
> >>
> > 
> > 
> > http://pypi.python.org/pypi/pycscope/0.2
> > 
> > Looks like an option
> 
> Yes it looks like an option.
> Unfortunately it is from 2006 and reported (and aborted) on a syntax
> error of one of my files.
> 
> My file is running and passes pylint / pychecker.
> 
> So I'm afraid, that the code might be outdated.
> I'll investigte perhaps a little more.

I wonder if you have seen the new version:

http://pypi.python.org/pypi/pycscope/0.3

-- 
Onward and upwards,  .O.
Kenny Meyer  ..O
:wq  OOO


signature.asc
Description: Digital signature
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: formatted input

2010-09-07 Thread Kenny Meyer
Bob (roberto.pagli...@gmail.com) wrote:
> Hi All,
> I have another question about formatted input. Suppose I am reading a
> text file, and that I want it to be something like this
> 
> word11 = num11, word12 = num12, word13 = num13 etc...
> word21 = num21, word22 = num12, word23 = num23 etc...
> etc...
> 
> where wordx1 belongs to a certain dictionary of words, say dic1, while
> wordx2 belongs to dic2, the numbers within some range and so on. I was
> wondering if there is something in the standard library I may use to
> check whether the file I am reading has a correct syntax according to
> my rules/dictionaries instead of implementing my own routine that
> would look like

Python's `re` module

> (pseudocode)
> for each line
>   put words into a list
>   check condition for each word

import re

match_1 = re.compile("^words1")
match_2 = re.compile("^words2")

# Return a match object each
re.match(match_1, "word11")
re.match(match_2, "word21")


I'm sure there are might be other ways to do the same thing.

-- 
- Kenny Meyer 
To understand recursion, we must first understand recursion.
--
-- 
http://mail.python.org/mailman/listinfo/python-list