On Oct 15, 9:48 pm, Sean DiZazzo wrote:
> On Oct 13, 6:41 pm, Peng Yu wrote:
>
> >http://docs.python.org/reference/simple_stmts.html#grammar-token-yiel...
>
> > The explanation of yield is not clear to me, as I don't know what a
> > generator is. I see the follow
Hi all,
I'm trying to connect to an ftp site from a windows machine with two
nics going to two different networks, but I keep getting the below
exception:
Traceback (most recent call last):
File "ftp.pyo", line 70, in connect
File "ftp.pyo", line 17, in __init__
File "ftplib.pyo", line 131,
On Oct 16, 4:51 pm, Sean DiZazzo wrote:
> Hi all,
>
> I'm trying to connect to an ftp site from a windows machine with two
> nics going to two different networks, but I keep getting the below
> exception:
>
> Traceback (most recent call last):
> File "ftp.
On Oct 19, 10:23 pm, Tim Roberts wrote:
> Sean DiZazzo wrote:
>
> >I'm trying to connect to an ftp site from a windows machine with two
> >nics going to two different networks, but I keep getting the below
> >exception:
>
> >Traceback (most recent call l
On Oct 19, 10:23 pm, Tim Roberts wrote:
> Sean DiZazzo wrote:
>
> >I'm trying to connect to an ftp site from a windows machine with two
> >nics going to two different networks, but I keep getting the below
> >exception:
>
> >Traceback (most recent call l
On Oct 25, 11:58 pm, Babloo wrote:
> i have a small python application with GUI (frontend) which has
> various functions. I have a "RUN" button which runs python scripts in
> the background . It basically calls execfile() function internally
> which runs in a thread , to run the python script .
>
On Oct 26, 1:25 am, Babloo wrote:
> On Oct 26, 1:01 pm, Sean DiZazzo wrote:
>
>
>
> > On Oct 25, 11:58 pm, Babloo wrote:
>
> > > i have a small python application with GUI (frontend) which has
> > > various functions. I have a "RUN" button which
On Oct 28, 7:15 am, banu wrote:
> On Oct 28, 3:02 pm, Jon Clements wrote:
>
>
>
> > On 28 Oct, 13:39, banu wrote:
>
> > > Hi,
> > > I am a novice in python. I was trying to write a simple script on
> > > Linux (python 3.0) that does the following
>
> > > #cd directory
> > > #ls -l
>
> > > I use
On Oct 29, 8:49 am, wadi wadi wrote:
> I can't alter the import statement as the error log is pointing to one
> of the installed python files 'hashlib.py'
>
> /python/2.6.2/lib/python2.6/hashlib.py
>
> and I don't have the right permissions to alter the python installation.
> Any idea?
>
> On 10/2
On Oct 29, 10:17 pm, Chris Rebert wrote:
> On Thu, Oct 29, 2009 at 9:53 PM, Peng Yu wrote:
> > I don't see a way to avoid walking over directories of certain names
> > with os.walk. For example, I don't want os.walk return files whose
> > path include '/backup/'. Is there a way to do so? Otherwis
On Nov 2, 9:01 pm, Ben Finney wrote:
> Anh Hai Trinh writes:
>
> > > Yes, just about any ‘map()’ operation has a corresponding list
> > > comprehension. (Does anyone know of a counter-example, a ‘map()’
> > > operation that doesn't have a correspondingly simple list
> > > comprehension?)
>
> > Tr
MediaInfo is your best bet. http://mediainfo.sourceforge.net/en
~Sean
On Nov 6, 11:59 pm, Michele Simionato
wrote:
> I would like to extract some simple info from media files, such as
> size, resolution, duration, codec. What's the simplest way to do it?
> Once in a time there was pymedia but I
> Here is a recent list of magic numbers:
>
> Python 2.6a0: 62151 (peephole optimizations and STORE_MAP opcode)
> Python 2.6a1: 62161 (WITH_CLEANUP optimization)
> Python 2.7a0: 62171 (optimize list comprehensions/change LIST_APPEND)
> Python 2.7a0: 62181 (optimize cond
On Feb 4, 3:03 pm, Julian wrote:
> Hello,
>
> I've asked this question at stackoverflow a few weeks ago, and to make
> it clear: this should NOT be a copy of the stackoverflow-thread
> "hidden features of Python".
>
> I want to design a poster for an open source conference, the local
> usergroup w
On Feb 3, 6:08 pm, alex23 wrote:
> On Feb 4, 8:47 am, Phlip wrote:
>
> > Yes, calling os.path.walk() and os.path.join() all the time on raw
> > strings is fun, but I seem to recall from my Ruby days a class called
> > Pathname, which presented an object that behaved like a string at
> > need, and
On Feb 7, 11:02 am, T wrote:
> I have a script, which runs as a Windows service under the LocalSystem
> account, that I wish to have execute some commands. Specifically, the
> program will call plink.exe to create a reverse SSH tunnel. Right now
> I'm using subprocess.Popen to do so. When I run
On Feb 7, 4:57 pm, T wrote:
> Thanks for the suggestions - I think my next step is to try running
> it under an admin user account, as you guys both mentioned. Alf -
> you're absolutely right, Microsoft has srvany.exe, which allows you to
> run any EXE as a Windows service. I've done this in th
>
> It's working fine when I run it via " debug" - that's how
> I was testing before. It's when I start the service that it fails -
> and you can see that, when you run it with debug, plink.exe runs under
> my username. When I run it as a service, it runs under System...
You can have the servic
On Feb 9, 6:52 am, T wrote:
> On Feb 8, 2:25 pm, David Bolen wrote:
>
>
>
> > T writes:
> > > I have a script, which runs as a Windows service under the LocalSystem
> > > account, that I wish to have execute some commands. Specifically, the
> > > program will call plink.exe to create a reverse
On Feb 8, 2:36 pm, a...@pythoncraft.com (Aahz) wrote:
> In article
> ,
> Sean DiZazzo wrote:
>
> >On Feb 3, 6:08=A0pm, alex23 wrote:
>
> >> There was also a PEP with another possible implementation:
> >>http://www.python.org/dev/peps/pep-0355/
>
>
On Feb 12, 11:33 pm, J Wolfe wrote:
> I would really appreciate some help with this. I'm fairly new to
> using classes...What am I doing wrong? All I get is a blank window. I
> can't seem to figure out how to initialize this Progress Bar.
>
Study and hack on this: http://uucode.com/texts/pylongo
On Feb 19, 10:06 am, MRAB wrote:
> Brandon wrote:
> > Hi everyone,
>
> > Does copying or moving a file affect the return value of
> > os.path.getmtime(path)?
>
> The modification time of a copied file should be the same as the
> original.
>
> The creation time of a copied file will be the time at
On Feb 24, 9:22 pm, Gib Bogle wrote:
> The program doesn't fail with the write error on the other XP machine, it
> actually fails to execute at all, complaining about the configuration
> information. Therefore I'm seeing different behaviour on three XP machines:
>
> Box 1 (SP2): runs OK
> Box 2 (
> Are the new Tk comaprable with other toolkits(Qt, GTK,Wx?)?
> Does Tk lack other features compared to the Qt,GTK,Wx...?
> (Or: is there things you can't simply do with Tk?)
>
> Thanks in advance for replying
tkinter is a good starting point. You can get some definite benefits
going to wx or Qt
On Mar 24, 7:59 pm, Kurian Thayil wrote:
> Hi All,
>
> I am just a month old with Python and trying to learn CGI with Python. I
> was trying to install MySQLdb module in my new CentOS 5.3 box with
> Python 2.4.3 default install. I downloaded the tar-ball of MySQLdb
> module (MySQL-python-1.2.3c1).
> You are right. I was trying to import the module sitting on the source
> folder :"-). Thanks for your quick response and let me try further.
Sweet! I remember it because it confused the hell out of me on at
least one past occasion. :)
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 9, 4:37 pm, Raphael Mayoraz wrote:
> Ooops, forgot to attach the file in my first e-mail. Now, here it is.
>
>
> Hello,
>
> I have some trouble to make getopt.getopt work and the way I want (and
> is described in the documentation).
>
Hi!
I have a small app that uses pywin32 to log on to a remote host and
send some files around. It works well, but I've found a machine that
the app won't work on.
The machine is dual-homed, with one interface able to see the server
machine, but the other can not. I don't have the exact error b
On Apr 14, 9:22 pm, Dennis Lee Bieber wrote:
> On Wed, 14 Apr 2010 15:18:11 -0700 (PDT), Sean DiZazzo
> declaimed the following in
> gmane.comp.python.general:
>
>
>
> > def wnet_connect(self, host, username, password):
>
> The presence of "self&q
On May 13, 9:39 am, News123 wrote:
> Hi Aaaz,
>
> Aahz wrote:
> > In article <4bea6b50$0$8925$426a7...@news.free.fr>,
> > News123 wrote:
> >> I'd like to perform huge file uploads via https.
> >> I'd like to make sure,
> >> - that I can obtain upload progress info (sometimes the nw is very slow)
On May 13, 9:54 pm, Sean DiZazzo wrote:
> On May 13, 9:39 am, News123 wrote:
>
>
>
> > Hi Aaaz,
>
> > Aahz wrote:
> > > In article <4bea6b50$0$8925$426a7...@news.free.fr>,
> > > News123 wrote:
> > >> I'd like to perform huge f
On May 14, 8:27 am, albert kao wrote:
> On May 14, 11:01 am, J wrote:
>
>
>
> > On Fri, May 14, 2010 at 10:53, albert kao wrote:
>
> > > C:\python>rmdir.py
> > > C:\test\com.comp.hw.prod.proj.war\bin
> > > ['.svn', 'com']
> > > d .svn
> > > dotd C:\test\com.comp.hw.prod.proj.war\bin\.svn
> > > T
On May 24, 9:34 pm, Six wrote:
> I am trying to access an objects sub-object attributes. I can boil the
> code I am working with down to this problem section:
> (snip)
> class Pt:
> x = None
> y = None
> def __init__(self, x, y):
> self.x, self.y = x, y
> pass
>
> class Pts:
> curr_p
On Jun 13, 4:39 pm, Vincent Davis wrote:
> On Sun, Jun 13, 2010 at 5:28 PM, Gerry Reno wrote:
> > sounds like your keymapping got messed with.
>
> > you could just:
> > set -o vi
> > python
> > ESC, Ctrl-j
> > and now ESC-k and ESC-j will take you back and forth in history (std vi
> > editing)
>
On Jun 11, 5:27 am, Eric von Horst wrote:
> I have small program that tries to open a wsdl. When I execute the
> program I am getting 'suds.transport.TransportError: HTTP Error 401:
> Unauthorized'
Hey Eric,
Im a suds noob as well. I found some code that led me to the below
example. It worked
On Jul 10, 5:10 pm, Tim Chase wrote:
> > shutil.rmtree(filename)
> > File "/usr/lib64/python2.5/shutil.py", line 178, in rmtree
> > onerror(os.rmdir, path, sys.exc_info())
> > File "/usr/lib64/python2.5/shutil.py", line 176, in rmtree
> > os.rmdir(path)
> > OSError: [Errno 39]
On Aug 18, 4:58 pm, birdsong wrote:
> On Aug 18, 3:18 pm, Derek Martin wrote:
>
>
>
> > On Tue, Aug 18, 2009 at 03:10:15PM -0500, Derek Martin wrote:
> > > I have some simple threaded code... If I run this
> > > with an arg of 1 (start one thread), it pegs one cpu, as I would
> > > expect. If I
On Aug 29, 5:39 pm, Chris Colbert wrote:
> I'm having an issue with sys.path on Ubuntu. I want some of my home
> built packages to overshadow the system packages. Namely, I have built
> numpy 1.3.0 from source with atlas support, and I need it to
> overshadow the system numpy 1.2.1 which I had to
On Aug 30, 10:08 pm, mierdatutis mi wrote:
> Hi,
>
> I'm newbie in python. I try to connect to remote server with ms sql
> server from my ubuntu. I install pyodbc and I do:
>
> >>> conn = >>> Conn =
> pyodbc.connect("DRIVER=
> {FreeTDS};SERVER=defekas62;UID=emuser;PWD=temporal;DATABASE=em620")
>
On Sep 2, 8:36 pm, MacRules wrote:
> Hi,
>
> I installed Python daemon, pyodbc module to access the back-end DB server.
>
> My setup is like this
>
> load data job -> Python Daemon A, port 6000 -> Python Daemon B, port
> 7000 -> MySQL
>
> Daemon A will perform data compression, such as GZIP, and s
On Sep 2, 10:10 pm, Helvin wrote:
> Hi,
>
> I have come across this very strange behaviour. Check this code:
>
> if file_str.find('Geometry'):
> #if file_str.endswith('Data_Input_Geometry.txt'):
> print 'I found geometry'
> elif file_str.find('Material'):
>
On Sep 3, 10:55 pm, Manuel Graune wrote:
> Hello everyone,
>
> the standard structure of a python-program which is taught in all of
> the books I on python I read by now is simply something like:
>
> #!/usr/bin/python
> print "Hello, world!"
> ^D
>
> While reading about structuring a larger code-b
On Sep 3, 11:55 pm, alex23 wrote:
> Sean DiZazzo wrote:
> > What are you using to test the scripts? I could be completely wrong,
> > but I find it hard to believe that the second version is much (if any)
> > faster than the first. Then again, I don't know mu
On Sep 4, 7:11 pm, Mathew Oakes wrote:
> Is there anything that can be done to make pexpect spawns send unicode lines?
>
> In this example they are just middot characters, but this process
> needs to be able to handle languages in other character sets.
>
> >>> spokentext = u'Nation . Search the FO
On Sep 6, 10:29 pm, "jwither" wrote:
> Given a string (read from a file) which contains raw escape sequences,
> (specifically, slash n), what is the best way to convert that to a parsed
> string, where the escape sequence has been replaced (specifically, by a
> NEWLINE token)?
>
> James Withers
I
On Sep 8, 6:23 pm, Rogério Brito wrote:
> Dear people,
>
> I am a newbie in Python and I'm just writing a program to rip the HTML parts
> of
> multipart/alternative e-mails that come with a plain text version.
>
> For this task, I decided to leave perl aside for this task and tried to code
> some
On Sep 10, 6:14 pm, Mag Gam wrote:
> its not a google/bing issue. Its about getting opinions from the
> community and hear their experiences. I wanted to hear opinions and
> war stories of people who tried using ssh with python, thats all.
>
This question gets asked at least once a week. It *is*
On Sep 11, 8:27 am, ed wrote:
> No matter what I do, the MessageBox always appears on the 2nd monitor.
> I've forced all the other widgets to monitor 1.
> I thought that creating a class and forcing the position would help, but
> it hasn't.
>
> I'm using Ubuntu Jaunty, python 2.6.
>
> Any ideas wh
On Sep 13, 3:12 pm, Peng Yu wrote:
> Hi,
>
> I want to understand why python use indentation to denote block of
> code. What are the advantages of it? Is there a style in python to
> denote a block of code the same as that of C++ (with '{}')?
>
> One disadvantage of using indentation to denote a b
On Sep 13, 3:12 pm, Peng Yu wrote:
> Hi,
>
> I want to understand why python use indentation to denote block of
> code. What are the advantages of it? Is there a style in python to
> denote a block of code the same as that of C++ (with '{}')?
>
> One disadvantage of using indentation to denote a b
On Sep 13, 4:57 pm, Dave Angel wrote:
> daved170 wrote:
> > On Sep 13, 2:17 pm, Dave Angel wrote:
>
> >> daved170 wrote:
>
> >>> Hi everybody,
> >>> I'm building a small python program that run a service (exe file) on
> >>> my servers.
> >>> I don't want to use remote desktop and it's siblings.
>
On Sep 13, 6:43 pm, Peng Yu wrote:
> Hi,
>
> I try the following code. I don't quite understand why __main__ is not
> defined. Could somebody let me know what I am wrong about it?
>
> Regards,
> Peng
>
> $ cat test.py
> #!/usr/bin/env python
>
> if __main__ == '__main__' :
> print "Hello World!\
On Sep 13, 6:43 pm, Peng Yu wrote:
> Hi,
>
> I try the following code. I don't quite understand why __main__ is not
> defined. Could somebody let me know what I am wrong about it?
>
> Regards,
> Peng
>
> $ cat test.py
> #!/usr/bin/env python
>
> if __main__ == '__main__' :
> print "Hello World!\
I have never used a call to "locals()" in my code. Can you show me a
use case where it is valuable and Pythonic?
~Sean
--
http://mail.python.org/mailman/listinfo/python-list
On Sep 13, 8:18 pm, Steven D'Aprano
wrote:
> On Sun, 13 Sep 2009 20:06:51 -0700, Sean DiZazzo wrote:
> > I have never used a call to "locals()" in my code. Can you show me a
> > use case where it is valuable and Pythonic?
>
> grep is your friend:
>
>
> > I have never used a call to "locals()" in my code. Can you show me a
> > use case where it is valuable and Pythonic?
>
> def print_item(item):
> description = textwrap.fill(item.description, 40)
> short = item.description.split('\n', 1)[0]
> code = str(item.id).zfill(6)
> p
On Sep 13, 9:11 pm, Steven D'Aprano
wrote:
> On Sun, 13 Sep 2009 20:26:06 -0700, Sean DiZazzo wrote:
> > On Sep 13, 8:18 pm, Steven D'Aprano
> > wrote:
> >> On Sun, 13 Sep 2009 20:06:51 -0700, Sean DiZazzo wrote:
> >> > I have never used a cal
> If you are willing to open your mind to the possibility that some
> Pythonic things don't adhere to every Zen, then I would suggest that
> Gabrielle's examples are perfectly Pythonic shortcuts. But if you
> don't want to use them, you don't have to, nobody is forcing you.
It's a pretty small do
On Sep 14, 10:43 pm, kernus wrote:
> I just googled this post:
>
> http://mail.python.org/pipermail/python-list/2006-September/575832.html
>
> something like:
>
> from Tkinter import *
>
> root = Tk()
> Entry(root).pack()
> Button(root, text='Quit', command=sys.exit).pack()
> root.overrideredirect
On Sep 15, 10:20 pm, kernus wrote:
> On Sep 15, 11:42 am, Sean DiZazzo wrote:
>
>
>
> > Whats interesting is that if you call overrideredirect from a button
> > command, it works as expected. Well, at least the text entry field
>
> ^so, Sean, you
On Sep 18, 11:54 am, kj wrote:
> I've often come across the idea that good Python style deals with
> potential errors using an EAFP ("easier to ask forgiveness than
> permission") strategy rather than a LBYL ("look before you leap")
> strategy.
>
> For example, LBYL would look like this:
>
> if os
On Sep 18, 9:55 am, Simon Forman wrote:
> On Mon, Sep 14, 2009 at 1:12 AM, Sean DiZazzo wrote:
>
> > Thanks for your explanation Steven. I see how it can be valuable, but
> > it seems to always break the second rule of Zen. I don't really want
> > to get into the c
On Sep 11, 10:36 am, Johan Grönqvist
wrote:
> Hi All,
>
> I find several places in my code where I would like to have a variable
> scope that is smaller than the enclosing function/class/module definition.
>
> One representative example would look like:
>
> --
> spam = { ... }
> eggs = { .
On Sep 18, 5:23 pm, Christian Heimes wrote:
> kj wrote:
> > For example, LBYL would look like this:
>
> > if os.path.isfile(some_file):
> > os.unlink(some_file)
>
> > In contrast, EAFP would look like this:
>
> > try:
> > os.unlink(some_file)
> > except OSError:
> > pass
>
> The two ve
On Sep 19, 9:17 am, kakarukeys wrote:
> Hi,
>
> When I am running a loop for a long time, calculating heavily, the CPU
> usage
> is at 100%, making the comp not so responsive. Is there a way to
> control the
> CPU usage at say 80%? putting a time.sleep(0.x) doesn't seem to help
> although CPU usag
On Sep 21, 1:46 pm, daggerdvm wrote:
> u don't want to answerthen why post?...get lost.
I eat children...
--
http://mail.python.org/mailman/listinfo/python-list
On Sep 21, 4:42 pm, "kunal.k" wrote:
> I have installed python 2.5 for a particular code. Now i have 2.6
> already installed. How do i direct this code to use the 2.5 modules??
I don't think you do. You should install the modules for python 2.6.
You could try to hand copy the modules, and some m
On Sep 22, 11:03 am, "Brown, Rodrick " wrote:
> How could I do the following check in Python
>
> In Perl I could do something like if ((defined($a)) { ... }
>
> I tried if var is not None:
> However this doesn't seem to work as described.
>
> Thanks.
try:
var
except NameError:
handle_it()
On Sep 22, 1:00 pm, snfctech wrote:
> Does anyone have experience building a data warehouse in python? Any
> thoughts on custom vs using an out-of-the-box product like Talend or
> Informatica?
>
> I have an integrated system Dashboard project that I was going to
> build using cross-vendor joins o
On Sep 23, 12:04 pm, The Bear wrote:
> Hi I'm looking to do something like this
>
> f = f.openfileobj(remotefileloc, localfilelikeobj)
>
> my remote files are on a solaris box that i can access using ssh (could
> prehap request othe protocols if necessary)
>
> anyone got any ideas?
>
> many thanks
On Sep 23, 4:05 pm, "Rhodri James"
wrote:
> On Wed, 23 Sep 2009 22:52:56 +0100, mike171562
>
> wrote:
> > Sorry for the confusion, Simon, this is almost exactly what I need,
> > but i need to be able to search for a string in a given value of an
> > item
>
> > Here is an example of the dict I a
On Sep 24, 7:49 am, flebber wrote:
> On Sep 24, 11:10 pm, flebber wrote:
>
>
>
> > On Sep 24, 10:58 pm, Dave Angel wrote:
>
> > > flebber.c...@gmail.com wrote:
> > > > I am using python 2.6.2, I haven't updated to 3.0 yet. No I have no
> > > > class or instructor, I am learning this myself. I ha
On Sep 24, 4:37 pm, Dave Angel wrote:
> Kevin Holleran wrote:
> > Hello,
>
> > I downloaded and installed the pexpect module and wrote a script. All is
> > well and good, but the script proved to be pretty useful and now I was asked
> > to run it as a scheduled task up on a server to run periodic
On Sep 24, 7:26 pm, s...@pobox.com wrote:
> If you are a csv module user, I have a question for you: Do you use the
> csv.Sniffer class?
>
> o Yes, frequently
> o Yes, on occasion
> o I tried it a few times but don't use it now
> o No, I don't need it
> o No, never heard of it
Hi,
I have some scripts that send files via ftplib to a client's ftp
site. The scripts have generally worked great for a few years.
Recently, the client complained that only part of an important file
made it to their server. My boss got this complaint and brought it to
my attention.
The first
On Oct 22, 10:48 pm, Steven D'Aprano wrote:
> On Fri, 22 Oct 2010 22:03:38 -0700, Sean DiZazzo wrote:
> > How can I assure him (and the client) that the transfer completed
> > successfully like my log shows?
>
> "It has worked well for many years, there are no
Can someone please explain this to me? Thanks in advance!
~Sean
Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 12:39:47)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> print "foo %s" % 1-2
Traceback (most rece
On Friday, June 2, 2017 at 10:46:03 AM UTC-7, bob gailer wrote:
> On 6/2/2017 1:28 PM, Jussi Piitulainen wrote:
> > sean.diza...@gmail.com writes:
> >
> >> Can someone please explain this to me? Thanks in advance!
> >>
> >> ~Sean
> >>
> >>
> >> Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 12:
Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 12:39:47)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import traceback
>>> tb = traceback.format_exc()
>>> type(tb)
>>> tb
'None\n'
>>>
Shouldn't it just retur
101 - 179 of 179 matches
Mail list logo