|
by: Paul Rubin |
last post by:
That's what the Python style guides advise. They don't seem to like
def frob(x):
import re
if re.search('sdfxyz', x): ...
instead preferring that you pollute your module's global namespace
with the names of all your imports. What's the point of that? It
gets worse when you want to do something like
|
by: Pekka Niiranen |
last post by:
Hi there,
I have two scripts. The first "main.py" sets some variables
and then imports another called "gen.py". The idea is to
provide "main.py" that defines some paths, variables etc.
without using Windows environment variables. Various other "hackers"
will make additional Python scripts (subroutines) like "gen.py"
that utilize variables...
|
by: D. Shane Fowlkes |
last post by:
Tw part question:
1 - Is it <% @Import Namespace..... or <%@ Import Namespace... ? I'm seeing
it both ways in a book (but I think one is a typo. My pages don't seem to
care which it is. Or do they?....see below
2 - I'm trying to import the namespaces of System.Data and
System.Data.SQLClient in the global.asax file so I don't have to do...
|
by: Shapper |
last post by:
Hello,
In the main root of my web site together with my aspx and aspx.vb files
I have the file global.vb.
This file has a class with all the functions which are used in many
aspx.vb files and it is like this:
Imports System
Namespace Global
|
by: Carmit |
last post by:
Hi,
I'm trying to build a proxy for this webservice:
http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/EndTransactionLLSRQ.wsdl
I'm getting the following error:
Error: Unable to import binding 'EndTransactionSoapBinding' from namespace 'http
s://webservices.sabre.com/websvc'.
|
|
by: didier.doussaud |
last post by:
I have a stange side effect in my project :
in my project I need to write "gobal" to use global symbol :
....
import math
....
def f() :
global math # necessary ?????? else next line generate an error
message ?????
|
by: Shane Hathaway |
last post by:
Here's a heretical idea.
I'd like a way to import modules at the point where I need the
functionality, rather than remember to import ahead of time. This might
eliminate a step in my coding process. Currently, my process is I
change code and later scan my changes to make matching changes to the
import statements. The scan step is error...
|
by: Martin Unsal |
last post by:
I'm using Python for what is becoming a sizeable project and I'm
already running into problems organizing code and importing packages.
I feel like the Python package system, in particular the isomorphism
between filesystem and namespace, doesn't seem very well suited for
big projects. However, I might not really understand the Pythonic way....
|
by: Stef Mientki |
last post by:
This might be a very weird construction,
but it's the most easy way in translating another language into Python (for simulation).
Although it works, I like to know if this a valid construction:
I've defined a class, like this,
attaching a not yet defined global to itself
class T6963_device (tDevice):
def __init__ (self):
|
by: Peter Teuben |
last post by:
if I define a simple string code, with the following contents:
import math
def foo(x):
return math.sqrt(x)
and i run it using exec(code) in python, math is not known. But when I
recode the string as:
def foo(x):
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|