I have installed python 2.6.4 on my windows7 laptop and MySQL dB.
Every time I try to import the module I get this error.
File "C:\Python26\lib\site-packages\MySQLdb\__init__.py", line 19, in
import _mysql
ImportError: DLL load failed: The specified module could not be found.
I ne
I am running cherrypy server but I am having some trouble with sessions
Where is my code
from cherrypy.lib import sessions
sess = sessions.Session()
x = sess.id
return x;
___
Tutor maillist - Tutor@python.org
To unsubscribe o
I have a module with the name _table
in the same directory I have another by the name of _module
I would like to import _table into _module
can someone tall me how.
from tables.report_db_engine import *
___
Tutor maillist - Tutor@python.
gailer
Sent: Sunday, April 25, 2010 10:25 PM
To: tutor@python.org
Subject: Re: [Tutor] module import problems
On 4/25/2010 9:56 PM, Rayon wrote:
I have a module with the name _table
in the same directory I have another by the name of _module
I would like to import _table into _module
my bad it was a simple error I was calling it form the wrong module thanks
From: Rayon
Sent: Monday, April 26, 2010 3:47 AM
To: bob gailer ; tutor@python.org
Subject: Re: [Tutor] module import problems
I have a project folder report_db in that project folder I have to packages
_modules
I am trying to get and set some session variables in ram with cherrypy
Here is my code:
import cherrypy
#cherry.session.get('user')
#cherry.session.get('password')
def security(f):
cherry.session.get('user')
cherry.session.get('password')
error messa
Here is the code I am not sure why this is not working I have sessions
turned on.
import cherrypy
@cherrypy.expose
def security(f):
cherrypy.session.get('id')
return f
___
Tutor maillist - Tutor@python.org
To un
using python telnet lib to connect to a Nortel switch, and dump some tables.
My problem is that every now and then the connection is reset by peer .
Telnet Error : (10054, Connection reset by peer)
I need to know why, I have it in a loop so it will download after a few tries
but I need to know
I need to find the max and min value from some floats in a array:
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
I have a array with this data in it
0.0046,0.095,0.0904,521456,['MCI 521456 0.0904'],['ATT 521 0.0919'],['IDT 521
0.095'],['None']
0.0083,0.0192,0.0109,39023821,['MCI 39023821 0.0109'],['ATT 39 0.012'],['IDT 39
0.0192'],['SPR 39 0.0135']
0.0421,0.0681,0.026,73462,['MCI 73462 0.0260'],['ATT 7 0.
how can I append a iteration to a tow dimensional array
so that one value can be like a key in a dir.
I can't use a directory because some of the values repeat and the dir throws
them out.
def getMark(record):
for x in record.split(','):
return str(x).strip()
array = []
for x in
ok so here it is I think this one should be very clear:
I have some data in a list, the data in question:
0.0046,0.095,0.0904,521456,['MCI 521456 0.0904'],['ATT 521 0.0919'],['IDT 521
0.095'],['None']
0.0083,0.0192,0.0109,39023821,['MCI 39023821 0.0109'],['ATT 39 0.012'],['IDT 39
0.0192'],['S
list = bigMethod() # this method makes the list
list.sort() # here is the sort thanks
for x in list: # out put the sort
print x
it all works Thanks a lot
--
From: "Dave Angel"
Sent: Saturday, September 19, 2009 7:46 PM
To: &
I need to setup a login page for a web application but I am not finding any
code in the mod_python doc that shows me how to do this.
What is need is the code to tell apache to get this login data from a login
page.
___
Tutor maillist - Tutor@pyt
I need to setup a login page for a web application but I am not finding any
code in the mod_python doc that shows me how to do this.
What is need is the code to tell apache to get this login data from a login
page.
OTOH if you want to build your own login system (e.g. with user details
stor
how to check whether a user is authenticated with mod_python
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
How do I Check for an active login session on every page that requires
authentication
Been at this for days and it's holding me back can someone plz help me with
some code examples.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change s
Can I use python to print xps or gif.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
Hi I need help with a some telnet automation I am trying build.
I need to login to a Nortel switch and send a table dump command capture
that data and send it to I file.
I have the code it, works and does all that I need my problem is that when I
try to dump a table later than 4 mega the it can t
500 Internal Server Error < Connection:
close < Date: Fri, 13 May 2011 18:35:24 GMT < Content-Length: 90 <
Content-Type: text/html < X-Powered-By: Servlet/2.5 JSP/2.1 < * Closing
connection #0
ERROR_ID=PARSEING_ERROR
DESCRIPTION=Request parsing failed: Tag in line:2 Ending col
c.setopt(c.SSL_VERIFYHOST, 0)
c.setopt(c.POSTFIELDS,binaryptr)
c.setopt(c.POSTFIELDSIZE,23L)
c.setopt(c.HTTPHEADER,head)
c.setopt(c.URL, url)
c.setopt(c.VERBOSE, 1)
c.perform()
Regards Rayon
___
Tutor maillist - Tutor@python.org
To unsubscr
C:\Python26\lib\site-packages\lxml\apihelpers.pxi", line 1364, in
lxml.etree._utf8 (src/lxml/lxml.etree.c:22190)
TypeError: Argument must be bytes or unicode, got 'instancemethod'
Regards Rayon
___
Tutor maillist - Tutor@pytho
Wow I did not see that, long day and night :) thanks a lot.
Regards Rayon
-Original Message-
From: tutor-bounces+evosweet=hotmail@python.org
[mailto:tutor-bounces+evosweet=hotmail@python.org] On Behalf Of Steven
D'Aprano
Sent: Sunday, May 22, 2011 8:23 AM
To: tutor@pytho
but I am not sure how i
would get it out.
Regards Rayon
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
From: Rayon [mailto:ra...@gtt.co.gy]
Sent: 21 October 2011 18:53
To: 'tutor@python.org'
Subject: python telnet
Can I connect to a telnet session and return data without disconnecting the
data session.
Regards Rayon
___
e(create_date+","+log_type+","+log_data+","+str(ip_address)+'\r
'+'\n')
log_file.close()
except Exception,error:
pass
-Original Message-
From: tutor-bounces+evosweet=hotmail@
Tutor] python telnet
Rayon wrote:
> Well what I am doing is connecting to a telnet session sending some
> commands, exiting and returning some data.
> What I would to do is send the commands and return the data without
> exiting the session.
> I would like to keep the same s
From: Rayon [mailto:ra...@gtt.co.gy]
Sent: 17 November 2011 14:04
To: 'tutor@python.org'
Subject: python telnet
I am trying to use winpexpect to connect a telnet session.
I keep getting this error.
raise ExceptionPexpect, 'Command not found: %s&
I installed the telnet client but still the same error.
Traceback (most recent call last):
File "C:\Users\Rayon\Documents\projects1\super_hia\main.py", line 6, in
child = winspawn('telnet 192.168.0.55:210')
File
"C:\Python26\lib\site-packages\winpexpect-1.
ython telnet
Rayon wrote:
> I am trying to use winpexpect to connect a telnet session.
> I keep getting this error.
>
>
>
> raise ExceptionPexpect, 'Command not found: %s' % self.command
> ExceptionPexpect: Command not found: telnet
Please copy and past
tutor@python.org
Subject: Re: [Tutor] python telnet
Rayon wrote:
> I installed the telnet client but still the same error.
How did you install it? Windows includes a telnet application, but it has to
be enabled first:
http://windows.microsoft.com/en-AU/windows-vista/Telnet-frequently-asked-qu
Not sure this is your problem but probably worth mentioning.
--
James
At Saturday, 19/11/2011 on 11:44 Rayon wrote:
> I used the turn on turn off feature, and I can start a telnet session
> from the command line.
>
> -Original Message-
> From: tutor-bounces+evoswe
ror:
error_email_mis(message)
logs('error',str(error),'null')
end_less()
time.sleep(10)
except Exception,error:
error_email_mis(message)
logs('error',str(error),'null')
-Origina
33 matches
Mail list logo