Hi guys,
I've to deal with CSVs that look like following
CSV (with one header and 3 legit rows where each legit row has 3 columns)
Some info
Date: 12/6/2012
Author: Some guy
Total records: 100
header1, header2, header3
one, two, three
one, Python is great, so are other languages, isn't ?,
Greetings, I hope you're doing well. I'm stuck in a strange issue,
most likely due to my own ignorance. I'm reading a config file using
ConfigParser module and passing database related info to _mssql.
Following doesn't work
config = ConfigParser.ConfigParser()
config.read('configs.txt')
On Apr 26, 7:39 pm, Thomas Rachel nutznetz-0c1b6768-bfa9-48d5-
a470-7603bd3aa...@spamschutz.glglgl.de wrote:
Am 26.04.2011 15:48, schrieb Oltmans:
Following doesn't work
config = ConfigParser.ConfigParser()
config.read('configs.txt')
server_info = config.get(DB_INFO,server)
db
Hi Python gurus, hope you're doing well. I've a small problem.
When I run the following code
___
names = ['oltmans','abramhovic','\n','sal','lee']
print '| ' + ' | '.join(names)
| oltmans | abramhovic |
| sal | lee
Hi all,
I'm writing a very small TCP server(written in Python) and now I want
to host it on some ISP so that it can be accessed anywhere from the
Internet. I've never done that before so I thought I should ask for
some advice. Do you guys know any good ISP that can let me do that?
Most
If I dump a Python dictionary into a file named data.pkl using
Pickle module on a Linux operating system, will the data contained in
data.pkl load fine in a Windows OS? I mean will I be able to load
the dictionary data contained in data.pkl just fine on Windows XP?
I could have tested it but
I've a small multi-threaded program that is written by keeping
Producer-Consumer pattern in mind. In the Producer part of the program
we create new users by doing a POST to a certain web URL whereas in
the Consumer part of the program we try to login newly created users.
Problem is that program
Hi, I've a list that looks like following
a = [ [1,2,3,4], [5,6,7,8] ]
Currently, I'm iterating through it like
for i in [k for k in a]:
for a in i:
print a
but I was wondering if there is a shorter, more elegant way to do it?
--
On May 9, 1:53 am, superpollo ute...@esempio.net wrote:
add = lambda a,b: a+b
for i in reduce(add,a):
print i
This is very neat. Thank you. Sounds like magic to me. Can you please
explain how does that work? Many thanks again.
--
http://mail.python.org/mailman/listinfo/python-list
,
Oltmans
--
http://mail.python.org/mailman/listinfo/python-list
this so I will really appreciate all the
help. Thanks in advance and kindly pardon my ignorance.
Thanks,
Oltmans
--
http://mail.python.org/mailman/listinfo/python-list
Hello Python gurus,
I'm quite new when it comes to Python so I will appreciate any help.
Here is what I'm trying to do. I've two classes like below
import new
import unittest
class test(unittest.TestCase):
def test_first(self):
print 'first test'
def test_second(self):
PM, Oltmans rolf.oltm...@gmail.com wrote:
Hello Python gurus,
I'm quite new when it comes to Python so I will appreciate any help.
Here is what I'm trying to do. I've two classes like below
import new
import unittest
class test(unittest.TestCase):
def test_first(self
On Feb 2, 2:14 am, Steve Holden st...@holdenweb.com wrote:
Should not tee be subclassing test, not unittest.TestCase?
Thank you, Steve. This worked, but I've not clue why? Can you please
enlighten me why sub-classing 'test' made it happen? Please. Thanks
again.
regards
Steve
--
Steve
Hi Python gurus,
I'm quite new to Python and have a problem. Following code resides in
a file named test.py
---
import unittest
class result(unittest.TestResult):
pass
class tee(unittest.TestCase):
def test_first(self):
print 'first test'
print '-'
def
On Jan 14, 11:46 pm, exar...@twistedmatrix.com wrote:
When you run test.py, it gets to the loadTestsFromName line. There, it
imports the module named test in order to load tests from it. To
import
that module, it runs test.py again. By the time it finishes running the
contents of test.py
Hello,. everyone.
I've a string that looks something like
lksjdfls div id ='amazon_345343' kdjff lsdfs /div sdjfls div id
= amazon_35343433sdfsd/divdiv id='amazon_8898'welcome/div
From above string I need the digits within the ID attribute. For
example, required output from above
='amazon_345343' kdjff lsdfs /div sdjfls div id
= amazon_35343433sdfsd/divdiv id='amazon_8898'welcome/div
hello, my age is 86 years old and I was born in 1945. Do you know that
PI is roughly 3.1443534534534534534
~uk
On Dec 21, 4:38 pm, Oltmans rolf.oltm...@gmail.com wrote:
Hello
Hi, all. All I'm trying to do is to print the error message using the
following code (copying/pasting from IDLE).
def div(a,b):
print a/b
try:
div(5,0)
except Exception as msg:
print msg
but IDLE says (while highlighting the 'as' keyword)
except Exception as msg:
SyntaxError:
Hello fellow python hackers,
I'm not an expert when it comes to Python and I'm totally stuck in a
situation. All of our unit tests are written using built-in 'unittest'
module. We've a requirement where we want to run a method only once
for our unit tests. Some background: all of our tests are
of using a variable named
'result' inside elementsPresent() doesn't sound very good. Any ideas
will be highly appreciated.
Thanks,
Oltmans
--
http://mail.python.org/mailman/listinfo/python-list
I've a multithreaded program in which I've to call class methods from
class methods. Here is how my code look like (excluding imports),. Any
help is highly appreciated.
#!/usr/bin/env python
class Requests(Thread):
def __init__(self, times):
Thread.__init__(self)
On Mar 11, 10:08 pm, Oltmans rolf.oltm...@gmail.com wrote:
self.html=SendRequest() # This line throws an error
and error says
NameError: global name '_Requests_SendRequest' is not defined.
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 11, 11:00 pm, Piet van Oostrum p...@cs.uu.nl wrote:
self.html=self.SendRequest()
--
Thank you, everyone, for the help. Appreciate that.
Piet van Oostrum p...@cs.uu.nl
URL:http://pietvanoostrum.com[PGP 8DAE142BE17999C4]
Private email: p...@vanoostrum.org- Hide
Hi, all. I'm trying to use Mechanize in a multithreaded program--
purpose of which is to fill out a form on a website using concurrent
threads. Guys, trust me I've spent a lot of time to figure out the
problem but I'm completed puzzled. Firstly, I've listed the errors and
then the program listing
ideas/
help is highly appreciated.
Thanks,
Oltmans
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 9, 3:37 am, Chris Rebert c...@rebertia.com wrote:
Learn about the methods of the string class
(str):http://docs.python.org/library/stdtypes.html#id4
You'll probably be most interested in .split()
OK, thanks I got it. I was trying to use Regex but .split() just
worked like a charm.
want to check following
types
1- integers
2- strings
3- testing types of a particular class
4- decimal/floats
Please excuse my ignorance enlighten me. I will really appreciate
any help.
Thanks,
Oltmans
--
http://mail.python.org/mailman/listinfo/python-list
me.
Thanks,
Oltmans
--
http://mail.python.org/mailman/listinfo/python-list
Here is the scenario:
It's a command line program. I ask user for a input string. Based on
that input string I retrieve text from a text file. My text file looks
like following
Text-file:
-
AbcManager=C:\source\code\Modules\Code-AbcManager\
Hey all,
I've been using Paramiko for sometime now and I never had any
problems. I've already submitted this question to Paramiko mailling
list but I thought I should post it in CLP as someone might have used
it in past. I'm using Paramiko for SSH. Are there any other good SSH
libraries that
I'm writing a program in which I will ask users to enter user name and
password once only. It's a console based program that will run on
Windows XP. Actually, I'm trying to provide the similar functionality
as Remember me thing in browsers. For that, I will need to store
user name and passwords on
On Jan 8, 1:55 am, Sebastian Bassi sba...@clubdelarazon.org wrote:
In general you don't store the password, but a hash of it. Then when
the user logs-in, you hash it and compare the result with the stored
hash.
About hash, use sha, look
I'm writing a file-transfer program and I'm receiving bytes
transferred in a function. Now I would like to print bytes transfered
in one place e.g.
Bytes Transfered so far X
and X will increase and cursor should stay at this position. I don't
want to use any 3rd party module for this. Can I
Hi,
I'm new to Python (and admittedly not a very good programmer) and I've
come across a scenario where I've to search and replace text in a
file.
For the sake of an example, I'm searching for every occurence of the
text
[[http://www.hotmail.com - Hotmail]]
I've to replace it with
Hi all,
I'm new to Python and am automating few tasks using Pamie. Everything
worked well until I had to handle the File Open Dialog. I mean I'm
trying to automate the file upload process using Pamie. Basically I
just want to automate the process of file upload. I want to
automatically hit the
36 matches
Mail list logo