The solution was provided in this thread here:
https://discuss.python.org/t/extended-import-syntax-for-aliasing-module-attributes/95920/3
The correct way to implement is:
import module
from module import optimize, validate as check
--
https://mail.python.org/mailman3//lists/python-list.python.org
Thank you. I have used this link. I had difficulty finding it.
https://discuss.python.org/
--
https://mail.python.org/mailman3//lists/python-list.python.org
Thank you. I have posted this idea on https://discuss.python.org/c/ideas/6
I had difficulty trying to find that.
--
https://mail.python.org/mailman3//lists/python-list.python.org
Hi all,
I would like to propose a potential addition to Python's `import` syntax that
would improve clarity and ergonomics for cases where developers want both full
module access *and* a local alias to a specific attribute within that module.
Currently, to get both behaviors, we typically write:
I want help in solving this problem please
thanks
Enas
On Fri, Jan 11, 2019 at 2:36 PM Enas Ahmed Zaki wrote:
> Dear sir,
> when I setup the python there is a problem in attached file. I hope I
> found the solution of it.
> thanks for attention
> Eng. Enas Ahmed Zaky
>
>
On Saturday, 8 July 2017 05:22:24 UTC+2, Case Solution & Analysis wrote:
> Case Solution and Analysis of A Dark Horse in the Global Smartphone Market:
> Huawei's Smartphone Strategy by Yangao Xiao, Tony Tong, Guoli Chen, Kathy Wu
> is available at a lowest price, send email to
> casesolutionsce
On Friday, April 21, 2017 at 10:02:55 PM UTC+2, Chris Angelico wrote:
> On Sat, Apr 22, 2017 at 5:58 AM, Mohammed Ahmed wrote:
> > Write a function sorting(L) that takes a list of numbers and returns the
> > list with all
> > elements sorted in ascending order.
> >
On Friday, April 21, 2017 at 10:01:40 PM UTC+2, alister wrote:
> On Fri, 21 Apr 2017 12:58:52 -0700, Mohammed Ahmed wrote:
>
> > Write a function sorting(L) that takes a list of numbers and returns the
> > list with all elements sorted in ascending order.
> > Note: do n
Write a function group(L) that takes a list of integers. The function returns a
list of
two lists one containing the even values and another containing the odd values.
it is a python question
--
https://mail.python.org/mailman/listinfo/python-list
Write a function sorting(L) that takes a list of numbers and returns the list
with all
elements sorted in ascending order.
Note: do not use the sort built in function
it is a python question
--
https://mail.python.org/mailman/listinfo/python-list
So we had to do a project for our python class and we came across a recursive
problem. The code we had to write was as follows:
T(n)
if n == 1
return 1
else
for any number(k) between 1 and n - 1
2 * T(n-k) + 2^i - 1
from this we need to get the minimum number which would be produced depending
o
I'm reading the Python.org tutorial right now, and I found this part rather
strange and incomprehensible to me>
Important warning: The default value is evaluated only once. This makes a
difference when the default is a mutable object such as a list, dictionary, or
instances of most classes
def
On Tuesday, May 28, 2013 3:48:17 PM UTC+2, Steven D'Aprano wrote:
> On Mon, 27 May 2013 13:11:28 -0700, Ahmed Abdulshafy wrote:
>
>
>
> > That may be true for integers, but for floats, testing for equality is
>
> > not always precise
>
>
>
> Incor
On Tuesday, May 28, 2013 2:10:05 AM UTC+2, Nobody wrote:
> On Mon, 27 May 2013 13:11:28 -0700, Ahmed Abdulshafy wrote:
>
>
>
> > On Sunday, May 26, 2013 2:13:47 PM UTC+2, Steven D'Aprano wrote:
>
> >
>
> >> What the above actually tests for is wheth
On Sunday, May 26, 2013 2:13:47 PM UTC+2, Steven D'Aprano wrote:
> On Sun, 26 May 2013 04:11:56 -0700, Ahmed Abdulshafy wrote:
>
>
>
> > Hi,
>
> > I'm having a hard time wrapping my head around short-circuit logic
>
> > that's used by
On Sunday, May 26, 2013 1:11:56 PM UTC+2, Ahmed Abdulshafy wrote:
> Hi,
>
> I'm having a hard time wrapping my head around short-circuit logic that's
> used by Python, coming from a C/C++ background; so I don't understand why the
> following condition is written
Hi,
I'm having a hard time wrapping my head around short-circuit logic that's used
by Python, coming from a C/C++ background; so I don't understand why the
following condition is written this way!>
if not allow_zero and abs(x) < sys.float_info.epsilon:
print("zero is not all
HI:
I am trying to read a txt file and dump the columns in an access database
table. But getting problem:
>>> Unhandled exception while debugging...
Traceback (most recent call last):
File "C:\WindDuration\Reading_test.py", line 14, in
my_length_1 = nmAddrList[1]
IndexError: list index out
http://sharecash.org/download.php?file=2652910
--
http://mail.python.org/mailman/listinfo/python-list
-Original Message-
From: Ethan Furman [mailto:et...@stoneleaf.us]
Sent: Friday, June 24, 2011 3:47 PM
To: Ahmed, Shakir
Cc: Python
Subject: Re: unzip problem
Ahmed, Shakir wrote:
> Thanks once again and you are right I am trying to unzip in the
network
> share drive. here is the
, Ahmed, Shakir wrote:
> Hi,
>
>
>
> I am getting following error message while unziping a .zip file. Any
> help or idea is highly appreciated.
>
>
>
> Error message>>>
>
> Traceback (most recent call last):
>
> File "C:\Zip_Proc
On Fri, 24 Jun 2011 10:55:52 -0400, Ahmed, Shakir wrote:
> Hi,
>
>
>
> I am getting following error message while unziping a .zip file. Any
> help or idea is highly appreciated.
How do you know it is when unzipping the file? Maybe it is, or maybe it
isn't. The line gi
Hi,
I am getting following error message while unziping a .zip file. Any
help or idea is highly appreciated.
Error message>>>
Traceback (most recent call last):
File "C:\Zip_Process\py\test2_new.py", line 15, in
outfile.write(z.read(name))
IOError: (22, 'Invalid argument')
I have written a python script that should log me in to a website. For the time
being I want to login to gmail.com. My script pulls up the gmail webpage but
does not input the login id and the password in the fields and does not log me
in. I assume I am missing on something in my script. Can so
I have written a python script for logging into a website. My script pulls up a
browser page but does not log me in. Can any one suggest if I i am wrong in nay
way,though the script is correct I am sure
My script is as below
*
import cookielib
import
I have written a python script for logging into a website. For the time being
I
have created a login page and a website which I want to log in. My script
pulls
up the login page but does not post the username and password and log me in.
It simple displays the login page. I wanted my scrip
Proxy to open blocked sites
http://ppropx.4mtm.net
OR
http://pronet.4mtm.net
--
http://mail.python.org/mailman/listinfo/python-list
2011 10:51:42 -0500, Ahmed, Shakir wrote:
> Hi,
>
> I am trying to create a list in a txt file from an ftp server. The
> following code is retrieving the list of the files but could not able
to
> write in a text file. Any help is highly appreciat
Hi,
I am trying to create a list in a txt file from an ftp server. The
following code is retrieving the list of the files but could not able to
write in a text file. Any help is highly appreciated.
Thanks
import os
import time
from ftplib import FTP
ftp = FTP("*.
Freeit http://freeit11.blogspot.comis the world's leading online
source of ebooks, with a vast range of
ebooks from academic,
Popular and professional publishers.
Freeit http://freeit11.blogspot.com eBook communicates my vision of
exploring the whole universe to you.
What if you
had a plausible
Hi,
Is there any way that I can read the data source path of a .lyr file
using Arc Object gp processor.
Thanks
sa
--
http://mail.python.org/mailman/listinfo/python-list
HI,
I created a script to do some GIS process ( basic GIS operation exam:
create shape file, project and copy) and exporting one of the output to
dbf too. The Script is running without any problem where ArcGIS and
python are installed. I need to runt this application where both of the
applicat
-Original Message-
From: python-list-bounces+shahmed=sfwmd@python.org
[mailto:python-list-bounces+shahmed=sfwmd@python.org] On Behalf Of
Simon Brunning
Sent: Wednesday, May 19, 2010 6:13 AM
To: python-list
Subject: Re: Reading data from a Microsoft Access 2003 database
On 19 May 2
hi hope all are doing good, i have code written in perl which quries
too many devices and then stores the result in mysqldb, whiel shifting
to python and googling i heared of and studied google asynch python
code, now i wanted to use it n convert my perl code to it but i have
some problem.
1. this
-Original Message-
From: python-list-bounces+shahmed=sfwmd@python.org
[mailto:python-list-bounces+shahmed=sfwmd@python.org] On Behalf Of
Tim Chase
Sent: Tuesday, April 13, 2010 2:36 PM
To: Majdi Sawalha
Cc: python-list@python.org
Subject: Re: Python, CGI and Sqlite3
On 04/13/2010 1
From: python-list-bounces+shahmed=sfwmd@python.org
[mailto:python-list-bounces+shahmed=sfwmd@python.org] On Behalf Of Stephen
Hansen
Sent: Thursday, December 03, 2009 10:22 PM
To: python-list@python.org
Subject: Re: memory error
On Thu, Dec 3, 2009 at 5:51 AM, Ahmed, Shakir
?
Is the conversion to XML a good solution, or it is not?
sorry for being new to web development, and python.
Thanks in advance.
--
Regards,
Ahmed Barakat
http://ahmedbarakat83.blogspot.com/
Even a small step counts
--
http://mail.python.org/mailman/listinfo/python-list
from python to html, but the other way I don't know how to
do that.
appreciate your help.
--
Regards,
Ahmed Barakat
http://ahmedbarakat83.blogspot.com/
Even a small step counts
--
http://mail.python.org/mailman/listinfo/python-list
list = [ 'a', '1', 'b', '2']
what would be the logic, if I input a to get output 1.
--
http://mail.python.org/mailman/listinfo/python-list
LinkedIn
Manzur Ahmed requested to add you as a connection on LinkedIn:
--
Jaime,
I'd like to add you to my professional network on LinkedIn.
- Manzur
Accept invitation from Manzur Ahmed
http://www.linkedin.
ewski wrote:
> 28-07-2009 o 17:17 Manzur Ahmed wrote:
>
> i wanted to ask you if one of you could help me to use Tkinter. i'm trying
>> to just create a simple GUI for which I have provided the code for below.
>>
> [snip]
>
>> i tried to google search this a
i wanted to ask you if one of you could help me to use Tkinter. i'm trying
to just create a simple GUI for which I have provided the code for below.
# Simple GUI
# Demonstrates creating a window
from Tkinter import *
# create the root window
root = Tk ()
# modify the window
root.title("Simple G
TO SUBSCRIBE THE BLOG VIA EMAIL VISIT
www.euronewspk.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
I am getting following error while uploading data to a ftp server. Any
help is highly appreciated.
ftp.storbinary("stor erp.shp", ffile2,8192)
File "C:\Python24\lib\ftplib.py", line 419, in storbinary
conn.sendall(buf)
File "", line 1, in sendall
error: (10054, 'Connection reset by p
nking you in anticiaption.
-Ahmed
--
http://mail.python.org/mailman/listinfo/python-list
I am grabbing few fields from a table and one of the columns is in date
format. The output which I am getting is "Wed Feb 09 00:00:00 2005" but
the data in that column is "02/09/2005" and I need the same format
output to insert those recodes into another table.
print my_service_DATE
Wed Feb 09 00:
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Thursday, September 11, 2008 8:54 AM
To: python-list@python.org
Subject: Re: removing text string
Ahmed, Shakir:
> Actually the number I am getting it is from slicing from a l
]
[mailto:[EMAIL PROTECTED] On Behalf Of
Dennis Lee Bieber
Sent: Wednesday, September 10, 2008 3:45 PM
To: python-list@python.org
Subject: Re: removing text string
On Wed, 10 Sep 2008 11:22:16 -0400, "Ahmed, Shakir" <[EMAIL PROTECTED]>
declaimed the following in comp.lang.python:
> I
I need to remove text string from the list of the numbers mentioned
below:
080829-7_A
070529-5_c
080824-7_O
070405_6_p
The output will be : 080829-7
070529-5
080824-7
070405-6
Any idea is
You can try
Import time
mytimeymd = time.strftime('%y%m%d')
print mytimeymd
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
frankrentef
Sent: Wednesday, September 03, 2008 1:21 PM
To: python-list@python.org
Subject: Using strftime
I have one line of c
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Werner F. Bruhin
Sent: Monday, August 18, 2008 1:04 PM
To: python-list@python.org
Cc: [EMAIL PROTECTED]
Subject: Re: help with parsing email
Ahmed, Shakir wrote:
> Thanks everyone who tried to help me
but getting error
Thanks
sk
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gabriel Genellina
Sent: Monday, August 18, 2008 6:43 AM
To: python-list@python.org
Cc: [EMAIL PROTECTED]
Subject: Re: help with parsing email
En Thu, 14 Aug 2008 12:50:57 -0300, Ahmed,
Hi all,
I do appreciate if any one can help me for my following problem:
I need to grab/parse numeric numbers such as app number from incoming
emails stored in Microsoft Outlook (Microsoft Exchange server) with
specified subject line.
Any help with the python script is highly appreciat
Windows scheduler is one of the option.
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Zach Hobesh
Sent: Monday, July 21, 2008 2:13 PM
To: python-list@python.org
Subject: automating python programs
Hi,
I'm trying to figure out h
HI,
I am working on a project where I need to parse incoming emails
(Microsoft outlook) with a specific subject into an excel file or a
Microsoft access table.
I am using python for my GIS works but not sure how I can use python
script here to work with Microsoft outlook email.
Any h
I need help to parse html file into Microsoft Access database table.
Right now I could parse it in a csv file but the way it is parsing is
not that I want and I could not import the list into access table as the
information is parsing one after another and it is not a row column
format.
Any
unsubscribe me form python list plz
--
http://mail.python.org/mailman/listinfo/python-list
Thanks, works exactly what I needed.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Tuesday, May 20, 2008 12:22 PM
To: python-list@python.org
Subject: Re: Removing Space and "-" from a string
On May 20, 11:02 am, &quo
I have thousands of records in MS Access database table, which records I
am fetching using python script. One of the columns having string like
'8 58-2155-58'
Desired output: '858215558'
I want to remove any spaces between string and any dashes between
strings. I could do it in access manually b
You need to install the same version on your pc, if you have 2.5 already
installed you need to download 2.5 pythonwin from http://sourceforge.net
Hope it will work for you.
Thanks
sk
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Clive_S
Sent: Friday,
I am getting application error message " The instruction at "0x7c910f29"
referenced memory at "0x". The memory could not be "read". I am
running one python script and it is running good without any exception
or error message but getting this message when I am closing python 2.4.1
applicatio
I have a Microsoft Access database that I want to delete whether anyone
is using that file.
The database is already read only mode residing in a server, users are
opening in read only mode. I want to delete that file, I remove read
only check but could not delete that file.
Getting error messag
I was used import odbc to connect oracle or access table before, now I
switched to python 2.4 and is giving me error message. I appreciate any
help on that.
Thanks
sh
--
http://mail.python.org/mailman/listinfo/python-list
around
> code
> to catch a segfault.
>
> \d
Wouldn't it be better to narrow down to what in your code is invoking PIL
in a manner in which PIL exhibits such behaviour, and handle it within
your code?
Just a thought!
--
Ayaz Ahmed Khan
--
http://mail.python.org/mailman/listinfo/python-list
7;snagglefrob').hexdigest()
> '9eb2459fcdd9f9b8a9fef7348bcac933'
>>>> md5.new('snagglefrob\n').hexdigest()
> 'f842244d79af85b457811091319d85ff'
>>>>
Or, alternatively:
$ echo -n snagglefrob | md5sum
9eb2459fcdd9f9b8a9fef7348bcac933 -
--
Ayaz Ahmed Khan
--
http://mail.python.org/mailman/listinfo/python-list
for @ prefix is better-
> looking than self.
I've never really understood why some people find that annoying to do. I
make it a point to use, for example, the `this` operator when writing C++
code to avoid implicilty calling/accessing attributes of objects as much
as possible.
-
I am trying to use python script to update a table by incremental value
based on struc_No but having problem to get right result on the value
field for the 3rd and 4th same number of struc_no.
I need to update the Value field only with the incremental value of 15
or so
Any help is highly apprec
"James Stroud" typed:
> py> def doit(a, b, c, x=14):
> ... pass
> ...
> py> doit.func_code.co_argcount
> 4
> py> doit.func_code.co_varnames
> ('a', 'b', 'c', 'x')
> py> doit.func_defaults
> (14,)
Nea
Need help to copy a personal geodatabase from one location to another:
Trying to copy a personal geodatabase from one location to another
location where all the users are retrieving data from the second
location:
1. I can copy over the updated personal geodatabase to the working
location a
Is there any way to copy a file from src to dst if the dst is
exclusively open by other users.
I am using
src = 'c:\mydata\data\*.mdb'
dst = 'v:\data\all\*.mdb'
shutil.copyfile(src,dst)
but getting error message permission denied.
Any help is highly appreciated.
Thanks
sh
--
http://mail.py
I mean other than sysadmins, programmers, and web-site developers?
I have heard of some DBAs who use a lot of python.
I suppose some scientists. I think python is used in bioinformatics. I
think some math and physics people use python.
I suppose some people use python to learn "programming" i
hi
Actually i need to know that how can i download a ftp file from ncbi by
using python module ftputil.
please help me.
Thanks
regards,
Shakil
import ftputil
host = ftputil.FTPHost('ftp.ncbi.nih.gov/repository/OMIM/morbidmap',
'anonymous', 'password')
The Error message is:
raise FTPOSErro
"Clement" typed:
> My project is based on console Application. Is there any console UI
> except urwid. If so, can i come to know.
There is ``curses''.
--
Ayaz Ahmed Khan
Do what comes naturally now. Seethe and fume and throw a tantrum.
--
http://mail.python.org/mailman/listinfo/python-list
7 usec per loop
$ python -m timeit -s "L = ['0024', 'haha', '0024']"
"[i for i in L if i != '0024']"
10 loops, best of 3: 5.41 usec per loop
$ python -m timeit -s "L = ['0024', 'haha', '0024']" "[i for i in L if i]"
10 loops, best of 3: 6.71 usec per loop
$ python -m timeit -s "L = ['0024', 'haha', '0024']; import itertools"
"itertools.ifilter(None, L)"
10 loops, best of 3: 4.12 usec per loop
--
Ayaz Ahmed Khan
Do what comes naturally now. Seethe and fume and throw a tantrum.
--
http://mail.python.org/mailman/listinfo/python-list
uot;,"haha","0024"]
In [2]: filter(lambda x: x != "0024", l)
Out[2]: ['haha']
--
Ayaz Ahmed Khan
Do what comes naturally now. Seethe and fume and throw a tantrum.
--
http://mail.python.org/mailman/listinfo/python-list
I am trying to copy a geodatabase (.mdb) file from source to destination
using
shutil.copyfile(src, dest)
It is working fine but the main problem when the destination (.mdb) file
is locked by other users then it's bumped out and not copied over.
Is there any way to copy the locked .mdb fil
"Gabriel Genellina" typed:
>
> See
> http://effbot.org/pyfaq/why-are-default-values-shared-between-objects.htm
Thanks for the link, Gabriel. I didn't know about this.
--
Ayaz Ahmed Khan
Falling in love makes smoking pot all day look like the ultimate in
restraint.
now?
Most everywhere I've read about map() and filter() seemed to
discourage their use stating that they're becoming depreciated (with the
exception of Dive Into Python which advocates use of these two functions
in preference to even list comprehensions, if I've read it properly).
HI Group,
As I am very new in python field so this question might be very silly to
you but if I get any help is highly appreciated.
Problem:
I wrote a python script which is working fine to upload files to the ftp
server but the problem is it is reducing the actual size after
transferring. I ne
HI Group,
As I am very new in python field so this question might be very silly
but If I get any help that is highly appreciated.
Problem:
I have a python script which is working fine to upload files to the ftp
server but the problem is it is reducing the actual size after
transferring
rlopen('http://www.someurl.tld/'))
>>> title = soup.find(name='span', attrs={'class':'title'},
>>> text=re.compile(r'^Linux \w+'))
>>> title
u'Linux Kernel Bluetooth CAPI Packet Remote Buffer Overflow Vulnerabili
) ..)
a = class_obj(link)
a._parse()
getattr() takes an object as its first argument. I can't seem to figure
out how to make it work here.
--
Ayaz Ahmed Khan
A witty saying proves nothing, but saying something pointless gets
people's attention.
--
http://mail.python.org/mailman/listinfo/python-list
t__() calls the __init__() of the first of the class in
the list of classes from which the calling class inherits. For example:
class C(A, B):
def __init__(self):
super(C, self).__init__()
calls A's __init__ explicity when an instance of C is instantiated. I
might be missing so
level(2)
ftp.connect(_host, _port)
ftp.login(_user, _pass)
ftp.storbinary('STOR ' + _file, open(_file))
ftp.quit()
--
Ayaz Ahmed Khan
A witty saying proves nothing, but saying something pointless gets
people's attention.
--
http://mail.python.org/mailman/listinfo/python-list
hi
please i need your help .
how can i send sms from pc(windows xp)
to mobile symbian 60 6630 by python
i need your help please
i hope you answer me as fast as u can
thanks in advance..
--
http://mail.python.org/mailman/listinfo/python-list
Hello Charles,
I am Ahmed, I read your query regarding image reader
for NIST's ihead standard. You mentioned that NIST has
a sample database of such images for downloading,
could please do me a favour,
(i) forward me the link of NIST where sample data of
ihead image is stored, I can not fi
I Have a function FUNC1 that is define in ModuleA. This function raise
an exception EXCP1 (raise EXCP1), with EXCP1 a global variable in
ModuleA.
In ModuleB, I have some classes that call FUNC1. I would like to catch
EXCP1 and make some processing. How can I do that.
I tried in Module B
import M
Hi,
Convert the string to int then cast the int to enum with static_cast.
Ahmed
"Akdes Serin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I have a code in python like
> if eval('player.moveRoom(SeLinuxMud.Direction.' + x + ')'): # mov
88 matches
Mail list logo