Ken G. beach...@insightbb.com wrote
Is there a Python command to send data to printer?
I have a Canon MX300 hooked up by USB. I can print from Firefox and
Thunderbird. I am using Ubuntu 9.04 and Python 2.6.2.
There is no universal easy way to print stuff unfortunately.
In console mode on
MARCUS NG marker...@gmail.com wrote
Currently nothing works due to my limited understanding.
That's a pretty vague description of the problem.
What exactly happens?
Does the file get copied?
Do you get error messages? If so what?
I am wondering if my syntax is wrong or am I missing
MARCUS NG wrote:
Hey all,
I have been searching online for ways to copy a zip file to a
destination and extract the zip file with python.
Currently nothing works due to my limited understanding.
I am wondering if my syntax is wrong or am I missing anything?
the code is as such. also if there
On Thu, Nov 19, 2009 at 5:47 PM, Geoff Dutton geoff.dut...@noaa.gov wrote:
Do you have recommendations for handling missing positional arguments? I'm
a huge fan of OptionParser module and use it in several programs to handle
options, but there must be an eligant way of handling missing
On Thu, Nov 19, 2009 at 9:31 PM, Eric Pavey warp...@gmail.com wrote:
Say I have this package layout
\myPackage
__init__.py
moduleA.py
moduleB.py
Is there a way (and I'm sure there is...) to query, for a given package
level, which modules live under it?
I thought I could do it like so:
On Fri, Nov 20, 2009 at 1:54 AM, MARCUS NG marker...@gmail.com wrote:
Hey all,
I have been searching online for ways to copy a zip file to a destination
and extract the zip file with python.
Currently nothing works due to my limited understanding.
I am wondering if my syntax is wrong or am I
Hi,
I'm not to sure I can explain myself. But I need to ask because I do not
understand how it works or what is possible.
class A (wx.Panel);
def__init__(...)
class B(wx.PyPanel):
def __init__(..):
self.pages = A(...)
class C (B)
def __init__(...)
I can't change the code in
lau...@protopc.com wrote:
John,
Thank you so much for your help! -- Problem SOLVED!!! -- Your explanation
and example was extremely helpful. I am very grateful.
Lauren :-)
if you want to pass an argument, you can curry the function with
functools.partial()
# currying the function, don't
John wrote:
Hi,
I'm not to sure I can explain myself. But I need to ask because I do not
understand how it works or what is possible.
class A (wx.Panel);
def__init__(...)
class B(wx.PyPanel):
def __init__(..):
self.pages = A(...)
class C (B)
def __init__(...)
I can't change
I need to make some code Python 2.4 compliant... the only thing I see
is use of try: except: finally:
To make this valid, I think I need to do a try: finally: and next try:
except: inside. Is this correct?
The code has;
try:
...
...
...
except SystemExit:
raise
except
On Friday 20 November 2009 04:48:59 am Lie Ryan wrote:
Is this what you want?
class C(B):
�...@property
def wxpanelFontSize(self):
return self.pages.wxpanelFontSize
�...@wxpanelfontsize.setter
def wxpanelFontSize(self, value):
self.pages.wxpanelFontSize
Alan Gauld wrote:
Ken G. beach...@insightbb.com wrote
Is there a Python command to send data to printer?
I have a Canon MX300 hooked up by USB. I can print from Firefox and
Thunderbird. I am using Ubuntu 9.04 and Python 2.6.2.
There is no universal easy way to print stuff unfortunately.
There is no universal easy way to print stuff unfortunately.
In console mode on Unix its not too bad, you can send data
to lpr, just as you would from the shell.
That is a surprise! I was so use to using lprint as in Basic.
BASIC ran on a predefined platform so could be sure where
ALAN GAULD wrote:
There is no universal easy way to print stuff unfortunately.
In console mode on Unix its not too bad, you can send data
to lpr, just as you would from the shell.
That is a surprise! I was so use to using lprint as in Basic.
BASIC ran on a predefined platform so
On Fri, Nov 20, 2009 at 5:03 AM, Kent Johnson ken...@tds.net wrote:
On Thu, Nov 19, 2009 at 5:47 PM, Geoff Dutton geoff.dut...@noaa.gov
wrote:
Do you have recommendations for handling missing positional arguments?
I'm
a huge fan of OptionParser module and use it in several programs to
On Fri, Nov 20, 2009 at 8:08 AM, Stephen Nelson-Smith
sanel...@gmail.com wrote:
I need to make some code Python 2.4 compliant... the only thing I see
is use of try: except: finally:
To make this valid, I think I need to do a try: finally: and next try:
except: inside. Is this correct?
Yes,
On Fri, Nov 20, 2009 at 4:09 AM, Kent Johnson ken...@tds.net wrote:
On Thu, Nov 19, 2009 at 9:31 PM, Eric Pavey warp...@gmail.com wrote:
Say I have this package layout
\myPackage
__init__.py
moduleA.py
moduleB.py
Is there a way (and I'm sure there is...) to query, for a given
On Fri, 2009-11-20 at 16:40 +0100, tutor-requ...@python.org wrote:
That is a surprise! I was so use to using lprint as in Basic. Oh
well. I will have to study up on fmt and/or groff.
Would those two commands (fmt, groff) send data to lpr from shell?
Is
lpr the same hookup for USB port?
I am trying to break out of a loop posted below. When asked for
monthdate, it should break out if I entered the number zero and it does
not. GRRR. Been working on this for almost an hour.
monthdate = 999
while monthdate 0:
monthdate = raw_input('Enter the month and date in
Ken G. beach...@insightbb.com wrote
I am trying to break out of a loop posted below. When asked for
monthdate, it should break out if I entered the number zero and it does
not. GRRR. Been working on this for almost an hour.
monthdate = 999
while monthdate 0:
You are comparing
John jfabi...@yolo.com wrote
class A (wx.Panel);
def__init__(...)
class B(wx.PyPanel):
def __init__(..):
self.pages = A(...)
class C (B)
def __init__(...)
I can't change the code in either class A or class B. But I want to add
a
property to class A in class C. Is that possible?
Alan Gauld wrote:
Ken G. beach...@insightbb.com wrote
I am trying to break out of a loop posted below. When asked for
monthdate, it should break out if I entered the number zero and it
does not. GRRR. Been working on this for almost an hour.
monthdate = 999
while monthdate 0:
Hi!
Slightly different (extented) than your original question, but here's how I'd
do this (although the program doesn't really do very much):
import time, random
def is_valid_date():
while True:
prompt = 'Enter the date in ISO format (-MM-DD), or 0 to exit: '
date =
Does the partial just do a lambda in the background? It's a neat
example, thanks! I've never seen this used before. Sorry if reply is
top-posted or otherwise weird, posting from mobile.
On 11/20/09, Lie Ryan lie.1...@gmail.com wrote:
lau...@protopc.com wrote:
John,
Thank you so much for your
Eric Pavey wrote:
On Fri, Nov 20, 2009 at 4:09 AM, Kent Johnson ken...@tds.net wrote:
On Thu, Nov 19, 2009 at 9:31 PM, Eric Pavey warp...@gmail.com wrote:
Say I have this package layout
\myPackage
__init__.py
moduleA.py
moduleB.py
Is there a way (and I'm sure there is...) to query,
On Fri, Nov 20, 2009 at 10:40 AM, Dave Angel da...@ieee.org wrote:
Eric Pavey wrote:
On Fri, Nov 20, 2009 at 4:09 AM, Kent Johnson ken...@tds.net wrote:
On Thu, Nov 19, 2009 at 9:31 PM, Eric Pavey warp...@gmail.com wrote:
Say I have this package layout
\myPackage
__init__.py
On Fri, Nov 20, 2009 at 10:58 AM, Eric Pavey warp...@gmail.com wrote:
On Fri, Nov 20, 2009 at 10:40 AM, Dave Angel da...@ieee.org wrote:
Eric Pavey wrote:
On Fri, Nov 20, 2009 at 4:09 AM, Kent Johnson ken...@tds.net wrote:
On Thu, Nov 19, 2009 at 9:31 PM, Eric Pavey warp...@gmail.com
Eric Pavey wrote:
On Fri, Nov 20, 2009 at 11:14 AM, Eric Pavey warp...@gmail.com wrote:
On Fri, Nov 20, 2009 at 10:58 AM, Eric Pavey warp...@gmail.com wrote:
On Fri, Nov 20, 2009 at 10:40 AM, Dave Angel da...@ieee.org wrote:
snip
lol, in usual fashion, after I hack through
ok, all i know is that i have python installed on my computer(mac),
and i know how to open up IDLE, how do i write my first program,
what do i use , how do i open that, and how to i save it as a prograam?
___
Tutor maillist - Tutor@python.org
To
On Fri, Nov 20, 2009 at 3:05 PM, Dave Angel da...@ieee.org wrote:
Eric Pavey wrote:
lol, in usual fashion, after I hack through it, while in the docs, I find
the 'fancy' solution:
import pkgutil
import myPackage
modules = pkgutil.iter_modules(myPackage.__path__)
for p in modules:
Quick introduction, I'm Joseph Fennell, and I've been playing with python
for the past 6 years (primarily in the interpreter) and have finally gotten
started on a full project and I've run into a small problem. I have defined
some modules, and when I import them into the page I want to use them
On Fri, Nov 20, 2009 at 1:42 PM, mark guinder mgsharky...@aim.com wrote:
ok, all i know is that i have python installed on my computer(mac), and i
know how to open up IDLE, how do i write my first program, what do i use ,
how do i open that, and how to i save it as a prograam?
Try taking a
On Fri, Nov 20, 2009 at 2:51 PM, Joseph Fennell josephfennells...@gmail.com
wrote:
Quick introduction, I'm Joseph Fennell, and I've been playing with python
for the past 6 years (primarily in the interpreter) and have finally gotten
started on a full project and I've run into a small
On Fri, Nov 20, 2009 at 12:28 PM, Kent Johnson ken...@tds.net wrote:
On Fri, Nov 20, 2009 at 3:05 PM, Dave Angel da...@ieee.org wrote:
Eric Pavey wrote:
lol, in usual fashion, after I hack through it, while in the docs, I
find
the 'fancy' solution:
import pkgutil
import myPackage
On Friday 20 November 2009 09:48:38 am Alan Gauld wrote:
John jfabi...@yolo.com wrote
class A (wx.Panel);
def__init__(...)
class B(wx.PyPanel):
def __init__(..):
self.pages = A(...)
class C (B)
def __init__(...)
I can't change the code in either class A or class
Stephen Nelson-Smith wrote:
I have the following method:
def get_log_dates(the_date_we_want_data_for):
t = time.strptime(the_date_we_want_data_for, '%Y%m%d')
t2 = datetime.datetime(*t[:-2])
extra_day = datetime.timedelta(days=1)
t3 = t2 + extra_day
next_log_date =
mark guinder mgsharky...@aim.com wrote
ok, all i know is that i have python installed on my computer(mac),
and i know how to open up IDLE, how do i write my first program,
what do i use , how do i open that, and how to i save it as a prograam?
That's slightly more than I assume for
Joseph Fennell josephfennells...@gmail.com wrote
I assume that it's because the variable is considered local and the
imported
functions are not technically local to that document.
global in Python means in the same module not global across all modules
You are best to pass data into
On Fri, Nov 20, 2009 at 4:44 PM, Joseph Fennell josephfennells...@gmail.com
wrote:
My apologies yes these are in seperate files,
--
main.py
---
cHandler.execute(SELECT * FROM table)
#sets results from above to nl
nl = cHandler.fetchall()
dn = raw_input(User
39 matches
Mail list logo