Re: The way to develope a graphical application to manage a Postgres database

2012-08-02 Thread Verde Denim
Sounds like you have enough pieces-parts... is it a question of the
development process?
On Aug 2, 2012 3:08 PM, "Csanyi Pal"  wrote:

> Hi,
>
> I'm new to python.
>
> I'm searching for a way to develope a Python graphical application for a
> Postgresql database.
>
> I have installed on my Debian GNU/Linux testing/sid system many python
> packages, among others:
> eric, geany, idle, ninja-ide, pida (it doesn't work here), python2.7,
> python-easygui, python-forgetsql, python-gasp, python-glade2,
> python-gobject-2, python-gtk2, python-pip, python-pygresql,
> python-pyside.qtsql, python-subversion, python-tk, python-wxglade,
> spyder, python3-psycopg2, python-psycopg2, XRCed.
>
> I did search in the Google but can't find any good tutorial except for
> wxpython tutorial: http://wiki.wxpython.org/FrontPage,
> wxGlade tutorial: http://wiki.wxpython.org/WxGladeTutorial
>
> There is a tutorial for using python-psycopg2 here:
> http://wiki.postgresql.org/wiki/Psycopg2_Tutorial
>
> Still I don't know how to put these all together?
>
> XRCed is the most interesting way for me.
>
> Can one advices me where to go?
>
> --
> Regards from Pal
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list


loops

2012-12-02 Thread Verde Denim
I'm just getting into py coding, and have come across an oddity in a py
book - while loops that don't work as expected...

import random

MIN = 1
MAX = 6

def main():
again = 'y'

while again == 'y':
print('Rolling...')
print('Values are: ')
print(random.randint(MIN, MAX))
print(random.randint(MIN, MAX))

again = input('Roll again? (y = yes): ')

main()

Produces -
python dice_roll.py
Rolling...
Values are:
5
4
Roll again? (y = yes): y
Traceback (most recent call last):
  File "dice_roll.py", line 17, in 
main()
  File "dice_roll.py", line 15, in main
again = input('Roll again? (y = yes): ')
  File "", line 1, in 
NameError: name 'y' is not defined

This same loop structure appears in many places in this book "Starting
out with Python, 2nd ed, Tony Gaddis), and they all yield the same
error. Is there something I'm missing here?

Thanks for the input...
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: loops

2012-12-02 Thread Verde Denim
On 12/02/2012 04:43 PM, Mitya Sirenef wrote:
> On 12/02/2012 04:39 PM, Verde Denim wrote:
>> I'm just getting into py coding, and have come across an oddity in a py
>> book - while loops that don't work as expected...
>>
>> import random
>>
>> MIN = 1
>> MAX = 6
>>
>> def main():
>>  again = 'y'
>>
>>  while again == 'y':
>>  print('Rolling...')
>>  print('Values are: ')
>>  print(random.randint(MIN, MAX))
>>  print(random.randint(MIN, MAX))
>>
>>  again = input('Roll again? (y = yes): ')
>>
>> main()
>>
>> Produces -
>> python dice_roll.py
>> Rolling...
>> Values are:
>> 5
>> 4
>> Roll again? (y = yes): y
>> Traceback (most recent call last):
>>File "dice_roll.py", line 17, in 
>>  main()
>>File "dice_roll.py", line 15, in main
>>  again = input('Roll again? (y = yes): ')
>>File "", line 1, in 
>> NameError: name 'y' is not defined
>>
>> This same loop structure appears in many places in this book "Starting
>> out with Python, 2nd ed, Tony Gaddis), and they all yield the same
>> error. Is there something I'm missing here?
>>
>> Thanks for the input...
> 
> I believe that should be raw_input, not input . input() evaluates user's
> input
> in local scope.  -m

m
Nicely done! That fixed it! Is that a version feature or should I take
what I find in these books with a grain of salt?

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


running gui py script

2012-12-26 Thread Verde Denim
I'm learning py in this environment -
PyCrust 0.9.5 - The Flakiest Python Shell
Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48)
[GCC 4.4.5] on linux2

When I type a tkinter program in pycrust (or pyshell), it executes as
expected, but when I call it from a command line, it doesn't. What I'm
getting back is this -

python my_first_gui_in_py.py
Traceback (most recent call last):
  File "my_first_gui_in_py.py", line 2, in 
class myapp_tk(Tkinter.Tk):
  File "my_first_gui_in_py.py", line 14, in myapp_tk
app = myapp_tk(None)
NameError: name 'myapp_tk' is not defined

Trying to call the file in pycrust doesn't seem to work for me either.
If I invoke pycrust either as
$ pycrust ./my_first_gui_in_py.py or
$ pycrust < ./my_first_gui_in_py.py

the editor opens, but with an empty buffer.

What is it that I'm not understanding?

Thanks, as always for the help.
-- 
http://mail.python.org/mailman/listinfo/python-list


learning curve

2012-12-27 Thread Verde Denim
Just getting into Py coding and not understanding why this code doesn't
seem to do anything -

# File: dialog2.py
import dialog_handler

class MyDialog(dialog_handler.Dialog):
def body(self, master):
Label(master, text="First:").grid(row=0)
Label(master, text="Second:").grid(row=1)
self.e1 = Entry(master)
self.e2 = Entry(master)
self.e1.grid(row=0, column=1)
self.e2.grid(row=1, column=1)
return self.e1 # initial focus

def apply(self):
first = string.atoi(self.e1.get())
second = string.atoi(self.e2.get())
print first, second # or something

# File: dialog_handler.py

from Tkinter import *
import os

class Dialog(Toplevel):

def __init__(self, parent, title = None):
Toplevel.__init__(self, parent)
self.transient(parent)

if title:
self.title(title)
self.parent = parent
self.result = None
body = Frame(self)
self.initial_focus = self.body(body)
body.pack(padx=5, pady=5)
self.buttonbox()
self.grab_set()

if not self.initial_focus:
self.initial_focus = self

self.protocol("WM_DELETE_WINDOW", self.cancel)
self.geometry("+%d+%d" % (parent.winfo_rootx()+50,
  parent.winfo_rooty()+50))
self.initial_focus.focus_set()
self.wait_window(self)

#
# construction hooks
def body(self, master):
# create dialog body.  return widget that should have
# initial focus.  this method should be overridden
pass

def buttonbox(self):
# add standard button box. override if you don't want the
# standard buttons
box = Frame(self)

w = Button(box, text="OK", width=10, command=self.ok,
   default=ACTIVE)
w.pack(side=LEFT, padx=5, pady=5)
w = Button(box, text="Cancel", width=10,
   command=self.cancel)
w.pack(side=LEFT, padx=5, pady=5)

self.bind("", self.ok)
self.bind("", self.cancel)

box.pack()

#
# standard button semantics
def ok(self, event=None):
if not self.validate():
self.initial_focus.focus_set() # put focus back
return
self.withdraw()
self.update_idletasks()
self.apply()
self.cancel()

def cancel(self, event=None):
# put focus back to the parent window
self.parent.focus_set()
self.destroy()

#
# command hooks
def validate(self):
return 1 # override

def apply(self):
pass # override
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: learning curve

2012-12-28 Thread Verde Denim
On 12/27/2012 09:32 PM, alex23 wrote:
> On Dec 28, 11:20 am, Verde Denim  wrote:
>> Just getting into Py coding and not understanding why this code doesn't
>> seem to do anything -
> 
> Is that the sum total of your code? You're not showing any
> instantiation of your classes.
Yes, as a matter of fact, it is the example verbatim from the tutorial
pages that I found. Apparently, it isn't the best example... Thanks for
the heads up.
-- 
http://mail.python.org/mailman/listinfo/python-list


import of ttk

2013-01-04 Thread Verde Denim
In reading through one of the learning articles, I have a bit of code
that imports ttk, but I apparently don't have this installed. I've
looked up the svn checkout for python-tk, and have checked it out
(read-only), but still get the same error. I'm running 2.6.6 python, if
that helps. The article I'm looking at is here -
http://www.zetcode.com/gui/tkinter/introduction/

Any input is appreciated.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: import of ttk

2013-01-05 Thread Verde Denim
On 01/04/2013 11:39 PM, Terry Reedy wrote:
> On 1/4/2013 11:02 PM, Verde Denim wrote:
>> In reading through one of the learning articles, I have a bit of code
>> that imports ttk, but I apparently don't have this installed. I've
>> looked up the svn checkout for python-tk, and have checked it out
>> (read-only), but still get the same error. I'm running 2.6.6 python, if
>> that helps.
> 
> Show the line of code that did not work and the traceback. What system
> are you running on and what tcl/tk installation does it have? ttk is
> included with any 8.5 installation. tile is often included with 8.4
> installations and should be picked up as well.
> 
>  The article I'm looking at is here -
>> http://www.zetcode.com/gui/tkinter/introduction/
> 
> 
The line is -
16 from ttk import Frame, Button, Style

$ python tkinter_tut1.py
Traceback (most recent call last):
  File "tkinter_tut1.py", line 16, in 
from ttk import Frame, Button, Style
ImportError: No module named ttk

I'm running on Debian Squeeze, and do show both 8.4 and 8.5 of tcl
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: network protocols

2012-06-13 Thread Verde Denim
On 6/13/12, John Sutterfield  wrote:
>
> Tarek,
>
> There doesn't appear to be a function in stdlib to cover that particular
> case.
>
> Doug Hellman has a nice section on finding service info here:
>
> http://www.doughellmann.com/PyMOTW/socket/addressing.html
>
> It wouldn't be "built-in", but it looks like it would be pretty simple to
> get the info you need.
>
> Best regards,
>
> JS
>
JS
Very nice link! Great information here.

-- Jack

>> Date: Wed, 13 Jun 2012 13:41:25 +0200
>> From: ta...@ziade.org
>> To: python-list@python.org
>> Subject: network protocols
>>
>> Hey
>>
>> I was surprised not to find any way to list all protocol names listed in
>> /etc/protocols in Python
>>
>> We have
>>
>> socket.getprotobyname(NAME)
>>
>> But there's no way to get the list of names
>>
>> Any ideas if this is available in the stdlib somehwere ?
>>
>> Thx
>> Tarek
>> --
>> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Looking for Coders or Testers for an Open Source File Organizer

2011-06-15 Thread Verde Denim
I'm interested in helping out, but I'm also curious to know how this
application will differentiate itself from those already in development
(i.e. more robust feature set, tighter functionality, better security, or
just because it is developed in Py)?

Regards
Jack

On Wed, Jun 15, 2011 at 10:53 AM, Zach Dziura  wrote:

> Also, can I be added to the project? Email is zcdzi...@gmail.com
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list


smtp

2011-08-08 Thread Verde Denim
I'm working on learning various aspects of Py coding, and happened to review
the smtplib docs this morning.
I entered the sample code from
http://www.python.org/doc//current/library/smtplib.html

import smtplib
def prompt(prompt):
return raw_input(prompt).strip()
fromaddr = prompt("From: ")toaddrs  = prompt("To: ").split()print
"Enter message, end with ^D (Unix) or ^Z (Windows):"
# Add the From: and To: headers at the start!msg = ("From: %s\r\nTo: %s\r\n\r\n"
   % (fromaddr, ", ".join(toaddrs)))while 1:
try:
line = raw_input()
except EOFError:
break
if not line:
break
msg = msg + line
print "Message length is " + repr(len(msg))
server = 
smtplib.SMTP('localhost')server.set_debuglevel(1)server.sendmail(fromaddr,
toaddrs, msg)server.quit()

and it returns -
"TypeError" with no other information...
It appears to be generated from the line

msg = ("From: %s\r\nTo: %s\r\n\r\n"
   % (fromaddr, ", ".join(toaddrs)))

But I'm not sure why...

Any input is appreciated.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: smtp

2011-08-08 Thread Verde Denim
On Mon, Aug 8, 2011 at 12:26 PM, Chris Angelico  wrote:

> On Mon, Aug 8, 2011 at 5:08 PM, Verde Denim  wrote:
> > and it returns -
> > "TypeError" with no other information...
> > It appears to be generated from the line
> >
> > msg = ("From: %s\r\nTo: %s\r\n\r\n"
> >% (fromaddr, ", ".join(toaddrs)))
> >
> > But I'm not sure why...
> >
>
> I transcribed pieces manually from your code into Python 2.4.5 and
> didn't get an error. What did you enter at the From: and To: prompts?
>
>
I'm running 2.6.5 on a debian base...
It didn't seem to matter what is input -
I tried using a single recipient as well as multiples (separated by comma).

Output appears as -
# python send_my_msg.py
From: m...@me.com
To: y...@you.com
Enter Message, end with ^D:
Traceback (most recent call last):
  File "send_my_msg.py", line 12, in 
 % (fromaddr, ", ".join(toaddr)))
TypeError


> As a side point: Does anyone else feel that it's potentially confusing
> to have a function whose parameter has the same name as the function
> itself? This is straight from the example.
>
> ChrisA
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list


dpkg

2011-08-26 Thread Verde Denim
I downloaded cx_oracle for installation to Ubuntu 11.04 64bit this morning,
and the alien and dpkg operations worked fine,
but on testing the import, the error msg shows that the oracle client lib is
missing. I found a thread that mentioned installing the
oracle instant client on 11.04 to resolve this, and alien and dpkg worked
fine.

Yet, when I go into python (runing 2.7) and import cx_Oracle, I get
"ImportError: libclntsh.so.11.1: cannot open shared object file: No such
file or directory.

Looking for this with find / -name libclntsh.so.11.1 -print produces
/usr/lib/oracle/11.2/client64/lib/libclntsh.so.11.1

I'm confused as to why Python doesn't see it...
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: dpkg

2011-08-26 Thread Verde Denim
On Fri, Aug 26, 2011 at 11:17 AM, Ken Watford  wrote:

> On Fri, Aug 26, 2011 at 10:43 AM, Verde Denim  wrote:
> > Looking for this with find / -name libclntsh.so.11.1 -print produces
> > /usr/lib/oracle/11.2/client64/lib/libclntsh.so.11.1
> >
> > I'm confused as to why Python doesn't see it...
>
> Try running "sudo ldconfig".
>

That was the missing link - thanks! works fine now.
-- 
http://mail.python.org/mailman/listinfo/python-list


n00b formatting

2011-02-24 Thread Verde Denim
hi, all
i can't believe i don't see this, but
python from the command line:
>>> x = '0D'
>>> y = '0x' + x
>>> print "%d" % int(y,0)
13

content of testme.py:
x = '0D'
y = '0x' + x
print "%d" % int(y,0)
TypeError: 'int' object is not callable

what am i not seeing here??
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: n00b formatting

2011-02-24 Thread Verde Denim
On Thu, Feb 24, 2011 at 12:49 PM, MRAB  wrote:

> On 24/02/2011 16:41, Verde Denim wrote:
>
>> hi, all
>> i can't believe i don't see this, but
>> python from the command line:
>>  >>> x = '0D'
>>  >>> y = '0x' + x
>>  >>> print "%d" % int(y,0)
>> 13
>>
>> content of testme.py:
>> x = '0D'
>> y = '0x' + x
>> print "%d" % int(y,0)
>> TypeError: 'int' object is not callable
>>
>> what am i not seeing here??
>>
>>  I can only assume that at some point you assigned an int to 'int'.
>

To put this in context, here is the code -
#!/usr/bin/env python

from scapy.all import *
from binascii import hexlify
import sys, re, pprint

class C12Pcap:

__acse_pdu_open = []  # 1-byte indicating start of packet
__acse_pdu_len = []   # 1-byte indicating the length of the packet
__asn1_called_ident_type = []   # 1-byte indicating universal identifier
__asn1_called_ident_length = []   # 1-byte indicating the length of this
identifier

def __init__(self, pcap=None, portno=0):
self.__pcap = pcap
self.__portno = portno
self.__pcktList = []

def __action(self):
if self.__pcap:
self.__rdpcap()
self.__dump()
return

def __rdpcap(self):
self.__pcktList = rdpcap(self.__pcap)
return

def __dump(self):
x = int = 0
z = int = -1
for pckt in self.__pcktList: # for each packet
z += 1   # debug a smaller subset...
if z == 50: break # debug a smaller subset...
layers = []  # a list of the layers' classes
layerDicts = []  # a list of each layer's fields and
values
cltype = pckt.__class__
cl = pckt
flds = cl.__dict__['fields']
while 1:
#   walk down the layers until no payload
layers.append(cltype)
layerDicts.append(flds)
cltype = cl.__dict__['payload'].__class__
cl =  cl.__dict__['payload']
flds = cl.__dict__['fields']

# if tcp, we'll guess at req/resp and if psh is on (for now)
if re.search('TCP', str(cltype)):
i = 0
for key, value in flds.items():
if key == 'flags' and long(value) == 24:   #
PUSH,ACK
i = 1
if i == 1 and key == 'dport' and str(value) ==
str(portno):
pktType = 'REQUEST'
if i == 1 and key == 'sport' and str(value) ==
str(portno):
pktType = 'RESPONSE'

# Do we have a Raw packet - the interesting ones for us
if re.search('Raw', str(cltype)):
h = hexlify(flds['load'])   # hex representation of
payload
self.__acse_pdu_open = h[0:2]
self.__acse_pdu_len = h[2:4]
self.__asn1_called_ident_type = h[4:6]
self.__asn1_called_ident_length = '0x' + h[6:8]
print self.__asn1_called_ident_length # WORKS FINE
print "%d" % (int(self.__asn1_called_ident_length,0)) #
FAILS WITH:
#TypeError: 'int' object is not callable
#File "/home/Scripts/Py/Elster_Lab/strip_raw_data1.py", line 103, in

  #inst.run(pcap,portno)
#File "/home/Scripts/Py/Elster_Lab/strip_raw_data1.py", line 92, in run
  #self.__action()
#File "/home/Scripts/Py/Elster_Lab/strip_raw_data1.py", line 41, in __action
  #self.__dump()
#File "/home/Scripts/Py/Elster_Lab/strip_raw_data1.py", line 86, in __dump
  #print "%d" % (int(self.__asn1_called_ident_length,0))

if 'NoPayload' in str(cltype): break

def run(self,pcap,portno):
self.__pcap = pcap
self.__portno = portno
self.__action()

def main():

return 0

if __name__ == '__main__':
inst = C12Pcap()
argl = sys.argv
pcap = argl[1]
portno = argl[2]
inst.run(pcap,portno)
main()
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: n00b formatting

2011-02-24 Thread Verde Denim
On Thu, Feb 24, 2011 at 12:23 PM, Chris Rebert  wrote:

> On Thu, Feb 24, 2011 at 8:41 AM, Verde Denim  wrote:
> > hi, all
> > i can't believe i don't see this, but
> > python from the command line:
> >>>> x = '0D'
> >>>> y = '0x' + x
> >>>> print "%d" % int(y,0)
> > 13
> >
> > content of testme.py:
>
> Is this the *entire* contents of the file? I suspect not, and that
> somewhere in it you assign to `int` as a variable, which should not be
> done since it's the name of the built-in type.
>
> > x = '0D'
> > y = '0x' + x
> > print "%d" % int(y,0)
> > TypeError: 'int' object is not callable
> >
> > what am i not seeing here??
>
> Please include the full exception Traceback.
> Also, add:
>
> print type(int), int
>
> just before the existing `print`.
>
> Cheers,
> Chris
>

Found it... I can't believe I did this in the code...
x = int = 0 ... Clobbered 'int' ...
i hate n00b mistakes.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python Tools for Visual Studio from Microsoft - Free & Open Source

2011-03-10 Thread Verde Denim
On Thu, Mar 10, 2011 at 12:54 AM, roland garros
wrote:

>
> FYI...
>
> http://pytools.codeplex.com
>
> Enjoy!
> --
> http://mail.python.org/mailman/listinfo/python-list
>

There goes the neighborhood...:P
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Can you advice a Python library to query a lan subnet with SNMP and collect MAC addresses of nodes?

2011-04-15 Thread Verde Denim
On Fri, Apr 15, 2011 at 5:00 AM, Aldo Ceccarelli
wrote:

> Hello All,
> in my specific problem I will be happy of a response where possible
> to:
>
> 1. distinguish different operating systems of answering nodes
> 2. collect responses of Wyse thin-clients with "Thin OS" to get node
> name and MAC address in particular
>
> Thanks a lot in advance for any sharing / forward to documentation,
> products in the area.
>
> KR Aldo
> --
> http://mail.python.org/mailman/listinfo/python-list
>

Aldo
If you haven't already, have a look at dpkt and scapy as well. Both good
tools to have for tasks such as these.

Regards

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


Re: Python IDE/text-editor

2011-04-16 Thread Verde Denim
On Sat, Apr 16, 2011 at 10:39 AM, craf  wrote:

> Look this:
>
> http://portableapps.com/apps/development/geany_portable
>
>
> Regards.
>
> Cristian
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>

All good suggestions. I think it may depend on the level of expertise you're
at. WingIDE is my preferred choice since it offers a lot of help in
developing Py, has a solid debugger, and is available across platforms. But
I'm a novice Py coder. If you're already strong in the coding sense, vi is
my editor of choice, which I use for other languages that I'm intimately
familiar with. Wiki has a pretty good comparison of Py coding editors/IDEs
(wiki search Python development tools). Like many other things Linux, it's
all about choice.

Being a non-free IDE is not a major drawback to Wing (imo). Price is decent,
support is excellent, and upgrades are included through major versions (4
just came out recently). There's also a sizeable community of people using
it. I don't know a whole lot about the company, but it may be one person.
Seems every time I've called I've spoken to same person - not too easy to
understand, but he is very helpful and seems to really know his way around
the tool.

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


Re: Kind of OT - Books on software development?

2011-05-25 Thread Verde Denim
Hey everyone,
I am looking at some projects coming up, which may or may not involve
python. So I figured I would throw the question out there and see what
everyone thinks.
I am looking for some books on software engineering/development...
something that discusses techniques from ideation, up through testing,
QA, production, and then maintenance. Is there such a book?
-Matthew

On Wed, May 25, 2011 at 11:45 AM, Ed Keith  wrote:

> I do not have my library with me, but I remember a book that fits the bill
> exactly, is was from Microsoft Press, I think it was called "Writing Solid
> Code"
>

Matt -

Roger Pressman - Software Engineering, A Practicioner's Approach is a good
one.
Donald E. Knuth. - The Art of Computer Programming (5 Volumes) -
http://www-cs-faculty.stanford.edu/~uno/taocp.html
Horowitz - Fundamentals of Computer Algorithms
Dowd, Macdonald, Shuh - The Art of Software Security Assessments

Good Basic Reference Library for engineering, designing, writing, and
SECURING code. I've got lots more titles on various aspects of engineering
and OOA/OOD construction, design methods, etc., but these are (imo) a good
foundation.

Regards

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


Re: Need reviews for my book on introductory python

2017-01-26 Thread Verde Denim
You would like us to volunteer to "review" your book that you'd like us 
to buy from you and that has already been published and used as a 
curriculum guide... If you'd like it reviewed by the Py community, how 
about making it available to us and allow us to edit it or suggest 
changes as needed? This, of course, would be for no-charge as we are 
using our time and resources to review your publication at no  cost to 
you. Thanks.



On 1/25/2017 9:25 PM, Sandeep Nagar wrote:

Hi,

A few month ago I wrote a book on introductory python based on my experinces 
while teaching python to Bachelor students of engineering. It is now available 
in e-book and paperback format at Amazon.

https://www.amazon.com/dp/1520153686

The book is written for beginners of python programming language and written in 
learn-by-doing manner. If some group members can review the same, it will be 
useful for myself to come up with an improved version.

Other similar books of mine are based on Octave and Scilab with following links:

https://www.amazon.com/dp/152015111X (Scilab)

https://www.amazon.com/dp/1520158106 (Octave)

If you are interested in open source computing, please have a look.

Also please do share the link for print books with your colleagues at other 
universities and recommend them for libraries and researchers, if you feel that 
they can be helpful to them.

Regards

Sandeep



---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

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


Odd msg received from list

2013-11-14 Thread Verde Denim
I got an odd message this morning from the list telling me that my
account was de-activated due to excessive bounces. I've only sent a
handful of messages to this board, but do read an awful lot of the posts
in order to learn more about the language. The message also listed my
account password, which I found odd. Has anyone else received a message
like this?

-- 
Regards

Jack
Boston Tea Party, Coercive Acts, Powder Alarm, Revolution
Lessons (Mistakes) not learned are bound to be repeated.

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


Re: Odd msg received from list

2013-11-16 Thread Verde Denim
Chris
Yes, I mean precisely that. The password was sent to me in the body of
the message in plaintext. That is what has me very concerned about the
list and its ability to protect private information.

Regards

Jack

On 11/15/2013 02:48 PM, Chris “Kwpolska” Warrick wrote:
> On Fri, Nov 15, 2013 at 12:30 AM, Gregory Ewing
>  wrote:
>> Verde Denim wrote:
>>> The message also listed my
>>> account password, which I found odd.
>>
>> You mean the message contained your actual password,
>> in plain text? That's not just odd, it's rather worrying
>> for at least two reasons. First, what business does a
>> message like that have carrying a password, and second,
>> it means the server must be keeping passwords in a
>> readable form somewhere, which is a really bad idea.
> From the info page at https://mail.python.org/mailman/listinfo/python-list:
>
>> You may enter a privacy password below. This provides only mild
>> security, but should prevent others from messing with your
>> subscription. **Do not use a valuable password** as it will
>> occasionally be emailed back to you in cleartext.
>> If you choose not to enter a password, one will be automatically
>> generated for you, and it will be sent to you once you've confirmed
>> your subscription.  You can always request a mail-back of your
>> password when you edit your personal options. Once a month, your
>> password will be emailed to you as a reminder.


-- 
Regards

Jack
Boston Tea Party, Coercive Acts, Powder Alarm, Revolution
Lessons (Mistakes) not learned are bound to be repeated.

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


Re: Odd msg received from list

2013-11-16 Thread Verde Denim
On 11/16/2013 08:18 PM, Chris Angelico wrote:
> On Sun, Nov 17, 2013 at 12:15 PM, Verde Denim  wrote:
>> Chris
>> Yes, I mean precisely that. The password was sent to me in the body of
>> the message in plaintext. That is what has me very concerned about the
>> list and its ability to protect private information.
> The list specifically told you not to use a valuable password :) In
> fact, a password is completely optional - it's just an alternative to
> always having to do a click-through.
>
> ChrisA
ChrisA
Each one of my accounts is completely different (and as random as I can
get them). Each one is also uniquely set to match a set of criteria of
my own choosing to indicate level of data, level of composite data,
level of integrity, level of criticality, and a few other 'soft values'.
This equates to each account being generated in a one-off fashion, so
I'm not worried that my list account here will ever show up somewhere
else in any other form. However, that doesn't mean that it doesn't
concern me that the list is publishing these values back to the list
participant(s) in plaintext. If I have to unsubscribe and then
re-subscribe without a pass-phrase I can do that but just wanted to make
the list admin(s) aware that it had occurred.

-- 
Regards

Jack
Boston Tea Party, Coercive Acts, Powder Alarm, Revolution
Lessons (Mistakes) not learned are bound to be repeated.

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


Re: Working with XML/XSD

2013-08-06 Thread Verde Denim
On 08/05/2013 06:56 PM, David Barroso wrote:
> Hello,
> I was wondering if someone could point me in the right direction. I
> would like to develop some scripts to manage Cisco routers and
> switches using XML. However, I am not sure where to start. Does
> someone have some experience working with XML, Schemas and things like
> that? Which libraries do you use? Do you know of any good tutorial?
>
> Thanks!
>
> David
>
>
W3C has a decent primer for XML (w3schools.com/xml/). I have a couple of
O'Reilly publications on the topic that are ok as well. There's a site
dedicated to the subject at xmlnews.org, and someone told me about a
course available at xmlmaster.org. I also found a short preso at
oreilly.com called the Eight Minute XML tutorial on automating system
administration so that's probably got some promise in the area you're
looking for.

hth

-- 
Regards

Jack
Boston Tea Party, Coercive Acts, Powder Alarm, Revolution
Lessons (Mistakes) not learned are bound to be repeated.

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


Py and SQL

2011-11-30 Thread Verde Denim
All
I have a sql script that I've included in a simple Py file that gives an
error in the SQL. The problem is that the SQL code executes correctly in a
database IDE environment (in this case ora developer). So, I'm concluding
that I'm doing something amiss in the Py code. Does anyone see why this
code would return a 'missing expression' sql error?
Essentially, the code should start, ask for a privilege, and then collect
the priv, role, and user data. Any input is appreciated.

#!/bin/bash
import time
import cx_Oracle

dbConn = cx_Oracle.connect('juser', 'pass', '1.2.3.4:/orcl:DEDICATED',
 cclass = "ABC", purity = cx_Oracle.ATTR_PURITY_SELF)

pStart = time.time()

dbVersion = dbConn.version.split(".")

majVer = dbVersion[0]

print "Oracle Version: %s" %(majVer)
print "Full Version: %s" %(dbConn.version)

dbCursor1 = dbConn.cursor()
dbCursor1.execute('select lpad(' ', 2*level) || c "Privilege, Roles and
Users" from ( select null p, name c from system_privilege_map where name
like upper(\'%&enter_privliege%\') union select granted_role p, grantee c
from dba_role_privs union select privilege p, grantee c from dba_sys_privs)
start with p is null connect by p = prior c')
dbRowResult = dbCursor1.fetchall()
for dbRow in dbRowResult:
print dbRow

dbCursor1.close()

pElapsed = (time.time() - pStart)

print pElapsed, " seconds"

dbConn.close()
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: I made a small reddit console feed with python last night

2013-02-13 Thread Verde Denim
On 02/13/2013 04:40 PM, Jared Wright wrote:
> If you would like to get a copy of it, instructions are here on Github
> 
> https://github.com/jawerty/AlienFeed
> 
What's a "reddit" console feed?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: LiClipse

2013-03-22 Thread Verde Denim
On 03/22/2013 04:26 PM, Wanderer wrote:
> I just updated PyDev and I got this message that they are looking for funding 
> for a new flavor of Eclipse called LiClipse. The description of what LiClipse 
> will be is kind of sketchy. No offense intended, but why? There is already a 
> bunch of downloads at Eclipse and there is also Easy Eclipse. The only reason 
> for a redesign of Eclipse, I would want would be change it from being Java 
> based. Oracle is losing money and I wonder what their next business model 
> will be for Java. Anyway, does anyone know what this LiClipse is all about?
>
> Thanks
Check this -
http://www.indiegogo.com/projects/pydev-and-liclipse-for-a-fast-sexy-and-dark-eclipse
described as a toolchain with plugins and a sleek UI for Eclipse; sounds
like a fork...

-- 
Regards

Jack
Boston Tea Party, Coercive Acts, Powder Alarm, Revolution
Lessons (mistakes) not learned are bound to be repeated.

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


dpkt

2010-11-18 Thread Verde Denim
Hi
I'm looking to find some help working with dpkt. As you probably know, there
really isn't any documentation, and not being astute at Python as of yet
leaves me with a lot of gaps.
Is there anyone here that can point me in a direction toward writing some
test code for parsing gre packets?

Thanks for the input; I appreciate the help.

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


Re: Which non SQL Database ?

2011-01-23 Thread Verde Denim
On Sun, Jan 23, 2011 at 3:19 PM, John Nagle  wrote:

> On 1/22/2011 10:15 PM, Deadly Dirk wrote:
>
>> On Sat, 04 Dec 2010 16:42:36 -0600, Jorge Biquez wrote:
>>
>>  Hello all.
>>>
>>> Newbie question. Sorry.
>>>
>>> As part of my process to learn python I am working on two personal
>>> applications. Both will do it fine with a simple structure of data
>>> stored in files. I now there are lot of databases around I can use but I
>>> would like to know yoor advice on what other options you would consider
>>> for the job (it is training so no pressure on performance).
>>>
>>
>For something like that, I'd suggest just using SQLite.  It comes
> with the Python distribution, it's well documented, and reasonably easy
> to use.
>
>The "NoSQL" stuff is mostly for people doing really big databases
> for large web sites.  The kind of operations where you have multiple
> data centers, thousands of rackmount servers, a huge traffic load,
> and smart people thinking about the implications of "eventually
> consistent".
>
>Google's BigTable and Facebook's Cassandra offer impressive
> performance at very large scale.  But they're way overkill for
> a desktop app.  Even the midrange systems, like CouchDB, are
> far too much machinery for a desktop app.
>
>John Nagle
>

This may sound a bit 'old school', but if it's a non-sql solution you're
after, what about c-isam ?
Data is indexed and stored in flat files. For a personal app that maintains
a small footprint, it's relative performance is acceptable. If the number of
entities and attributes rises above a handful, however, I would recommend
investing more thought in whether this is a permanent solution.

Regards

Jack

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


encoding

2011-02-14 Thread Verde Denim
All
I'm a bit new to py coding and need to setup some code to encode/decode base
128.
Anyone here have some info they can point me to do get this done? I've been
looking around on the web for a few days and can't seem to lay my hands on
anything definitive.
Thanks in advance for your help.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: encoding

2011-02-14 Thread Verde Denim
On Mon, Feb 14, 2011 at 12:35 PM, Ian Kelly  wrote:

> On Mon, Feb 14, 2011 at 10:10 AM, Verde Denim  wrote:
> > All
> > I'm a bit new to py coding and need to setup some code to encode/decode
> base
> > 128.
> > Anyone here have some info they can point me to do get this done? I've
> been
> > looking around on the web for a few days and can't seem to lay my hands
> on
> > anything definitive.
> > Thanks in advance for your help.
>
> First, why do you want to do this?  I ask because there is probably a
> better way to achieve what you want.  I'm not aware of a standard for
> "base 128", and it does not sound to me like something that would be
> very useful.
>
> Base 64 is commonly used as an encoding system because it fits inside
> the 94 printable characters of ASCII and is easily implemented.  It is
> also provided by the Python standard library.  Why not use this
> instead?
>
> Cheers,
> Ian
>

Ian
Thanks for the reply. The fact is that I don't _want_ to, but need to as a
part of a work project. If I had a choice, base 64 would be the way to go
since (as you point out), it's already in the standard library. If I could
take the encoded form and translate it to base 64 and then use the standard
library, that would work as well, but I'm not sure that there's a one-to-one
correlation there.

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


Re: encoding

2011-02-14 Thread Verde Denim
On Mon, Feb 14, 2011 at 12:46 PM, MRAB  wrote:

> On 14/02/2011 17:10, Verde Denim wrote:
>
>> All
>> I'm a bit new to py coding and need to setup some code to encode/decode
>> base 128.
>> Anyone here have some info they can point me to do get this done? I've
>> been looking around on the web for a few days and can't seem to lay my
>> hands on anything definitive.
>> Thanks in advance for your help.
>>
>>  http://en.wikipedia.org/wiki/LEB128
> --
>
> MRAB
Thanks for the reply. The link you sent will (hopefully) give me a starting
point. Do you know if there are particular implementations of base 128
encoding that differ from LEB?

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


Re: Suggested editor for wxPython on Ubuntu

2011-02-17 Thread Verde Denim
On Thu, Feb 17, 2011 at 1:27 PM, Cousin Stanley wrote:

>
> usenet.digi...@spamgourmet.com wrote:
>
> > Ok, I've decided that Boa Constructor is too buggy to be useful
> > under Ubuntu, so what would the team recommend for developing
> > Python projects with wxPython? Preferably with some GUI design
> capability?
>
>   perhaps  python-wxglade
>
>GUI designer written in Python with wxPython
>
>wxGlade is a GUI designer written in Python with the popular
>GUI toolkit wxPython, that helps you create wxWidgets/wxPython
>user interfaces. At the moment it can generate Python, C++ and
>XRC (wxWidgets' XML resources) code.
>
> Although I do use wx-glade, geany, pycrust, netbeans, gedit, and vi, I
found and purchased WingIDE a while back. For the cost, it has nearly
everything I've seen in Netbeans for Java. I believe a license is about
$80(USD) and is well worth the money (at least to me). Runs on win, lin, and
mac. The auto-complete and function/method/lib/package helpers are
invaluable to me since I haven't memorized everything within the python
libs.

- Jack

>
> --
> Stanley C. Kitching
> Human Being
> Phoenix, Arizona
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list


C12

2011-02-22 Thread Verde Denim
Anyone on the list have decent knowledge of C12 ? Please send me an email if
you've got knowledge in this area. Thanks.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Planning a Python Course for Beginners

2017-08-09 Thread Verde Denim


On 8/9/2017 9:25 AM, Marko Rauhamaa wrote:
> r...@zedat.fu-berlin.de (Stefan Ram):
>
>> Steve D'Aprano  writes:
>>> There's a word for frozen list: "tuple".
>>   Yes, but one should not forget that a tuple
>>   can contain mutable entries (such as lists).
> Not when used as keys:
>
> >>> hash(([], []))
> Traceback (most recent call last):
>   File "", line 1, in 
> TypeError: unhashable type: 'list'
>
>
> Marko
Hence the word 'can' and not 'will' or 'must' or 'shall' ...

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

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